ESP32 upload problem

I had hardware where I used the ESP32 DEV Kit1(Wroom), the prototype was changed to use a “Wrover” and I use the DEV KitV4 programming schematic on my new PCB. I plugged it into my notebook and the CP2102N register and I can program the first 4 PCBs without a problem. My colleague however uses windows10 and it just doesn’t want to upload. Because we use dual boot I also rebooted in Linux (Ubuntu) and to my surprise, it also did not want to “upload”. Both use esptool.py v3.1. I tried in windows to delete the pytool directory, updated all libs, tools ext to the latest version, and even reinstall visual studio code, to no avail. I tried to lower the upload speed etc,
Ini file:

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
upload_speed = 460800
upload_port = /dev/ttyUSB0

PC Error message

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  12.0% (used 39308 bytes from 327680 bytes)
Flash: [======    ]  55.2% (used 723950 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttyUSB0
Uploading .pio/build/esp32doit-devkit-v1/firmware.bin
esptool.py v3.1
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Notebook OK

Building in release mode
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  12.0% (used 39308 bytes from 327680 bytes)
Flash: [======    ]  55.2% (used 723986 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttyUSB0
Uploading .pio/build/esp32doit-devkit-v1/firmware.bin
esptool.py v3.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:0d:8e:d2:8d:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000c0fff...
Compressed 17104 bytes to 11191...
Writing at 0x00001000... (100 %)
Wrote 17104 bytes (11191 compressed) at 0x00001000 in 0.5 seconds (effective 256.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 393.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 569.7 kbit/s)...
Hash of data verified.
Compressed 724096 bytes to 441399...
Writing at 0x00010000... (3 %)
Writing at 0x0001ae8e... (7 %)
Writing at 0x00028444... (11 %)
Writing at 0x00035722... (14 %)
Writing at 0x0003b3ef... (18 %)
Writing at 0x00040f7f... (22 %)
Writing at 0x000465fe... (25 %)
Writing at 0x0004bdd2... (29 %)
Writing at 0x00050e63... (33 %)
Writing at 0x000563a8... (37 %)
Writing at 0x0005b609... (40 %)
Writing at 0x00060c75... (44 %)
Writing at 0x00067bd8... (48 %)
Writing at 0x00070356... (51 %)
Writing at 0x00075ac3... (55 %)
Writing at 0x0007b28e... (59 %)
Writing at 0x000808f2... (62 %)
Writing at 0x00085b82... (66 %)
Writing at 0x0008b590... (70 %)
Writing at 0x000915bd... (74 %)
Writing at 0x00097122... (77 %)
Writing at 0x0009d255... (81 %)
Writing at 0x000a2d6c... (85 %)
Writing at 0x000a8c05... (88 %)
Writing at 0x000aef2a... (92 %)
Writing at 0x000b4d8f... (96 %)
Writing at 0x000baf6f... (100 %)
Wrote 724096 bytes (441399 compressed) at 0x00010000 in 10.2 seconds (effective 565.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

How can I get more verbose upload information, too scared to touch the working notebook? Something is different

Ok so

  • Your computer + Linux: works
  • Your computer + Windows: ?
  • colleague’s computer + Windows: fails
  • colleague’s computer + Linux: fails

Is that right?

I can suggest a few things:

You are a star, the video with the extra capacitor on the EN line to ground did the trick to solve the mystery on linux. However I added a pull down resitor to GPIO12 as well just to be sure.

Thanks again…

1 Like