I’m trying to upload code to my ESP32 board using the Arduino IDE, but I’m consistently getting the following error:
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Context:
- The board was working fine before, and I was able to upload code successfully.
- I have not changed the USB cable, port, or my development environment.
- I’m using macOS and the latest ESP32 Arduino core.
- The correct board is selected (ESP32 Dev Module).
Troubleshooting I’ve Tried:
- Checked the USB cable and port – The board is detected under /dev/cu.usbserial-0001.
- Manually entered boot mode – Holding the BOOT button while uploading.
- Lowered upload speed – Changed to 115200 baud rate in the Arduino IDE.
- Reinstalled USB drivers – Tried both CH340 and CP210x drivers.
- Tried erasing flash memory using esptool.py.
Question:
What else can I try to fix this error? Could there be a hardware-related issue even though the board was working fine before?