ArduinoGeneral

Firebeetle NVRAM issue

userHead Account cancelled 2021-03-07 23:12:09 679 Views0 Replies
I can't get NVRAM working on a FireBeetle ESP32. Code works fine on other ESP32 variants. No errors when writing or reading, I just get nothing back.
Eg.

EEPROM.begin(sizeof(WifiSettings) + 2);

if ((EEPROM.read(0) != 0x98) || (EEPROM.read(1) != 0x76))
{
#ifdef DEBUG
printf("BOM not found - writing new BOM\n");
#endif
EEPROM.write(0, 0x98);
EEPROM.write(1, 0x76);
EEPROM.put(2, _settings); // settings object
EEPROM.commit();
}

Running the code above every time the board is booted tries to set up the NVRAM every time.

On boot I see the following, with errors wround the flash and EEPROM.

st:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
Settings initialise
[E][EEPROM.cpp:73] begin(): Unable to open NVS namespace: 4353
BOM not found - writing new BOM

I am using platformIO to build my code

[env]
platform = espressif32
;board = esp32dev
board = firebeetle32

framework = arduino
upload_port = COM5
monitor_port = COM5
monitor_speed = 115200
platform_packages = [email protected]https://github.com/espressif/arduino-esp32.git
lib_deps =
adafruit/Adafruit [email protected]^2.0.0
adafruit/Adafruit BMP280 [email protected]^2.1.1
check_tool = cppcheck

[env:FIREBEETLE_ESP32_DEBUG]
build_type = debug
build_flags = -D DEBUG