diff options
Diffstat (limited to 'os/hal/platforms/STM32/rtc_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/rtc_lld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/rtc_lld.c b/os/hal/platforms/STM32/rtc_lld.c index ba89a3c9e..1ddbc0903 100644 --- a/os/hal/platforms/STM32/rtc_lld.c +++ b/os/hal/platforms/STM32/rtc_lld.c @@ -241,13 +241,13 @@ void rtc_lld_set_alarm(uint32_t tv_alarm){ RTC->ALRL = (uint16_t)(tv_alarm & 0xFFFF);
RTC->CRL &= ~RTC_CRL_CNF; /* switch off configure mode */
- 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) */
+
+ while(!(RTC->CRL & RTC_CRL_RTOFF)) /* wait for completion */
+ ;
}
/**
|