cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L452 RTC wakeup timer works, but just once

WPuch
Associate II

I initialize RTC timer by first clearing RTC_CR register,then waiting until WUTWF bit is on, then setting RTC WUTR register to 100, and RTC_CR to 0x4420 (wakeup timer enable, wakeup interrupt enable, bypass shadow). Bypass shadow register is set for other things.

This setting should generate interrupt 2048/100=about 20 times per second

NVIC is enabled for RTC wakeup interrupt, EXTI is properly set to rising edge for line 20.

The interrupt handler clears bit in EXTI_PR1 by writing 1 and clear bit 10 in RTC_ISR.

NET EFFECT: one interrupt is generated. that's all.

What i am doing wrong.

10 REPLIES 10

STM32L010RB (Nucleo-L010RB)