AnsweredAssumed Answered

RTC ALARM is not triggered! - STM32L152

Question asked by bernabeu.Anthony on Aug 15, 2016
Latest reply on Aug 17, 2016 by bernabeu.Anthony
I am running a STM32L152 into stop mode. The MCU sleeps most of the time (waking up every 1hr to read sensors). As I have the watchdog running, I am using RTC to generate an alarm every 10s (watchdog period is ~25s). So when I am sleeping for 1hr, I am setting the alarm in time now + 10s, then go to stopmode, woken up by the alarm and set the alarm to the next 10s etc... 
It is working almost fine but for some reason, sometimes the MCU resets because of the watchdog not kicked. That means I have missed the alarm for some reason. I have been doing some tests and over 3 days it happened 3 times. By saving some flag into a preserved ram I know for sure that the alarm did not work (flag is set to 1 when wakeup occurs and reset before sleep). And I also know that my alarm time and date are set correctly (also saved into the preserved ram section every time).

As anyone ever experienced this kind of issue? I was thinking to generate 2 alarms so that if the MCU missed one, it is very unlikely that it would miss two.

Any previous experience or ideas are welcome.