[ESP32-S3]Concatenating 2 devices over JTAG

lukilukeskywalker
Posts: 21
Joined: Wed Feb 22, 2023 4:25 pm

[ESP32-S3]Concatenating 2 devices over JTAG

Postby lukilukeskywalker » Sat Aug 26, 2023 2:44 pm

Hi,
I have been wondering if I could concatenate a ESP32 and another microprocessor/FPGA JTAG.
If I have something wrong over my assumptions, please let me know.
I know that the ESP32-S3 has a USB Interface that hosts a JTAG controller and Serial interface. Also, the ESP32-S3 has JTAG pins exposed, which means that both interfaces may be used to program the ESP32. (right?, I mean, I can program it over USB, I guess over the serial controller and over the JTAG pins, or?)
My question is, would it be possible for me to concatenate both devices with JTAG, and program them over a single JTAG cable? Also, would it be possible to use the JTAG controller integrated in the ESP32-S3 USB interface to program the other device?
P.S: I am sorry for the lack of knowledge, I have not been able to test this assumptions and I haven't been able to find any information about the JTAG controller, aside from that it can be used to test the ESP32
P.S2: Yeah, I know that there are projects that bitbang the pins to emulate a JTAG controller, but I would prefer not to do that, if possible
Thank you very much

lukilukeskywalker
Posts: 21
Joined: Wed Feb 22, 2023 4:25 pm

Re: [ESP32-S3]Concatenating 2 devices over JTAG

Postby lukilukeskywalker » Sun Aug 27, 2023 1:31 pm

The CPU JTAG signals can be routed to the USB Serial/JTAG Controller or external GPIO pads using eFuses and
when the user program has started, software control as well. At that time, the JTAG signals from the USB
Serial/JTAG can also be routed to the GPIO matrix. This allows debugging a secondary SoC via JTAG using the
ESP32-S3 USB Serial/JTAG Controller.

https://www.espressif.com/sites/default ... #page=1210
So I guess that means that it can indeed be used to debug another SoC, but can it be used to upload code to the other SoC?
Also, can't both JTAG interfaces be concatenated? I don't see how it would be possible with the provided diagrams in the technical note

ESP_Sprite
Posts: 9052
Joined: Thu Nov 26, 2015 4:08 am

Re: [ESP32-S3]Concatenating 2 devices over JTAG

Postby ESP_Sprite » Mon Aug 28, 2023 1:04 am

So, as you read, you can use software to redirect the JTAG signals to GPIO pins. The intended use for this (and the only use we envisioned, guess we had a lack of creativity) is to have some ESP32 chip that is used as an impromptu JTAG adapter for something else. As such, it's not possible to 'chain' the internal CPU with some external device. (Although I think you could possibly hack something up by both setting the ESP32 to use JTAG pins for its CPU, as well as configure the USB-serial-JTAG converter to output to GPIOs, then connect those two externally. You'd need to try that though.)

Note that on a JTAG level, uploading and debugging are all the same, so if you can debug another device, you can upload to it as well. Also note that there's a known issue where SRST does not get redirected properly: if you use SRST to reset the external device, the ESP32 will reset as well.

Who is online

Users browsing this forum: No registered users and 65 guests