Brownout Detector Triggered

Hello everyone!

I am uploading simple led blinking example into the ESP 32 using Arduino IDE. Every time I upload the code I got the error Brown detector was triggered. I could not figure out why I am getting this error. Please help I am new to programming.

Reads like your power supply is an issue, or the ESP32 is defective, or line 1294 of your code you posted is wrong, or you are using one of the pins your not supposed to use as shown in the schematic you posted.

Be a trooper and let us help you with your issue by posting your formatted code in code tags and a schematic.

Hello Sir!

Here is my code!
I dont think code has an issue!

void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Pardon me I dont have schematics. By the way I have just connected the ESP 32 to my PC with the USB cable and no other circuit.

Thank you in advance

John_Gabriel:
By the way I have just connected the ESP 32 to my PC with the USB cable and no other circuit.

You need to post a link to the datasheet for the ESP32 board you are using.

A bare ESP32 can't be directly connected to a USB cable without making up a linking circuit. If that's what you have done then please post your circuit diagram.

...R

PS ... Your Title does not let people know that you have an ESP32 problem and those who could help might not read your Thread. You can change the Title if you edit your Original Post.

If you are new to the ESP32 and you use pinMode(LED_BUILTIN, OUTPUT); which is GPIO13, not connected to the built in LED, on the ESP32 and uses the TCK pin, you may encounter some major issues, unless you know how/when to use the TCK pin.

Instead use pinMode( GPIO2, OUTPUT); to blink the internal LED and get yourself the ESP32-WROOM-32 pinout. If you are using a ESP32 WROVER, then get the ESP32-WROVER pinout and use GPIO0.

You might want to use: #include “esp_system.h” //This inclusion configures the peripherals in the ESP system.

and if you want to go all neat-o the ESP32 has 2 cores and a ULP processor

Using the ULP processor to blink the led

#include "sdkconfig.h"
#include "esp_system.h" //This inclusion configures the peripherals in the ESP system.
#include "esp32/ulp.h"
#include "driver/rtc_io.h"

setup()
{
 ULP_BLINK_RUN(1000000);
}

loop(){}

void ULP_BLINK_RUN(uint32_t us)
{
  size_t load_addr = 0;
  int rtcAddress2047 = 2047; // rtc address to store state R0
  RTC_SLOW_MEM[rtcAddress2047] = 0; // set initial state to address location
  ulp_set_wakeup_period(0, us);
  const ulp_insn_t  ulp_blink[] =
  {
    I_MOVI(R3, rtcAddress2047),             // #rtcAddress2047 -> R3
    I_LD(R0, R3, 0),                        // R0 = RTC_SLOW_MEM[R3(#rtcAddress2047)]
    M_BL(1, 1),                             // GOTO M_LABEL(1) IF R0 < 1
    I_WR_REG(RTC_GPIO_OUT_REG, 26, 27, 1),  // RTC_GPIO2 = 1
    I_SUBI(R0, R0, 1),                      // R0 = R0 - 1, R0 = 1, R0 = 0
    I_ST(R0, R3, 0),                        // RTC_SLOW_MEM[R3(#rtcAddress2047)] = R0
    M_BX(2),                                // GOTO M_LABEL(2)
    M_LABEL(1),                             // M_LABEL(1)
    I_WR_REG(RTC_GPIO_OUT_REG, 26, 27, 0),// RTC_GPIO2 = 0
    I_ADDI(R0, R0, 1),                    // R0 = R0 + 1, R0 = 0, R0 = 1
    I_ST(R0, R3, 0),                      // RTC_SLOW_MEM[R3(#rtcAddress2047)] = R0
    M_LABEL(2),                             // M_LABEL(2)
    I_HALT()                                // HALT COPROCESSOR
  };
  const gpio_num_t led_gpios[] =
  {
    GPIO_NUM_2,
    // GPIO_NUM_0,
    // GPIO_NUM_4
  };
  for (size_t i = 0; i < sizeof(led_gpios) / sizeof(led_gpios[0]); ++i) {
    rtc_gpio_init(led_gpios[i]);
    rtc_gpio_set_direction(led_gpios[i], RTC_GPIO_MODE_OUTPUT_ONLY);
    rtc_gpio_set_level(led_gpios[i], 0);
  }
  size_t size = sizeof(ulp_blink) / sizeof(ulp_insn_t);
  ulp_process_macros_and_load( load_addr, ulp_blink, &size);
  ulp_run( load_addr );
} // void ULP_BLINK_RUN(uint32_t us)

The LED will blink and not use core 0 or core 1.

Hello Sirs!

Thanks for your support.

I managed to eliminate the error. I was literally surprised not happy when I git everything correct.
I just changed the USB cable and boom Brown detector triggered message vanished.

BTW i was using ESP32DEV KIT.

Regards