Hi, I’m currently using several ESP32C6s for some of my projects, but I keep running into the fact that I’d really like to be able to store some data between power blackouts.
As far as I know the ESP32C6 doesn’t support that, right? There’s only memory that will survive soft reboots and deep sleeps.
Is there any other of their XIAO modules that do support this? I really like their tiny format so it would be nice to use their modules instead of having to look elsewhere.
So The ESP32 microcontroller has a specific memory space designed for this purpose. Non-volatile storage (NVS) retains data through reboots and system power loss events (using a portion of the NVS). With this method, more than 2 KBytes of data can be stored.from data sheet Jun 26, 2023
I haven’t really tried what was suggested in the post shared by @PJ_Glasso because it seems similar to what I was doing (using RTC_DATA_ATTR and I do close the Serial port before sleeping) and there the variables don’t survive a power out or even a hard reset.
Btw this part of the ESP32C6 documentation seems to suggest that the board does indeed lose data marked with RTC_DATA_ATTR after a power outage: “In ESP32-C6, there is only RTC FAST memory, … It will be kept powered on by default.”