File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -305,9 +305,10 @@ void rtc_init(void)
305305 rtc_unlock ();
306306 /* reset configuration */
307307 RTC -> CR = 0 ;
308- RTC_REG_ISR = RTC_ISR_INIT ;
308+ rtc_enter_init_mode () ;
309309 /* configure prescaler (RTC PRER) */
310310 RTC -> PRER = (PRE_SYNC | (PRE_ASYNC << 16 ));
311+ rtc_exit_init_mode ();
311312 rtc_lock ();
312313 }
313314
@@ -347,7 +348,7 @@ int rtc_get_time(struct tm *time)
347348{
348349 /* After waking up from standby, the RSF flag has to be manually cleared.
349350 * To be safe, we do it every time even though we might not have been in
350- * standby before . */
351+ * standby before. */
351352 rtc_unlock ();
352353 RTC_REG_ISR &= ~RTC_ISR_RSF ;
353354 rtc_lock ();
@@ -450,7 +451,8 @@ void rtc_poweroff(void)
450451
451452void ISR_NAME (void )
452453{
453- #if !(defined(CPU_FAM_STM32L5 ) || defined(CPU_FAM_STM32WL ) || defined(CPU_FAM_STM32G0 ) || defined(CPU_FAM_STM32U5 ))
454+ #if !(defined(CPU_FAM_STM32L5 ) || defined(CPU_FAM_STM32WL ) || defined(CPU_FAM_STM32G0 ) || \
455+ defined(CPU_FAM_STM32U5 ))
454456 if (RTC_REG_ISR & RTC_ISR_ALRAF ) {
455457 if (isr_ctx .cb != NULL ) {
456458 isr_ctx .cb (isr_ctx .arg );
You can’t perform that action at this time.
0 commit comments