GlossaryJTAG
JTAG
JTAG is the four-wire serial port, defined by IEEE 1149.1, that gives test and debug access to chips on a board. The name comes from the Joint Test Action Group, the industry group that developed it. Engineers use the word for the port itself and for the debug and programming tools that run over it.
How it works
The port has four required signals: TCK, the clock; TMS, which steps the port's state machine; TDI, data in; and TDO, data out. An optional TRST resets the port. Several chips can be chained, with one chip's TDO feeding the next chip's TDI, so a single header reaches every chip in the chain.
IEEE 1149.1 defines a test access port and a boundary-scan register for testing connections. Chip makers add their own functions on the same port, such as processor debug, breakpoints, memory access and flash programming. IEEE 1532 extended the port for in-system configuration of programmable devices.
JTAG vs boundary scan and SWD
Boundary scan is the board test method that uses the JTAG port to drive and read chip pins and find opens and shorts. JTAG is the port that carries it, along with debug and programming. A board can use JTAG for programming and debug without ever running a boundary-scan test.
SWD is a two-wire debug port used on many microcontrollers. It uses fewer pins than JTAG and supports debug and programming, but it does not support boundary scan or chaining in the JTAG sense. Many microcontrollers support both on shared pins.
Why it matters
JTAG is often the only way to program, debug or test a chip after it is soldered down, especially a BGA. Leaving it out, or routing it poorly, can make boards hard to bring up and impossible to test well.
How to get it right
- Bring JTAG signals to a header or pads that a fixture can reach.
- Add pull resistors as the chip makers recommend, and keep TCK clean.
- Order and document the chain, and allow chips to be bypassed.
- Plan whether to lock JTAG on production units for security.
JTAG in robotics and drone hardware
Robot controllers and flight computers often carry FPGAs and application processors that are debugged and programmed over JTAG. A chained header that reaches all of them speeds bring-up and gives production a single access point for programming and test.
The same port serves boundary scan tests on BGA joints, in-system programming and debug, so one test point pattern or connector covers all three.