Friday, February 8, 2008

USB to JTAG Interface

Intro



This document describes some prototype USB-to-JTAG interfaces I built
with the FTDIChip FT2232C device. The primary purpose was to develop
a USB-connectable JTAG interface for the Open On-Chip Debugger
OpenOCD.


One very useful feature of the FTDIChip FT2232C devices is that it can drive
a fast synchronous serial interface like SPI or JTAG. To do that, channel one
of the two-channel FT2232C has to be switched to "MPSSE" mode. The maximum
clock frequency to achieve is about 6 MHz.


The other channel of the FT2232C is available for arbitrary other tasks. A
typical usage is to establish a UART connection to a microprocessor target
while channel one at the same time serves a JTAG connection.


Note that all the JTAG interfaces built with the FT2232C lack the
adaptive clocking feature, i.e. the RTCK (return clock) JTAG signal offered
by some ARM controllers, e.g. the Oki 67Q4xxx, is not supported.


Please see also my OpenOCD page:
http://www.fh-augsburg.de/~hhoegl/proj/openocd/index.html



Prototype 1






img/usbjtag-1-photo-small.jpg

Figure: Photography of the first prototype


This was the very first demonstrator to show that a JTAG port can be
driven with a FT2232C chip (I think it was in 2004). I mounted a ready
to use FT2232M module by DLP Design on a
prototyping PCB and did the wiring by hand. You can buy these modules
e.g. at Elektronikladen or
Unitronic.



Schematic (JPG)


http://www.fh-augsburg.de/~hhoegl/proj/usbjtag/img/usbjtag-1-sch.jpg



Schematic (XFIG)


http://www.fh-augsburg.de/~hhoegl/proj/usbjtag/img/usbjtag-1-sch.fig



Photography of the first prototype using a FT2232C DIL module (USBJTAG-1)


http://www.fh-augsburg.de/~hhoegl/proj/usbjtag/img/usbjtag-1-photo.jpg




Prototype 2






img/usbjtag-2-photo-small.jpg

Figure: Photography of the second prototype 2


My second prototype is a PCB with about 7 x 6 cm size with the following
components on board:




  • FT2232C with 93C56 EEPROM




  • Step up/down regulator to guarantee 5.0 Volt from 4.5 to 5.5 USB Voltage.




  • RS-232 Level Shifter (MAX3241)




  • ADuM1401BRW I-Coupler for JTAG port level shifting and electrical isolation.




  • RS-232 connector D-SUB9




  • JTAG Connector



Be aware, the design has some flaws:




Joern Kaipf's OOCD-Link



[2006-02-26] During Embedded World 2006 I came into contact with Joern Kaipf.
He designed a JTAG interface with MAXIM level shifters which supports a target
voltage range from 1.2 to 3.6 Volt. The following photography shows this
board.



img/oocd-link-ew07.jpg


One year later I met Joern at Embedded World 2007. He now also has built a
version of the OOCD-Link adaptor which directly uses the FT2232 signals to
drive the target. This works for targets running with 3.3V and 5V. A nice
additional feature is the 10-pin header which carries the UART signals of
channel B. The adaptor is called "OOCD-Link-S". Please see the following
photography:



img/oocd-link-s-ew07.jpg


Joern will give the PCB files to anyone who is interested in building
such an adaptor. His E-mail address is joern (at) joernline.de. See
also Joern's homepage http://www.joernonline.de.



The commercial adaptors



The following adaptors are all based on my original design using the
FT2232. However the commercial adaptors have a differing pin usage and
have much better support for a wide target voltage range than my
original prototypes.


Amontec JTAGkey and JTAGkey-Tiny


Amontec sells a USB-to-JTAG interface also based on the FT2232C.
It does not use the I-Coupler but much faster buffer devices specialized for
level shifting (but not for electrical isolation). Target voltages down to
1.8V are supported. Please see the following link to the "JTAGkey":
http://www.amontec.com/jtagkey.shtml
Note that the JTAGkey uses a wiring of the FT2232 signals different from
my schematic.


Amontec JTAGkey (129 Euro)


img/jtagkey_small02.jpg



img/jtagkey-schema.jpg


Due to the rather high price for JTAGkey Amontec later designed a cheaper
JTAG adaptor, the JTAGkey-Tiny. I recommend to buy this adaptor
because it is really "tiny" and its price is reasonable. It directly
fits into a standard 20-pin JTAG header. On the side opposed to the
JTAG header it has a Mini-USB connector with 5 pins.


Amontec JTAGkey-Tiny (29 Euro)


img/jtagkey-tiny-board-text.JPG


Olimex USB-JTAG


Olimex manufactures and sells many variants of reasonably priced ARM7
and ARM9 board. If you consider to start with ARM controllers you
should go to http://www.olimex.com. They also
have the following JTAG adaptors supported by OpenOCD:


Olimex ARM-USB-TINY (49.95 USD)


img/msp430-jtag-tiny.jpg


Olimex ARM-USB-OCD (69.95 USD)


img/ARM-USB-OCD-3.jpg




Powered by ScribeFire.

No comments: