ESP32-WROOM unexpected system halt and subsequent WDT Reboot
Posted: Fri Mar 07, 2025 11:41 am
Good morning everyone,
I'm Lorenzo and this is my first post on forum, despite this development on ESP32 for several years now.
I'm writing my blog post because I encountered an unexpected problem during my project development that I can't solve, and i hope you can help.
General description of the project:
- the project is intended for mass production (initial >1K pcs)
- the project uses the ESP32-WROOM processor on a custom PCB board been tested and debugged before firmware development
- the project uses many functions: UART, I2C, SPI, I2S, BT_BLE, light sleep
Comment about fwr characteristics:
The system works well and the device runs its program by alternating periods of light sleep and waking up with data acquisition for 0,5s every 5s, BT_BLE communication is available throughout the wake-up period, and the BT driver is not stopped before light sleep so that it is still available when you wake up and it work suspending light sleep if BT connected.
Problem description:
Completely randomly general within 24 hours, TG0WDT or TG1WDT configured on 300ms tick and 7s task randomly trig to reboot the system.
To do some tests I disabled task WDT and working only with RTC_WDT in 12s, but completely randomly again, it seems that the processor freezes resulting in WDT reboot as configured after 12s.
Log example with external timestamp
COMMENT TIMESTAMP LOG_OUTPUT
OK [2025-03-06 04:18:38.298] (03:03:03.301) battery: VBatt raw: 4144
OK [2025-03-06 04:18:38.298] (03:03:03.302) battery: VBatt f: 4158
OK [2025-03-06 04:18:38.314] (03:03:03.302) datareading: new mic acquisition..
unexpected [2025-03-06 04:18:38.845] (03:0ets Jul 29 2019 12:21:46
RTC_reboot [2025-03-06 04:18:50.342]
RTC_reboot [2025-03-06 04:18:50.342] rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
RTC_reboot [2025-03-06 04:18:50.342] configsip: 0, SPIWP:0xee
RTC_reboot [2025-03-06 04:18:50.342] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
RTC_reboot [2025-03-06 04:18:50.342] mode:DIO, clock div:2
RTC_reboot [2025-03-06 04:18:50.358] load:0x3fff0030,len:1384
RTC_reboot [2025-03-06 04:18:50.358] load:0x40078000,len:14964
RTC_reboot [2025-03-06 04:18:50.358] load:0x40080400,len:4
RTC_reboot [2025-03-06 04:18:50.358] load:0x40080404,len:3192
RTC_reboot [2025-03-06 04:18:50.358] entry 0x400805f4
Best regards,
LM
I'm Lorenzo and this is my first post on forum, despite this development on ESP32 for several years now.
I'm writing my blog post because I encountered an unexpected problem during my project development that I can't solve, and i hope you can help.
General description of the project:
- the project is intended for mass production (initial >1K pcs)
- the project uses the ESP32-WROOM processor on a custom PCB board been tested and debugged before firmware development
- the project uses many functions: UART, I2C, SPI, I2S, BT_BLE, light sleep
Comment about fwr characteristics:
The system works well and the device runs its program by alternating periods of light sleep and waking up with data acquisition for 0,5s every 5s, BT_BLE communication is available throughout the wake-up period, and the BT driver is not stopped before light sleep so that it is still available when you wake up and it work suspending light sleep if BT connected.
Problem description:
Completely randomly general within 24 hours, TG0WDT or TG1WDT configured on 300ms tick and 7s task randomly trig to reboot the system.
To do some tests I disabled task WDT and working only with RTC_WDT in 12s, but completely randomly again, it seems that the processor freezes resulting in WDT reboot as configured after 12s.
Log example with external timestamp
COMMENT TIMESTAMP LOG_OUTPUT
OK [2025-03-06 04:18:38.298] (03:03:03.301) battery: VBatt raw: 4144
OK [2025-03-06 04:18:38.298] (03:03:03.302) battery: VBatt f: 4158
OK [2025-03-06 04:18:38.314] (03:03:03.302) datareading: new mic acquisition..
unexpected [2025-03-06 04:18:38.845] (03:0ets Jul 29 2019 12:21:46
RTC_reboot [2025-03-06 04:18:50.342]
RTC_reboot [2025-03-06 04:18:50.342] rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
RTC_reboot [2025-03-06 04:18:50.342] configsip: 0, SPIWP:0xee
RTC_reboot [2025-03-06 04:18:50.342] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
RTC_reboot [2025-03-06 04:18:50.342] mode:DIO, clock div:2
RTC_reboot [2025-03-06 04:18:50.358] load:0x3fff0030,len:1384
RTC_reboot [2025-03-06 04:18:50.358] load:0x40078000,len:14964
RTC_reboot [2025-03-06 04:18:50.358] load:0x40080400,len:4
RTC_reboot [2025-03-06 04:18:50.358] load:0x40080404,len:3192
RTC_reboot [2025-03-06 04:18:50.358] entry 0x400805f4
Best regards,
LM