#003 ESP get into bootloader automatic
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
I came across a serial pin problem in my record:
I used pin2, and in a way it could work, as long as it's TX and won't be pull high when boot.
But it seems to be better to use other pins
Select bootloader mode
The ESP32 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.py |
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.
GPIO2 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloader.
Other Pins
As well as GPIO0 and GPIO2, the following pins influence the serial bootloader mode:
GPIO | Meaning |
---|---|
12 (MTDI) | If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is connected and pulled high. See ESP32 datasheet for more details. |
15 (MTDO) | If driven Low, silences boot messages from normal boot. Has internal pull-up, so unconnected = High = normal output. |
Automatic bootloader
Automatic bootloader
esptool.py can automatically enter the bootloader on many boards by using the RTS and DTR modem status lines to toggle GPIO0 and EN automatically.
Make the following connections for
esptool.py
to automatically enter the bootloader:ESP32 Pin | Serial Pin |
---|---|
EN | RTS |
GPIO0 | DTR |
Note that some serial terminal programs (not esptool.py) will assert both RTS and DTR when opening the serial port, pulling them low together and holding the ESP32 in reset. If you've wired RTS to the ESP32 then you should disable RTS/CTS "hardware flow control" in the program. Development boards (including all Espressif boards) usually use additional circuitry to avoid this problem - if both RTS and DTR are asserted together, this doesn't reset the chip.
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
留言
張貼留言