esp32: Fix task watchdog timer triggering issues TW#14794

The two task watchdog timer bugs are as follows...
1) If only a single task existed on the wdt task list, and esp_task_wdt_feed()
was only called once, the watchdog triggers but fails to print task name
2) If a single task already exists on the task wdt list, and another task calls
esp_task_wdt_feed() once, the watchdog fails to trigger

Problem stemmed from the loop responsible for resetting the watchdog timer
having incorrect loop parameters. The loop failed to traverse the full length
of the task wdt list
This commit is contained in:
Darian Leung 2017-08-30 13:56:37 +08:00
parent e6afe28baf
commit ae9041ab71

View file

@ -131,7 +131,7 @@ void esp_task_wdt_feed() {
TIMERG0.wdt_feed=1; TIMERG0.wdt_feed=1;
TIMERG0.wdt_wprotect=0; TIMERG0.wdt_wprotect=0;
//Reset fed_watchdog status //Reset fed_watchdog status
for (wdttask=wdt_task_list; wdttask->next!=NULL; wdttask=wdttask->next) wdttask->fed_watchdog=false; for (wdttask=wdt_task_list; wdttask!=NULL; wdttask=wdttask->next) wdttask->fed_watchdog=false;
} }
portEXIT_CRITICAL(&taskwdt_spinlock); portEXIT_CRITICAL(&taskwdt_spinlock);
} }