Merge branch 'master' of bitbucket.org:nuttx/nuttx
This commit is contained in:
commit
d6a3aab0b4
|
@ -379,12 +379,11 @@ int up_rtc_initialize(void)
|
||||||
|
|
||||||
stm32_pwr_enablebkp(true);
|
stm32_pwr_enablebkp(true);
|
||||||
|
|
||||||
/* Set access to the peripheral, enable the backup domain (BKP) and the lower
|
/* Select the lower power external 32,768Hz (Low-Speed External, LSE) oscillator
|
||||||
* power external 32,768Hz (Low-Speed External, LSE) oscillator. Configure the
|
* as RTC Clock Source and enable the Clock */
|
||||||
* LSE to drive the RTC.
|
|
||||||
*/
|
|
||||||
|
|
||||||
stm32_rcc_enablelse();
|
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
|
/* TODO: Get state from this function, if everything is
|
||||||
* okay and whether it is already enabled (if it was disabled
|
* okay and whether it is already enabled (if it was disabled
|
||||||
|
|
|
@ -756,12 +756,6 @@ static void stm32_stdclockconfig(void)
|
||||||
|
|
||||||
stm32_rcc_enablelsi();
|
stm32_rcc_enablelsi();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_RTC_LSECLOCK)
|
|
||||||
/* Low speed external clock source LSE */
|
|
||||||
|
|
||||||
stm32_rcc_enablelse();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -774,6 +768,14 @@ static inline void rcc_enableperipherals(void)
|
||||||
rcc_enableahb();
|
rcc_enableahb();
|
||||||
rcc_enableapb2();
|
rcc_enableapb2();
|
||||||
rcc_enableapb1();
|
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