ESP32-C3 EEPROM.C write NVS storage not work

dorry3
Posts: 1
Joined: Sun Jun 19, 2022 4:50 am

ESP32-C3 EEPROM.C write NVS storage not work

Postby dorry3 » Sun Jun 19, 2022 5:26 am

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 244 times

lbernstone
Posts: 637
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Sun Jun 19, 2022 8:41 am

Known bug; will be fixed in 2.0.4. Set flash mode to QIO.

gotfredsen
Posts: 2
Joined: Wed Jul 06, 2022 1:11 pm

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

Postby gotfredsen » Wed Jul 06, 2022 1:14 pm

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

Who is online

Users browsing this forum: No registered users and 55 guests