Page 1 of 1

Flash memory integrity check

Posted: Mon Apr 09, 2018 11:03 am
by Dav_FR
Dear all,

I would like to know if there is a way to carry out a flash memory integrity check to detect damaged sectors.

I'm interested in both, via USB with some tool such as esptool.py or from the device itself with an API for remote diagnosis.

The idea is know if a partition is damaged (for example a OTA partition where I plan use to upgrade the firmware) to know when a memory must be replaced due to issues or if a device is reaching the end of it's life (which can be short depending of the application).

I read about the wear levelling, which is close related with this topic but I did not found API to obtain this kind of information.

Best regards

Re: Flash memory integrity check

Posted: Mon Apr 09, 2018 1:37 pm
by ESP_Sprite
Both the flashing process as well as the boot process already check hashes of the flashed program; if there is a corruption in the flash you will notice it because either esptool will tell you the flash failed or the bootloader will fail to boot the program because of a checksum/hash error.