Skip to content

ESP32 WDT Interrupt Handler Not Registered

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 WDT Interrupt Handler Not Registered. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 watchdog timer interrupt handler is not called before system reset.

Quick Fix

Wrong

// No WDT handler registered
// System just resets without warning
Sudden reboot. No debug information about WDT trigger.
void IRAM_ATTR wdtISR(void* arg) {
  // Save reset reason to RTC memory
  RTC_DATA_ATTR int wdtCount;
  wdtCount++;
  esp_default_wdt_handler(arg);
}
timer_config_t config = { /* ... */ };
timer_isr_register(TIMER_GROUP_0, TIMER_0, wdtISR, NULL, 0, NULL);
WDT triggered. Count saved to RTC memory. System restarts with reason code.

Prevention

Register ISR before WDT timeout. Save debug info to RTC memory before reset. Use panic handler to capture backtrace. Set esp_task_wdt_config.trigger_panic=true for crash dump. Analyze serial output for WDT reason.

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

FAQ

### How do I get a backtrace on WDT reset?

Enable CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT in menuconfig. The backtrace shows which task was running when WDT triggered.

Can I capture WDT reason in RTC memory?

Yes. Store the reset reason in RTC_DATA_ATTR variable. Check it on next boot with esp_reset_reason().

What is the default WDT handler?

The default handler prints debug info to serial and calls abort(), which triggers a core dump if configured.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro