aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/RTCv1
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32/RTCv1')
-rw-r--r--os/hal/platforms/STM32/RTCv1/rtc_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/RTCv1/rtc_lld.c b/os/hal/platforms/STM32/RTCv1/rtc_lld.c
index 811920e06..4344f17bb 100644
--- a/os/hal/platforms/STM32/RTCv1/rtc_lld.c
+++ b/os/hal/platforms/STM32/RTCv1/rtc_lld.c
@@ -101,6 +101,10 @@ CH_IRQ_HANDLER(RTC_IRQHandler) {
CH_IRQ_PROLOGUE();
+ /* This wait works only when AHB1 bus was previously powered off by any
+ reason (standby, reset, etc). In other cases it does nothing.*/
+ rtc_lld_apb1_sync();
+
/* Mask of all enabled and pending sources.*/
flags = RTC->CRH & RTC->CRL;
RTC->CRL &= ~(RTC_CRL_SECF | RTC_CRL_ALRF | RTC_CRL_OWF);