2010-06-23 08:17 AM
ISR Flags from Standby mode
2011-05-17 04:55 AM
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.
2011-05-17 04:55 AM
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.2011-05-17 04:55 AM
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.
2011-05-17 04:55 AM
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