python esptool...." /> python esptool...." /> python esptool...."/>

Can't upload my code to esp32 and not able able to erase flash

2.1k views Asked by At

Every time i try to upload a code or erase flash it gets me "A fatal error occurred: Timed out waiting for packet content"

C:\esptool>python esptool.py --port com4 erase_flash esptool.py v3.0-dev Serial port com4

Connecting........_

Detecting chip type... ESP32

Chip is ESP32D0WDQ6 (revision 1)

Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

Crystal is 40MHz

MAC: 24:6f:28:a2:5a:7c

Uploading stub...

Running stub...

Stub running...

Erasing flash (this may take a while)...

A fatal error occurred: Timed out waiting for packet content

2

There are 2 answers

0
paulelong On

I just encountered a similar problem. Flashing new code would fail. When I ran idf.py monitor, it would continually reboot in a pretty tight loop. My solution was to erase the flash using:

idf.py erase_flash -p com21
0
Quinn Carver On

is your USB cable a charger cable only? This happens a lot. Charger cables look almost the same as charge/data cables. Though the heads look the same, sometimes a charger cable is slightly thinner b/c it only has two conductors in the jacket. Charger/Data cables however have at least 4 wires, Data +, Data -, Power and Ground. Test your cable with another data device, or try a slightly thicker cable.