Hi,
I originally asked this question in OMAP forum. However, a google search shows that many of the questions on L138's DEEPSLEEP mode are asked and answered in the Linux forum so I copied my question to here. I develop using raw code without an OS, but I think the procedure of how L138's Linux PSP employed to put into and wake the device up from deep sleep mode should be an established paradigm that I should follow.
I have an urgent question with OMAP L138’s DEEPSLEEP mode. The descriptions below are all about running on the ARM side, not the DSP side.
For purely testing whether DEEPSLEEP and waking up is possible, I used a small project and configured linker.cmd to put all stuff into the 128KB shared memory. The deep sleep and waking up were all successful.
For the real project which is much larger which has lots of its portions put into DDR2 memory, I only tried to put the function pairs intoDeepSleep() and outOfDeepSleep() into the shared 128KB memory by using #pragma directive. However, the waking up was not successful. The external device (an MSP430) correctly performs the due steps of first pulling DEEPSLEEPn low and release it after some time, but when I first disconnect (before the CPU was stopped when it was connected, so I have to reconnect) and then connect (I removed the GEL file first because I don’t want OnTargetConnect() to alter the state of the device) to the CPU I got one of the two errors in CCS Debug view after suspending the execution of the program:
- Only one layer of stack: 0x01513004 (no symbols are defined for 0x01513004)
- Two layers of stack.
- The top layer: UndefInstHandler() [it points to the .out file generated]
- The lower layer: 0xC047F1A8 (no symbols are defined for 0xC047F1A8)
Both seem to suggest that the code has erroneously jumped to somewhere that was not a function within the project. I haven’t been able to find what has caused it.
The DEEPSLEEP process is not about setting the SLEEPENABLE bit alone because DDR2 and other peripherals all needs to properly dealt with. Is it possible to identify the cause of the problem from the error information above? And is there a recommended scheme of code placement for DEEPSLEEP mode: which of them should be in the shared 128KB memory, or even ARM’s L1 memory, and which should be placed in DDR2?
Paul