This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flash corruption detection

Hello,

I`m searching for a possibility to detect a possible Flash corruption caused by a Brown out or something else? Is there any controller interal possibility to detect a corrupt Flash page to delete and restore it with default data on start up?

For example:

The software starts a shut down routine where some data will be stored into the internal flash. If during this process the power get lost and the flash will be corrupted, I like to detected this and like to restore the flash with default data out of my application storage page. (Delete-Write)     

Could you help me with this problem?

Thanks for your help!

Regards,

JLe

PS.: What happend if the controller try to read a corrupted flash page? Is it a POR Reset?

Parents
  • Hi, 

     

    There isn't a mechanism integrated into the flash to detect if a page is corrupted or not.

     

    What we do in our fds file system is to store a CRC of the page, so if the page content doesn't match with the CRC we know that the page content has been corrupted. You can calculate the CRC before you write to the flash, based on the content in RAM that you expect to be written to the flash. 

Reply
  • Hi, 

     

    There isn't a mechanism integrated into the flash to detect if a page is corrupted or not.

     

    What we do in our fds file system is to store a CRC of the page, so if the page content doesn't match with the CRC we know that the page content has been corrupted. You can calculate the CRC before you write to the flash, based on the content in RAM that you expect to be written to the flash. 

Children
No Data
Related