ESP32-Pi - how to get it into download mode

tjey

New member
Sorry for the extreme newbie question, but it's been a bit since I've done any ESP32 Development.

I've purchased an ESP32-Pi and a Eight MOSFETS 8-Layer Stackable HAT for Raspberry Pi a little while ago, and unfortunately, other projects got in the way of my plans to use them.

I'm using Platform.IO with Visual Studio code on Windows 11, and I'm trying to get a simple "hello world" working on the ESP32-Pi.

I see the COM port (COM7) show up in Device Manager, but when I try to upload my code to the ESP32-Pi (connected via a known good USB-C cable), I get the following error:

Code:
Looking for upload port...
Auto-detected: COM7
Uploading .pio\build\esp32doit-devkit-v1\firmware.bin
esptool.py v4.5.1
Serial port COM7
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.

On other ESP32 DevKit board, I need to press a button to upload, but the ESP32-Pi doesn't have any (or at least not that I can see).

Thanks in advance.

BTW, I'm working on porting the Raspberry Pi sample for V3+ of the Eight MOSFETS 8-Layer Stackable HAT for Raspberry Pi to ESP32 so that I can use the PWM features, etc. and this is my first step towards actually testing that out.
 

tjey

New member
I've also notice that the LED on the board doesn't come on when I plug in the USB cable. Does the board need another power source other than the USB cable?
 

alexburcea

Moderator
Staff member
Hi,

The card does not need a separate power supply, and the only requirement is to set the dipswitches in programming mode (1/2 ON; 3/4 OFF).
On the other hand, we test the card only with Arduino IDE.
Please follow the instructions from the readme.

Alex.
 

tjey

New member
Alex,

Thanks for the reply!

I've followed the instructions from the readme, and I'm now trying to build and upload the gpio example from the arduino IDE. I'm still getting the same error. Here's the output from the Arduino IDE:

Code:
Sketch uses 318634 bytes (24%) of program storage space. Maximum is 1310720 bytes.
Global variables use 22012 bytes (6%) of dynamic memory, leaving 305668 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port COM7
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2

I've double checked the COM port in Device Manager, and it shows the following:

Screenshot 2025-04-08 080058.png


The DIP switch are set as you mentioned (1/2 ON, 3/4 OFF).

Should the LED (D1) light up when the USB-C cable is connected? Mine does not. I've also tried power supplies (phone charger, USB-C PD Power bank) and the LED does not light up.

I've tested the same setup (same IDE, same cable, same USB port on my desktop, but different board settings in Arduino IDE & Platform.IO) with an ESP32-SuperMini-C3, and it seems to work fine in that case.

Any further help would be appreciated!
 

alexburcea

Moderator
Staff member
Hi,

The LED is connected to one of the GPIO's so if the ESP32 has no program inside to control it, it remains off. You could power the card also externally (I see you have the mosfet card), but I doubt that it would make a difference..
Please write an email to support@sequentmicrosystems.com telling them your order number and asking for a replacement.
 

tjey

New member
Thanks Alex.

Is there any other troubleshooting I can do to determine that the problem is not between the keyboard and chair (as opposed to the board itself)?
 

alexburcea

Moderator
Staff member
What type of board do you select in Arduino IDE? Could you also try with a previous version of the Arduino? The latest is 2.x I am guessing you use that one, and how about the 1.x and select "DOIT ESP32 devkit V1"
 

tjey

New member
I've selected "DOIT ESP32 DEVKIT V1" in the arduino IDE.

Do you mean to try a previous version of the Arduino IDE?
 

tjey

New member
I had the impression you use Arduino 2.x, but if this is not the case, forget about my last message.
i not sure if I'm answering the correct question, but I'm using the latest Arduino IDE, which is 2.x

Regardless, I've emailed support with my order number, but I'm very open if there is more troubleshooting I can do, since that is likely very much faster than getting a new board.
 

alexburcea

Moderator
Staff member
The switches are correct, we will send you a replacement, but if you could share a picture of the back of the card, we might see something wrong, we will appreciate.
 

tjey

New member
Just to close this off, it looks like the board is defective. Sequent Microsystems is shipping me a new board, which, on top of all the troubleshooting that Alex had me do, is wonderful customer service.

Well done, and I can't wait to get the replace and get my project on the way!
 

tjey

New member
Ok, so this gets stranger and stranger, and I'm not sure where to go from here:

I've received the new board, tried it on my main dev computer (running Windows 11), and it gives me the same error :(

However, I tried on a old Windows 10 laptop I've got with the latest version of the Arduino IDE, and it seems to work fine there.

When I started troubleshooting the problem, I had the same version of the CH Serial driver on both machines.
3
I've read that newer versions of the CH340 Serial driver have some issues with Windows 11, so I reverted back to old version (3.5.2019.1), but that didn't change things at all. I've tried uploading my sketch on the Win 10 machine, connecting it to the Windows 11 machine, and then using PuTTY to connect to the serial port, and I can see the serial output from my sketch.

Any other tips I can try on this new problem?
 

alexburcea

Moderator
Staff member
Hi,

I am running Win 11 Home version 23H2 and have no issue with the driver. Upload does more than communicate over USART; it also controls the DTR and RTS signals. It is hard to get a solution when I can't replicate the problem.

Alex.
 

tjey

New member
I completely understand that there isn't much to go on here.

I've tried making the sure the drivers are in sync between the two machines, and even the same driver consistently fails on my desktop, and pretty consistently works on the laptop. I say "pretty consistently" as I have had it fail a few times on my laptop as well, but when that happens, it does seem to work if I first upload a very simple sketch from either the Arduino IDE or Visual Studio Code/Platform.io, and then it works if I try to upload something a bit more complicated.

I've tried running esptool manually with various command (i.e. read-mac, erase-flash) and they consistently work on one machine, but not the other. One the machine that it fails on, I've tried running esptool with trace option, and I see the output from whatever I've successfully uploaded last in the esptool trace info.

Are the DTR and RTS signals direct lines on the USB-C port? I wonder if all my cables are lacking some lines.

I've tried a few more tests, and I've noticed that running the SD card example never seems to work, even with a freshly formatted microSD card. I'm not sure what that points to though. One thought was maybe there isn't enough power to read a flash card, but that's a pure guess on my part.

Is there a chance that the board isn't getting enough power from the USB port? I did a quick check in USBview from the both machines, and they both say that the device has requested 98mA of power.

I unfortunately don't have another power supply yet, although the parts are on the way to make one, since my target is have the 8MOSFET board controlling some 12V power outputs (including PWM), and regulator/buck convertor makes it pretty easy to supply 5V from a 12V power supply.
 
Top