Skip to main content
Alexey Ostrejkovsky
Associate II
Dec 9, 2020 12:35 PM UTC
Solved

How I can distinguish, ALARM A or ALARM B waked up STM32L053 from Standby mode?

My controller can be waked up from Standby mode by Alarm A or Alarm B: Alarm A every day and Alarm B every minute. Are there any flags (or another means) to know, what event (Alarm A or B) was cause of the waking? That is the problem, because all registers (excluded PWR_CSR and RTC Backup) "dying" after MCU entering in Standby mode...

This topic has been closed for replies.
TDK
TDKBest answer
Dec 9, 2020 1:23 PM UTC

> Are there any flags (or another means) to know, what event (Alarm A or B) was cause of the waking?

Read the current RTC value and determine if it's consistent with an every minute or every day wakeup time.

"If you feel a post has answered your question, please click ""Accept as Solution""."

2 replies

TDK
TDKBest answer
Dec 9, 2020 1:23 PM UTC

> Are there any flags (or another means) to know, what event (Alarm A or B) was cause of the waking?

Read the current RTC value and determine if it's consistent with an every minute or every day wakeup time.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Alexey Ostrejkovsky
Associate II
Dec 11, 2020 6:36 PM UTC

Many thanks!

It looks like it will have to be done... STM32L053 has no any alarm flags, which can survive the standby mode.