Main task is not subscribed to the TWDT, yet esp_task_wdt_reset() does actually reset the TWDT
Posted: Thu Oct 21, 2021 12:16 am
The search function on this site seems very unreliable so apologies if this has been brought up elsewhere. I did try to search but I just got blank pages as a result.
I'm using ESP IDF v4.3 with a standard ESP32 module.
According to the menuconfig help, the task watchdog is enabled by default (ESP_TASK_WDT=Y) and initialized on startup.
I have a busy loop in my main task that is calling [Codebox]esp_task_wdt_reset()[/Codebox] and [Codebox]taskYIELD()[/Codebox] to feed the watchdog reliably. This seems to work.
But the docs for [Codebox]esp_task_wdt_reset()[/Codebox] say that it should return ESP_OK when the watchdog has been reset successfully. However I'm seeing a return value of ESP_ERR_NOT_FOUND which according to the docs means that the current running task (the main task in my case) is not currently subscribed to the TWDT.
Is this expected behaviour?
P.S. what's up with the broken Codebox tags?
I'm using ESP IDF v4.3 with a standard ESP32 module.
According to the menuconfig help, the task watchdog is enabled by default (ESP_TASK_WDT=Y) and initialized on startup.
I have a busy loop in my main task that is calling [Codebox]esp_task_wdt_reset()[/Codebox] and [Codebox]taskYIELD()[/Codebox] to feed the watchdog reliably. This seems to work.
But the docs for [Codebox]esp_task_wdt_reset()[/Codebox] say that it should return ESP_OK when the watchdog has been reset successfully. However I'm seeing a return value of ESP_ERR_NOT_FOUND which according to the docs means that the current running task (the main task in my case) is not currently subscribed to the TWDT.
Is this expected behaviour?
P.S. what's up with the broken Codebox tags?