cancel
Showing results for 
Search instead for 
Did you mean: 

RTC alarm occurred while micro powered down

martindavey9
Associate II
Posted on June 19, 2009 at 10:08

RTC alarm occurred while micro powered down

3 REPLIES 3
martindavey9
Associate II
Posted on May 17, 2011 at 13:14

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.

swhite
Associate III
Posted on May 17, 2011 at 13:14

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.''

martindavey9
Associate II
Posted on May 17, 2011 at 13:14

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.