Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

lalit.shah
Posts: 15
Joined: Mon Apr 14, 2025 6:46 am

Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby lalit.shah » Mon Apr 14, 2025 7:13 am

Hi all,

We are planning to use ESP32-S3-WROOM-1-N16R8 in one of our product development.

ESP32-S3-WROOM-1-N16R8 has D+ and D- lines, and can function as USB?

We would like to utilize those pins for both image download and debugging purpose.

Please let us know if we need to add any additional circuit for the same.

Regards,
Lalit Shah

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

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby Sprite » Mon Apr 14, 2025 7:17 am

ESP32-S3-WROOM-1-N16R8 has D+ and D- lines, and can function as USB?

We would like to utilize those pins for both image download and debugging purpose.
You can.
Please let us know if we need to add any additional circuit for the same.
If you follow the (bits that are applicable to modules in the) hardware design guidelines, you should be fine. Generally, no additional circuitry on D+/D- is required, but depending on your use you may want to add extra ESD protection.

lalit.shah
Posts: 15
Joined: Mon Apr 14, 2025 6:46 am

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby lalit.shah » Mon Apr 14, 2025 7:42 am

Hi Sprite,

Thanks for prompt response and guiding me for reference design.

Is there any reference design or any example available where D+ and D- lines have been connected?

Regards,
Lalit

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

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby Sprite » Mon Apr 14, 2025 8:14 am

Yes. (Note schematics are linked in the bottom of that document; look at the port labeled "ESP USB" there)

lalit.shah
Posts: 15
Joined: Mon Apr 14, 2025 6:46 am

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby lalit.shah » Mon Apr 14, 2025 2:19 pm

Hi Sprite,

Thanks for update.

From all details my understanding is that if we just need to use for download perspective we can use USB functionality, but if we need to use from debug perspective than we need to keep external USB-UART chip.

Regards,
Lalit

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

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby Sprite » Tue Apr 15, 2025 12:26 am

It's actually the other way around: if you want to do (JTAG) debugging, you can do that using the USB port (when it uses the USB-serial-JTAG controller) but you cannot do that over an UART; you'd need an additional JTAG adapter.

Generally, there's only a few reasons why you'd want to add an external USB-to-serial chip to an ESP32-S3:
- You want to make use of the USB-OTG functionality (to connect the ESP32-S3 to an USB device, or to have it act like a specific USB device) and need to debug the device like it is in that mode. USB-OTG takes over the USB port from the USB-serial-JTAG you'd use to debug these issues.
- You need to debug issues with light/deep sleep. UARTs tend to be a bit more useful for that as they don't loose the USB connection when the chip goes to sleep.

As an extra hint: Do make sure to connect GPIO0 to something (a button as on the devboard, or at least a testpad), as you can theoretically need it to force the device into bootloader mode.

lalit.shah
Posts: 15
Joined: Mon Apr 14, 2025 6:46 am

Re: Can we use USB pins for debug and program (i.e. flash bin) in ESP32-S3-WROOM-1-N16R8?

Postby lalit.shah » Wed Apr 16, 2025 5:18 am

Thanks for update and clarification.

Who is online

Users browsing this forum: PerplexityBot and 4 guests