Hi Tom
In the utasker project there is a similar technique as you use. There is a low power task which does the following:
extern void fnLowPower(TTASKTABLE *ptrTaskTable) // lowpower task called on every scheduling pass{ if (!uNoSchedule(OWN_TASK)) { // is the scheduler idle? fnDoLowPower(); // switch to low power mode until woken }}
On the Coldfire fnDoLowPower() is translated to asm ("stop #0x2000"); [for Codewarrior] or asm { stop #0x2000 } [for GCC]
This works well, saving CPU power without any speed reductions - as soon as any interrupt occurs the CPU immediately exits WAIT mode and continues. Often the CPU will then be in the WAIT mode 99% of the time, just waking up when an event (timer UART or Ethernet interrupt etc.) has occurred and going back to sleep again as soon as it has been handled.
However the saving on the M5223X (typically 20mA at 40MHz) with active PHY is quite small since the main power consumption is the PHY (factor 10 higher in 100M mode).
By selectively disabling additional peripherals (DOZE mode) the saving can increase but often peripherals are needed to operate all the time and non-used ones are already disabled (note that this is not the case per default so peripherals need to be powered down if never used to stop unnecessary current drain).
Much improved low power consumption is achieved by using the STOP mode but this is only suitable when it is really possible to close down pretty much everything (timers, communication interfaces) and be woken by an asynchronous interrupt (like someone pressing the standby button). This is generally only suitable for a standby type mode and not for saving power during 'normal' operation. For this reason there is no such support for it although I do known of projects which have used it (eg. battery backed-up portable equipment which need to monitor a single input at quite low rates and then wake back to full operation very quickly when necessary).
Regards
Mark