Low power Stop / Sleep mode in MQX on Coldfire V2

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

Low power Stop / Sleep mode in MQX on Coldfire V2

1,092 Views
ARQuattr
Contributor IV

I'm using some MCF5225x devices on some older boards running MQX 3.6, and would like to use stop modes.  I see a lot of information on the forum and in app notes for MQX support of low power modes for Kinetis, but very little for Coldfire.  Is this supported in any MQX version.  If not, if I just write to the power management registers directly will I have problems with MQX?

I would like to put the device into low power mode (as low power as possible), and have it wait until receiving a pin interrupt, and then wake up and resume.  If resuming is not possible, a full reset would be OK.

Thanks

Angelo

Tags (4)
1 Reply

768 Views
Luis_Garabo
NXP TechSupport
NXP TechSupport

It is risky to have the ColdFire entering in low power mode while MQX is running. The worst of the scenarios is that the Kernel could be getting lost in the stack when it comes back from the low power mode. Since you are considering to perform a reset to wake up then I suggest to exit MQX with _mqx_exit ().This function returns back to the environment that called _mqx(). If your application has installed the MQX exit handler (_mqx_set_exit_handler), _mqx_exit() calls the MQX exit handler before it exits. By default, _bsp_exit_handler is installed as the MQX exit handler in each BSP.

Please have in mind that it is important to ensure that the environment (boot call stack) the MQX is returning to is in the consistent state. This is not provided by distributed MQX BSPs, because the boot stack is reused (rewritten) by MQX Kernel data. Set the boot stack outside of Kernel data section to support correct _mqx_exit functionality. So, if you are returning after calling _mqx() then you could perform a similar code as a stationary project where this is done.

Then you can configure and enter into low power mode and when you return you can perform a software reset which will cause to restart MQX.

I haven’t tested but in theory it is feasible.

Regards,

Garabo

0 Kudos
Reply