Page 1 of 1

ESP32-C3 on board USB not detected

Posted: Fri Aug 16, 2024 2:41 pm
by DHOUT19
I've created a custom board with the ESP32-C3, and I am currently trying to use the on board USB pins of the ESP32-C3 to flash and debug the chip. The attached image is a schematic of the USB pins. D+ goes to pin 19 and D- goes to pin 18.

Here's what I have done thus far. I have made a cable that connects that D+ (Green) and D- (White) wires to their respective cables on the board. I am not using the +5 and GND wires as the custom board is being powered elsewhere. The chip is only being powered with a 3.3 volt supply. I plugged in the USB cable and powered on the board. The computer did not detect anything. I pulled pin 9 to ground to put the chip in Download mode, still nothing. Looking through the hardware documentation, it did mention this:
Note that USB_D+ will have level output, so please add a pull-up resistor to determine the initial high-level output voltage.
https://docs.espressif.com/projects/esp ... t.html#usb

So, I added a 10k pull-up resistor on the D+ pin, still nothing. Throughout all these steps, I made sure that everything was plugged in (USB pins, and pin 9) before powering on the board.

Are there any extra steps that I could try? Is there something that I am missing or doing wrong?

Re: ESP32-C3 on board USB not detected

Posted: Sat Aug 17, 2024 5:39 am
by Sprite
You should not need a pullup on D+, I'm not sure why that text is there. You do however need to connect USB GND to your devices GND, otherwise nothing will work.

Re: ESP32-C3 on board USB not detected

Posted: Mon Aug 19, 2024 3:15 pm
by DHOUT19
This worked! Thank you much sir!

Re: ESP32-C3 on board USB not detected

Posted: Tue Apr 01, 2025 2:08 am
by agatha
You should not need a pullup on D+, I'm not sure why that text is there.
You do need a pull-up, but the justification to "determine the initial high-level output voltage" appears to be wrong. The ESP32-C3 (and similar) is a USB 2.0 full-speed device. That means that signal levels are simply 3.3V (0.0–0.3V low, 2.8–3.6V high).

In the past week or so, the old version:
Note that USB_D+ will have level output, so please add a pull-up resistor to determine the initial high-level output voltage.
was changed to the current version:
Note that upon power-up, the USB_D+ signal will fluctuate between high and low states. The high-level signal is relatively strong and requires a robust pull-down resistor to drive it low. Therefore, if you need a stable initial state, adding an external pull-up resistor is recommended to ensure a consistent high-level output voltage at startup.
This isn't correct either. There is a startup glitch on GPIO18 (i.e. D-), but this isn't related that I can see.

In a USB host, there are 15k pulldowns on D- and D+. When you connect a USB device, the way it gets detected is it uses a 1.5k (i.e. lower, stronger) pull-up to pull one of the lines high. If the device has a pullup on D+, then it is a full-speed device (and if on D-, a low-speed device). (More about this scheme here.)

So, since it's a USB 2.0 full-speed device, we need a 1.5k pull-up on the D+ line to allow the host to detect when it is connected, and to then identify it as a full-speed device.

Re: ESP32-C3 on board USB not detected

Posted: Tue Apr 01, 2025 6:49 am
by Sprite
In a USB host, there are 15k pulldowns on D- and D+. When you connect a USB device, the way it gets detected is it uses a 1.5k (i.e. lower, stronger) pull-up to pull one of the lines high. If the device has a pullup on D+, then it is a full-speed device (and if on D-, a low-speed device). (More about this scheme here.)

So, since it's a USB 2.0 full-speed device, we need a 1.5k pull-up on the D+ line to allow the host to detect when it is connected, and to then identify it as a full-speed device.
Thing is, the ESP32C3 (and other chips which have a full-speed USB port of some kind) have that 1.5K pulldown integrated into the PHY and it should engage it automatically after startup. As such, you should not need to add it externally (and adding it externally will actually violate the USB spec as it would be in parallel with the internal resistor.)

Re: ESP32-C3 on board USB not detected

Posted: Mon May 19, 2025 10:37 pm
by agatha
Thing is, the ESP32C3 (and other chips which have a full-speed USB port of some kind) have that 1.5K pulldown integrated into the PHY
That's super important! This wasn't in the documentation, so we mistakenly added an external one to our design. Please document it clearly in the datasheet, reference, and online guide!