2009-06-19 01:08 AM
RTC alarm occurred while micro powered down
2011-05-17 04:14 AM
Hi,
Is it possible to detect if an alarm has occurred while the micro is powered down? The ALRF flag would be high in a normal situation, but it is cleared after a hardware reset. Martin.2011-05-17 04:14 AM
From section 15.4.2 of the STM32 Reference Manual.
''The OWF, ALRF, SECF and RSF bits are not updated when the APB1 clock is not running.''2011-05-17 04:14 AM
Hi,
Thanks for your reply. After some investigation and lots of manual reading, only software way to do this is to store the alarm setting in the user registers in RTC power domain. CPU then checks for a previous alarm state on power up, by comparing alarm value with current counter value. As manual states in standby mode alarm value cannot be captured, as APB1 is not running (or even powered). Can't read alarm registers RTC_ALR directly as these are write only. Thanks, Martin.