Page 1 of 1
ESP32-S3 USB JTAG and MSD
Posted: Mon Apr 17, 2023 1:20 pm
by steaky1212
Hi everyone,
Is it possible to use the USB port for both JTAG and MassStorageDevice (or CDC)?
This can either be:
- it enumerates as a composite device
- for the first 10 seconds of booting it is JTAG, but then switches over to MSD if nothing has connected
I am using the ESP32-S3-Mini and I'm using every pin, so I can't use the external JTAG interface.
Re: ESP32-S3 USB JTAG and MSD
Posted: Tue Apr 18, 2023 1:20 am
by ESP_Sprite
The first option is impossible, as USB-serial-JTAG (which provides the JTAG connection) and USB-OTG (which can provide the mass storage functionality) can't be connected to the USB pins at the same time. The second option is viable.
Re: ESP32-S3 USB JTAG and MSD
Posted: Tue Apr 18, 2023 12:11 pm
by steaky1212
It's good to know that option1 is impossible due to silicon!
Regarding switching out JTAG for MSD during run-time, would this just be a case of not running "tinyusb_driver_install" (etc.), or something a lot more involved?
Also, is there a way for the ESP32 to know that it is currently under JTAG and so to not enable the USB?
Thanks
Re: ESP32-S3 USB JTAG and MSD
Posted: Wed Apr 19, 2023 3:32 am
by ESP_Sprite
steaky1212 wrote: ↑Tue Apr 18, 2023 12:11 pm
Regarding switching out JTAG for MSD during run-time, would this just be a case of not running "tinyusb_driver_install" (etc.), or something a lot more involved?
I think so, yes. Until that call, the usb-serial-jtag should still be available.
Also, is there a way for the ESP32 to know that it is currently under JTAG and so to not enable the USB?
There is:
https://docs.espressif.com/projects/esp ... _attachedv