I'm encountering an issue with my ESP32 that I hope to get some advice on. When I run my code that involves using two displays, the ESP32 continuously resets in a loop with rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT). However, when I use the same code with just one ANY display, it works perfectly fine.
I’m puzzled about what could be causing this behavior when both displays are connected. Below is the code I’m using:
Has anyone faced a similar problem or can provide insights into why this might be happening? Any suggestions on how to troubleshoot or fix this issue would be greatly appreciated!
I had a similar experience some time ago, wasn't using the same library you're using, but in my case it went sideways as you describe, but developing my own libraries.
The problem was related to a interference issue with the second display that made the esp32 to get in an eternal loop that finally kept it from kicking the watchdog. To make it short the timers used to manage the refreshing times of the displays where shared, so everytime one of the displays reseted the count it was resetted for both...
The distintive behavior that gave me the first hint was the precise periodicity of the reset time, which was easily noted by the onboard led that blinked every 5 seconds with every reboot.
Check if you have to make some provision to drive two different displays to keep all the parameters of one separated from the other's.
Hi @gabygold , I appreciate your answer, sorry for the interference before I noticed your answer.
From my experience with some demo code that end in an endless while loop, the ESP32 doesn't do watchdog restarts, in contrast to ESP8266. You may need to enable watchdog on ESP32 first.
What I can recall now from that experience is that I was using some basic template I used to avoid configuring some stuff once and again, so maybe the watchdog enable code was there, or was part of the debugging session code inserted.
So, taking out the mention on any "'watchdog entity" my issue was:
_ Two display objects were instantiated and started
_ The displays had timers to keep them refreshed as they were 74HC595 dynamic driven.
_ Each time the display was refreshed the timer was reseted for the next refresh.
_ The timer start time variable was wrongly declared as static, so one display reseted the timer for both displays.
_ The ESP32 rebooted every 5 seconds...
I believe that better describes my issues and my solution. And the library development thankfully arrived to an usable stage! Thank you once again @silentobserver .
The wiring is basic — the pins mentioned in the previous code are connected to the display segment pins through a 330 Ohm resistor. Even if I don't connect anything and simply upload the code, it still triggers a reset problem. I believe I've used the same code successfully on a different ESP32 board purchased from AliExpress before, but MH-ET LIVE.
OK, I've just struck this watchdog reset every few seconds problem with an ESP32 "cheap yellow display," uploaded to from Arduino IDE, and fixed it in the Tools menu by selecting... Events run on: Core 0
and... Arduino runs on: Core 1