Changing FT2232H-Based Device Parameters

Altium’s DT05 USB JTAG Adapter

Years ago, I acquired one of these DT05 adapters from Amazon with the desire to expand my FPGA programming horizons beyond Altium’s NanoBoard 3000, which never worked well for me. I could never get much of their embedded software platform working quite right, but that’s another subject for another day.

At the time, I knew that this device was based on a FT2232H chip, and therefore, theoretically would work with Xilinx ISE as well as within Altium Designer. Unfortunately for me, this functionality did not work out of the box. Xilinx ISE has support for the Digilent FT2232-based devices, but not the Altium device.

Enter FT_PROG Stage Right

FT_PROG is a nifty program from FTDI that allows you to change the information stored in the FT2232H EEPROM. The EEPROM information controls which VID/PID the USB device enumerates with as well as the functions of both of the on-chip ports. The ports can be configured in a variety of different ways. Please see the FTDI website for more information.

FT_PROG requires the Microsoft .NET Framework 4.0 to be installed on your system in order to function. Chances are, you already have this installed.

Operation

Once FT_PROG is installed, run it. Then plug your JTAG adapter into a USB port and hit DEVICES -> Scan and Parse (F5) or just hit F5. Right click on Device 0 in the Device Tree, and select Apply Template -> From File. Open your preferred file, right click on Device 0 again, then select Program Device. Boom! You’re done!

Files

Right-click and Save Link As... on the files below to save them.

Update 11/01/17 — FT_PROG is not enough!

If you have been trying to use FT_Prog to make your FT2232H work with the Digilent drivers for Xilinx without success, there is a reason. The Digilent drivers probably look in a different spot in the EEPROM than FT-Prog uses/copies for device verification. I used libftdi a couple of years ago to directly copy the EEPROM from a valid Digilent device to a file, which you can use to flash your FT2232H. Apparently, I completely forgot about this when I wrote up the original post. Also it runs on Linux!

Installation

If you are using a Debian-based linux distro, as I am, installation is easy! Just find libftdi1 in your favorite package manager and install it. I like apt-get, because the command line is my friend.
sudo apt-get install libftdi1

If you want to compile from source, remember that Libftdi requires cmake, libusb 1.0, libboost, and libconfuse to be installed.
For Debian:
sudo apt-get install cmake libboost-dev libusb-1.0-0-dev libconfuse-dev
git clone https://github.com/legege/libftdi.git
cd libftdi
cmake .
make && sudo make install

Operation

Libftdi has a handy little utility for reading and writing the EEPROM. ftdi_eeprom uses configuration file similar to FT_Prog’s xml files with the added ability to define raw data files. You may need to change the VID/PID defined in the conf file. The first line below will save the raw EEPROM data from a device and the second one will write to it.
sudo ftdi_eeprom --read-eeprom flash_digilent.conf
sudo ftdi_eeprom --flash-eeprom flash_digilent.conf
The contents of the DT05 EEPROM before the raw flash:
0x000: 01 01 03 04 10 60 00 07 80 2f 08 00 00 00 9a 12 .....`.. ./......
0x010: ac 34 e0 1a 00 00 00 00 56 00 00 00 00 00 00 00 .4...... V.......
0x020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x090: 00 00 00 00 00 00 00 00 00 00 12 03 44 00 69 00 ........ ....D.i.
0x0a0: 67 00 69 00 6c 00 65 00 6e 00 74 00 34 03 44 00 g.i.l.e. n.t.4.D.
0x0b0: 69 00 67 00 69 00 6c 00 65 00 6e 00 74 00 20 00 i.g.i.l. e.n.t. .
0x0c0: 41 00 64 00 65 00 70 00 74 00 20 00 55 00 53 00 A.d.e.p. t. .U.S.
0x0d0: 42 00 20 00 44 00 65 00 76 00 69 00 63 00 65 00 B. .D.e. v.i.c.e.
0x0e0: 1a 03 32 00 31 00 30 00 32 00 34 00 39 00 38 00 ..2.1.0. 2.4.9.8.
0x0f0: 35 00 34 00 36 00 30 00 36 00 00 00 00 00 31 9f 5.4.6.0. 6.....1.

Here is my output from the flash operation:
FTDI eeprom generator v0.17
(c) Intra2net AG and the libftdi developers
FTDI read eeprom: 0
EEPROM size: 256
Used eeprom space: 238 bytes
FTDI write eeprom: 0
FTDI close: -1

The contents of the DT05 EEPROM after the raw flash:
0x000: 01 01 03 04 10 60 00 07 80 2f 08 00 00 00 9a 12 .....`.. ./......
0x010: ac 34 e0 1a 00 00 00 00 56 00 01 00 c7 92 6a 35 .4...... V.....j5
0x020: 51 01 80 30 4a 74 61 67 53 6d 74 31 00 00 00 00 Q..0Jtag Smt1....
0x030: 00 00 00 00 00 44 69 67 69 6c 65 6e 74 20 4a 54 .....Dig ilent JT
0x040: 41 47 2d 53 4d 54 31 00 00 00 00 00 00 00 00 00 AG-SMT1. ........
0x050: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0x090: 00 00 00 00 00 00 00 00 00 00 12 03 44 00 69 00 ........ ....D.i.
0x0a0: 67 00 69 00 6c 00 65 00 6e 00 74 00 34 03 44 00 g.i.l.e. n.t.4.D.
0x0b0: 69 00 67 00 69 00 6c 00 65 00 6e 00 74 00 20 00 i.g.i.l. e.n.t. .
0x0c0: 41 00 64 00 65 00 70 00 74 00 20 00 55 00 53 00 A.d.e.p. t. .U.S.
0x0d0: 42 00 20 00 44 00 65 00 76 00 69 00 63 00 65 00 B. .D.e. v.i.c.e.
0x0e0: 1a 03 32 00 31 00 30 00 32 00 30 00 33 00 38 00 ..2.1.0. 2.0.3.8.
0x0f0: 35 00 39 00 32 00 38 00 39 00 02 03 00 00 7b 6e 5.9.2.8. 9.....{n

Files

Right-click and Save Link As... on the file below to save it.

DT05 Connector Pins

Ch JTAG Serial SPI Flying Lead Color 10-pin Cable Mini-HDMI
A HARD TDI RXD DO Red 1 9
HARD TDO RTS# DI Brown 2 8
HARD TCK TXD SCK Blue 3 6
HARD TMS CTS# CS Purple 4 5
B SOFT TDI RXD DO Yellow 5 3
SOFT TDO TRS# DI Green 6 2
HARD TCK TXD SCK White 7 12
HARD TMS CTS# CS Grey 8 11
N/A GND Black 9 1, 4, 7, 10, 13
DETECT N/A N/A Orange 10 NC

Using the DT05 As a USB to Serial Device

Flash the EEPROM on the DT05 with the FT2232H Default.xml file. This will allow the use of 2 channels of serial with a shared ground. Channel A

On OSX and Linux, connecting through the DT05 to the target can be as easy as using screen:
screen $usbdevice 115200 -L
Which will start a new screen session at 115200 baud with logging (-L). The name of your USB device depends on your operating system and device serial number. The DT05 will have two devices, one for each channel. The device name for channel A ends with an A (/dev/tty.usbserial-FT20KVDWA on my OSX machine). I’m sure you can figure out channel B on your own. To quit screen, hit control-a then k.

Scrollback in screen is basically unusable until you add this to your ~/.screenrc file:
# Enable mouse scrolling and scroll bar history scrolling
termcapinfo xterm* ti@:te@

Using the DT05 with a beaglebone black

Using the DT05 with a pine64+