ESP32-CAM Upload Failure: Possible Serial Noise or Corruption

Hi,
I'm using an FTDI adapter and an ESP32-CAM board, trying to upload the video camera streaming code from random nerd tutorials, and it's coming up with this error:

Sketch uses 806989 bytes (25%) of program storage space. Maximum is 3145728 bytes.
Global variables use 50264 bytes (15%) of dynamic memory, leaving 277416 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.2.1
Serial port COM3
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:cc:a8:79:f4:3c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
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 0x000d6fff...
Compressed 18912 bytes to 13025...
Writing at 0x00001000... (100 %)

A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.

This same error occurs with different computers, different ports, and different usb cables, just about at my wit's end.
Anything else I should try to fix this?

Post an image of your project. Post a schematic. Reads like the devices RAM is fracked. Did you try disconnecting those extra things hanging out on the GPIO pins to see if an upload will happen?

Post your code.


Code is copied from here
The green lead connects gpi0 to ground, and I've tried uploading with and without - same error pops up.
Also tried running esptool flash_id from cmd, and it comes up with the same error.

Did you try the spare ESP32CAM?

The spare ESP32-CAM? I don't have one unfortunately.

1 Like

Hi @sumjos. This type of upload error when using the ESP32 boards can sometimes be resolved by reducing the "Upload Speed" setting.

Unfortunately the ESP32-CAM board definition does not provide a configurable upload speed. You can select an equivalent board from the Arduino IDE Tools > Port menu that does have a configurable upload speed. I'll provide instructions:

  1. Select Tools > Board > esp32 > ESP32 Dev Module from the Arduino IDE menus.
  2. Select Tools > Upload Speed > 115200 from the Arduino IDE menus.

Now try uploading to your board once more. If the upload is now successful, you can try selecting higher values from the Tools > Upload Speed menu until you find the highest value that still allows successful uploads. I used the lowest available speed 115200 in my instructions to be conservative but you will find the uploads take a long time at this speed.

13 Likes

Thanks for your answer.Fixed my problem. :grinning:

2 Likes

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

1 Like

Fixed my problem to.. thanks for posting the info. cheers

1 Like

I tried everything brom changing baid rate to frequency, board.
But still it shows same error, or just straight out shows serial communication fatal error.

Please help!!

Thanks - this fixed my problem too when trying to upload code to a generic ESP32 board!

1 Like

i face same problem
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
for esp32S

Hi @saad2212

Did you try the suggestion provided in post #6. If so, does the upload error still occur even after that?

Hey i'm having the same , please can anyone help me? i have tried everything from changing baud rate to removing auto upload circuit in a custom pcb BOARD with esp32 wroom32U

2 posts were merged into an existing topic: Esp32 cam program upload error

Thank you for your information

1 Like

I also try with custom PCB BOARD with esp32 wroom32UE. did you find any solution?

Changing the USB cable worked for me.

1 Like

Changing the upload speed also solved my problem. Also, prior to this, I had been trying (unsuccessfully) to connect ESP32 to iMac (Intel version) via the normal USB-A ports on iMac. I then connected USB-C on ESP32 to Thunderbolt (USB-C) on iMac, and then Arduino IDE recognized the usbserial-#### port instantly.

1 Like

Thank you :smiling_face_with_three_hearts:

1 Like