I’m wondering if FreeRTOS can do “suspend to SRAM” for a deeper sleep state than Tickless mode?
It would save the configuration state of all drivers and any system state to a secondary memory SRAM chip (not DRAM so that it doesn’t need any refreshing) and won’t wake up until a timer and/or RTC and/or external (pins/serial port, usb port) interrupt. Then after the interrupt causes it to come back, it restores everything and comes out of Idle.
Most Cortex chips support this kind of ultra low power mode, but sadly don’t have anything that helps you save/restore system/peripheral state to memory
The low power modes that loose memory contents are NOT designed to be used by a Real Time application that “saves” all of the state then goes into this mode. The problem being that this can take a lot of time, and what ever is going to remember that state will be taking power (or be very slow).
These states are used for applications that know they aren’t going to be needed for a while, to save a little bit of essential state, and turn the machine off except for a few critical I/O devices that can wake the system up, which the quickly “re-boots” the application, using the saved state information, and handles the request.
A generic operating system (like FreeRTOS) isn’t going to know how to distill the current state down enough, that is really an application specific operation.