Skip to main content
ngaylard2
Associate II
June 23, 2010
Question

ISR Flags from Standby mode

  • June 23, 2010
  • 4 replies
  • 798 views
Posted on June 23, 2010 at 17:17

ISR Flags from Standby mode

    This topic has been closed for replies.

    4 replies

    swhite2
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    You could, at startup, compare the RTC counter and alarm registers. If they're equal you could *assume* that the RTC woke you up. Of course its is possible that the wake-up pin changed at the alarm time so that's not definitive.

    ngaylard2
    ngaylard2Author
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    Hello All,

    thank you for the replies but it looks like it confirms what we believed. We can't use the backup domain registers as they have all been used for other variables that we need. 

    While battery life is critical we will have to resort to calculating the time of day and taking action if it is within range (not ideal but workable).

    Many thanks

    swhite2
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    Well a copy of the alarm register could be kept in backup-domain RAM. The ''slow'' time to enable the backup-domain at reset isn't much of an issue if the RTC counter  is updated once-per-second. Of course it maybe if its clocked faster.

    damh
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    You cannot compare directly because the alarm registers are writeonly!

    The readable registers are not usable after reset until they are updated (wait for synchro... and this process can be slow ~30µs).

    There is no flag, that signals an external wakeup event. You can only try to read PA0.