last time, I promise, Dwayne Reid wrote: > Each of my 8 records includes a 16 bit CRC. I try to detect bad eeprom 2 > ways - after I have written a new record, I read back the data and ensure > that it is correct. If I detect an error, I map in a new block of eeprom > and re-write the record. > > Upon power-up, I check the CRC of each block to ensure that the sequence > number I am about to get is valid. If it is not valid, I assume that system > power died before that block could written and that I have lost that record. > The record before the bad one should be the newest - the bad record becomes > the next to be over-written. This should be quite unlikely - I've got > enough reserve power stored in capacitors to ensure that I could finish at > least 5 complete block saves. But its a problem that I can detect and deal > with, so I will. Using this CRC test technique, if you start to have a bad eeprom address due excessive use, it will always tells you that the previous address was the last recorded, what will be false. Even using the previous suggestion to use two places to store same circular buffer pointer, you still weak for the eeprom wearing problems, if one of those places start also to fail, all your system will crash badly. It is very difficult to create a crash-proof system based on eeprom that is able to fail.