Issue with uploading code to ESP32 board: "Unable to verify flash chip connection"

Hello everyone,

I am encountering a problem while trying to upload code to my ESP32 board using Arduino IDE. I have to mention that I'm a beginner and I'm not familiar with how Arduino or esp32 work. Every time I attempt to upload the code, I receive the following error message:

Sketch uses 260173 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 21344 bytes (6%) of dynamic memory, leaving 306336 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/cu.usbserial-10
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e4:65:b8:20:71:90
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.

A fatal error occurred: Unable to verify flash chip connection (Invalid head of packet (0xA6): Possible serial noise or corruption.).
Failed uploading: uploading error: exit status 2

I have tried several troubleshooting steps, including:

  • Resetting the ESP32 board and trying again.
  • Using a different USB port and a different USB cable.
  • Updating the USB drivers and ESP32 firmware to the latest versions.
  • Verifying physical connections and relevant pins.

However, the issue persists. It seems to be related to a communication problem between Arduino IDE and the ESP32 board, possibly due to serial noise or corruption.

I know for sure that there is nothing wrong with the ESP32 because my faculty gave it to me.
Has anyone else encountered a similar issue before? Any suggestions or insights would be greatly appreciated.

I need to mention that I have Mac OS if it matters in any way.

Thank you in advance for your help.

Best regards.

2 Likes

Start by reading the "how to post" instructions.
Show whatever code you are using and show circuit diagram (NOT Fritzing)

Any Update on this as im also facing the same Issue

1 Like

copy the complete error message and post as text (not a screen image)

Hi @murdock_85 ,

Welcome to the forum..
maybe try a slower Upload speed, should be under the Tools menu..

good luck.. ~q

6 Likes

I had the same issue, changing the upload speed to 115200 fixed this issue. Thanks

7 Likes

esptool.py v4.5.1
Serial port COM9
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 34:5f:45:07:ba:60
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.

A fatal error occurred: Unable to verify flash chip connection (Invalid head of packet (0x80): Possible serial noise or corruption.).
Failed chip erase: uploading error: exit status 2 I am facing same issue. No baud rate changing work for me ...I am using ESP programmer to upload program

No baud rate changing work for me ...I am using ESP programmer to upload program. Please can anyone help

Probably you got one of these without flash. What's printed on the chip?

Please, post the picture of your ESP32 Board to see if it is 30-pin or 38-pin version.

Same problem I am facing while uploading the code in XIAO ESP32 C3
Here is the error I received --->

esptool.py v4.6
Serial port COM23
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 54:32:04:89:3e:84
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600

A fatal error occurred: No serial data received.
A fatal error occurred: No serial data received.

I was able to upload the code two to three times but after that, I was unable to upload the code.
After that, I took a new XIAO ESP32 C3 board and tried but the same thing happened in the second board also.
If anyone has a solution regarding this, please share.

esp32 boardsupport version 2.0.17? If you have 3.X please downgrade and try again.

I uploaded code using arduino ide 1.8.19
Now I tried to upload the code with Arduino ide 2.3.2(Latest) and received this-->

A fatal error occurred: No serial data received.
Failed uploading: uploading error: exit status 2

IDE 1.8.19 is quite OK, but what's the ESP IDF version?

I tried with Arduino ide 2.3.2(Latest) followed by these steps:

Enter Bootloader Mode

When you encounter the above two situations, you can try to put XIAO into BootLoader mode, which can solve most of the problems of unrecognized devices and failed uploads. The specific method is:

  • Long press the "BOOT BUTTON".
  • Connect the Seeed Studio XIAO ESP32C3 to your computer while holding the BOOT BUTTON.
  • Release it to enter bootloader mode

#What to do when upload fails/the program runs abnormally/the device port is not found? | Seeed Studio Wiki

After this, I can upload the program without pressing any button.

1 Like

Just confirming the changing the serial comminucatin rate to 115600 fixed it for me. I was running indirectly from MAC USBc port to LENTION USB hub to cheap Yellow Display dev board.

Hello Everyone,
Need help in similar kind of problem. If someone expert is available, then let me know. It will be pleasure.
Thanks & regards

what is the specific problem?
which ESP32 version? e.g. ESP32, ESP32S3, ESP32C3, etc
if compile/upload errors copy the text output and post using code tags,
select < CODE/ > and paste the code or text where it says “type or paste code here”

Funcionou comigo. Com a IDE aberta, desconectei o cabo USB, depois mantive o botão "boot" pressionado, conectei o cabo "USB e dei o comando de carregar na IDE. Bingo! (Português). IDE 1.8.10

Thank you very much.

This worked for me.