I am working on an IoT application with over 15K lines of code using PlatformIO IDE, Espressif 6.2.0, and the Arduino framework for the ESP32 WROOM target.
I left the device running for about 28 hours, and everything was working fine until I encountered the following exception, which simply stated that the ISR WDT (Interrupt Service Routine Watchdog Timer) had timed out, which is understandable.
However, what happened next really confused me. The device attempted to reboot 97 times, and each attempt resulted in the same error. On the 98th attempt, the device got stuck in the reboot process and did not proceed further. It seemed as if the CPU was halted, but I do not know why or how exactly.
I have a single ISR in my program attached to a digital input. In that ISR, I only increment an integer variable by one and nothing else.
My question is, why might this have happened? Let's consider that my program has a major problem that occurs after 28 hours, but why doesn't the issue stop after rebooting?
Has anyone had a similar experience, and if so, what were the possible solutions?
Here is the start and end of the log for your reference:
[T-97929] [N] Free Heap Size: 55464, Min Heap Size: 16372
[97929352][E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Core 1 register dump:
PC : 0x40081467 PS : 0x00050a35 A0 : 0x4008522c A1 : 0x3ffbfaac
A2 : 0x00000000 A3 : 0x3ffbe12c A4 : 0x3ffbe14c A5 : 0x00000000
A6 : 0x3ffbe14c A7 : 0x00000000 A8 : 0x00000001 A9 : 0x3ffbfa8c
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00000001 A15 : 0x3ffb8ff0 SAR : 0x0000001b EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4008a468 LEND : 0x4008a47e LCOUNT : 0xffffffff
Core 1 was running in ISR context:
EPC1 : 0x400f6137 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
Backtrace: 0x40081464:0x3ffbfaac |<-CORRUPTED
Core 0 register dump:
PC : 0x4018d46a PS : 0x00060735 A0 : 0x800f4bcc A1 : 0x3ffcc580
A2 : 0x00000000 A3 : 0x80000001 A4 : 0x800921f8 A5 : 0x3ffaf660
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x800f46ae A9 : 0x3ffcc550
A10 : 0x00000000 A11 : 0x80000001 A12 : 0x800921f8 A13 : 0x3ffaf670
A14 : 0x00000003 A15 : 0x00060023 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4018d467:0x3ffcc580 0x400f4bc9:0x3ffcc5a0 0x400902c4:0x3ffcc5c0
ELF file SHA256: ed76320984d99ab6
Rebooting...
[T-0] [N] Setup Started.
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Core 1 register dump:
PC : 0x4008520c PS : 0x00050035 A0 : 0x4000bff0 A1 : 0x3ffbfadc
A2 : 0x00000000 A3 : 0x00000040 A4 : 0x00001000 A5 : 0x3ffbfaac
A6 : 0x00000000 A7 : 0x3ffbe12c A8 : 0x0002566a A9 : 0x3ffbfaac
A10 : 0x00000001 A11 : 0x00000804 A12 : 0x00000001 A13 : 0x3ffbfa8c
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001b EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4008a5d0 LEND : 0x4008a5db LCOUNT : 0xffffffff
Core 1 was running in ISR context:
EPC1 : 0x400f6137 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
Backtrace: 0x40085209:0x3ffbfadc |<-CORRUPTED
Core 0 register dump:
PC : 0x4018d46a PS : 0x00060735 A0 : 0x800f4bcc A1 : 0x3ffcc580
A2 : 0x00000000 A3 : 0x4008981c A4 : 0x00060520 A5 : 0x3ffbcfb0
A6 : 0x007bfaf8 A7 : 0x003fffff A8 : 0x800f46ae A9 : 0x3ffcc550
A10 : 0x00000000 A11 : 0x3ffbfaf4 A12 : 0x3ffbfaf4 A13 : 0x00000000
A14 : 0x00060520 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4018d467:0x3ffcc580 0x400f4bc9:0x3ffcc5a0 0x400902c4:0x3ffcc5c0
ELF file SHA256: ed76320984d99ab6
.
.
.
. 97 Exception Like This
.
.
.
.
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Core 1 register dump:
PC : 0x40085204 PS : 0x00050a35 A0 : 0x4008182e A1 : 0x3ffbfadc
A2 : 0x00000000 A3 : 0x3ffb78e0 A4 : 0x00001000 A5 : 0x3ffbfaac
A6 : 0x00000000 A7 : 0x3ffbe12c A8 : 0x3ffbe168 A9 : 0x00000000
A10 : 0x3ffbe14c A11 : 0x00000001 A12 : 0x00000001 A13 : 0x3ffbfa8c
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001b EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4008a468 LEND : 0x4008a47e LCOUNT : 0xffffffff
Core 1 was running in ISR context:
EPC1 : 0x400f6137 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
Backtrace: 0x40085201:0x3ffbfadc |<-CORRUPTED
Core 0 register dump:
PC : 0x4018d46a PS : 0x00060935 A0 : 0x800f4bcc A1 : 0x3ffcc580
A2 : 0x00000000 A3 : 0x80000001 A4 : 0x800921f8 A5 : 0x3ffcc4a0
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x800f46ae A9 : 0x3ffcc550
A10 : 0x00000000 A11 : 0x80000001 A12 : 0x800921f8 A13 : 0x3ffaf630
A14 : 0x00000003 A15 : 0x00060023 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4018d467:0x3ffcc580 0x400f4bc9:0x3ffcc5a0 0x400902c4:0x3ffcc5c0
ELF file SHA256: ed76320984d99ab6
Rebooting...
[T-0] [N] Setup Started.