Hi. I'd like to store some data (about 100 bytes) on my ESP32 which I'd like to access after waking up from a deep sleep.
Are there any functions to do this in a Rust project? I know there's an `RTC_DATA_ATTR` attribute you can use in C/C++ projects but is there a way to do this in Rust? Since this data will be updated before every sleep, using flash memory is not the best choice, as it has a limited amount of write cycles.
Using RTC memory
Re: Using RTC memory
Working example for a u32 (value is persisted across deep sleep resets for instance):
Code: Select all
#[link_section = ".rtc.data"]
static mut MY_FANCY_VARIABLE: u32 = 0;
Who is online
Users browsing this forum: No registered users and 4 guests