ESP32-C3 Failed To Upload Over USB CDC

sqsqsq
Posts: 5
Joined: Mon Dec 27, 2021 5:54 am

ESP32-C3 Failed To Upload Over USB CDC

Postby sqsqsq » Mon Dec 27, 2021 6:05 am

I have a custom ESP32-C3 board based on the ESP32-C3FH4, with GPIO18 connected to USB D- and GPIO19 connected to USB D+.

When connected to my PC (Win 10), it shows up as COM11 (ESP32C3 Dev Module). I put it into download mode by pulling GPIO9 low.

When flashing it with esptool, it gives a few different types of errors:

Code: Select all

serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'The device does not recognize the command.', None, 22)
or sometimes

Code: Select all

A fatal error occurred: Failed to set baud rate 115200. The driver may not support this rate.
Any ideas?

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby ESP_Sprite » Mon Dec 27, 2021 6:32 am

Hm, haven't seen that before. If you open a terminal program (Putty or something) on that port, do you get any output?

sqsqsq
Posts: 5
Joined: Mon Dec 27, 2021 5:54 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby sqsqsq » Mon Dec 27, 2021 8:16 pm

I tried Putty but was unable to connect. The Arduino serial monitor opens fine, but no output.

I received a different error today:

Code: Select all

serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
I suspect something is wrong with my PC's USB, or the drivers are not working. I was able to test on a mac (11.6) and was able to upload with no issues (ESP32 Arduino Core 2.0.2). It ran a simple snippet that loops

Code: Select all

Serial.println("Hello World!");
and works fine.

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby ESP_Sprite » Tue Dec 28, 2021 2:10 am

It's odd... Do you perchance use any hubs between the C3 and the PC? If not, could you try and see if adding an USB2 hub changes things? If you do, can you try connecting it directly to the PC?

sqsqsq
Posts: 5
Joined: Mon Dec 27, 2021 5:54 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby sqsqsq » Wed Dec 29, 2021 8:11 am

I am connecting directly to the PC (USB-A to USB-C cable, no hub). I am using a USB-C connector on my board, but only using it as a USB 2.0 connection. I will try to use a USB 2.0 hub and try again.

sqsqsq
Posts: 5
Joined: Mon Dec 27, 2021 5:54 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby sqsqsq » Sat Jan 01, 2022 1:22 am

Adding a USB 2.0 hub in between works! I was able to upload on my PC. Thanks @ESP_Sprite!

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby ESP_Sprite » Sun Jan 02, 2022 11:49 am

Interesting. For our reference, can you give us a bit more info so we can investigate this, specifically: what machine does this happen with (if it's a desktop PC and you know the mainboard or the chipset, that's helpful) and what OS are you running?

sqsqsq
Posts: 5
Joined: Mon Dec 27, 2021 5:54 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby sqsqsq » Wed Jan 19, 2022 2:36 am

Here are my PC specs:

OS: Win 10 Pro
Motherboard: Asus w/ Core i7 6700K
Chipset: ASMedia USB3.1 eXtensible Host Controller

It shows up as "USB JTAG/serial debug unit" under device manager > USB Devices and "COM11" under Ports

Let me know if you need any other information.

I also want to note that though the USB hub did solve the problem, it still happens occasionally where the upload fails.

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Failed To Upload Over USB CDC

Postby ESP_Sprite » Wed Jan 19, 2022 2:54 am

Thanks; I'll see if we can replicate this at some point to figure out what is happening there.

Who is online

Users browsing this forum: No registered users and 118 guests