Page 1 of 1

ESP32-C3 EEPROM.C write NVS storage not work

Posted: Sun Jun 19, 2022 5:26 am
by dorry3
I use below code write to NVS ESP32-C3

EEPROM.begin(2048)

int val = byte(random(10020));
EEPROM.writeInt(1,val);

Serial.printf("Read At 1 boot: %d\n", EEPROM.readInt(1));// return value is normal

but power off or reset,data lost!

but above code in esp32 is all ok!
samplewrite.zip
(669 Bytes) Downloaded 314 times

Re: ESP32-C3 EEPROM.C write NVS storage not work

Posted: Sun Jun 19, 2022 8:41 am
by lbernstone
Known bug; will be fixed in 2.0.4. Set flash mode to QIO.

Re: ESP32-C3 EEPROM.C write NVS storage not work

Posted: Wed Jul 06, 2022 1:14 pm
by gotfredsen
I got that to work in Arduino, but not in PlatformIO.

My platformio.ini:

Code: Select all

[env:adafruit_qtpy_esp32c3]
platform = espressif32
board = adafruit_qtpy_esp32c3
framework = arduino
board_build.flash_mode = qio