Electronic – Purpose of a JTAG programmer

fpgajtagmicrocontroller

There is a device called a JTAG programmer. This device is typically used to programm MCUs or FPGAs.

My question is do you actually need this device to program a MCU or FPGA with JTAG? Are simple wires/jumper cables not enough for the JTAG programming?

I mean to program a evaluation board you don't need this kind of device. Most of the time you can use a micro usb cable to program it.

Best Answer

JTAG is a protocol, think TCP/IP, on which we can have web browsers, send email, tweet, etc...JTAG has a few primary use cases, in chip production you can use it to test the chip. In board level products you can use it to boundry scan basically light up a pin on one part and knowing the schematic see that the other parts that are supposed to be connected see the voltage. Low speed, grossly broken kind of a thing. And there there are use cases where you are talking to some peripheral for lack of a better term, and one primary use case there is an on chip debugger (OCD) which is extremely specific to the chip or processor core. Folks like ARM support jtag based debuggers into their products, but their mcu products are now primarily cortex-ms which support SWD instead of JTAG (well SWD is the main use case) which is a different protocol/interface.

JTAG is historically not used for programming or debugging MCUs, it takes too many pins for starters, 4 or 5 if you want reset or more. MCU vendors use other protocols some of which are home made and not standard. In most cases though all of these details are in the vendors documentation. And some may have multiple choices there may be a bootloader that you invoke with a strap pin and use uart, or spi or i2c protocols. Some may support i2c or spi in logic (not using a bootloader) some may have jtag or other similar. And a number of board level hobby products have a third party bootloader installed that has nothing to do with the chip vendor.

JTAG is just a very simple few wire serial protocol that can be used to daisy chain to many taps on the line. Used for chip test, board test, programming CPLDs/FPGAs, and sometimes talking to OCDs. If you look at the very simple state machine you see there are four areas where you can specify address or data, you can put whatever you want behind that (well there are some rules).


A number of eval boards, not all, will contain an FTDI device FT2232 or equivalent with mpsse support which makes it easy to support many protocols of which SWD or JTAG or others are not uncommon. Other boards you buy a debugger device which sometimes is simply an FTDI device or is sometimes an mcu that has been programmed to do the job. Look at most ST NUCLEO boards for example there is the target mcu and the debugger mcu (stlink).

Related Topic