ESP32 "Interrupt wdt timeout on CPU0"

The interrupt watchdog panics when the FreeRTOS tick interrupt on a CPU could not run within its timeout. Something kept interrupts off on that CPU for too long.

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0).

Core  0 register dump:
PC      : 0x4008b6a2  PS      : 0x00060034  A0      : 0x8008c1e4  A1      : 0x3ffb0b70
...
Backtrace: 0x4008b69f:0x3ffb0b70 0x4008c1e1:0x3ffb0b90 0x400d3a2e:0x3ffb0bb0

What blocks interrupts

From Espressif's Watchdogs guide: disabling interrupts, critical sections (which also disable them), and interrupt handlers of the same or higher priority that run too long. The backtrace shows the code that was running when the timeout hit, which is usually the one holding them off.

The usual causes

The timeout is CONFIG_ESP_INT_WDT_TIMEOUT_MS. Raising it is a last resort, for the rare critical section that truly cannot be shorter.

Find the line

The Backtrace: line is a list of PC:SP pairs, innermost call first. To turn the addresses into functions and lines you need the ELF of exactly the build that crashed:

When it happens in the field

On your desk the crash prints to the serial monitor. On a device in someone else's building it prints to a port nobody is reading, the chip restarts, and all you hear is that it "sometimes hangs". Pinscope keeps the panic reason and backtrace across the restart, sends them on the next connection and decodes them with the ELF of the build that crashed, so you get the function and line without anyone at the device. Free for three devices. How crash reporting from the field works.

Related errors: Task watchdog got triggered · Cache disabled but cached memory region accessed · Stack overflow · rst:0x… reset reasons. All ESP32 errors: the list. Messages and causes from ESP-IDF's panic handler and Espressif's Fatal Errors guide.

More