Task watchdog got triggered

Adham Aboud
Posts: 48
Joined: Mon Apr 30, 2018 5:32 pm

Task watchdog got triggered

Postby Adham Aboud » Sat Jun 02, 2018 6:29 pm

Hello all,

I created an empty task that executes every 1 msec (vTaskDelay(1/portTICK_PERIOD_MS)),
subscribed it with the WD task
if (esp_task_wdt_add(NULL)!= ESP_OK)
{
// CHECK_ERROR_CODE(); }
if (esp_task_wdt_status(NULL)!= ESP_OK)
{
// CHECK_ERROR_CODE();
}


and resets the watchdog task every loop of that task.
esp_task_wdt_reset()


When I run the program I receive Task watchdog got triggered




Is there something error at my code? any ideas ??


Thanks in advance,

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Task watchdog got triggered

Postby WiFive » Sat Jun 02, 2018 6:38 pm

1/portTICK_PERIOD_MS = 1/10 = 0 (integer)
So change it to vTaskDelay(1)

Even if your task resets the watchdog all other watched tasks have to also reset it individually so you have to give them a chance to execute.

Who is online

Users browsing this forum: No registered users and 109 guests