Re: GPIO Pin states after reset/during startup
Posted: Sun Oct 08, 2017 9:07 am
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.
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.