Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By rudy
#70714 If the RTC memory has not been use then it can have anything in it's memory. How would a routine that retrieves a string after a reset know that it was valid?

The CRC is not necessary. But it would be a good idea to place something in memory to indicate that your program had initialized it and that the contents is valid. Store a word into a 4 byte location. Then do a check for it before you accept your saved relay state. If the word wasn't what you expected then your saved state would be invalid.
User avatar
By zdewitt
#70723
rudy wrote:If the RTC memory has not been use then it can have anything in it's memory. How would a routine that retrieves a string after a reset know that it was valid?

Aha indeed, I hadn't considered this but yes just like you must do with EEPROM. Thanks for the info