FreeRTOS idle task not getting CPU time with light sleep

DavidA99
Posts: 1
Joined: Wed Apr 27, 2022 4:52 pm

FreeRTOS idle task not getting CPU time with light sleep

Postby DavidA99 » Wed Apr 27, 2022 5:03 pm

Hello, I hope you're well.

I'm developing a firmware in which i utilize FreeRTOS tasks and a flag based system to detect user input and control a motor, a display based on lvgl and communicate with a server.

However i'm having a little trouble when trying to use lightsleep, maybe for 15 20 minutes i can wake up from the light sleep almost every time without a problem, but more than that in lightsleep i get the following error.

Code: Select all

Task watchdog got triggered. The following tasks did not feed the watchdog in time:
 - IDLE (CPU 0)
Tasks currently running:
CPU 0: esp_timer
CPU 1: IDLE
The first thing i tried to fix it was to wake the device using a timer but even then some rare ocasions it would throw the error.

I've tried to turn off my timers and even deleting them before entering light sleep, but as the timer is used by other structures i tried to suspend the task and resume if after waking up to test, but the behaviour stays the same.

To test even more i tried to delete, and re-create the esp_timer task. and it almost seemed to teach me something, but the wi-fi wouldn't connect after light sleep and display stopped working. This i believe is due to the wi-fi and lvgl being based on the timer task and deleting the task itself in the first time, removed some crucial component.


Any direction and advice is greatly appreciated, i've tried to search the forums for a similar problem but i wasn't able to find what could be a potential solution to this problem.

Who is online

Users browsing this forum: No registered users and 251 guests