MCF5223x STOP Modes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5223x STOP Modes

1,103 Views
w2vy
Contributor V

While running my code without any Power Down Mode changes I am running at about 25C above the surrounding air.

 

I would like to have it run cooler.

 

My FAE suggested going into WAIT or DOZE mode (STOP Modes) which disables SRAM, Flash, Core waiting for a Wake Up (Interrupt etc)

 

I found the point in the task switcher where it scans the take list and if it finds none, I do the following:

// We have gone through the entire list (again), let's DOZE until we get an INT   MCF_CIM_LPCR = MCF_CIM_LPCR_LPMD_WAIT;   tk_stop_mode();

 

 

and tk_stop_mode is:

 

 

_tk_stop_mode:   stop  #0x2000   rts

I have look around a little and have not found any examples of using the stop modes.

 

Anyone have code snippets they can share?

 

Mark does uTasker support DOZE mode?

(It seems to use most every other feature of the chips)

 

tom

Labels (1)
0 Kudos
2 Replies

247 Views
mjbcswitzerland
Specialist V

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

 

 

0 Kudos

247 Views
w2vy
Contributor V

I was looking into this to conserve HEAT not power... I did manage to get it working but since my PHY is always on it was hard to notice.

 

The good news is the Max Junction Temp is 130C so with the 0-70C part it is hard to hit that point!

 

Heat is not a problem for me. (and for most I assume)

 

tom

0 Kudos