Xiao ESP32S3 Custom Reset and Boot Buttons

I’ll have a bunch of questions about the ESP32S3 (non-sense :slight_smile: ). Keeping them in seperate threads to focus on one question at a time.

My first one is about adding some custom buttons for Reset and Boot, as it is such a pain to press these on the board. I want to solder custom push buttons, but I am not sure where to. I see an “EN” and “GND” pad on the back. I will try to short EN to GND for the reset, but how about the boot button? I see a section for the strapping pins in the wiki, but I can’t decipher if these map to any physical pins on the board.

Note, I am using the ESP32S3 (non-sense) with the ePaper breakout board.

Thanks.

Hi there,
SO let’s keep it in one thread so we don’t have to jump around.
The strapping pins are important when needing certain options at boot time.
Refer to the technical reference guide for the ESP32S3 NO they do not use the Peripheral multiplexor so they can’t be reassigned. They are however latched at boot time so you can use them as pins after that. (most people and designs stay away from that)
As indicated in the other thread, Look at the schematic, it and the pins xls spreadsheet are on the resources section of the wiki, READ it, come back ask more good questions LOL :+1: :smile:

From the schematic, it looks like GPIO_0 is not connected anywhere other than the BOOT button on the board, which means I cannot easily solder my own boot button at all. Am I reading the schematic wrong?

Unfortunately, yes.
According to its schematic, the BOOT button links to GPIO0 which is not connected to anywhere else.
But in most cases we don’t need to push this button, right?

Most cases, right, but I am working on an ePaper solution, and on this project, most of the time the esp32 is in deep sleep mode. Even if I reset, it goes back into deep sleep in a few seconds (just update the screen, then deep sleep). So I cannot flash the device most of the time. Therefore putting it into boot loader mode is convenient.

1 Like

I think I need to be a little creative here. I’m thinking:

Option 1: If I reset via EN pin, the wakeup reason is “not timer”, and I can delay putting the device into deep sleep for a minute or so, which will give me the time to flash. (Hit reset button, then flash). Handle it in the default: section below.

  wakeup_reason = esp_sleep_get_wakeup_cause();

  switch(wakeup_reason)
  {
    case ESP_SLEEP_WAKEUP_EXT0 : Serial.println("Wakeup caused by external signal using RTC_IO"); break;
    case ESP_SLEEP_WAKEUP_EXT1 : Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
    case ESP_SLEEP_WAKEUP_TIMER : Serial.println("Wakeup caused by timer"); break;
    case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println("Wakeup caused by touchpad"); break;
    case ESP_SLEEP_WAKEUP_ULP : Serial.println("Wakeup caused by ULP program"); break;
    default : Serial.printf("Wakeup was not caused by deep sleep: %d\n",wakeup_reason); break;
  }

Option 2: Use one of the GPIO pins as RTC_GPIO to wakeup, and if that is the wakeup reason, don’t go into deep sleep immediately.

I was thinking of wakeup via UART, but that only works with light sleep. So that is not an option.

I think either option 1 or 2 would work. Will give it a try.

1 Like