EEPROM library not reading or writing correctly

longtimer
Posts: 9
Joined: Wed Sep 27, 2017 3:18 pm

EEPROM library not reading or writing correctly

Postby longtimer » Sat Feb 10, 2018 5:41 am

We recently received a shipment of manufactured boards that use the ESP-WROOM-32 module. The packaging of this module is different from the previous ESP-WROOM-32 that we had been using during development with markings for CE and FCC certifications now present. We are able write code to this module and to write to SPIFFs using the updater tool so flash writes are possible.

However, we are unable to either read or write successfully using the EEPROM library. With both read and write, no errors are generated and the esp_partition_write call in the commit() function is returning a 0/ESP_OK response. No errors occur, but subsequent attempts to read the flash just written always read as high bits giving 0xFF bytes and 0xFFFF shorts for example.

Is there a need for a new type of module definition with different partitions for the new ESP-WROOM-32 module? Currently the "ESP32 Dev Module" is the type we have been using.

Are there changes in IDF version that may have affected this?

Is any special control of flash read/write rates required? The chip prints mode:DIO on startup.

As a reference, the code works without issue on the ESP-WROOM-32 modules we used for development.

Unfortunately we are totally stuck without the ability to write to flash from code.

UPDATE: We have now confirmed that the esp_partition_write/esp_partition_read methods do not consistently write to the flash. Rarely, the flash will be updated, but in most cases it is not updated by these methods.

Who is online

Users browsing this forum: No registered users and 152 guests