Simple JTAG Adapter

To interact with the ARM CPU on the router board from a personal computer, and to support development, debugging and testing requirements, ARM (like most CPU vendors) includes an on-chip debugging system, known as EmbeddedICE-RT. Through a IEEE 1149.1 JTAG Interface Test Access Point (TAP), a PC-hosted debugger can monitor and control the CPU core as well as the memory subsystem. The core can be halted, the contents of core registers or memory can be inspected or changed, instructions can be inserted into the core, and (with the right tools) programs can be downloaded into the systems memory and debugged at a source code level.

Almost all systems based on an ARM CPU core (such as the W90N740-based router board) have a header (or perhaps a set of bed-of-nails test points) that bring out all the relevant signals needed for JTAG access. In the case of the router PCB, a dedicated 14-pin header is included in the top left of the board near the reset switch. The JTAG interface would typically be used both during development, and at the time of manufacture, for testing, and for programming the flash memory.

To use the JTAG port with your PC, you need an interface unit; most such commercial units are expensive and use a programmable logic device (FPGA or CPLD) to provide the highest possible performance. However it is possible to make your own very simple JTAG adapter that connects to your PC's parallel port – the PC performs all the low level protocol operations in software, so that the hardware requirement is minimal. The schematic of the required hardware is shown here; as you can see, it consists of just one IC, a CMOS buffer/line-driver (74HC244), one transistor, and several resistors. For more information, see the original design, at the JTAG-ARM9 project (http://jtag-arm9.sourceforge.net/hardware.html).

Prototype

I constructed the circuit on a small piece of prototype board (like "veroboard"); the result is shown below.

Image:wiggler-top.jpg

If you are constructing the adapter on prototype board, you will find that the DB25 parallel port connector will not fit in the board correctly – I was able to bend pins 14 to 25 at right angle and bend the remaining pins inwards so they could be forced into the 2.54mm-spaced holes on in the board. Pins 18 to 25 were all bridged together and connected to ground. Note that in the photos the resistors are not the specified values due to the fact that they were not in stock; 100R were used instead of the 51R resistors, and 27k instead of 47k – the circuit still works fine.

PCB

Since assembling the prototype shown, I have laid out a simple single-sided PCB; the details and design files for it are available on request if you want to etch one yourself. Alternatively, a pre-assembled PCB is included in our kit, see Cost and Availability.

Image:jtagpcb_photo.jpg