For more interesting projects done by Flameman, be sure to check out his project index
Go back to avr-blackfin Flameman/blackfin-avr
The Universal USB to Serial breakout board is designed to allow the maximum flexibility for all your serial protocol needs, the FT2232H is specially designed to take advantage of several common serial protocols. The board includes an onboard 3.3V regulator, access to +5 and +3.3V if your project is to run on bus power, and a blank EEPROM for configuration data(such as modes, VID/PID).
The available serial modes are: - Dual Channel RS232/RS422/RS485 - Dual Channel 245 FIFO - Sync/Async - Dual Channel JTAG <---------------------- what you need - Dual Channel I2C - Dual Channel SPI - Dual Channel Bit Bang - Sync/Async - Dual Channel CPU style FIFO Interface - Dual Combination of any of the above interfaces - Fast Serial Optical Interface - 8051 Host Bus Emulation
The datasheet can be downloaded from FTDIChip.com. As well, they have information on all the configuration modes, and custom DLL's for the I2C, SPI, and JTAG interfaces.
In order to use a ft2232 as gnICE usb-jtag, you have to program the onboard EEPROM. FTDI has a program called FT_PROG. Download and run the program and parse the FT2232 information. As you can see from the image, after parsing the data, you need to navigate to the hardware settings under each port and select 245 FIFO mode. Once this is done, write the data to the FT2232 chip. I have noticed that the FTDI_Prog seems to have a bug where string descriptors do not get read back right if you change them. As far as I can tell they write properly, but do not read back correctly and appear as garbled characters.
Analog Devices documentation
FT2232H.AD5 --- BFjtag.pin02 EMU FT2232H.AD3 --- BFjtag.pin06 TMS FT2232H.AD0 --- BFjtag.pin08 TCK FT2232H.AC1 --- BFjtag.pin10 TRST FT2232H.AD1 --- BFjtag.pin12 TDI FT2232H.AD2 --- BFjtag.pin14 TDO FT2232H.gnd --- BFjtag.pin04 gnd BFjtag __ 1 -|..|- 2 emu 3 -|..|- 4 gnd 5 -|..|- 6 tms gnd 7 -|..|- 8 tck gnd 9 -|..|- 10 /trst gnd 11 -|..|- 12 tdi gnd 13 -|..|- 14 tdo +--+
method1: do a custom configuration, programming the ft2232 eeprom
Every FT2232 universal serial module has an EEPROM (1) on board that is programmed with a default set of parameters including the
- VID:0x0403 default
- PID:0x6010 default
- VID:0x0456 gnICE
- PID:0xf000 gnICE
The EEPROM can be changed onboard using the FTDI Windows utility FT_Prog or any other Linux stuff. If you change the VID & PID to match gnice then every software looking for gnICE can detect the module.
/CS Chip Select SclK Serial Data Clock DIn Serial Data Input DOut Serial Data Output GND Ground /WRP write protect, put to vcc to protect VCC Power Supply ORG Internal Organization 8/16bit _____ /cs -| |_| |- vcc Sclk -| |- /wrp DIn -| |- org 8/16bit DOut -|_____|- gnd
[Basic Details] Device Type=5 VID PID Type=2 USB VID=0456 USB PID=F000 [USB Power Options] Bus Powered=1 Self Powered=0 Max Bus Power=100 [USB Serial Number Control] Prefix=AD Use Fixed Serial Number=0 Fixed Serial Number=12345678 [USB Remote WakeUp] Enable Remote WakeUp=0 [Windows Plug and Play] Enable Plug and Play=1 [USB String Descriptors] Manufacturer=Analog Devices Inc. Product=Blackfin gnICE [Programming Options] Only Program Blank Devices=1 [BM Device Specific Options] USB Version Number=1 Disable Serial Number=0 IO Pin Pull Down in Suspend=0 [Dual Device Specific Options A] RS 232 mode=0 245 FIFO mode=1 245 CPU FIFO mode=0 OPTO Isolate mode=0 High Current Drive=1 [Dual Device Specific Options B] RS 232 mode=1 245 FIFO mode=0 245 CPU FIFO mode=0 OPTO Isolate mode=0 High Current Drive=1 [Dual Device Driver Options A] Virtual Com Port Driver=0 D2XX Driver=1 [Dual Device Driver Options B] Virtual Com Port Driver=1 D2XX Driver=0 [R Device Specific Options] Invert TXD=0 Invert RXD=0 Invert RTS#=0 Invert CTS#=0 Invert DTR#=0 Invert DSR#=0 Invert DCD#=0 Invert RI#=0 C0 Signal=-1 C1 Signal=-1 C2 Signal=-1 C3 Signal=-1 C4 Signal=-1 Enable Ext Osc=0 High Current I/O=0 Load D2XX Driver=0 In EndPoint Size=0
method2: hacking urjtag
urjtag is handling is at urjtag/src/tap/cable/ft2232.c & ft2232_list.h This is where the gnice and gnice+ are defined.
so you could aldo modify the urjtag code replacing
URJ_DECLARE_FTDX_CABLE(0x0456, 0xF000, "-mpsse", "gnICE", gnice)
URJ_DECLARE_FTDX_CABLE(0x0403, 0x6010, "-mpsse", "gnICE", gnice)
it has been used here: http://www.mindchasers.com/topics/jtag.htm