SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.52k stars 491 forks source link

First 9 bytes of RTCMEM_USER are not kept #718

Open folgorante opened 5 years ago

folgorante commented 5 years ago

Hi, When saving data into RTCMEM_USER after deep sleep the first nine bytes are not kept. I've tried on two LoLin NodeMcu V3 with this code:

for (int i = 0; i < 128; i++) {
    uint32_t val = RTCMEM_USER[i];
    printf("%3d=%x ", i, val);
    RTCMEM_USER[i] = 0xf0f0f0f0;
    if (!((i+1) % 4)) printf("\n");
}
portDISABLE_INTERRUPTS();
sdk_system_deep_sleep(5*1000000);

Coming back from deep sleep the first line of output always shows: 0=2334ae68 1=0 2=f0f0f03e 3=f0f0f0f0

Can it be that first nine bytes are not in user area?

Marco