Hi guys, I'm trying to use the Wait mode (that turns off the CPU clock of the Coldfire V1) to implement low power idle task in a RTOS.
This RTOS was developed for me and me colleagues, in order to have an very lightweight OS to use with sensor networks.
The problem occur when the OS calls the Idle task. This task puts the MCU in stand by to reduce the comsumed power when there are no task eligible to run. Any peripherals can wakeup the CPU, exiting from the idle task.
If the system suffer with high load (a lot of interrupts - communication in serial line, wireless line, timer interrupts, etc), the CPU sometimes gets inconsistent generating any kind of error (memory access error, illegal opcode error, disabled interrupts, etc. If we turn off the wait instruction, these error don't occur and it's work fine.
What could be the reason of this issue ???
I appreciate any help.
Thanks in advance,