custom ESP32-C3 board with native USB does not work

Nuri24
Posts: 2
Joined: Sun Dec 10, 2023 11:38 am

custom ESP32-C3 board with native USB does not work

Postby Nuri24 » Sun Dec 10, 2023 11:46 am

Hello fellas,

I have a custom-board with the ESP32-C3 chip and wanted to program it via the integrated JTAG interface. With a CP2102 I can program my board without any problems. I use vscode an platformio.

i don't have much experience with the esp32.

What I have found out so far is that USB works with addressing and the ID for the device must be stored in the Firmware. Since the ESP doesn't have one yet, I can't program directly out of the box with the JTAG interface. In my naive recklessness I thought I could simply load some program with the CP2102 and then it should work...no.

as soon as I connect the board to the PC via usb, windows says it has not recognized the device correctly and therefore no port.

i tried in the ini following configuration:

Code: Select all

[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
monitor_speed = 460800
build_flags = 
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1
framework = arduino
can someone help ?
thanks!

greeting

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

Re: custom ESP32-C3 board with native USB does not work

Postby ESP_Sprite » Mon Dec 11, 2023 12:44 am

You should always be able to force the ESP32-C3 into download mode by resetting or powering it up with GPIO9 connected to ground. Can you try that? If that doesn't work, it's likely a hardware issue, e.g. you may have USB D+ and D- swapped.

Nuri24
Posts: 2
Joined: Sun Dec 10, 2023 11:38 am

Re: custom ESP32-C3 board with native USB does not work

Postby Nuri24 » Sun Dec 17, 2023 4:44 pm

ESP_Sprite wrote:
Mon Dec 11, 2023 12:44 am
You should always be able to force the ESP32-C3 into download mode by resetting or powering it up with GPIO9 connected to ground. Can you try that? If that doesn't work, it's likely a hardware issue, e.g. you may have USB D+ and D- swapped.
Hello,
sorry for the late reply, I haven't seen that my topic has been approved.
I have two buttons, reset and GPIO9, thats allows me go into download mode. Then i can program with an extern programmer, but not with the native USB. Windows still says device not recognized.
I have attached the schematic.

thanks!
Attachments
Schaltplan.PNG
Schaltplan.PNG (24.09 MiB) Viewed 48644 times

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

Re: custom ESP32-C3 board with native USB does not work

Postby ESP_Sprite » Mon Dec 18, 2023 2:41 am

I really suggest you look at the hardware design guidelines, you did a bunch of things that at best limit your WiFi range (no pi network on the power supply pins, no impedance matching on the antenna) and at worst make your ESP32 work flaky or not at all (no RC network on the EN pin), and those are only the things I spotted in a glance.

Your USB connections seem to check out, though: if reality is as the schematic is, it should work. What value is X1? It should be 40MHz (10ppm), if that diverges widely, USB will break. If X1 checks out, I'd look at the soldering: look for shorts and breaks in the connections.

liaifat85
Posts: 200
Joined: Wed Dec 06, 2023 2:46 pm

Re: custom ESP32-C3 board with native USB does not work

Postby liaifat85 » Mon Dec 18, 2023 12:01 pm

Along with what ESP-sprite has suggested, also check if your PCB has a manufacturing error.

Who is online

Users browsing this forum: Google [Bot] and 82 guests