I am confused by the many online resources in regards to debugging the ESP32-S3
Many resources that show how to use the ESP-PROG show to connect it to the ESP32-S3's TDO, TDI, TCK, TMS signals.
However, other resources say that all that is needed is to connect the USB D- & D+ to IO19 and IO20.
So, which is it?
JTAG USB Confusion
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: JTAG USB Confusion
The answer is 'either'. The default is to debug over the integrated USB-serial-JTAG device by connecting to GPIO19&20. This is cheapest as it doesn't need an ESP-Prog and also you a serial communication channel as well (so you don't need an USB-serial chip or something). If you need to debug sleep issues or if you want to use the USB-OTG peripheral of the ESP32S3, you cannot use this method. In that case, you can blow a fuse in the ESP32S3 and it'll switch to the more traditional TCK/TDI/TDO/TMS signals, to which you can connect using e.g. an ESP-Prog.
Re: JTAG USB Confusion
Thanks! I've been reading through the documentation today and think I have a rough idea of what's needed after reading through the chip datasheet, the module datasheet, the Hardware Design guidelines, and the Technical Reference Manual. That's a LOT!
It looks like I'll need to consider the strapping pins IO0, IO3, IO45 & IO46, AND also the fuses. Once I get those configured properly, then connect D- & D+ and make sure my Windows driver is installed correctly.
Is that a decent summary? Or, is there something else I'm missing?
It looks like I'll need to consider the strapping pins IO0, IO3, IO45 & IO46, AND also the fuses. Once I get those configured properly, then connect D- & D+ and make sure my Windows driver is installed correctly.
Is that a decent summary? Or, is there something else I'm missing?
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: JTAG USB Confusion
If you're using GPIO19&20 for USB, you shouldn't have to worry about fuses. With the default fuse setting, the bootup level for GPIO3 also does not matter.
Re: JTAG USB Confusion
Thank you again! I now have line-by-line debugging working through Eclipse IDE (Espressif IDE) using the D- & D+ pins connected to IO19 and IO20.
Here are some notes to anyone else reading this thread:
-Note: Many examples I see online don't mention connecting the USB gnd to PCB gnd, but that was necessary in my case. Note that I'm currently powering my MCU through a different method (Not from USB).
-Note: A lot of the documentation had me thinking I'd needed to hold IO0 LOW at boot to allow Flashing and Debugging with this method, but it appears to NOT be needed.
-Note: This part is likely obvious, but you can not have any pullup or pulldown on the D- & D+ signals. The hardware I was trying to accomplish this on had these issues and I wasn't successful until I removed those.
I'm still confused regarding the 5V USB signals. I've read many times that none of the ESP32's signals are 5V tolerant. Is the ESP32-S3 special for the IO19 and IO20 pins and can handle the signals? If so, can you please point me to documentation that confirms this so I can feel confident in moving forward with my design?
Here are some notes to anyone else reading this thread:
-Note: Many examples I see online don't mention connecting the USB gnd to PCB gnd, but that was necessary in my case. Note that I'm currently powering my MCU through a different method (Not from USB).
-Note: A lot of the documentation had me thinking I'd needed to hold IO0 LOW at boot to allow Flashing and Debugging with this method, but it appears to NOT be needed.
-Note: This part is likely obvious, but you can not have any pullup or pulldown on the D- & D+ signals. The hardware I was trying to accomplish this on had these issues and I wasn't successful until I removed those.
I'm still confused regarding the 5V USB signals. I've read many times that none of the ESP32's signals are 5V tolerant. Is the ESP32-S3 special for the IO19 and IO20 pins and can handle the signals? If so, can you please point me to documentation that confirms this so I can feel confident in moving forward with my design?
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: JTAG USB Confusion
This is generally true: unless it's very clear the particular application doesn't need it (e.g. when optocouplers or relays are involved), you should always connect grounds together.
Generally, you don't need this. If you manage to disable the USB-serial-JTAG (e.g. by accidentally reconfiguring the GPIOs, or because of some bootloop) you may need to use IO0 to get the ESP32-S3 back into download mode.-Note: A lot of the documentation had me thinking I'd needed to hold IO0 LOW at boot to allow Flashing and Debugging with this method, but it appears to NOT be needed.
According to the USB spec, power is 5V, but the USB datalines are 3.3V. In general, GPIO19&20 are designed to be compatible with USB.I'm still confused regarding the 5V USB signals. I've read many times that none of the ESP32's signals are 5V tolerant. Is the ESP32-S3 special for the IO19 and IO20 pins and can handle the signals? If so, can you please point me to documentation that confirms this so I can feel confident in moving forward with my design?
Re: JTAG USB Confusion
I'm learning lots of new things today.
Thanks again!
Thanks again!
Who is online
Users browsing this forum: Bryght-Richard and 194 guests