ESP32 freezes/reboots every few hours
Posted: Thu Jun 30, 2022 7:26 am
Hi there everyone, I’m having a problem with my esp32 crashing randomly.
I’m using the esp-wroom-32 module using the Arduino IDE and primarily driving a set of LEDs using this driver library
https://github.com/mrfaptastic/ESP32-HU ... el-I2S-DMA
I’m also using the neopixelbus library to drive a further limited set of 6 LEDs
My code (which unfortunately I can’t paste here) polls the server every minute to get a new image to display, this is a string of values that I loop through, updating each LED in the display (about 600 LEDs in total).
The esp32 crashes randomly every few hours, and It isn’t clear why. Without the hardware WDT active core 1 just freezes (core 0 still appears to function in this time), with the WDT enabled the board panics and resets.
With debug set to verbose the serial output shows the below, and the exception decoder shows no more detail than ‘panic_abort’
task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
task_wdt: - loopTask (CPU 1)
task_wdt: Tasks currently running:
task_wdt: CPU 0: IDLE
task_wdt: CPU 1: loopTask
task_wdt: Aborting.
abort() was called at PC 0x4010bbfc on core 0
Backtrace:0x40083bc5:0x3ffbecfc |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting...
This appears to show that there is a problem in the loop, where it is getting stuck somewhere. I would love to see where in the loop the crash occurs, but this detail doesn’t appear to available
The crashes appear at random, and don’t seem to happen when connecting to WiFi for example. I’ve checked my code and can’t see anywhere that it could be getting stuck, but clearly there is a problem somewhere.
I think this is a software problem, but it could also be hardware related. The power supply is stable and I don’t see a dip in voltage on my scope when the crashes happen. I have a few hardware versions and all are doing the same thing.
Any pointers (despite me not being able to post the code for review) would be helpful. For example, It would be helpful to get more detail on where the code is getting stuck.
Thanks
I’m using the esp-wroom-32 module using the Arduino IDE and primarily driving a set of LEDs using this driver library
https://github.com/mrfaptastic/ESP32-HU ... el-I2S-DMA
I’m also using the neopixelbus library to drive a further limited set of 6 LEDs
My code (which unfortunately I can’t paste here) polls the server every minute to get a new image to display, this is a string of values that I loop through, updating each LED in the display (about 600 LEDs in total).
The esp32 crashes randomly every few hours, and It isn’t clear why. Without the hardware WDT active core 1 just freezes (core 0 still appears to function in this time), with the WDT enabled the board panics and resets.
With debug set to verbose the serial output shows the below, and the exception decoder shows no more detail than ‘panic_abort’
task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
task_wdt: - loopTask (CPU 1)
task_wdt: Tasks currently running:
task_wdt: CPU 0: IDLE
task_wdt: CPU 1: loopTask
task_wdt: Aborting.
abort() was called at PC 0x4010bbfc on core 0
Backtrace:0x40083bc5:0x3ffbecfc |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting...
This appears to show that there is a problem in the loop, where it is getting stuck somewhere. I would love to see where in the loop the crash occurs, but this detail doesn’t appear to available
The crashes appear at random, and don’t seem to happen when connecting to WiFi for example. I’ve checked my code and can’t see anywhere that it could be getting stuck, but clearly there is a problem somewhere.
I think this is a software problem, but it could also be hardware related. The power supply is stable and I don’t see a dip in voltage on my scope when the crashes happen. I have a few hardware versions and all are doing the same thing.
Any pointers (despite me not being able to post the code for review) would be helpful. For example, It would be helpful to get more detail on where the code is getting stuck.
Thanks