Page 1 of 1

Task watchdog got triggered

Posted: Sat Jun 02, 2018 6:29 pm
by Adham Aboud
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,

Re: Task watchdog got triggered

Posted: Sat Jun 02, 2018 6:38 pm
by WiFive
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.