I can't get USB OTG to work

npwh2545
Posts: 8
Joined: Fri Feb 07, 2025 12:15 pm

I can't get USB OTG to work

Postby npwh2545 » Sat May 24, 2025 1:57 am

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 375 times
BQ25601DRTWR
Screenshot 2025-05-24 082132.png
Screenshot 2025-05-24 082132.png (109.07 KiB) Viewed 375 times
USB type C
Screenshot 2025-05-24 082216.png
Screenshot 2025-05-24 082216.png (196.62 KiB) Viewed 375 times

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: I can't get USB OTG to work

Postby Sprite » Sun May 25, 2025 7:01 am

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?

npwh2545
Posts: 8
Joined: Fri Feb 07, 2025 12:15 pm

Re: I can't get USB OTG to work

Postby npwh2545 » Sun May 25, 2025 6:02 pm

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

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: I can't get USB OTG to work

Postby Sprite » Mon May 26, 2025 7:11 am

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?

npwh2545
Posts: 8
Joined: Fri Feb 07, 2025 12:15 pm

Re: I can't get USB OTG to work

Postby npwh2545 » Mon May 26, 2025 8:33 am

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?

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: I can't get USB OTG to work

Postby Sprite » Mon May 26, 2025 5:23 pm

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)

npwh2545
Posts: 8
Joined: Fri Feb 07, 2025 12:15 pm

Re: I can't get USB OTG to work

Postby npwh2545 » Tue May 27, 2025 9:36 am

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).

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: I can't get USB OTG to work

Postby Sprite » Wed May 28, 2025 11:27 am

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.

npwh2545
Posts: 8
Joined: Fri Feb 07, 2025 12:15 pm

Re: I can't get USB OTG to work

Postby npwh2545 » Wed Jul 09, 2025 9:13 pm

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

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: I can't get USB OTG to work

Postby Sprite » Thu Jul 10, 2025 4:58 am

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.

Who is online

Users browsing this forum: Bing [Bot] and 2 guests