I'm experiencing a very typical issue with data corruption in a flash chip in a not so typical way. I'm using the M25P16 16Mb serial Flash chip by Micron to log historical data on my device over SPI.
The Logging works wonderfully with one known error, and thats when the power to the device cycles during a Flash Opperation.
I expected the last data block written to the Flash to be corrupted but in reality it seems the entire Sector becomes corrupted!
Here is what I mean by corrupted, every data block I write to Flash recieves a checksum, if a corrupted data block is being read, all the data is correct EXCEPT the low word of the checksum. The low word of the checksum always returns 0x0000.
For example a checksum of 0xA533037E being written to flash will be read as 0xA5330000.
Now for the weird part, if this problem is occuring and NEW DATA is written to flash the same thing happens for the new data!
How I have been solving this problem is by erasing all of the data and starting over. This seems to solve the problem in an not-so-great way.
My Question is this: For Serial Flash, if a corruption occurs, do you think it is the entire sector that becomes corrupted or just a data point? Does this seems like "typical" behavior for corrupted values?
Any input is appreciated :)
Addendum Here is the link to the data sheet for the flash: