Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with generic FT2232H adapter #9

Open
d18c7db opened this issue Mar 1, 2022 · 1 comment
Open

Help with generic FT2232H adapter #9

d18c7db opened this issue Mar 1, 2022 · 1 comment

Comments

@d18c7db
Copy link

d18c7db commented Mar 1, 2022

Hi, I was trying to use your tool with a generic FT2232H breakout board. The board is detected under the "Probe" menu and I can select it, but when I run "JTAGChain" "Get ID" I get "Error: No device found".

The connections are as follows:
FT2232H-ADBUS0 to target TCK
FT2232H-ADBUS1 to target TDI
FT2232H-ADBUS2 to target TDO
FT2232H-ADBUS3 to target TMS
FT2232H-ADBUS5 to GND

The same FT2232H breakout board with same connections as above works in OpenOCD so the TDI/TDO are the correct way around and gets the expected JTAG ID, however for OpenOCD to detect the breakout board I need to use Zadig and install a WinUSB driver whereas for your "JTAG Boundary Scanner" to detect the breakout board I need to install a libusb-win32 (v1.2.6.0) driver.

It doesn't feel like this is a driver issue though, since the breakout board is detected. It feels maybe like a connection issue, this is why I tied ADBUS5 to GND since it is labeled as "Target presence : 0 if target present" in the config.script so perhaps it needs some other connection as well? What else could be wrong?

@jfdelnero
Copy link
Member

Please have a look to the "config.script" file, you can change the FT2232 pin assignation and configuration :

Here is the current default configuration :

`
//
// Probe internal mapping
//
// Olimex ARM-USB-OCD-H JTAG signals example
//
// VREF – voltage follower input for the output buffers adjust
// JTAG signals as per your target board voltage levels
//
// The TCK/TDI/TDO/TMS signals are fixed to these pins
// ADBUS0 -> TCK; (out)
// ADBUS1 -> TDI; (out)
// ADBUS2 -> TDO; (in)
// ADBUS3 -> TMS; (out)

// ADBUS4 -> 0 to enable JTAG buffers; (GPIOL0) (out)
// ADBUS5 -> 0 if target present; (GPIOL1) (in)
// ADBUS6 -> TSRST in; (GPIOL2) (in)
// ADBUS7 -> RTCK; (in) (GPIOL3) (in)
// ACBUS0 -> TRST; (GPIOH0)
// ACBUS1 -> SRST; (GPIOH1)
// ACBUS2 -> TRST buffer enable (GPIOH2)
// ACBUS3 -> RED LED; (GPIOH3)

//
// Set the internal GPIO direction (0 -> input, 1 -> output)
//

set PROBE_FTDI_SET_PIN_DIR_ADBUS0 1 // TCK -> out
set PROBE_FTDI_SET_PIN_DIR_ADBUS1 1 // TDI -> out
set PROBE_FTDI_SET_PIN_DIR_ADBUS2 0 // TDO -> in
set PROBE_FTDI_SET_PIN_DIR_ADBUS3 1 // TMS -> out
set PROBE_FTDI_SET_PIN_DIR_ADBUS4 1 // Buffers enable -> out
set PROBE_FTDI_SET_PIN_DIR_ADBUS5 0 // Target presence : 0 if target present -> in
set PROBE_FTDI_SET_PIN_DIR_ADBUS6 0 // TSRST -> in
set PROBE_FTDI_SET_PIN_DIR_ADBUS7 0 // RTCK -> in

set PROBE_FTDI_SET_PIN_DIR_ACBUS0 1 // TRST -> out
set PROBE_FTDI_SET_PIN_DIR_ACBUS1 1 // SRST -> out
set PROBE_FTDI_SET_PIN_DIR_ACBUS2 1 // TRST buffer enable -> out
set PROBE_FTDI_SET_PIN_DIR_ACBUS3 1 // RED LED -> out

//
// Set the internal GPIOs output state
//

set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS0 0
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS1 0
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS2 0
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS3 1
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS4 0 // JTAG buffer enable (active low)
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS5 0
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS6 0
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ADBUS7 0

set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ACBUS0 0 // TRST
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ACBUS1 0 // SRST
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ACBUS2 0 // TRST buffer enable
set PROBE_FTDI_SET_PIN_DEFAULT_STATE_ACBUS3 0 // RED LED

//
// Set the internal GPIOs polarity
// 0 : Active High.
// 1 : Active Low.
//

set PROBE_FTDI_SET_PIN_POLARITY_ADBUS0 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS1 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS2 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS3 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS4 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS5 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS6 0
set PROBE_FTDI_SET_PIN_POLARITY_ADBUS7 0

set PROBE_FTDI_SET_PIN_POLARITY_ACBUS0 1 // TRST is active-low
set PROBE_FTDI_SET_PIN_POLARITY_ACBUS1 0
set PROBE_FTDI_SET_PIN_POLARITY_ACBUS2 0
set PROBE_FTDI_SET_PIN_POLARITY_ACBUS3 0

//
// Assign the TRST / SRST control pins
// 0<>7 : ADBUS
// 8<>11 : ACBUS
// Set to -1 when not available/used.
//

set PROBE_FTDI_SET_TRST_OE_PINNUM 10
set PROBE_FTDI_SET_TRST_STATE_PINNUM 8

set PROBE_FTDI_SET_SRST_OE_PINNUM -1
set PROBE_FTDI_SET_SRST_STATE_PINNUM -1

set PROBE_FTDI_SET_CONNECTION_LED_PINNUM 11

set PROBE_FTDI_JTAG_TRST_DELAY_MS 200
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants