guild icon
Toit
#ESP32 task watchdog
Thread channel in help
Rikke
Rikke 08/29/2023 11:51 AM
Hi,
I'm working on a hardware watchdog by using the esp task watchdog (CONFIG_ESP_TASK_WDT=y in sdkconfig).

I am having some problems with resetting the timer, because I keep getting the error 261, which is /* 261 0x105 Requested resource not found */.

I init the watchdog, and add NULL as task which appears to be the entire toit task :🙂:
esp_err_t err1 = esp_task_wdt_init(timeout_s, true); esp_err_t err2 = esp_task_wdt_add(NULL);

I have another function which resets the timer, and logs the rc to console
esp_err_t err = esp_task_wdt_reset(); ESP_LOGE("Toit", "WDT reset: %d",err);
The restting looks like this in console:
E (689483) Toit: WDT reset: 0 E (689993) Toit: WDT reset: 0 E (690503) Toit: WDT reset: 261 E (691003) Toit: WDT reset: 261 E (691513) Toit: WDT reset: 0 E (692013) Toit: WDT reset: 261 E (692523) Toit: WDT reset: 261 E (693033) Toit: WDT reset: 0 E (693543) Toit: WDT reset: 0 E (694053) Toit: WDT reset: 261 E (733243) Toit: WDT reset: 261 E (733753) Toit: WDT reset: 261 E (734263) Toit: WDT reset: 261 E (734773) Toit: WDT reset: 261 E (735283) Toit: WDT reset: 0 E (735833) Toit: WDT reset: 261 E (736343) Toit: WDT reset: 0 E (736853) Toit: WDT reset: 261 E (737363) Toit: WDT reset: 261 E (737873) Toit: WDT reset: 261
But this is giving me far more errors than succesful resets. I wonder if anyone else has been playing around with this watchdog?
Rikke
Rikke 08/29/2023 12:37 PM
Might be worth noting i've commented out freertos functions in flash:
#CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
2 messages in total