ESP32-C6 how to make data survive reset?
Posted: Thu Oct 17, 2024 7:09 pm
Hi, I'm developing some code where I want to track the number of times the system was booted, both when woken up from deep sleep as well as when the user presses the reset button.
I can get the first part to work (wakeup from deep sleep) if I mark the boot counter was RTC_DATA_ATTR but that won't survive a reset.
So according to the docs (https://docs.espressif.com/projects/esp ... types.html) there is an __NOINIT_ATTR option and there's also the RTC_NOINIT_ATTR option. But they don't seem to do anything.
So my question is: is there a way to do this?
I can get the first part to work (wakeup from deep sleep) if I mark the boot counter was RTC_DATA_ATTR but that won't survive a reset.
So according to the docs (https://docs.espressif.com/projects/esp ... types.html) there is an __NOINIT_ATTR option and there's also the RTC_NOINIT_ATTR option. But they don't seem to do anything.
So my question is: is there a way to do this?