I'm working on a SoC that can power-off the ARM (Cortex-M4) while retaining the system RAM, and I'm interested in saving the processor state then restoring it when the ARM is restarted. So prior to power-off the software would save all necessary register values to RAM, then during boot rather than performing a regular application start-up the software would reload the saved values.
I know I would need to save and restore core registers, plus system control, NVIC, systick, and perhaps other things, though I'm not sure of the full list.
The infocenter has a document detailing this for the ARM11 processor, but I haven't found any discussion or code for the M4.
My questions are:
We did this on an ARM7TDMI and every driver was responsible to store its registers. Problematic are RO registers. For these you have to maintain a shadow register.But depending on the SoC, some peripheral have a sleep mode as well.