cancel
Showing results for 
Search instead for 
Did you mean: 

RTC missed alarm STM32 L152VB

JAN R
Associate III

Hi,

I use RTC for timing FreeRTOS (also in Tickless mode - in STOP mode) I use ALARM A in rtc. I noticed one weird behavior. Some times for examaple after 5 hours of running program the ALARM A is missed - no Interrupt of alarm happended, althougt the Alarm should happen.

For example I set ALARM A in 7 minutes, 58 seconds and 512 Subseconds . Alarm should activate interrupt in 7 minutes, 58 seconds and 505 Subseconds, but the IRQ did not happen. But when I now look to RTC register, so the actual time is already 7m59s,2396 SubSec.

I notice:

I do not dissable or clear interrupt flag for RTC.

When I change PREDIV S from 3699 to for example 1849 this behavior is much more frequent - it happen practically after 1 second of running program.

Do you have any advice please?

Best Ragards, Jan.

1 REPLY 1
JAN R
Associate III

Please help me 🙂