diff --git a/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c b/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c index 7a213d1a24..6e482a66d2 100644 --- a/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c +++ b/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c @@ -75,9 +75,9 @@ RTCDriver RTCD1; * @notapi */ static void rtc_enter_init(void) { - + int counter = 0; RTCD1.rtc->ISR |= RTC_ISR_INIT; - while ((RTCD1.rtc->ISR & RTC_ISR_INITF) == 0) + while ((RTCD1.rtc->ISR & RTC_ISR_INITF) == 0 && ++counter