Is there an area in esp32 where data is not lost until the device is powered off?

Vincent zhang
Posts: 7
Joined: Tue Oct 18, 2022 8:14 am

Is there an area in esp32 where data is not lost until the device is powered off?

Postby Vincent zhang » Wed Dec 14, 2022 6:21 am

I have some important data that is periodically updated and I want to store it, but I don't want to store them directly on the flash, because this will affect the service life of the flash.
Therefore, I would like to know if esp32 has such a storage area, when the program restarts or crashes, the data is not lost until the device is powered off.

ESP_Sprite
Posts: 9727
Joined: Thu Nov 26, 2015 4:08 am

Re: Is there an area in esp32 where data is not lost until the device is powered off?

Postby ESP_Sprite » Thu Dec 15, 2022 1:37 am

You should be able to use the RTC_NOINIT_ATTR on a variable to achieve this.

Who is online

Users browsing this forum: iParcelBox and 83 guests