Skip to main content
martindavey9
Associate II
June 19, 2009
Question

RTC alarm occurred while micro powered down

  • June 19, 2009
  • 3 replies
  • 777 views
Posted on June 19, 2009 at 10:08

RTC alarm occurred while micro powered down

    This topic has been closed for replies.

    3 replies

    martindavey9
    Associate II
    May 17, 2011
    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.

    martindavey9
    Associate II
    May 17, 2011
    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.

    swhite
    Associate III
    May 17, 2011
    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.''