Cortex M3: CPU Context to Retention RAM

Hi, I am looking for some pointers, links or apps notes. Consider a Cortex M3 based system which has a deep sleep mode whereby CPU c ore is powered down, but the system RAM retains state (retention RAM). Prio r to entering deep sleep, I would like to save "CPU Context" to give me the fastest startup response after a wake event. (I think that on some older A RM CPUs, this was called "dormant" mode) The simplest would simply to push all CPU core registers onto the stack pri or to sleep, and pop off after sleep, but I am wondering if someone has act ually come up with a well thought-out/analyzed alternative. Thanks for any feedback. Steven

Reply to
moogyd
Loading thread data ...

If you make sure that your system is in an "idle" state when going into sleep, there should be no need to save/restore anything.

--
(Remove the obvious prefix to reply privately.) 
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

That simply means all relevant context is already saved.

--

Rick
Reply to
rickman

I think you'd do much better to have one really well-defined stopping point, and a fixed set of stuff to load into the CPU registers. Even then I'd be worried about missing some CPU state or setting up a peripheral wrong.

It's certainly far more reliable, if far slower, to treat some section of the processor RAM in this case as something akin to a really small hard drive, bring the thing up normally, and then read whatever is in your "important" part of RAM to proceed.

--
www.wescottdesign.com
Reply to
Tim Wescott

But current consumption in idle is higher than in deep sleep. I'd have to look at data sheets to be sure -- but it is.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I believe you are saying in deep sleep the RAM content is retained. If that is so, isn't the internal state of the CPU also saved?

--

Rick
Reply to
rickman

I assume he means if you are idling in main there is nothing to restore

but if everything but the RAM content has been reset there could be lots of stuff

it depends, they may turn off the power to everything but the RAM

-Lasse

Reply to
lasselangwadtchristensen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.