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
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.
Can't upload my code to esp32 and not able able to erase flash