Boot Mode Selection
This guide explains how to select the boot mode correctly and describes the boot log messages of ESP32-S3.
Warning
The ESP32-S3 has a 45k ohm internal pull-up/pull-down resistor at GPIO0 (and other pins). If you want to connect a switch button to enter the boot mode, this has to be a strong pull-down. For example a 10k resistor to GND.
Information about ESP32-S3 strapping pins can also be found in the ESP32-S3 Datasheet, section “Strapping Pins”.
On many development boards with built-in USB/Serial, esptool.py
can automatically reset the board into bootloader mode. For other configurations or custom hardware, you will need to check the orientation of some “strapping pins” to get the correct boot mode:
Select Bootloader Mode
GPIO0
The ESP32-S3 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash.
GPIO0 Input |
Mode |
---|---|
Low/GND |
ROM serial bootloader for esptool |
High/VCC |
Normal execution mode |
GPIO0 has an internal pullup resistor, so if it is left unconnected then it will pull high.
Many boards use a button marked “Flash” (or “BOOT” on some Espressif development boards) that pulls GPIO0 low when pressed.
GPIO46
GPIO46 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloader.
In normal boot mode (GPIO0 high), GPIO46 is ignored.
Other Pins
As well as the above mentioned pins, other ones influence the serial bootloader, please consult the ESP32-S3 Datasheet, section “Strapping Pins”.
Automatic Bootloader
esptool.py
resets ESP32-S3 automatically by asserting DTR
and RTS
control lines of the USB to serial converter chip, i.e., FTDI, CP210x, or CH340x. The DTR
and RTS
control lines are in turn connected to GPIO0
and EN
(CHIP_PU
) pins of ESP32-S3, thus changes in the voltage levels of DTR
and RTS
will boot the ESP32-S3 into Firmware Download mode.
Note
When developing esptool.py
, keep in mind DTR
and RTS
are active low signals, i.e., True
= pin @ 0V, False
= pin @ VCC.
As an example of auto-reset curcuitry implementation, check the schematic of the ESP32 DevKitC development board:
The Micro USB 5V & USB-UART section shows the
DTR
andRTS
control lines of the USB to serial converter chip connected toGPIO0
andEN
pins of the ESP module.Some OS and/or drivers may activate
RTS
and orDTR
automatically when opening the serial port (true only for some serial terminal programs, notesptool.py
), pulling them low together and holding the ESP in reset. IfRTS
is wired directly toEN
then RTS/CTS “hardware flow control” needs to be disabled in the serial program to avoid this. An additional circuitry is implemented in order to avoid this problem - if bothRTS
andDTR
are asserted together, this doesn’t reset the chip. The schematic shows this specific circuit with two transistors and its truth table.If this circuitry is implemented (all Espressif boards have it), adding a capacitor between the
EN
pin andGND
(in the 1uF-10uF range) is necessary for the reset circuitry to work reliably. This is shown in the ESP32 Module section of the schematic.The Switch Button section shows buttons needed for manually switching to bootloader.
Make the following connections for esptool
to automatically enter the bootloader of an ESP32-S3 chip:
ESP Pin |
Serial Pin |
---|---|
EN |
RTS |
GPIO0 |
DTR |
In Linux serial ports by default will assert RTS when nothing is attached to them. This can hold the ESP32-S3 in a reset loop which may cause some serial adapters to subsequently reset loop. This functionality can be disabled by disabling HUPCL
(ie sudo stty -F /dev/ttyUSB0 -hupcl
).
(Some third party ESP32-S3 development boards use an automatic reset circuit for EN
& GPIO0
pins, but don’t add a capacitor on the EN
pin. This results in unreliable automatic reset, especially on Windows. Adding a 1uF (or higher) value capacitor between EN
pin and GND
may make automatic reset more reliable.)
In general, you should have no problems with the official Espressif development boards. However, esptool.py
is not able to reset your hardware automatically in the following cases:
Your hardware does not have the
DTR
andRTS
lines connected toGPIO0
andEN
(CHIP_PU
)The
DTR
andRTS
lines are configured differentlyThere are no such serial control lines at all
Manual Bootloader
Depending on the kind of hardware you have, it may also be possible to manually put your ESP32-S3 board into Firmware Download mode (reset).
For development boards produced by Espressif, this information can be found in the respective getting started guides or user guides. For example, to manually reset a development board, hold down the Boot button (
GPIO0
) and press the EN button (EN
(CHIP_PU
)).For other types of hardware, try pulling
GPIO0
down.