diff --git a/os/hal/platforms/STM32/rtc_lld.c b/os/hal/platforms/STM32/rtc_lld.c index ce483d3f9..3f8468bae 100644 --- a/os/hal/platforms/STM32/rtc_lld.c +++ b/os/hal/platforms/STM32/rtc_lld.c @@ -245,6 +245,11 @@ void rtc_lld_set_alarm(uint32_t tv_alarm){ while(!(RTC->CRL & RTC_CRL_RTOFF)) /* wait for completion */ ; + +#if !(RTC_SUPPORTS_CALLBACKS) + RTC->CRL &= ~RTC_CRL_ALRF; + RTC->CRH |= RTC_CRH_ALRIE; +#endif /* !(RTC_SUPPORTS_CALLBACKS) */ } /**