-->
Page 2 of 2

Re: GPIO Pin states after reset/during startup

PostPosted: Sun Oct 08, 2017 9:07 am
by rudy
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.

Re: GPIO Pin states after reset/during startup

PostPosted: Sun Oct 08, 2017 3:53 pm
by zdewitt
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