File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
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
@@ -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