Page 1 of 1
ESP32-C3 Failed To Upload Over USB CDC
Posted: Mon Dec 27, 2021 6:05 am
by sqsqsq
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?
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Mon Dec 27, 2021 6:32 am
by ESP_Sprite
Hm, haven't seen that before. If you open a terminal program (Putty or something) on that port, do you get any output?
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Mon Dec 27, 2021 8:16 pm
by sqsqsq
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
and works fine.
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Tue Dec 28, 2021 2:10 am
by ESP_Sprite
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?
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Wed Dec 29, 2021 8:11 am
by sqsqsq
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.
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Sat Jan 01, 2022 1:22 am
by sqsqsq
Adding a USB 2.0 hub in between works! I was able to upload on my PC. Thanks @ESP_Sprite!
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Sun Jan 02, 2022 11:49 am
by ESP_Sprite
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?
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Wed Jan 19, 2022 2:36 am
by sqsqsq
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.
Re: ESP32-C3 Failed To Upload Over USB CDC
Posted: Wed Jan 19, 2022 2:54 am
by ESP_Sprite
Thanks; I'll see if we can replicate this at some point to figure out what is happening there.