---

** [tickets:#125] ftdi driver doesn't use default VID:PID**

**Status:** new
**Milestone:** 0.9.0
**Created:** Sat Apr 09, 2016 03:30 PM UTC by CSB
**Last Updated:** Sat Apr 09, 2016 03:30 PM UTC
**Owner:** nobody


Contrary to the ft2232 driver, and contrary to the docs ( I suspect copy-paste 
from the ft2232 docs !) :
~~~~
ftdi_vid_pid [vid pid]+
The vendor ID and product ID of the adapter. If not specified, the FTDI
default values are used.
~~~~
turns out not to be true. The difference lies in the static VID:PID arrays 
defined in both ftdi.c and ft2232.c.

ft2232.c has
~~~~
static uint16_t ft2232_vid[MAX_USB_IDS + 1] = { 0x0403, 0 };
static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0x6010, 0 };
~~~~
 
indeed defining the default FTDI VID:PID pair; whereas ftdi.c has
~~~~
static uint16_t ft2232_vid[MAX_USB_IDS + 1] = { 0 };
static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0 };
~~~~
and therefore ftdi_initialize() will fail with an unhelpful "Command failed 
with error code -100" message.

I suggest copying the definitions for those two arrays from ft2232.c to ftdi.c 
as an easy fix, that won't require modifying the docs !


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to