This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reset ARM while preserving memory, continue execution later


I'm running eCos on an ARM-based SOC target, and I need to save energy. The only way to make the ARM consume less power is to put it into reset (clocking it down is not possible here).

So what I'd like to try out is putting the ARM into reset, and deasserting the reset after a short time (5ms). This is possible with external logic that I have.

I verified that the ARM resets and comes out of reset correctly. What I need now is a way to get eCos back to where it left off. The ARM's memory is conserved, so I have everything in the same condition as when the reset was asserted, except for the processor state.

What would I need to do?

Before going into reset:
Disable interrupts
Save the processor state in a fixed location. Check flag to make sure we're not coming out of reset right now (see below).
if we're going into reset:
Set a flag indicating that reset is being done.
Do the reset.
else if we're coming from reset:
Alter the flag.
Enable interrupts.


When coming out of the reset:
Check the flag.
If power-saving reset is detected:
Alter flag (so coming back into the old state won't go into reset again).
Restore the processor state (execution continues above)

What do you think about this? Any suggestions? How would this fit in with the existing ARM arch code?

Heiko

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]