# Esp32 cam program upload error

**URL:** <https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156>\
**Category:** Uploading\
**Created:** [January 26, 2024, 11:16am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156 "2024-01-26T11:16:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 26, 2024, 11:16am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/1 "2024-01-26T11:16:06Z")

</div>

I have a ESP32-s cam board and i tried to upload the examples \> esp32 \> camera \> cameraWebServer program in arduino but i got this below error. can some one help me out please.

Sketch uses 1510681 bytes (48%) of program storage space. Maximum is 3145728 bytes.  
Global variables use 70388 bytes (21%) of dynamic memory, leaving 257292 bytes for local variables. Maximum is 327680 bytes.  
[esptool.py](http://esptool.py/) v4.5.1  
Serial port /dev/ttyUSB0  
Connecting....  
Chip is ESP32-D0WD (revision v1.0)  
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None  
WARNING: Detected crystal freq 41.36MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?  
Crystal is 40MHz  
MAC: a8:03:2a:64:bf:34  
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 0x00182fff...  
Compressed 18992 bytes to 13110...  
Writing at 0x00001000... (100 %)

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

---

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 26, 2024, 10:59am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/2 "2024-01-26T10:59:36Z")

</div>

> [@ESP32-CAM Upload Failure: Possible Serial Noise or Corruption](https://forum.arduino.cc/t/esp32-cam-upload-failure-possible-serial-noise-or-corruption/1068333/6):
>
> 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.

Can some one help me with this error, i tried the above solution as well but didn't worked

```plaintext
Sketch uses 1510681 bytes (48%) of program storage space. Maximum is 3145728 bytes.
Global variables use 70388 bytes (21%) of dynamic memory, leaving 257292 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.36MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: a8:03:2a:64:bf:34
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 0x00182fff...
Compressed 18992 bytes to 13110...
Writing at 0x00001000... (100 %)

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

```

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [January 26, 2024, 11:18am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/3 "2024-01-26T11:18:12Z")

</div>

Hi @sara59669. It is possible for a short or external circuitry connected to the Arduino board to interfere with the upload process, causing this type of upload error.

Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Make sure there isn't any conductive debris (e.g., strands of wire or component leads) on the board or on the surface the board is sitting on.

If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:

1. Disconnect the USB cable of the Arduino board from your computer.
2. Disconnect any shields, modules, external circuitry, etc. from your board.
3. Connect the Arduino board to your computer with a USB cable.

Now try uploading a sketch to the board again. Does the upload succeed?

This experiment will determine whether the upload error was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [January 26, 2024, 11:21am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/4 "2024-01-26T11:21:57Z")

</div>

I have merged your cross-posts @sara59669.

Cross-posting is against the Arduino forum [rules](https://forum.arduino.cc/faq#keep-tidy). The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting can result in a suspension from the forum.

In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in [the " **How to get the best out of this forum**" guide](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966). It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

---

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 26, 2024, 11:38am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/5 "2024-01-26T11:38:52Z")

</div>

same error again -

 ![20240126_16h57m51s_grim](https://europe1.discourse-cdn.com/arduino/original/4X/c/d/4/cd4729c2e3c4bd6bccbf464afc60b261a2f5077e.png)

this is my setup -

 ![WhatsApp Image 2024-01-26 at 5.06.00 PM](https://europe1.discourse-cdn.com/arduino/original/4X/9/7/7/9777fe3eaed93abcf270a604af67c56dc0729d76.jpeg)

please help me out

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [January 26, 2024, 12:42pm UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/7 "2024-01-26T12:42:58Z")

</div>

> [@sara59669](#):
>
> this is my setup -

I see that you are using a USB to serial adapter module as the interface between the computer and the ESP32 board.

I was not able to find any information about that particular model. I did a test upload to an ESP32-CAM board using a different model of FTDI FT232R module and was successful. I used the following connections between the two:

* * *

⚠ I have the jumper on my FTDI FT232R module in the " **3.3V**" position.

* * *

| USB Module | ESP32-CAM |
| --- | --- |
| GND | GND |
| VCC | VCC |
| TX | U0R |
| RX | U0T |

In addition, I have the " **IO0**" pin on the board connected to " **GND**".

From looking at the picture you shared, it appears your connections are similar. However, I am concerned about the voltage levels. As I mentioned above, I am able to select a 3.3 V levels on the FTDI FT232R module I have. This means that the "VCC" pin on the module outputs 5 V and the RX and TX pins also use 3.3 V logic levels. I don't know whether your module is using 3.3 V or 5 V levels. Exposing the ESP32 microcontroller on the ESP32-CAM to 5 V logic levels on the U0R pin could damage it as 3.3 V should be used instead.

Another observation I have is that the brown wire from your USB to serial module is connected to the pin that is marked " **GND/R**" on my ESP32-CAM board. I found that the upload failed when I had that connection, though with a different error from the one you are experiencing:

```plaintext
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.

```

I changed the connection to the pin marked " **GND**" and after that the upload was successful.

---

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 26, 2024, 1:44pm UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/8 "2024-01-26T13:44:09Z")

</div>

I tried to change the brown wire to other GND but same issue. I don't have other ftdi module.

I have a Arduino Uno how to upload code to esp32 cam via Uno. I'll try.

---

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 26, 2024, 2:22pm UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/9 "2024-01-26T14:22:00Z")

</div>

Tried using Arduino Uno. Connection and errors below

 ![20240126_194827](https://europe1.discourse-cdn.com/arduino/original/4X/6/3/b/63b6a83c417bbe8eba6062cfe07dd885aa8e91d3.jpeg)

 ![IMG-20240126-WA0004](https://europe1.discourse-cdn.com/arduino/original/4X/6/b/f/6bfcadea2a1e8bcd3cbad567d20a21814af9f757.jpeg)

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [January 26, 2024, 4:32pm UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/10 "2024-01-26T16:32:58Z")

</div>

When you are using an Uno board as a USB to serial adapter, confusingly the connections are like so:

| Uno | Target |
| --- | --- |
| RX | RX (e.g., U0R) |
| TX | TX (e.g., U0T) |

The reason for this is that the pin labels on the Uno are referring to the pins on the ATmega328P microcontroller, but in this usage you are communicating directly between the Uno's USB to serial chip (ATmega16U2) and the target. Since the connections between the USB chip and the ATmega328P are RX-TX, TX-RX, the pin marked "RX" on the Uno is actually connected to the TX pin on the USB chip and the pin marked "TX" on the Uno is actually connected to the RX pin on the USB chip.

With the Uno, you have the problem of exposing the ESP32's U0R pin to 5 V as I suspected was also occurring with your FTDI module. It is possible this has caused permanent physical damage to the ESP32 and that physical damage might be the reason the upload is failing.

When you are using an Uno as a USB to serial adapter, it is best to connect the "RESET" pin on the Uno to the "GND" pin in order to hold the ATmega328P microcontroller in reset. Otherwise the ATmega328P might interfere with the communication between the Uno's USB chip and the target.

---

<div class="post-metadata">

**Author:** ![Patriboom](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Patriboom](https://forum.arduino.cc/u/Patriboom)\
**Post date:** [January 27, 2024, 12:04am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/11 "2024-01-27T00:04:53Z")

</div>

Visit [60+ ESP32-CAM Projects, Tutorials and Guides with Arduino IDE | Random Nerd Tutorials](https://randomnerdtutorials.com/projects-esp32-cam/) by Ruis Santos. You'll find example and explinations. All examples did work good on first attemps in my case.

---

<div class="post-metadata">

**Author:** ![sara59669](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@sara59669](https://forum.arduino.cc/u/sara59669)\
**Post date:** [January 27, 2024, 5:40am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/12 "2024-01-27T05:40:49Z")

</div>

how can i check whether my esp32 cam chip is good or damaged? using multimeter?

---

<div class="post-metadata">

**Author:** ![Patriboom](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Patriboom](https://forum.arduino.cc/u/Patriboom)\
**Post date:** [January 28, 2024, 2:15pm UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/13 "2024-01-28T14:15:38Z")

</div>

It is easy and streightforward to use a TTL interface to prgram the ESP32cam like this:

> **[FTDI FT232RL USB to TTL Serial Converter Adapter Module 5V/3.3V](https://phillipjfry.com/products/ftdi-ft232rl-usb-to-ttl-serial-converter-adapter-module-5v-3-3v?_pos=1&_psq=TTL&_ss=e&_v=1.0)**
>
> FTDI FT232RL USB to TTL Serial Converter Adapter Module 5V / 3.3VFeatures:Material: PCB, Electronic ComponentThe USB power supply can choose 5V or 3.3V, set by jumper.Draw out all signal port of FT232RL chip.RXD / TXD transceiver communication...

I also built a breakout SMB for both ESP32cam and ESP8266  
 ![avecTTL](https://europe1.discourse-cdn.com/arduino/original/4X/b/9/c/b9ccd700a87f2fe6181399d398064f1a3c518570.jpeg)  
which works very good.

I may sell you that. If you want. I have not price yet, never sold. You can have it as DIY kit or all done.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [January 29, 2024, 11:40am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/14 "2024-01-29T11:40:35Z")

</div>

I don't think there is any easy way. The damage would have occurred in the microscopic circuits on the silicon die of the ESP32 microcontroller.

I suggest you purchase a replacement board. If the problem does not occur when you attempt an upload to the replacement board (making sure to use the appropriate voltage levels this time), then you will know that the original board was damaged. If the same problem occurs with both boards then it is more likely that there is some problem with the rest of the system.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 27, 2024, 11:41am UTC](https://forum.arduino.cc/t/esp32-cam-program-upload-error/1216156/15 "2024-07-27T11:41:26Z")

</div>

Closed on July 27, 2024, 11:41am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
