Page 1 of 2

I can't get USB OTG to work

Posted: Sat May 24, 2025 1:57 am
by npwh2545
I'm having trouble with USB OTG. I've designed and built the circuit, but when I connect it to my PC, it's completely unresponsive, even after trying to enter bootloader mode. You can see the circuit diagram below.

esp32s3
Screenshot 2025-05-24 082048.png
Screenshot 2025-05-24 082048.png (222.48 KiB) Viewed 384 times
BQ25601DRTWR
Screenshot 2025-05-24 082132.png
Screenshot 2025-05-24 082132.png (109.07 KiB) Viewed 384 times
USB type C
Screenshot 2025-05-24 082216.png
Screenshot 2025-05-24 082216.png (196.62 KiB) Viewed 384 times

Re: I can't get USB OTG to work

Posted: Sun May 25, 2025 7:01 am
by Sprite
First things first; does your board work at all?
- Do you get a good ripple-free 3.3V rail from the switcher? (That is, I assume it comes from U12, can't really see the 3v3 net connected to anything anywhere...)
- Using a 'scope, do you see 40MHz on X2?
- Do you see serial chatter on U0TXD when you reset the ESP32?

Re: I can't get USB OTG to work

Posted: Sun May 25, 2025 6:02 pm
by npwh2545
I removed the U12 IC and reconnected the board to my computer. It was detected, but it appears there's no driver support, as it came up as 'Unknown USB Device (Device Descriptor Request Failed)'. After a while, I tried connecting it again, but this time, no notification appeared at all.

I don't have a scope capable of measuring 40MHz.

Regarding U0TXD

RESET

ESP-ROM: esp32s3-20210327
Build: Mar 27 2021
rst: 0x1 (POWERON), boot: 0x29 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffff7f
invalid header: 0xffffff7f

BOOT

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x21 (DOWNLOAD(USB/UART0))
waiting for download

Re: I can't get USB OTG to work

Posted: Mon May 26, 2025 7:11 am
by Sprite
Okay, serial output means the chip itself (including crystal) is working. How do you generate the 3.3V then, if U12 is not responsible for that?

Re: I can't get USB OTG to work

Posted: Mon May 26, 2025 8:33 am
by npwh2545
I'm using an external 3.3V power supply instead, for easier debugging. And regarding the USB OTG not working, do I need to set up USB CDC first?

Re: I can't get USB OTG to work

Posted: Mon May 26, 2025 5:23 pm
by Sprite
That could be the issue; long wires to an external power supply combined with no local bulk capacitance can lead to issues. Suggest you add a big-arse bulk cap (100uF or higher) close to the 3.3V input of your board.

You should always see the built-in USB CDC if you boot the board in download mode (sw2 closed when powering on or resetting the ESP32S3)

Re: I can't get USB OTG to work

Posted: Tue May 27, 2025 9:36 am
by npwh2545
Initially, I received the message 'Unknown USB Device (Device Descriptor Request Failed)'. At that time, I was using a C17 capacitor marked as 10uF. However, when I measured the actual value, I found it to be 7.4uF because the capacitor I purchased had a tolerance of ±20%. After the 10uF capacitor I had ran out, I replaced it with a 4.7uF capacitor, assuming it would be a suitable substitute. After replacing it and connecting the board to the computer, there was no notification, unlike when I used the 10uF capacitor (7.4uF).

Re: I can't get USB OTG to work

Posted: Wed May 28, 2025 11:27 am
by Sprite
I think that's a red herring: decoupling in that region will affect WiFi performance, but a few uF less there shouldn't affect bootup and general uC workings.

Re: I can't get USB OTG to work

Posted: Wed Jul 09, 2025 9:13 pm
by npwh2545
There is one SOC that works. I bought a new ESP32 SOC and tried it with the same circuit design, but it didn’t work. I tried measuring the crystal, but there was no signal, and there was no current or voltage. Is it possible that the problem is caused by the crystal?

crystal i use
https://lcsc.com/product-detail/Crystal ... _C37635335

and load capa 10pF

Re: I can't get USB OTG to work

Posted: Thu Jul 10, 2025 4:58 am
by Sprite
Decently sure your crystal works - you wouldn't get serial output if it didn't. Could still technically be that for some reason, it's 'off' by more than the USB requires but less than serial requires... but I'm not sure how likely that would be.