Flash memory integrity check

Dav_FR
Posts: 14
Joined: Mon Mar 27, 2017 8:14 am

Flash memory integrity check

Postby Dav_FR » Mon Apr 09, 2018 11:03 am

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

ESP_Sprite
Posts: 9711
Joined: Thu Nov 26, 2015 4:08 am

Re: Flash memory integrity check

Postby ESP_Sprite » Mon Apr 09, 2018 1:37 pm

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.

Who is online

Users browsing this forum: No registered users and 66 guests