[OpenTRV-dev] AVR (328P) EEPROM puzzler
damon at opentrv.uk
Fri Mar 18 20:12:52 GMT 2016
We are seeing some bizarre behaviour where when we try to write a 16-byte key into EEPROM it fails to ‘stick’ properly the first time. If the board is power-cycled and the key is written again, it appears to stick as expected. (There’s some subtle sub-wierdnesses also.) This uses some ‘careful’ update routines that we use extensively elsewhere and seem to be fine with blocks as large as 8 bytes long (node IDs).
Lots of use of my favourite search engine is failing to show any evidence of this being a common problem.
I have reviewed the code repeatedly and found a minor wrinkle which is merely an inefficiency, not an error.
Anyone fancy doing some detective work and then pointing out exactly why I shouldn’t be allowed near a keyboard any more? B^>
More information about the OpenTRV-dev