The hex numbers used by the FT2232 pin configuration properties refer to the FT2232 data bits described in the following table:
|Data Bit||Signal||FT2232 Pin|
See the 2.1 Data Bit Definition section of http://www.ftdichip.com/Documents/AppNotes/AN2232C-01_MPSSE_Cmnd.pdf for more information.
The first thing to specify is the direction of each of the FT2232 pins, this is specified by the Output Pins property, a bit value of '1' specifies the pin as an output, '0' specifies the pin as an input.
Next you should specify the initial output value of the FT2232 pins, this is specified by the Output Value property, it allows you to provide power to devices and specify the initial signal state.
The configuration of the standard JTAG signals TDI, TDO, TMS and TCK are the same for all FT2232 devices, so the only signals you need to worry about are nSRST and nTRST.
You specify how a signal should be driven by setting two properties:
- The Mask property - this specifies the FT2232 data pin(s) to use when setting the state of the signal.
- The Inversion Mask property - this allows you to invert the value of FT2232 data pin(s) when setting the state of a signal.
When setting a signal to a particular state, the value of the FT2232 output data pins are computed as follows:
output = (output OR mask) XOR inversion_mask;
output = (output AND (NOT mask)) XOR inversion_mask;
The nSRST signal is controlled by the nSRST Mask and nSRST Inversion Mask properties. Similarly, the nTRST signal is controlled by the nTRST Mask and nTRST Inversion Mask properties.
The generic FT2232 device target interface also allows the behaviour of optional LEDs to be specified. To illuminate an LED when the debugger is connected to the target interface use the Connected LED Mask and Connected LED Inversion Mask properties. To illuminate an LED when the target program is running and not stopped on a breakpoint, use the Running LED Mask and Running LED Inversion Mask properties.
By way of example, if you have an FT2232 device with the nTRST signal directly connected to GPIOL0/ADBUS4 and the nSRST signal directly connected to GPIOL1/ADBUS5 and no LEDs the target properties would be:
|Connected LED Inversion Mask||0x0000|
|Connected LED Mask||0x0000|
|nSRST Inversion Mask||0x0000|
|nTRST Inversion Mask||0x0000|
|Running LED Inversion Mask||0x0000|
|Running LED Mask||0x0000|
Please sign in to leave a comment.