Photo by Umberto on Unsplash

Getting Started with JTAG Boundary Scan

Street View for Circuit Boards, Part One

--

Everyday at life-sized scale, people roam along networks of roads. On a smaller scale, they digitally cruise Street View in Google Maps. Computers zoom in and out and effortlessly make big things small and small things big. If you could enlarge an electronic circuit board to the size of a town, you’d find there too a road network of sorts.

Here’s where JTAG boundary scan comes in: it’s like Street View for electronic circuit boards. Just like Street View pictures a town from every passing driveway, JTAG captures a simple black and white, high or low, 1-bit image of the electric energy at each pin pad on a circuit board. This view allows you to verify that connections between pins are correct and that each pin is functioning as expected.

📝 JTAG stands for Joint (European) Test Access Group, a consortium that formed in the mid-80s to address the need to simplify testing of printed circuit boards (PCBs).

In this series of articles, we’ll look at what you need to get started using JTAG boundary scan to test your hardware.

How JTAG Works

Companies that build your electronics depend on JTAG. It’s the only fast, free, and readily available alternative to costly visual inspection for today’s nano-minaturized portable devices.

JTAG originates from features built into modern integrated circuits (ICs). Physically, it’s made up of five pins on the chip. The board manufacturer configures these pins from chip to chip and then puts them on a connector for factory technicians to access.

Two pins in particular, one named test data in (TDI) and the other test data out (TDO) snake through the integrated circuits. This serial daisy chain sends messages to the JTAG controller and receives 1-bit images back from the hardware. You can then see all the connections and signals on the hardware you are testing and troubleshoot any issues.

🛠 If the right-to-repair your own equipment matters to you, you’ll want to tap into this valuable diagnostic feed.

How to Get Started with JTAG

You won’t need to physically touch or expose the electronics to put JTAG to use if you have the right to repair. You need only three things to get started. Open source software is one of those, and it’s free. (In the next article, you’ll learn about four open source projects that have all the algorithms you will need). The other two requirements you can purchase for easily under $100. The first of these is a board with an identifiable JTAG connector; the last is a JTAG probe with a matching plug so your computer can direct serial traffic to the TDI line and listen in on what the TDO line returns.

You’re not guaranteed to find an identifiable JTAG connector on retail boards. While many retail and consumer electronics have JTAG, in the last stage of production many JTAG features are severed or secured. Features are removed if their use requires expert knowledge of internal or external details of the hardware.

The JTAG features that remain are there to help locate and correct faults that may develop over time during operation. You’ve probably already used some JTAG features on your personal electronics. Most likely you’ve used it to upgrade the firmware on a device. Your role in that is typically to insert a SD card or connect the device to the internet; the rest of the process is automated.

Development Boards

To nurture a deeper understanding of JTAG, it’s best to look for a development board first. A development board will often be sold in a bundle that includes the compatible JTAG probe and cables. You’ll find plenty of development boards with JTAG interfaces to get you started.

The board I’ve used in writing this article is an early edition of the MachXO3L Starter Kit from Lattice Semiconductors.

MachXO3L image courtesy of https://www.latticesemi.com

This is a very simple breakout board powered over USB. It comes populated with just a power-supply, 8 LEDs, a DIP switch and, most importantly, a JTAG interface. The popular FTDI FT2232H series USB probe is built into the onboard JTAG interface. The bundle ships with a USB-A to USB-mini cable that is all the hardware you need to experiment with JTAG.

The FTDI FT2232H is a JTAG serial engine used by many developer board manufacturers. In its incarnation on the LCMXO3L-6900C-S-EVN, my experience shows successful communication when used in combination with Gwenhael Goavec-Merou’s OpenFPGA Loader.

Up Next

I’ll talk about OpenFPGA Loader and other open-source packages available in the next article. Each of the software platforms you’ll learn about has a facility for listing the boards and probes it was designed to work with. My suggestion is to find a software library written in a language that you love, and purchase one of the platforms for which it has proven fit for use. Stay tuned as we delve into JTAG software in part two.

--

--

Steve Motty (nOw Innovation Inc.)

30-years specializing in geospatial & remote-sensing logic-ware for many markets: subsea exploration;aviation training;incident recorders;&ocean-going robotics.