ESP32 reset reason

mistertransistor
Posts: 5
Joined: Sun Apr 07, 2024 9:27 pm

ESP32 reset reason

Postby mistertransistor » Thu Nov 14, 2024 4:55 pm

How reliable is the reset reason that you can obtain from the ESP32?
I ask because I have an ESP32-S3 supermini that is resetting itself intermittently. It is in a portable medical device that reads 3 sensors regularly. To save power it only turns on the WiFi every 5 minutes, transmits the data over ESP-NOW, and then turns off the WiFi. This works perfectly with an ESP32-C3 supermini, but I 'upgraded' to an S3 and have these intermittent failures, which seem to occur soon after the wifi is turned on. The reset reason given is either "Reset due to power-on event." or sometimes "Brownout reset (software or hardware)." Does this truly indicate a power problem? I have a large aluminium electrolytic capacitor soldered onto the pads that supply power to the socket for the S3. I have ordered a polythene (low ESR) electrolytic to see if that helps.
Another oddity - after a genuine power-on, the reset reason is "Reset reason can not be determined."

Thanks for any information.

Andrew

PS the resets occur under either USB or battery power

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 reset reason

Postby ESP_Sprite » Fri Nov 15, 2024 2:38 am

Very likely, yes. Check the current capability of your LDO (>500mA), make sure there's at least some capacitance on the power rails close to the ESP32 module if the traces from the power supply to it are of any significant length, and also check that the WiFi antenna doesn't have metal around it.

mistertransistor
Posts: 5
Joined: Sun Apr 07, 2024 9:27 pm

Re: ESP32 reset reason

Postby mistertransistor » Sun Nov 17, 2024 4:02 pm

Thanks. The S3 Zero is a commercial small module and I assume the regulator has a correct spec.
I have solved the problem by
1. introducing a few seconds delay between turning on wifi and initialising ESP-NOW
2. moving the decoupling capacitor from the 5V pin to the 3V3 pin
Later I replaced the standard electrolytic by a solid polymer one with low ESR. I do monitor the supply voltage and I can see that it drops by 50mV when WiFi is on.

Can I ask why you say "check that the WiFi antenna doesn't have metal around it." Apart from the obvious answer that it won't work if it is shielded.

Cheers
Andrew

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 reset reason

Postby ESP_Sprite » Mon Nov 18, 2024 2:29 am

mistertransistor wrote:
Sun Nov 17, 2024 4:02 pm
Can I ask why you say "check that the WiFi antenna doesn't have metal around it." Apart from the obvious answer that it won't work if it is shielded.
It'll not only not work (or work badly), the ESP32 will also use more power than normal. Not sure what the working mechanism is, but I noticed this when I designed an ESP32 module to sit against a metallized E-ink back with only the 0.8mm of PCB as a separation.

Who is online

Users browsing this forum: No registered users and 74 guests