cancel
Showing results for 
Search instead for 
Did you mean: 

ISR Flags from Standby mode

ngaylard2
Associate II
Posted on June 23, 2010 at 17:17

ISR Flags from Standby mode

4 REPLIES 4
swhite2
Associate III
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.

damh
Associate II
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.

swhite2
Associate III
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.

ngaylard2
Associate II
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