Page 1 of 1

If vTaskDelay is called,will esp32 enters the modem sleep state?

Posted: Wed May 17, 2017 12:03 pm
by roctwo
If vTaskDelay is called,will esp32 enters the modem sleep state during vTaskdelay's period?

Re: If vTaskDelay is called,will esp32 enters the modem sleep state?

Posted: Wed May 17, 2017 1:21 pm
by WiFive
Modem sleep should work when radio is not needed regardless of whether task is paused. What type of context the actual switching in/out of modem sleep uses is another question, probably interrupt + preempt. For light sleep, that should occur when task is paused assuming other conditions ok but I don't think it is implemented yet.

Re: If vTaskDelay is called,will esp32 enters the modem sleep state?

Posted: Wed May 17, 2017 7:01 pm
by madscientist_42
WiFive wrote:Modem sleep should work when radio is not needed regardless of whether task is paused. What type of context the actual switching in/out of modem sleep uses is another question, probably interrupt + preempt. For light sleep, that should occur when task is paused assuming other conditions ok but I don't think it is implemented yet.
Based on a conversation in another thread, I don't think, I know. The best you can realistically hope for right now is idle-sleep of the CPU cores with vTaskDelay(s) or putting the whole SoC under Deep Sleep (which has it's own drawbacks).

While the chip's quite capable of long-endurance battery operations, the IDF (and probably every other RTOS built...and there's several now...) isn't there yet- because they're still getting base functionality fully up.