fix RTC with HSE initialisation

This commit is contained in:
King Kévin 2018-10-29 14:09:01 +01:00
parent 4dbf6df59f
commit 4b531542dc
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ void main(void)
printf("setup internal RTC: ");
#if defined(BLUE_PILL) // for boards without a Low Speed External oscillator
// /!\ WARNING the blue pill LSE oscillator is affected when toggling the onboard LED, thus prefer the HSE
rtc_auto_awake(RCC_LSE, 8000000 / 128 - 1); // use High Speed External oscillator (8 MHz / 128) as RTC clock (VBAT can't be used to keep the RTC running)
rtc_auto_awake(RCC_HSE, 8000000 / 128 - 1); // use High Speed External oscillator (8 MHz / 128) as RTC clock (VBAT can't be used to keep the RTC running)
#else // for boards with an precise Low Speed External oscillator
rtc_auto_awake(RCC_LSE, 32768 - 1); // ensure internal RTC is on, uses the 32.678 kHz LSE, and the prescale is set to our tick speed, else update backup registers accordingly (power off the micro-controller for the change to take effect)
#endif