I am working with MQX 4.0 and have a program that has several periodic tasks. These tasks use the
_timer_start_periodic_every() function. I need to set the program into one of the Low Power Management modes, preferably STOP mode. However, when I enter STOP mode, the timer interrupt fails to wake the system back up.
If I comment out all the periodic tasks, the system works fine. I did follow / cut / paste the MQX lowpower example included with MQX 4.0.
I made sure the LPTMR0 registers are identical in the commented and uncommented versions, just before changing over to STOP mode.
I have decreased the sleep time down from 0.5sec to 100 us.
I have doubled the main/periodictask/timertask stacks.
I am currently working on a K60 tower.
Does anyone have any suggestions on how to get this to work?
Thanks
Hi Mark:
_timer_start_periodic_every relies on a systick timer, which is the default MQX tick timer.
In stop mode, Systick is not running. It will not wake up the system from STOP modes ( STOP, VLPS, LLS,VLLSx).
In low power mode, we can use low power timer or RTC.
Regards
Daniel
Have a great day,
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------