JTAG
From Free net encyclopedia
JTAG, an acronym for Joint Test Action Group, is the usual name used for the IEEE 1149.1 standard entitled Standard Test Access Port and Boundary-Scan Architecture for test access ports used for testing printed circuit boards using boundary scan.
JTAG was standardized in 1990 as the IEEE Std. 1149.1-1990. In 1994, a supplement that contains a description of the boundary scan description language (BSDL) was added. Since then, this standard has been adopted by electronics companies all over the world. Boundary scan is nowadays mostly synonymous with JTAG.
While designed for printed circuit boards, it is nowadays primarily used for testing sub-blocks of integrated circuits, and is also useful as a mechanism for debugging embedded systems, providing a convenient "back door" into the system. When used as a debugging tool, an in-circuit emulator which in turn uses JTAG as the transport mechanism enables a programmer to access an on-chip debug module which is integrated into the CPU via JTAG. The debug module enables the programmer to debug the software of an embedded system.
Contents |
Electrical characteristics
A JTAG interface is a special four/five-pin interface added to a chip, designed so that multiple chips on a board can have their JTAG lines daisy-chained together, and a test probe need only connect to a single "JTAG port" to have access to all chips on a circuit board. The connector pins are
- TDI (Test Data In)
- TDO (Test Data Out)
- TCK (Test Clock)
- TMS (Test Mode Select)
- TRST (Test Reset) optional.
Since only the one data line is available, the protocol is necessarily serial like SPI. The clock input is at the TCK pin. Configuration is performed by manipulating a state machine one bit at a time through a TMS pin. One bit of data is transferred in and out per TCK clock pulse at the TDI and TDO pins, respectively. Different instruction modes can be loaded to read the chip ID, sample input pins, drive (or float) output pins, manipulate chip functions, or bypass (pipe TDI to TDO to logically shorten chains of multiple chips). The operating frequency of TCK varies depending on the chip, but it is typically 10-100MHz (10-100ns per bit).
When performing boundary scan on integrated circuits, the signals manipulated are between different functional blocks of the chip, rather than between different chips.
The TRST pin is an optional reset to the test logic - usually asynchronous, but sometimes synchronous, depending on the chip. If the pin is not available, the test logic can be reset by clocking in a reset instruction synchronously.
Even though few consumer products provide an explicit JTAG port connector, the connections are very often available on the printed circuit board as a remnant from development prototyping. When exploited, these connections often provide an excellent means for reverse engineering.
Common extensions
Manufacturer's extensions: Infineon, MIPS EJTAG, Freescale COP, ARM ETM (Extended Trace Macrocell), OnCE etc.
Widespread uses
- Almost every embedded system you can find has a JTAG port.
- The PCI bus connector contains JTAG pins. A special JTAG card can be used to reflash a corrupt BIOS.
Client software
The JTAG interface is accessed using some JTAG-enabled application.
Free software
- OpenCores JTAG module is an IP core which can be used to provide JTAG in a design. It is part of the OpenCores project
- The openwince project produce the JTAG Tools supporting a large set of inexpensive IEEE 1284 parallel printer port cables (the project has made no releases since 2003 but its CVS repository is quite active)
- JTAG-ARM9 provides a JTAG access program for the ARM9 processor.
- JTAG for the LART aimed at the LART processor
- JTAG base layer is an attempt at creating a JTAG library
- The uCLinux for Blackfin project have a JTAG-backend for the GNU Debugger and a JTAG Tools version specifically for Blackfin based on the openwince work
- JTAG toolkit is one more free software JTAG tool suite
Proprietary software
- SEGGER Microcontroller Systeme GmbH j-link, USB to JTAG interface for ARM cores (J-Flash, J-Mem, RDI Pro Bundle)
- SEGGER Microcontroller Systems LLC j-trace, a USB to Trace Mictor and JTAG interface for ARM cores
- Lauterbach Datentechnik GmbH produce JTAG-based in-circuit emulators the most popular being TRACE 32
- Macraigor Systems LLC JTAG Commander and OCD Commander
- Abatron AG's BDI-2000 acts as a GDB server on your LAN, giving you source-level debugging via JTAG.
- Embedded Toolsmiths Guardian-SE JTAG Emulator connects a GDB server on your LAN to the JTAG interface on PowerPC, MIPS, XScale and Arm Processors. This allows: JTAG FLASH Programming, JTAG Emulation and JTAG source-level debugging via JTAG for PowerPC, MIPS, XScale and ARM Processors.
- XJTAG Development System
- Göpel electronic SCANFLEX
- Corelis ScanExpress
External links
- JTAG FAQ
- A Brief Introduction to the JTAG Boundary Scan Interface
- JTAG Scan Educator - Ver. 2 (Rev. A) - An educational software program for DOS, JTAG Scan Educator, introduces the fundamentals of the IEEE 1149.1 boundary-scan standard, including architecture protocol, and required instruction sets.
- Boundary Scan Testing A great tutorial with more in depth detail about operations
- K9JTAG - A cheap do it yourself parallel port JTAG debugger for ARM microcontrollers.de:Joint Test Action Group