ESP32 stuck/glitched after repeated brownout

__Tada9__
Posts: 3
Joined: Sun Oct 16, 2022 8:56 pm

ESP32 stuck/glitched after repeated brownout

Postby __Tada9__ » Fri May 16, 2025 10:26 pm

I have built a battery(li-ion) powered product around the ESP32-MINI-1-H4.
I did not include a reset button, thinking it would not be necessary. There is no hard shut-down either. Shutdown of the product is handled by sleep mode.

When the battery is discharged below ~3V, brownout reset is triggered(there is some drop on LDO as well). This should not happen in normal operation, but can happen if the user doesn't charge the product for extended period of time.

As the brownout reset is triggered, current draw decreases, bringing the voltage above the brownout threshold. The cycle repeats few times. After several cycles, the ESP gets stuck. I am assuming hardware level glitch.
Even after charging the battery, ESP doesn't resume operation, because it is still stuck in this glitched state.
The only way to restore operation is to dismantle the product, connect a programmer(USB<->UART transceiver) and toggle reset pin from there.

While there are some hardware level mitigations I could incorporate into the next revision, I already have 200 pieces in the wild and replacing them all is financially impossible for me. I need a SW fix.

Any Idea how to solve this? I was unable to find any other mention of this issue on the internet, which is also pretty surprising to me.

Thank you

Sprite
Espressif staff
Espressif staff
Posts: 10596
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 stuck/glitched after repeated brownout

Postby Sprite » Sat May 17, 2025 2:50 am

No such fix exists, sorry, as per the datasheet: "When a battery is used as the power supply for the ESP32 series of chips and modules, a supply voltage supervisor is recommended, so that a boot failure due to low voltage is avoided. Users are recommended to pull CHIP_PU low if the power supply for ESP32 is below 2.3V."

Perhaps you can make the issue less frequent by detecting the low battery situation very early on after reset (e.g. in the bootloader) and immediately going into deep sleep mode if you do.

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: ESP32 stuck/glitched after repeated brownout

Postby ves011 » Sat May 17, 2025 1:50 pm

One idea might be on deep sleep exit function to measure the battery level (supposing the hardware allows you that). If lower than a still safe lower limit (e.g. 3.1 V) disable deep sleep exit event.
But this will still require some external event when battery is back charged.

__Tada9__
Posts: 3
Joined: Sun Oct 16, 2022 8:56 pm

Re: ESP32 stuck/glitched after repeated brownout

Postby __Tada9__ » Sat May 17, 2025 2:54 pm

One idea might be on deep sleep exit function to measure the battery level (supposing the hardware allows you that). If lower than a still safe lower limit (e.g. 3.1 V) disable deep sleep exit event.
But this will still require some external event when battery is back charged.

The hardware does battery measurement before any power-hungry peripheral(Bluetooth) is enabled. But it dies before it even gets to my code.
The deep sleep exit event is just a push button on I36.

I do have charger status output on I39. That might actually work.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], ChatGPT-User, PerplexityBot, Qwantbot and 9 guests