Watchdog time not always resetting the ESP32

daveoo
Posts: 1
Joined: Tue Dec 01, 2020 10:12 am

Watchdog time not always resetting the ESP32

Postby daveoo » Tue Dec 01, 2020 10:46 am

Hi,

I have configured the watchdog timer within the ESP32 to trigger.

Most of the time when it triggers it resets the ESP32 as it should, but occasionally, it triggers but does not reset the ESP32, and leaves the ESP32 in the following state. (see trace below). The only way to then reset the device is via a hard reset (i.e. toggling the EN line) - any ideas?

some code extracts...

header included and timeout period:

#include <esp_task_wdt.h>
#define WDT_TIMEOUT 240

Configuring the WDT:

esp_task_wdt_init(WDT_TIMEOUT, true); //enable panic so ESP32 restarts
esp_task_wdt_add(NULL); //add current thread to WDT watch


Resetting the watchdog to avoid reset..
esp_task_wdt_reset(); // feeding the watchdog


Captured on serial output:

Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1)
Core 1 register dump:
PC : 0x4008bd32 PS : 0x00060c34 A0 : 0x8008aeef A1 : 0x3ffbe660
A2 : 0x3ffb8bd4 A3 : 0x3ffcff54 A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00060c23 A7 : 0x00000000 A8 : 0x3ffcff54 A9 : 0x3ffcff54
A10 : 0x00000014 A11 : 0x00000014 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00060c21 A15 : 0x00000000 SAR : 0x00000019 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Core 1 was running in ISR context:
EPC1 : 0x4008a376 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x4008bd32

Backtrace: 0x4008bd32:0x3ffbe660 0x4008aeec:0x3ffbe680 0x40089177:0x3ffbe6a0 0x400e0e61:0x3ffbe6e0 0x400d7ab9:0x3ffbe700 0x400d6f34:0x3ffbe730 0x40169783:0x3ffbe750 0x400d743a:0x3ffbe770 0x40080f5d:

Who is online

Users browsing this forum: Baidu [Spider] and 74 guests