SRAM retention in sleep mode

eyalasko
Posts: 7
Joined: Sun Dec 08, 2019 7:09 am

SRAM retention in sleep mode

Postby eyalasko » Sun Dec 22, 2019 8:53 am

Hi,

I have an application that gets data from I2C sensor, stores it into several KB (>8KB) deep buffer, runs an algorithm on the stored samples and goes idle.
This repeates every T ms.

In order to reduce the overall power consumption I would like to go to sleep whenever possible.
If I understand correctly, going into deep sleep does not retain SRAM content and the only way to exit is by rebooting.
What about light sleep, Will it retain the SRAM (DRAM/IRAM) content? What about GPIOs state, I2C configuration etc. ?

The documentation only mentions RTC RAM (Fast/Slow) but not the consequences of light sleep on the other ESP32 subsystems like SRAM and peripherals.

So, what is the correct/best way to handle such scenario where the software needs to wake up from sleep and resume with the exact same state as it was before going to sleep (i.e. resume running from where it 'fell asleep' with the SRAM/peripheral content intact)

THANKS for any guidance on this crucial issue.

Who is online

Users browsing this forum: No registered users and 82 guests