[ESP32H2] PAD_to_JTAG vs. USB_to_JTAG: Advantages and Disadvantages?

FoxForest
Posts: 1
Joined: Sun Mar 31, 2024 8:46 am

[ESP32H2] PAD_to_JTAG vs. USB_to_JTAG: Advantages and Disadvantages?

Postby FoxForest » Sun Mar 31, 2024 10:02 am

The ESP32H2 offers the options PAD_to_JTAG and USB_to_JTAG (see ESP32H2 - Technical Reference Manual: 1.10.4 JTAG Control) to implement JTAG functionality. The JTAG signal source for the PAD_to_JTAG option are the JTAG pins MTDI, MTCK, MTMS, and MTDO. The JTAG signal source for the USB_to_JTAG option is the USB Serial/JTAG Controller (see ESP32H2 - Technical Reference Manual: 8.2.4 JTAG Signal Source Control).

I am designing a USB-C powered embedded system that uses the ESP32-H2-MINI-1 module. I am looking to utilize the JTAG interface for debugging and flashing during development and for flashing the firmware during production. Currently, I have designed the system for PAD_to_JTAG using a TC2050-IDC to connect to the JTAG pins. However, I am not sure if the USB_to_JTAG would be the better choice, considering a USB-C connector is already present on the board for power delivery.

:?: What are the advantages and disadvantages of the different JTAG options?

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

Re: [ESP32H2] PAD_to_JTAG vs. USB_to_JTAG: Advantages and Disadvantages?

Postby ESP_Sprite » Mon Apr 01, 2024 1:56 am

Pad JTAG can be a bit faster, but it depends on your JTAG adapter and cabling and the particular work you're doing. Pad JTAG might play better with light/deep sleep (for USB-serial-JTAG, the entire device disappears, while for pad JTAG, only the JTAG bit will). Pad JTAG needs to be enabled by burning an eFuse, though, so you can't use it as your sole way of programming the chip; you need either a serial or USB connection to enable pad JTAG anyway.

Note that in your setup (assuming you have enough GPIOs) you can do both for no cost: simply route the data lines to your USB-C connector as well as have the tag-connect footprint on the PCB. That way you can always switch from one to the other when needed.

(If any, if you didn't do that already, make sure GPIO9 is accessible somehow so you can force the chip into download mode. You might need that for either of the two options.)

Who is online

Users browsing this forum: No registered users and 56 guests