Page 1 of 1

custom ESP32-C3 board with native USB does not work

Posted: Sun Dec 10, 2023 11:46 am
by Nuri24
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

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

Posted: Mon Dec 11, 2023 12:44 am
by ESP_Sprite
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.

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

Posted: Sun Dec 17, 2023 4:44 pm
by Nuri24
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!

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

Posted: Mon Dec 18, 2023 2:41 am
by ESP_Sprite
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.

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

Posted: Mon Dec 18, 2023 12:01 pm
by liaifat85
Along with what ESP-sprite has suggested, also check if your PCB has a manufacturing error.