Page 1 of 1

ESP32-S3 JTAG and USB-MSC

Posted: Thu Apr 28, 2022 1:41 pm
by EspUser123
Hi There,

I'm using ESP32-S3 in my project. I would like to attach a USB mass storage device to the USB OTG interface and I would like to use the same pins for debugging and flashing the ESP32 (of cause not the same time, but in the same project).

I got the JTAG running with the HelloWorld example.
After updating to IDF 4.4.1 the USB MSC example project is works as well.

However, if the USB MSC example project is flashed, the JTAG doesn't appear in the windows device manager, so I can't use the JTAG.
Even if I uncomment the content in the Main() the JTAG is not available.

How can I get the JTAG in an USB MSC project running?
Attaching a jumper to select if JTAG should be used, would be acceptable.

One further question:
The build process in windows takes about 15-20min, in a WSL2 setup 1:15min. As the driver support in WSL2 is limited, is it possible to get the JTAG within a WSL2 setup running?

Thanks.

Re: ESP32-S3 JTAG and USB-MSC

Posted: Fri Apr 29, 2022 1:37 am
by ESP_Sprite
With 'the JTAG', you mean the internal USB-serial-JTAG converter? In that case, there isn't really any logic to handle your use case. Either you initialize MSC, meaning the port is switched to the USB-OTG controller and used as a host, or you don't, meaning the port is switched to the USB-serial-JTAG converter and you can use it for debugging. You could theoretically try and detect what is connected to the port (e.g. by looking if whatever is connected sources 5V or not) and switch modes depending on that, but this is not implemented out of the box.