Since roughly one year, I try to upload sketches with my Arduino IDE (now version 1.8.9) via an FTDI adapter (FT232RL) to ATMEGA328P and now also to a WROOM32 core. I describe her the issue with the ESP32 as this is much more important to me (ATMEGA328P can easily be programmed with an UNO as ISP programmer.
Every time I run into time out:
Arduino: 1.8.9 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"
Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Sketch uses 207713 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 15228 bytes (4%) of dynamic memory, leaving 312452 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM7
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Wiring (see also picture):
ESP32 FTDI (set to 3.3V)
GND GND
3V3 VCC (I also tried with an external 3V3 Power source, it did not change)
RX TX
TX RX
IO00 GND (with jumper)
Reset the ESP32 with shortly setting EN to GND (button) before uploading the code.
The LED on GPIO32 is to test a blink sketch only.
I did this setup also on a breadboard. Same behavior.
I also tested all connections. Everything fine.
If I unplug the FTDI adapter from the ESP32 during uploading, the Arduino IDE tries to upload until it runs into timeout. No change in behavior compared to the normal time out.
If I unplug the FTDI from USB during upload, I get an error message:
Arduino: 1.8.9 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"
Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Sketch uses 207713 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 15228 bytes (4%) of dynamic memory, leaving 312452 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM7
Connecting........_____....._____....._____....._____...Traceback (most recent call last):
File "esptool.py", line 2959, in <module>
File "esptool.py", line 2952, in _main
File "esptool.py", line 2653, in main
File "esptool.py", line 460, in connect
File "esptool.py", line 440, in _connect_attempt
File "esptool.py", line 379, in sync
File "esptool.py", line 315, in command
File "site-packages\serial\serialutil.py", line 352, in timeout
File "site-packages\serial\serialwin32.py", line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(5, 'Access is denied.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected.
I tried all possible timings with the GPIO00 and the EN button but nothing works. It’s exactly the same issue I have with ATMEGA328P.
I installed again the driver from ftdichip.com. No change.
I changed also the Com Port speed in the device manager from 9600 to 115200Bps (device manager -> right click to comPort7 -> properties -> port settings -> Bits per second). No change.
After reading forums all the time and seeing that all other seems to mix up cables or have wrong drivers, I am really without any ideas.
What is wrong with my setup? Where shall I dig to find the solution? :o
Any help is warmly welcome!
Thanks in advance.