From 4b531542dc0e483b5edcc60c134919dbdc9a3746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 29 Oct 2018 14:09:01 +0100 Subject: [PATCH] fix RTC with HSE initialisation --- application.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.c b/application.c index cb388b1..e0c51fe 100644 --- a/application.c +++ b/application.c @@ -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