[ECOS] Low-power application for MPC823e with SDRAMs and cache locking
Alex Schuilenburg
alexs@ecoscentric.com
Fri Mar 28 09:50:00 GMT 2003
Rupesh S wrote:
> Hi,
>
> I plan to use eCos on SH3-7729R board.
> Can any one help me how to go about getting the eCos distribution and the
> toolchains associated ?
See
http://sources.redhat.com/ecos/getstart.html
or
http://www.ecoscentric.com/ecos/cdrom.html
-- Alex
>
> ----- Original Message -----
> From: "Karl-Magnus Moeller" <Karl-Magnus.Moeller@combitechsystems.com>
> To: <ecos-discuss@sources.redhat.com>
> Sent: Thursday, March 27, 2003 4:52 AM
> Subject: [ECOS] Low-power application for MPC823e with SDRAMs and cache
> locking
>
>
> I am working with a low-power application on an MPC823e platform running
> eCos.
> My code executes from SDRAM, which I need to put in self-refresh mode
> during low-power mode, therefore I need to lock my low-power function +
> the external interrupt vector in ICACHE.
>
> I have managed to put the SDRAMs in self-refresh, but there seems to be
> a problem with the cache-locking and eventually the disabling of the
> interrupt sources that generates exceptions straight to the PowerPC core
> (bypassing the SIU), such as the decrementer.
>
> What I have taken into consideration regarding the cache-locking is that
> I have minimized this code and written the parts that executes after the
> SDRAMs have been put in self-refresh mode, in assembler with only
> immediate data in order to minimize the cache-locking to the icache,
> while the data cache is disabled. In my application I also replace the
> external interrupt vector at 0x500 with code that clears SIPEND and then
> performs an RFI.
>
> The sequence looks somewhat like this:
>
> 1. Disable the decrementer.
> 2. Disable interrupts.
> 3. Flush and disable dcache.
> 4. Modify the external interrupt vector at 0x500.
> 5. Load and lock the code for the low-power function + address 0x500 in
> Icache.
> 6. Put SDRAM in self-refresh.
> 7. Enable one specific wake-up IRQ.
> 8. Put the CPU in deep-sleep.
>
> When the CPU wakes up it should jump to 0x500 (which must be located in
> icache) where it
> clears the SIPEND register and performs an RFI.
>
> 9. Disable interrupts.
> 10. Put SDRAM in normal mode.
> 11. Unlock the Icache (starts to execute from SDRAM again).
> 12. Restore the 0x500 vector.
> 13. Enable the data cache.
> 14. Enable the decrementer.
> 15. Enable interrupts and exit the low-power function.
>
> Is there anything more that I should do that I haven't thought about?
>
> When running with a debugger/BDM connected the I can't seem to wake up
> properly. When running the application with the debugger disconnected,
> it only stays in sleep mode for a couple of milliseconds before it
> resumes to normal mode, but the application crashes after a short while.
>
> This kind of application is very hard to debug and I am wondering if
> there is someone out there with any experience of low-power application
> under eCos combined with SDRAMs and cache-locking for the MPC8xx family?
>
> I've had a quick look at the power-profiles for eCos 2.0 beta, and I am
> wondering if anyone is having a closer look at implementing this for the
> MPC8xx family?
>
> Anyone that can help?
>
> Thanks in advance.
>
> Regards,
>
> /Karl-Magnus
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list