diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 8280791e..dfc3b0b5 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2008-07-10 Arnim Laeuger + + * src/tap/usbconn/libftd2xx.c (usbconn_ftd2xx_open): perform device reset + and RX purge + 2008-07-09 Arnim Laeuger * src/tap/usbconn/libftd2xx.c: added some debugging messages diff --git a/jtag/src/tap/usbconn/libftd2xx.c b/jtag/src/tap/usbconn/libftd2xx.c index b36219f7..30bab9a8 100644 --- a/jtag/src/tap/usbconn/libftd2xx.c +++ b/jtag/src/tap/usbconn/libftd2xx.c @@ -330,7 +330,7 @@ usbconn_ftd2xx_common_open( usbconn_t *conn ) if ((status = FT_Open( 0, &(p->fc) )) != FT_OK) { - perror( "Unable to open FTDO device.\n" ); + perror( "Unable to open FTDI device.\n" ); /* mark ftd2xx layer as not initialized */ p->fc = NULL; return -1; @@ -353,7 +353,12 @@ usbconn_ftd2xx_open( usbconn_t *conn ) fc = p->fc; - if ((status = FT_SetBitMode( fc, 0x00, 0x00 )) != FT_OK) + if ((status = FT_ResetDevice( fc )) != FT_OK) + perror( _("Can't reset device.\n") ); + if (status == FT_OK) if ((status = FT_Purge( fc, FT_PURGE_RX )) != FT_OK) + perror( _("Can't purge RX buffer.\n") ); + + if (status == FT_OK) if ((status = FT_SetBitMode( fc, 0x00, 0x00 )) != FT_OK) perror( _("Can't disable bitmode.\n") ); if (status == FT_OK) if ((status = FT_SetLatencyTimer(fc, 2)) != FT_OK)