FreeCalypso > hg > fc-usbser-tools
view eeproms/jtag-unbuf @ 68:5cbde3c80c24
fteeprom-{erase,prog}: detach logic: change to detach by default
As it turns out, detaching all ttyUSB interfaces of a multichannel device
does not require outside knowledge of how many channels there are, as in
our previous -d option design that is being removed here - instead we can
read the bNumInterfaces constant from the USB device's config descriptor
and thus know how many interfaces there are in total. Based on this
discovery, change the design of fteeprom-{erase,prog} as follows:
* remove -d option;
* flip the default to where we detach all interfaces by default;
* add -n option to NOT detach any interfaces.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 13 Sep 2023 06:37:03 +0000 |
parents | 434806360d91 |
children | d46ea7a3fa0c |
line wrap: on
line source
# This EEPROM configuration is meant to be programmed into COTS FT2232D # breakout boards used as unbuffered JTAG adapters. The custom USB VID:PID # belongs to Falconia Partners LLC; we hereby allow the community to program # this PID into generic FT2232D boards (not made by Falconia) as long as # it is used for the present purpose with this full EEPROM configuration. # # The purpose of having a custom USB ID is to prevent the Linux kernel # ftdi_sio driver from treating this FT2232D instance as a dual UART and # creating a ttyUSB device for Channel A. If you wish to use Channel B # as a UART (which is still available for that purpose), you will need to use # a Linux kernel version with commit 6cf87e5edd9944e1d3b6efd966ea401effc304ee # included, or apply that commit locally if your kernel version does not # include it. vid 0x0403 # FTDI pid 0x7151 # Allocated by FTDI to Falconia Partners LLC manuf FTDI product Unbuffered JTAG adapter # We program Channel A to come up in the 245 FIFO mode prior to being # switched into MPSSE mode by OpenOCD, as opposed to the default 232 UART mode. # If the FT2232D chip's ADBUS pins are connected directly to the JTAG target # without a buffer (what we mean by an unbuffered JTAG adapter), the default # 232 UART mode is NOT safe, as it will produce a fight on the ADBUS2 line # between the UART RTS output and the target's TDO output. 245 FIFO mode is # expected to be safer, as all 8 ADBUS lines will be inputs for as long as # the ACBUS2 line is left unconnected and not driven by anything. byte00 0x01 # Channel A: FIFO mode, D2XX driver byte01 0x08 # Channel B: UART mode, VCP driver