Skip to content

Commit 9ac0ccd

Browse files
committed
fixup! fixup! fixup! fixup! cpu/stm32/periph/rtc: don't stop RTC for every lock
1 parent 6975d5b commit 9ac0ccd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpu/stm32/periph/rtc_all.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

451452
void 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);

0 commit comments

Comments
 (0)