From 3a26233b8fbdafcb4cfecf14c87df0815cec380a Mon Sep 17 00:00:00 2001 From: Andrey Tolstoy Date: Tue, 14 Sep 2021 03:35:48 +0700 Subject: [PATCH] minor --- hal/src/stm32f2xx/rtc_hal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hal/src/stm32f2xx/rtc_hal.c b/hal/src/stm32f2xx/rtc_hal.c index 0a4bdae48a..5e33a3fa33 100644 --- a/hal/src/stm32f2xx/rtc_hal.c +++ b/hal/src/stm32f2xx/rtc_hal.c @@ -214,6 +214,7 @@ static bool hal_rtc_enable_lse() { static bool hal_rtc_switch_clock_source(uint32_t source) { +#if HAL_PLATFORM_INTERNAL_LOW_SPEED_CLOCK if ((RCC->BDCR & RTC_CLOCK_SOURCE_MASK) != (source & RTC_CLOCK_SOURCE_MASK) && (RCC->BDCR & RTC_CLOCK_SOURCE_MASK) != 0x000) { // Unforunately the only way to reconfigure clock source is to reset @@ -256,6 +257,7 @@ static bool hal_rtc_switch_clock_source(uint32_t source) HAL_enable_irq(state); } else +#endif // HAL_PLATFORM_INTERNAL_LOW_SPEED_CLOCK { if (source == RCC_RTCCLKSource_LSE) { if (!hal_rtc_enable_lse()) {