I was wondering if there is a possible way to keep the created Tasks (with xTaskCreate) even after DeepSleep.
I have a routine of functions which are always doing the same in the exact same order. In my current code, the ESP32 creates the Tasks, starts with the first one, uses xTaskNotfiy to start the second one and so on... and after the last task is finished my ESP32 deletes all Tasks with vTaskDelete("Handle of the Task") and goes into the deep sleep mode. After DeepSleep, when he is awake again, he creates the tasks again which he created before. In my opinion this is not efficient.
So my question is: Is there a way to create the Tasks just once at a cold start, then keep it even after deepsleep so I dont need to create them again?
Is there also a difference between vTaskDelete(NULL) and vTaskDelete("Handle of the Task")? Is vTaskDelete(NULL) just exiting the calling task or does it really delete the calling Task?
Keep created Tasks even after DeepSleep
Re: Keep created Tasks even after DeepSleep
No because deepsleep will power off the ram and the information will be lost. A hibernate mode is interesting to consider but not sure it would be worthwhile to implement.
Re: Keep created Tasks even after DeepSleep
Too bad, thought it is possible since it is possible to save Attributes even after DeepSleep with RTC_DATA_ATTR. Thanks for the reply.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], Dennie and 103 guests