I see in the MCF52258 / 59 Ref Manual that the real time clock registers only get "reset" once, if the power sourct (backup battery) is disconnected. The Days, Hours, and Minutes values go to "??". Is there a bit to test to see if the clock is invalid?
Thanks!
I may have found something that will work.
The alarm hours & minutes register (ALRM_HM) does get cleared on power loss. Since I am not using the alarm, I load it with a pre-defined value. On boot, I check to see if that value is still there. If not, the battery was removed.
If you know of a better method, please chime in!
Thanks!
Hi,
I used this chip - and I wasn't able to clean this alarm register - after startup it has something on it.
Ipa