There are more than one task, after completing the periodic work,the 52832 module should enter system on low power mode,sleep 30 minutes,then wake up and continue with the periodic work.
Any suggestions would be appreciated. Thanks.
There are more than one task, after completing the periodic work,the 52832 module should enter system on low power mode,sleep 30 minutes,then wake up and continue with the periodic work.
Any suggestions would be appreciated. Thanks.
Hi, what comes to my mind is the following:
Create a timer that will trigger an event (callback) after 30 minutes. When there is no tasks available and the RTOS can go in idle, set WFE() (wait for event). You will leave sleep mode when your timer runout (30 minutes).
Maybe someone can confirm this?
Hopefully this helps!
Regards,
Thanks for your reply.
I tried WFE and app_timer,when freertos is used,
WFE is unable to put the module into sleep mode due to the existence of freertos tick.
Hi,
If you have enabled the tickless idle functionality, then you have asked the RTOS to decide when to sleep. If you want to control the sleep cycle of your device, then you should NOT enable the tickless idle in your FreeRTOSConfig.h file.
With Tickless Idle enabled
Without tickless enabled
You need your application to control its own sleep cycle.
Thank you.This answer is very helpful.
With Tickless idle enabled
Task called vTaskDelay(30 * 60 * 1024) or suspend and then resume by a 30 minutes timer callback
The effect of these two ways is the same, right?
Without tickless enabled
I will try sleep function (__SEV,__WFE,__WFE)
Yes, your understanding is correct.