Page 1 of 1

How to write flash status

Posted: Fri Jan 08, 2021 5:01 pm
by jingtu_tj
Hello all,

My equipment met a problem. After working for some days(especially when the battery resumed from running out), it would show this error.

Chip version: ESP32D0WDQ5 (revision 1)
ESP-IDF: V3.0.9

Code: Select all

W (10459) SPIFFS: Failed to update mtime (-10012)

After I used esptool.py to rewrite the status of flash to 0x0000, this error can be fixed. However, I want to know how to reset flash status by C, then our clients don't need to ship the equipments back.

Code: Select all

Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 10:52:1c:83:51:d4
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x02fc
Setting flash status: 0x0200
After flash status:   0x0200
Hard resetting via RTS pin...
I have found esp_rom_spiflash_write_status in spi_flash_rom_patch.c, but it didn't work after I call it.

Thanks for your help in advance.

Re: How to write flash status

Posted: Tue Jan 12, 2021 12:57 am
by jingtu_tj
Does anyone have some ideas? Thank you.