棋子 · 2020年02月17日

Saving processor state for power-down and resume

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:

Is this already implemented on M4 (perhaps somewhere like in CMSIS, FreeRTOS, or a published example)?
If not, is there documentation on how to do this on M4? (I searched google and the arm infocenter without success)
If not, would the "Cortex-M4 Technical Reference Manual" identify all the registers I need to save? Or are there more?

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年02月17日

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.

你的回答
关注数
1
收藏数
0
浏览数
2535
极术小姐姐
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息