ESP32 WROOM 32 won't enter serial bootloader mode

jpraus
Posts: 2
Joined: Thu Jan 03, 2019 8:01 pm

ESP32 WROOM 32 won't enter serial bootloader mode

Postby jpraus » Thu Jan 03, 2019 8:20 pm

Hi,

I am building a project based on a bare ESP32-WROOM-32 module (not a devkit). So far I was able to hook it up to and boot but when I want to flash it, it won't enter DOWNLOAD_BOOT mode.

My setup:
GPIO2 -> 10k pulldown to GND
GPIO0 -> 10k pullup to VCC
EN -> 10k pullup to VCC and 100nF capacitor between EN and GND
TX and RX connected to FTDI chip

This is what I get on serial console when doing a hard reset by connecting EN to GND:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:3480
load:0x40078000,len:7804
ho 0 tail 12 room 4
load:0x40080000,len:252
entry 0x40080034
[0;32mI (46) boot: ESP-IDF v2.0-3-gbef9896 2nd stage bootloader[0m
[0;32mI (46) boot: compile time 05:59:45[0m
[0;32mI (46) boot: Enabling RNG early entropy source...[0m
[0;32mI (65) boot: SPI Speed      : 40MHz[0m
[0;32mI (77) boot: SPI Mode       : DIO[0m
[0;32mI (90) boot: SPI Flash Size : 4MB[0m
[0;32mI (102) boot: Partition Table:[0m
[0;32mI (113) boot: ## Label            Usage          Type ST Offset   Length[0m
[0;32mI (136) boot:  0 phy_init         RF data          01 01 0000f000 00001000[0m
[0;32mI (159) boot:  1 otadata          OTA data         01 00 00010000 00002000[0m
[0;32mI (183) boot:  2 nvs              WiFi data        01 02 00012000 0000e000[0m
[0;32mI (206) boot:  3 at_customize     unknown          40 00 00020000 000e0000[0m
[0;32mI (229) boot:  4 ota_0            OTA app          00 10 00100000 00180000[0m
[0;32mI (252) boot:  5 ota_1            OTA app          00 11 00280000 00180000[0m
[0;32mI (276) boot: End of partition table[0m
[0;32mI (289) boot: Disabling RNG early entropy source...[0m
[0;32mI (306) boot: Loading app partition at offset 00100000[0m
[0;32mI (1481) boot: segment 0: paddr=0x00100018 vaddr=0x00000000 size=0x0ffe8 ( 65512) [0m
[0;32mI (1482) boot: segment 1: paddr=0x00110008 vaddr=0x3f400010 size=0x1c5f0 (116208) map[0m
[0;32mI (1498) boot: segment 2: paddr=0x0012c600 vaddr=0x3ffb0000 size=0x0215c (  8540) load[0m
[0;32mI (1529) boot: segment 3: paddr=0x0012e764 vaddr=0x40080000 size=0x00400 (  1024) load[0m
[0;32mI (1552) boot: segment 4: paddr=0x0012eb6c vaddr=0x40080400 size=0x1b028 (110632) load[0m
[0;32mI (1631) boot: segment 5: paddr=0x00149b9c vaddr=0x400c0000 size=0x00034 (    52) load[0m
[0;32mI (1632) boot: segment 6: paddr=0x00149bd8 vaddr=0x00000000 size=0x06430 ( 25648) [0m
[0;32mI (1648) boot: segment 7: paddr=0x00150010 vaddr=0x400d0018 size=0x7a56c (501100) map[0m
[0;32mI (1676) heap_alloc_caps: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (1698) heap_alloc_caps: At 3FFBA6B8 len 00025948 (150 KiB): DRAM[0m
[0;32mI (1719) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM[0m
[0;32mI (1741) heap_alloc_caps: At 4009B428 len 00004BD8 (18 KiB): IRAM[0m
[0;32mI (1761) cpu_start: Pro cpu up.[0m
[0;32mI (1773) cpu_start: Single core mode[0m
[0;32mI (1786) cpu_start: Pro cpu start user code[0m
[0;32mI (1847) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (1927) uart: queue free spaces: 10[0m
Bin version:0.10.0

I (1928) wifi: wifi firmware version: c604573
I (1929) wifi: config NVS flash: enabled
I (1930) wifi: config nano formating: disabled
I (1938) wifi: Init dynamic tx buffer num: 32
I (1939) wifi: wifi driver task: 3ffc4eac, prio:23, stack:3584
I (1944) wifi: Init static rx buffer num: 10
I (1948) wifi: Init dynamic rx buffer num: 0
I (1952) wifi: Init rx ampdu len mblock:7
I (1955) wifi: Init lldesc rx ampdu entry mblock:4
I (1960) wifi: wifi power manager task: 0x3ffca254 prio: 21 stack: 2560
I (1966) wifi: wifi timer task: 3ffcb2d4, prio:22, stack:3584
[0;31mE (1972) phy_init: PHY data partition validated[0m
[0;32mI (1991) phy: phy_version: 329, Feb 22 2017, 15:58:07, 0, 0[0m
I (1992) wifi: mode : softAP (b4:e6:2d:cf:37:02)
I (1995) wifi: mode : sta (b4:e6:2d:cf:37:01) + softAP (b4:e6:2d:cf:37:02)
I (1999) wifi: mode : softAP (b4:e6:2d:cf:37:02)
So the module works, but I got the same result even when I connect GPIO0 to GND and do the reset - I would expect it to enter DOWNLOAD_BOOT mode but it still boots as usual.

I tried my devkit board and got following message to console while pressing BOOT on reset:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
That is what I would expect from my ESP-WROOM-32 module as well, but I cannot achieve it. Already spend several days on trying to solve the issue.

Any help appreciated!

jpraus
Posts: 2
Joined: Thu Jan 03, 2019 8:01 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby jpraus » Fri Jan 04, 2019 2:30 pm

Here is schematic of my wiring:
schematics.png
schematics.png (28.12 KiB) Viewed 33030 times
I think I have everything wired up correctly, can it be something with built-in firmware?

rustyx
Posts: 5
Joined: Thu Mar 14, 2019 10:19 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby rustyx » Wed May 08, 2019 7:48 pm

Both IO0 and IO2 must be low to enter download mode. Are you sure you pull IO2 down, not up? It's pulled down in ESP32 by default.

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby username » Wed May 08, 2019 8:58 pm

Each strapping pin is connected to its internal pull-up/pull-down during the chip reset. Consequently, if a strapping
pin is unconnected or the connected external circuit is high-impedance, the internal weak pull-up/pull-down will
determine the default input level of the strapping pins
Remove R16, is not needed. AS GPIO2 is set to the correct state per above.

You need to ensure that your performing the Program Mode scenario properly.

Annotation 2019-05-08 155435.jpg
Annotation 2019-05-08 155435.jpg (99.78 KiB) Viewed 32275 times

iabarry
Posts: 3
Joined: Sat Aug 17, 2019 3:36 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby iabarry » Sat Aug 17, 2019 3:42 pm

hi username

Great image for the sequencing of EN and GPIO-0.
When does the uploading occur and when do I release EN?

thanks
Barry
love the creative account name too!

iabarry
Posts: 3
Joined: Sat Aug 17, 2019 3:36 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby iabarry » Sun Aug 18, 2019 2:14 am

I've not seen this concisely written in one place, so here goes:

1. Prerequisites
In the IDE:
Select the proper PORT
Set baud rate 115600 <--- this may change if you change ports
Select the "ESP32 Dev Board"

1.1 Ensure IO-2 is Grounded.
IO-2 must be low to enter bootloader. By default it is pulled. Check to see if your circuit pulls it up.

1.2 Press and maintain BOOT switch (IO-0 to Gnd)

2. Briefly press EN switch. This is really Reset-F to the ESP
The IO-0 and IO-2 conditions must both be met to enter bootloader mode.
After releasing EN (reset), you can release Boot (IO-0)

3. Start the loading in the Arduino IDE.
Observe both Tx and Rx LEDs on the CP2102 board, if so equipped.

4. When loading is complete
4.1 IO-2 is now free for other assignments
4.2 Perform Reset by briefly pressing EN. The uploaded program will now execute.

I hope folks find this of value.
Last edited by iabarry on Tue Aug 20, 2019 3:53 am, edited 1 time in total.

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 WROOM 32 won't enter serial bootloader mode

Postby username » Mon Aug 19, 2019 2:29 am

Great image for the sequencing of EN and GPIO-0.
When does the uploading occur and when do I release EN?
The uploading starts via serial data. EN is just really the reset pin. So you can just press it and release it quickly. The important thing here is that IO-0 is held low just a bit longer after EN is released. That is what puts it into programming mode.
1.1 Ensure IO-2 is Grounded.
IO-2 must be low to enter bootloader.
Sort of true. If nothing is connected to IO-2, it will be in the proper state internally. Only if say you connect something like a pullup resistor or something else that pulls it up will you need to insure its low first.
4. When loading is complete
4.1 Release the Boot switch
You can release the Boot Switch (IO-0) after say 100ms after you have released EN. Its not required to keep it low during the whole programming cycle.

Who is online

Users browsing this forum: No registered users and 73 guests