AnsweredAssumed Answered

How to determine the origin of Wakeup from Standby?

Question asked by p.alex.002 on Feb 16, 2015
Latest reply on Feb 20, 2015 by p.alex.002
I am studying awakening from Standby Mode on STM32F100CB.
I have this context: we set up WKUP pin and RTC Alarm, and go to Standby. Then, rising edge on WKUP pin or RTC Alarm wakes the system up.

Here are a few things that were determined experimentally (I could not find them documented in RM0041), and I'd like to check them with you:

1. It is impossible to determine what caused the wakeup: WKUP pin or RTC Alarm. (RTC_CRL & RTC_CRL_ALRF) is always 0 on the wakeup.

2. By default, RTC_ALR==0. Meaning that RCT Alarm will still wake the system up from Standby when RTC_CNT==0 (after RTC_CNT==0xFFFFFFFF), event if we don't call RTC_SetAlarm(tickstamp). This can be checked by calling RTC_SetCounter(0xFFFEFFFF), where 0xFFFEFFFF is some big number close to the upperbound value.

3. If programmable counter RCT_CNT overflows during Standby, the Overflow Interrupt will never be triggered (i.e. RTC_IRQHandler() will never be called), even after wakeup.

Are these statements correct?