Brownout detector was triggered - cannot revert to working state

Hi,

I am using an ESP32 board with a code running properly.
I plugged a TFT screen on the board, uploaded my code to use the screen, and started getting this error.

I understand it is related to a lack of power and I saw several suggestions on how to address it.

I removed the screen and reverted the code to what worked before, but the error doesn’t go away.

I am not even sure the code is being updated.

Is there a way to force get it back to work?

Kind regards

Brownout detector was triggered

ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13104
load:0x40080400,len:3036
entry 0x400805e4

If everything is disconnected from the ESP32 and it is just powered by the USB does it still give a brown out detection? If so the ESP32 may be damaged or try a different power supply.

To give advice about your setup, we need to know what you actually have. Post a hand drawn wiring diagram, with components clearly identified. A photo of the setup would be useful, too.

The ESP32 is power hungry and you should be using a power supply capable of delivering 0.5 to 1 Ampere.

Hi @Idahowalker and @jremington ,
at this stage, I have nothing connected to the board and I am trying to upload a simple Serial.println to the board.

ArduinoIDE says the code has been uploaded, but the serial keeps printing the "Brownout detector was triggered"

What board? How is it powered? What is the computer connection?

Does the spare board show the same thing?

@jremington

It's an ESP-32 ESP32S Development.

It's connected to my MAC via a USB-c to USB micro cable.

I am confused because this is the same setup I have been using for a while.
Computer, board and cable.

The change that caused it seemed to have been adding the TFT screen and upload the code to use the screen.

I reverted all of it. The board has nothing connected to it and I uploaded a simple piece of code.

There is not going away

@Idahowalker ,

sorry.
Which spare board?

I am testing with one board

And the way the TFT was connected could have damaged the ESP32.

I always have 2 or 3 spare ESP32's hanging around for when things like this happen.

Really??
Is there a way to double-check it?

I thought if the connection was wrong I would damage the screen, not the board.

Well what was the last thing done to the board before it showed the error, is most likely the cause?

It sounds like you damaged the ESP32 board making the display connection.

Until you can find time to post clear photos and other details of the setup, I won't have anything to add.

Posting advice can be found in the "How to get the best out of this forum" post.

@jremington ,

It's not about time. I don't really have photos to send.
I used breadboard and I have undone all the connections.

What I am trying to do to test is upload the most basic code to the board without anything connected to that.
I can send a photo, but I am not sure it will help.

Yes, I might have damaged the board. I am not sure what could have caused that.

Sounds like you may have damaged something.

If you are still able to upload code you could try disabling the brownout detection.

#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"

void setup()
{
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
  
  Serial.begin(115200);
  Serial.println("Brownout detector disabled");
}

void loop()
{}

1 Like

@red_car

The upload seems to go ok; see msg below.

But it still gives the Brownout message (below).

I am new to Ardunio. It's ok if I have damaged the board, I really want to learn how to troubleshoot and fix it if it's ended up not being damaged.

Tks

Wrote 18656 bytes (12053 compressed) at 0x00001000 in 0.2 seconds (effective 765.0 kbit/s)...
Hash of data verified.
Compressed 204192 bytes to 105771...
Writing at 0x00010000... (14 %)
Writing at 0x00014000... (28 %)
Writing at 0x00018000... (42 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (71 %)
Writing at 0x00024000... (85 %)
Writing at 0x00028000... (100 %)
Wrote 204192 bytes (105771 compressed) at 0x00010000 in 1.8 seconds (effective 920.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 439.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
10:13:17.222 -> p�� �L�\�9�@�
10:13:17.222 -> Brownout detector was triggered
10:13:17.222 -> 
10:13:17.222 -> ets Jun  8 2016 00:22:57
10:13:17.222 -> 
10:13:17.222 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
10:13:17.222 -> configsip: 0, SPIWP:0xee
10:13:17.256 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
10:13:17.256 -> mode:DIO, clock div:1
10:13:17.256 -> load:0x3fff0018,len:4
10:13:17.256 -> load:0x3fff001c,len:1216
10:13:17.256 -> ho 0 tail 12 room 4
10:13:17.256 -> load:0x40078000,len:10944
10:13:17.256 -> load:0x40080400,len:6388
10:13:17.256 -> entry 0x400806b4
10:13:17.321 -> 
10:13:17.321 -> Brownout detector was triggered
10:13:17.353 -> 

Sounds like the brownout is kicking in before it gets to the sketch code.

I believe there may be some way to disable the brownout by configuring certain settings in the IDE (I had a quick Google but was unable to confirm exactly what these settings might be).

I have seen other posts suggesting removing the ESP32 boards completely from the IDE, then re-installing. Seems there may have been bugs in some older versions relating to brownout. Maybe worth a try.

I found this document.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-esp-brownout-det

It states

CONFIG_ESP_BROWNOUT_DET

Hardware brownout detect & reset

Found in: Component config > ESP System Settings > Brownout Detector

The ESP has a built-in brownout detector which can detect if the voltage is lower than a specific value. If this happens, it will reset the chip in order to prevent unintended behaviour.

Default value:

  • Yes (enabled)

I tried adding, but it didn't help

#define CONFIG_ESP_BROWNOUT_DET 1
#define CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7 1

I think it is triggering before your sketch code even runs... I think you need to try and disable in the IDE somewhere so the code that gets compiled has brownout turned off.

so far no lucky on find an option on the IDE side.

I have posted on the Espressif forum now.

I tried with Platformio and the same problem.

I tried to change the usb-c port and tried with a external charger just to see if it unstuck

tks

@red_car

I found this video. Arduino: ESP32: Disable Brownout Detector (2 Solutions!!) - YouTube

It states I can change the configuration on the "Arduino\hardware\espressif..."

but this folder doesn't exist or I couldn't find it.

have you seen this before?

(I could try on Platformio as well - if I find the proper place to put the file)

tks