juniskane commented on a change in pull request #2943: URL: https://github.com/apache/incubator-nuttx/pull/2943#discussion_r586213160
########## File path: arch/arm/src/stm32f7/stm32_lse.c ########## @@ -100,27 +118,55 @@ void stm32_rcc_enablelse(void) regval |= RCC_BDCR_LSEON; #ifdef CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY - /* Set start-up drive capability for LSE oscillator. */ + /* Set start-up drive capability for LSE oscillator. With the + * enable on. + */ - regval &= ~RCC_BDCR_LSEDRV_MASK; - regval |= CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY << - RCC_BDCR_LSEDRV_SHIFT; + regval &= ~(RCC_BDCR_LSEDRV_MASK); + regval |= drives[CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY]; Review comment: Suppose CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY is 1 aka MEDHI, but now drives[1] is MEDLO, so selects wrong capability! Stupid ST silicon designer borked the values used here. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org