Merge branch 'master' of bitbucket.org:nuttx/nuttx
This commit is contained in:
commit
d6a3aab0b4
|
@ -378,13 +378,12 @@ int up_rtc_initialize(void)
|
|||
*/
|
||||
|
||||
stm32_pwr_enablebkp(true);
|
||||
|
||||
/* Set access to the peripheral, enable the backup domain (BKP) and the lower
|
||||
* power external 32,768Hz (Low-Speed External, LSE) oscillator. Configure the
|
||||
* LSE to drive the RTC.
|
||||
*/
|
||||
|
||||
stm32_rcc_enablelse();
|
||||
|
||||
/* Select the lower power external 32,768Hz (Low-Speed External, LSE) oscillator
|
||||
* as RTC Clock Source and enable the Clock */
|
||||
|
||||
modifyreg16(STM32_RCC_BDCR, RCC_BDCR_RTCSEL_MASK, RCC_BDCR_RTCSEL_LSE);
|
||||
modifyreg16(STM32_RCC_BDCR, 0, RCC_BDCR_RTCEN);
|
||||
|
||||
/* TODO: Get state from this function, if everything is
|
||||
* okay and whether it is already enabled (if it was disabled
|
||||
|
|
|
@ -756,12 +756,6 @@ static void stm32_stdclockconfig(void)
|
|||
|
||||
stm32_rcc_enablelsi();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTC_LSECLOCK)
|
||||
/* Low speed external clock source LSE */
|
||||
|
||||
stm32_rcc_enablelse();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -774,6 +768,14 @@ static inline void rcc_enableperipherals(void)
|
|||
rcc_enableahb();
|
||||
rcc_enableapb2();
|
||||
rcc_enableapb1();
|
||||
|
||||
#if defined(CONFIG_RTC_LSECLOCK)
|
||||
/* Low speed external clock source LSE
|
||||
* For F1 it requires PWR and BKP from APB1
|
||||
*/
|
||||
|
||||
stm32_rcc_enablelse();
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in New Issue