Hi, I found that if I turned on the TinyUSB support in menuconfig, we basically lost the built-in JTAG debugger facilities. Only when I boot with GPIO0 pulled low it shows up the interface that can be used for flashing. I wonder if it is possible to reuse the USB interface for both JTAG and other user-defined classes like HID, CDC, MSD so that they work simultaneously?
Thanks!
Is it possible to use the ESP32S3 USB JTAG and the other TinyUSB classes simultaneously?
-
- Posts: 11
- Joined: Tue Apr 12, 2022 11:15 am
Re: Is it possible to use the ESP32S3 USB JTAG and the other TinyUSB classes simultaneously?
Yes. However, there is only one integrated USB PHY on chip, so you would need an external PHY for the other function. See pp. 942. of the Technical Reference Manual v0.8.
Re: Is it possible to use the ESP32S3 USB JTAG and the other TinyUSB classes simultaneously?
Thank you for the insights!Zoltan Janosy wrote: ↑Mon Aug 22, 2022 8:03 amYes. However, there is only one integrated USB PHY on chip, so you would need an external PHY for the other function. See pp. 942. of the Technical Reference Manual v0.8.
Does this mean, if you want to use the USB periph along with the JTAG features, the JTAG can only be accessed from the external PHY interface (MTDI, MTCK, etc.) ? I am not familiar with the USB protocol. Why could the USB interface be multiplexed for multiple CDC, HID, MSD device, but not for the JTAG interface? Is the USB JTAG interface mutually exclusive with other device profiles?
Thanks!
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Is it possible to use the ESP32S3 USB JTAG and the other TinyUSB classes simultaneously?
Yes. All the profiles you mention run on the USB-OTG peripheral which is software-configurable to be whatever you want. JTAG needs to work even when software is broken or not there, so it's in its own peripheral which is hardcoded to only be an usb-to-serial-and-jtag thing. Normally, both are there but they use the same USB bus: once you start TinyUSB, the PHY switches out USB-serial-jtag for the USB-OTG. If you add an external PHY, you can have one on the USB bus that provides while having the other on the internal PHY.
Re: Is it possible to use the ESP32S3 USB JTAG and the other TinyUSB classes simultaneously?
Appreciate for the clear explanations!ESP_Sprite wrote: ↑Mon Aug 22, 2022 10:21 amYes. All the profiles you mention run on the USB-OTG peripheral which is software-configurable to be whatever you want. JTAG needs to work even when software is broken or not there, so it's in its own peripheral which is hardcoded to only be an usb-to-serial-and-jtag thing. Normally, both are there but they use the same USB bus: once you start TinyUSB, the PHY switches out USB-serial-jtag for the USB-OTG. If you add an external PHY, you can have one on the USB bus that provides while having the other on the internal PHY.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], QQ26750452 and 68 guests