SPI_FAST_FLASH_BOOT - This is the normal SPI flash boot mode.
If it was low on reset, the bit will be cleared.Ī number of boot mode strings can be shown depending on which bits are set:ĭOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2) - ESP32 is in download flashing mode (suitable for esptool) If the pin was high on reset, the bit value will be set. The individual bit values are as follows:
HD LOADER ELF. SOFTWARE CODE
The value can be read in ESP32 code via the get_reset_reason() ROM function.īoot:0xNN (DESCRIPTION) is the hex value of the strapping pins, as represented in the GPIO_STRAP register. A mapping between the hex value and each reason can be found in the ESP-IDF source. Rst:0xNN (REASON) is an enumerated value (and description) of the reason for the reset.
HD LOADER ELF. SOFTWARE SERIAL
There are no such serial control lines at allĮts 00 : 22 : 57 rst : 0x1 ( POWERON_RESET ), boot : 0x3 ( DOWNLOAD_BOOT ( UART0 / UART1 / SDIO_REI_REO_V2 )) The DTR and RTS lines are configured differently
Your hardware does not have the DTR and RTS lines connected to GPIO0 and EN ( CHIP_PU) However, esptool.py is not able to reset your hardware automatically in the following cases: In general, you should have no problems with the official Espressif development boards. Adding a 1uF (or higher) value capacitor between EN pin and GND may make automatic reset more reliable.) This results in unreliable automatic reset, especially on Windows. (Some third party ESP32 development boards use an automatic reset circuit for EN & GPIO0 pins, but don’t add a capacitor on the EN pin. This functionality can be disabled by disabling HUPCL (ie sudo stty -F /dev/ttyUSB0 -hupcl). This can hold the ESP32 in a reset loop which may cause some serial adapters to subsequently reset loop. In Linux serial ports by default will assert RTS when nothing is attached to them. Make the following connections for esptool to automatically enter the bootloader of an ESP32 chip:
The Switch Button section shows buttons needed for manually switching to bootloader. This is shown in the ESP32 Module section of the schematic. If this circuitry is implemented (all Espressif boards have it), adding a capacitor between the EN pin and GND (in the 1uF-10uF range) is necessary for the reset circuitry to work reliably. The schematic shows this specific circuit with two transistors and its truth table. If RTS is wired directly to EN then RTS/CTS “hardware flow control” needs to be disabled in the serial program to avoid this.Īn additional circuitry is implemented in order to avoid this problem - if both RTS and DTR are asserted together, this doesn’t reset the chip.
HD LOADER ELF. SOFTWARE DRIVERS
Some OS and/or drivers may activate RTS and or DTR automatically when opening the serial port (true only for some serial terminal programs, not esptool.py), pulling them low together and holding the ESP in reset. The Micro USB 5V & USB-UART section shows the DTR and RTS control lines of the USB to serial converter chip connected to GPIO0 and EN pins of the ESP module. When developing esptool.py, keep in mind DTR and RTS are active low signals, i.e., True = pin 0V, False = pin VCC.Īs an example of auto-reset curcuitry implementation, check the schematic of the ESP32 DevKitC development board: