Difficulty Connecting to ESP32-WROOM-32E

Chevelle
Posts: 19
Joined: Sun Nov 29, 2020 12:50 pm

Difficulty Connecting to ESP32-WROOM-32E

Postby Chevelle » Sat Feb 13, 2021 11:50 pm

I have relatively new to the ESP line but with extensive experience with a lot of other microcontrollers. I am in the prototyping stage of what will eventually be several products.

I used the ESP32-DEVKit for feasibility and everything worked great but of course won't use the DEV board in the final product. I partially built up two boards that use the ESP32-WROOM-32E. The code that flashed the DEV board just fine will not load up to the module through the serial programmer.

I have done a lot of web searching. This is not an issue of not getting the device into boot mode. It does that just fine. If I bring the EN and the BOOT pins low and then release the EN pin, the modules comes back with:

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

But the connection is never made and I get the packet timeout error. (I use Visual Studio as the IDE but the same happens when I check through the Arduino IDE.)

When I just reset the module, it returns:

load:0x3fff001c,len:5656
load:0x40078000,len:0
ho 12 tail 0 room 4
load:0x40078000,len:13844
entry 0x40078fc4
[0;32mI (31) boot: ESP-IDF v3.0.7 2nd stage bootloader[0m
[0;32mI (31) boot: compile time 09:04:31[0m
[0;32mI (31) boot: Enabling RNG early entropy source...[0m
[0;32mI (35) boot: SPI Speed : 40MHz[0m
[0;32mI (40) boot: SPI Mode : DIO[0m
[0;32mI (44) boot: SPI Flash Size : 4MB[0m
[0;31mE (48) flash_parts: partition 0 invalid magic number 0x54ae[0m
[0;31mE (54) boot: Failed to verify partition table[0m
[0;31mE (59) boot: load partition table error![0m
user code done

Any assistance is appreciated.

Chevelle
Posts: 19
Joined: Sun Nov 29, 2020 12:50 pm

Re: Difficulty Connecting to ESP32-WROOM-32E

Postby Chevelle » Sun Feb 14, 2021 2:51 pm

[SOLVED]

First off, if you are looking at this post because you can't connect your programmer to the ESP32, there is a lot of miss information about how to solve that issue.

1. Any pushbutton connected to a micro should have some modest hardware debounce to it. A 10k pullup to 3.3 and a .1 to 1.0uf capacitor to ground is fine. (I have that on both the EN and BOOT pins.)

2. The BOOT pin (IO-0) needs to be pulled down when flashing but so does IO-2. If this pin is not used in your application (open), then there is no need to add any circuitry for this as the ESP32 automatically pulls this pin low when needed. However, if you are using this pin, be sure that whatever it is connected to will not interfere with this process. (I have left this pin open.)

3. If you are using the module and not the development board, I use a 10uf capacitor on the 3.3 power pin to help stabilize the power into the device. I have not had any brown out warnings since doing this. (If you are going for the lowest power consumption possible, do not use an electrolytic capacitor here. The leakage current is higher for an electrolytic than for a ceramic.)

4. As to getting into boot mode, I do not like the idea of adding a capacitor to the the BOOT pin. I prefer to put the device into boot mode specifically when I want to, hence the use of a debounced button. I have seen a lot of methods on the net but it is easier than most suggest. Just pull the EN pin low, then the BOOT pin (at the same time is OK). Then release the EN pin before releasing the BOOT pin. The time between the releases can be quite short.

As to my problem, it turned out to be a limitation of the programmer. The programmer that I have provides limited current at 3.3v. It is not enough to support the ESP32. My application is battery powered and has an onboard battery management and charging circuit. I initially tried to flash the device with the unit off which means it was powered only by the programmer. No joy. However, when I disconnected the programmer's 3.3v and turned the unit on so it ran on the battery, it all worked!!!

NOTE: Be sure that your programmer has enough current to fully support the ESP32 module.

Chevelle
Posts: 19
Joined: Sun Nov 29, 2020 12:50 pm

Re: Difficulty Connecting to ESP32-WROOM-32E

Postby Chevelle » Sun Feb 14, 2021 4:30 pm

Unfortunately, not solved. I was able to upload revised code several times but not it is unsuccessful again.

Very troubling.

Chevelle
Posts: 19
Joined: Sun Nov 29, 2020 12:50 pm

Re: Difficulty Connecting to ESP32-WROOM-32E

Postby Chevelle » Thu Feb 25, 2021 12:06 am

Problem definitely definitely solved. Turned out not to be anything I did. The programmer was bad. It could receive but not transmit.

Everything is working great.

Who is online

Users browsing this forum: No registered users and 92 guests