Skip to content

ESP32 Watchdog Feed Not Resetting Timer

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 Watchdog Feed Not Resetting Timer. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 watchdog is fed but still triggers a system reset.

Quick Fix

Wrong

while (true) {
  // feedWatchdog();  // Not calling!
Watchdog timeout. System resets every few seconds.
esp_task_wdt_config_t config = {
  .timeout_ms = 10000,
  .idle_core_mask = (1 << 0) | (1 << 1),
  .trigger_panic = true
};
esp_task_wdt_init(&config);
void loop() {
  esp_task_wdt_reset();
  // do work that takes < 10 seconds
  delay(100);
}
WDT fed every 100ms. No resets. Timeout: 10 seconds.

Prevention

Call esp_task_wdt_reset() at least once per timeout period. Check that all tasks are feeding their WDT. Use correct API version (IDF vs Arduino). Increase timeout for slow operations. Add WDT feed in ISRs for critical sections.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### How often should I feed the WDT?

At least twice as often as the timeout period. If timeout is 10s, feed every 5s. For safety, feed every 1s.

What if one task hangs but others feed WDT?

TWDT is per-task. If the suspend/reset task hangs, other tasks feeding their WDT won't help. Enable panic on TWDT trigger.

Can I feed WDT from ISR?

Yes. Call esp_task_wdt_reset() from ISR if the main loop is blocked by interrupt-heavy workloads.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro