Page 1 of 1

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

Posted: Mon Apr 14, 2025 7:13 am
by lalit.shah
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

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

Posted: Mon Apr 14, 2025 7:17 am
by Sprite
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.

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

Posted: Mon Apr 14, 2025 7:42 am
by lalit.shah
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

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

Posted: Mon Apr 14, 2025 8:14 am
by Sprite
Yes. (Note schematics are linked in the bottom of that document; look at the port labeled "ESP USB" there)

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

Posted: Mon Apr 14, 2025 2:19 pm
by lalit.shah
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

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

Posted: Tue Apr 15, 2025 12:26 am
by Sprite
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.

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

Posted: Wed Apr 16, 2025 5:18 am
by lalit.shah
Thanks for update and clarification.