Skip to content
Snippets Groups Projects
Commit a634b5d5 authored by ntfreak's avatar ntfreak
Browse files

Jonas Horberg [jhorberg@sauer-danfoss.com]

https://lists.berlios.de/pipermail/openocd-development/2009-August/009939.html

1. It can only be built with the FTD2XX driver. libftdi supports FT2232H/FT4232H 
since version 0.16 

2. A speed value of 0 is used as a RTCK request indicator. This clashes with the 
valid clock division value 0 that provide the highest fixed clock frequency. 

3. The ft2232_speed_div function return the maximum selectable frequency (30MHz) 
when RTCK is activated. It should return 0. 

4. The ft2232_khz function return ERROR_OK when RTCK is requested even for 
devices lacking RTCK support. It should return ERROR_FAIL so the upper driver layers 
can detect this and try to fallback to a fixed frequency. 

5. FT2232H/FT4232H have a backward compatibility function that divide the clock 
by 5 to get the same frequency range as FT2232D. There is no code that disable 
this functionality. I can not find anything about if this is enabled or disabled by default. 
I think it is safest to actively disable it. 


git-svn-id: svn://svn.berlios.de/openocd/trunk@2591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent bb5086b8
No related branches found
No related tags found
No related merge requests found
......@@ -215,9 +215,10 @@ options may be available there:
FTD2XX
--enable-ft2232_ftd2xx Enable building support for FT2232 based devices
using the FTD2XX driver from ftdichip.com
--enable-ftd2xx-highspeed
--enable-ft2232-highspeed
Enable building support for FT2232H and
FT4232H-based devices (requires >=libftd2xx-0.4.16)
FT4232H-based devices (requires >=libftd2xx-0.4.16
or >=libftdi-0.16)
--enable-gw16012 Enable building support for the Gateworks GW16012
JTAG Programmer
......
......@@ -323,9 +323,9 @@ AC_ARG_ENABLE(ft2232_ftd2xx,
AS_HELP_STRING([--enable-ft2232_ftd2xx], [Enable building support for FT2232 based devices using the FTD2XX driver from ftdichip.com]),
[build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no])
AC_ARG_ENABLE(ftd2xx_highspeed,
AS_HELP_STRING([--enable-ftd2xx-highspeed], [Enable building support for FT2232H and FT4232H-based devices (requires >=libftd2xx-0.4.16)]),
[want_ftd2xx_highspeed=$enableval], [want_ftd2xx_highspeed=no])
AC_ARG_ENABLE(ft2232_highspeed,
AS_HELP_STRING([--enable-ft2232-highspeed], [Enable building support for FT2232H and FT4232H-based devices (requires >=libftd2xx-0.4.16 or >=libftdi-0.16)]),
[want_ft2232_highspeed=$enableval], [want_ft2232_highspeed=no])
AC_ARG_ENABLE(amtjtagaccel,
AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]),
......@@ -835,8 +835,8 @@ main( int argc, char **argv )
])
AC_MSG_CHECKING([whether to build ftd2xx highspeed device support])
AC_MSG_RESULT([$want_ftd2xx_highspeed])
if test $want_ftd2xx_highspeed != no; then
AC_MSG_RESULT([$want_ft2232_highspeed])
if test $want_ft2232_highspeed != no; then
AC_MSG_CHECKING([for ftd2xx highspeed device support])
AC_COMPILE_IFELSE([
#include "confdefs.h"
......@@ -847,15 +847,15 @@ if test $want_ftd2xx_highspeed != no; then
#include <ftd2xx.h>
DWORD x = FT_DEVICE_4232H;
], [
AC_DEFINE(BUILD_FTD2XX_HIGHSPEED, [1],
[Support FT2232H/FT4232HS with FTD2XX.])
build_ftd2xx_highspeed=yes
AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
[Support FT2232H/FT4232HS with FTD2XX or libftdi.])
build_ft2232_highspeed=yes
], [
build_ftd2xx_highspeed=no
build_ft2232_highspeed=no
])
AC_MSG_RESULT([$build_ftd2xx_highspeed])
AC_MSG_RESULT([$build_ft2232_highspeed])
if test $want_ftd2xx_highspeed = yes -a $build_ftd2xx_highspeed = no; then
if test $want_ft2232_highspeed = yes -a $build_ft2232_highspeed = no; then
AC_MSG_ERROR([You need a newer FTD2XX driver (version 0.4.16 or later).])
fi
fi
......@@ -903,6 +903,28 @@ main( int argc, char **argv )
AC_MSG_RESULT([Skipping as we are cross-compiling])
])
AC_MSG_CHECKING([whether to build libftdi highspeed device support])
AC_MSG_RESULT([$want_ft2232_highspeed])
if test $want_ft2232_highspeed != no; then
AC_MSG_CHECKING([for libftdi highspeed device support])
AC_COMPILE_IFELSE([
#include <stdio.h>
#include <ftdi.h>
enum ftdi_chip_type x = TYPE_2232H;
], [
AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
[Support FT2232H/FT4232HS with FTD2XX or libftdi.])
build_ft2232_highspeed=yes
], [
build_ft2232_highspeed=no
])
AC_MSG_RESULT([$build_ft2232_highspeed])
if test $want_ft2232_highspeed = yes -a $build_ft2232_highspeed = no; then
AC_MSG_ERROR([You need a newer libftdi version (0.16 or later).])
fi
fi
# Restore the 'unexpanded ldflags'
LDFLAGS=$LDFLAGS_SAVE
CFLAGS=$CFLAGS_SAVE
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment