FT-X series

The seventh generation of fixed-function D2xx devices, an upgrade to FT232R and FT245R. There are four kinds of FT-X series devices:

  • the FT20xX series, USB to I2C peripherial bridges (effectively a new mode of operation)
  • the FT22xX series, USB to FT1248 bridges (based on the FT1248 mode introduced in FT232H)
  • the FT23xX series, USB to UART bridges (a sequel to FT232R)
  • the FT240X, USB to FIFO bridge (a sequel to FT245R)

Note: FT22xX claims to be an "FT1248/SPI bridge". In reality, it has nothing to do with SPI. It could at most be charitably described as "SPI fanfic with little regard for canon".

All FT-X series devices are actually the same silicon, differentiated through mode selection in the factory-programmed area of its EEPROM memory and packaging.

Features:

  • is a full-speed USB 1.1 peripherial
  • single channel D2xx device
  • set to one of four base modes depending on factory configuration:
  • dynamically-selectable alternate modes include:
  • 512-byte IN FIFO, 512-byte OUT FIFO
  • internal 2048-byte EEPROM
    • pre-programmed factory area in EEPROM
    • in FT1248 and I2C peripherial modes, the EEPROM can be accessed from the business end too
  • USB battery charger detection
  • 48MHZ internal base clock, generated from an internal 12MHz oscillator
  • 3.3V or 5V VCC supply for internal circuitry
  • separate 1.8V to 3.3V VCCIO supply for business-end IO
  • internal 5V-to-3.3V LDO
  • internal 3.3V/5V-to-1.8V LDO
  • internal D+ pullup resistor
  • internal power-on reset circuit
  • required external support circuitry:
    • just the decoupling capacitors

The default VID:PID of the device is 0403:6015, unless configured otherwise by the EEPROM. The bcdDevice value is 0x1000.

The devices are:

devicepackagebusiness endbusiness end pins
FT200XD10-pin DFNI2C peripherial2×I2C + 1×CBUS
FT201XS16-pin SSOPI2C peripherial2×I2C + 6×CBUS
FT201XQ16-pin QFNI2C peripherial2×I2C + 6×CBUS
FT220XS16-pin SSOP4-bit FT12487×FT1248 + 1×CBUS
FT220XQ16-pin QFN4-bit FT12487×FT1248 + 1×CBUS
FT221XS20-pin SSOP8-bit FT124811×FT1248 + 1×CBUS
FT221XQ20-pin QFN8-bit FT124811×FT1248 + 1×CBUS
FT230XS16-pin SSOPbasic UART4×UART + 4×CBUS
FT230XQ16-pin QFNbasic UART4×UART + 4×CBUS
FT231XS20-pin SSOPfull UART8×UART + 4×CBUS
FT231XQ20-pin QFNfull UART8×UART + 4×CBUS
FT234XD12-pin DFNbasic UART4×UART + 1×CBUS
FT240XS24-pin SSOPFIFO13×FIFO + 2×CBUS
FT240XQ24-pin QFNFIFO13×FIFO + 2×CBUS

Pinout — FT20xX, FT22xX, FT23xX

QFN20SSOP20QFN16SSOP16DFN12DFN10FT20xXFT22xXFT23xX
1424108SDAMIOSI1RXD
25-----MIOSI7RI#
3635-9GNDGNDGND
47-----MIOSI5DSR#
58-----MIOSI6DCD#
694611-CBUS4MIOSI3CTS#
71057--CBUS2MISOCBUS2
811681210USBDPUSBDPUSBDP
9127911USBDMUSBDMUSBDM
1013810333V3OUT3V3OUT3V3OUT
111491122RESET#RESET#RESET#
1215101244VCCVCCVCC
131613135-GNDGNDGND
14171114--CBUS1CS#CBUS1
1518121565CBUS0CLKCBUS0
16191416--CBUS3CBUS3CBUS3
17201517-CBUS5MIOSI0TXD
181-----MIOSI4DTR#
19216286SCLMIOSI2RTS#
2031397VCCIOVCCIOVCCIO
[pad][pad]-[pad][pad]GNDGNDGND

Pinout — FT240X

QFN24SSOP24FT240X
14DATA1
25DATA7
36GND
47DATA5
58DATA6
69DATA3
710SI/WU#
811RD#
912WR
1013USBDP
1114USBDM
12153V3OUT
1316RESET#
1417VCORE
1518VCC
1619GND
1720TXE#
1821RXF#
1922CBUS6
2023CBUS5
2124DATA0
221DATA4
232DATA2
243VCCIO

CBUS pins

The device has up to 6 CBUS pins. They can be configured through the EEPROM to do the following functions:

EEPROM valuevalid on pinsfunction
0x00alltristate
0x01allUART TXLED#
0x02allUART RXLED#
0x03allUART TXRXLED#
0x04allPWREN#
0x05allSLEEP#
0x06allconst-0 output
0x07allconst-1 output
0x08all (everything but FT20xX), CBUS[0-3] (FT20xX)I/O (for CBUS bitbang mode)
0x09allUART TXDEN
0x0aallCLK24
0x0ballCLK12
0x0callCLK6
0x0dallBCD_CHARGER
0x0eallBCD_CHARGER#
0x0fallI2C TXE#
0x10allI2C RXF#
0x11allVBUS_SENSE (previously known as PWRSAV#)
0x12allbitbang WR#
0x13allbitbang RD#
0x14allTIMESTAMP
0x15allKEEP_AWAKE

The two new functions are:

  • TIMESTAMP (device output, toggles on every USB SOF frame)
  • KEEP_AWAKE (device input, prevents device from entering suspend state when unplugged)

EEPROM format

The FT-X series has an internal EEPROM of 2048 bytes. It can be accessed from the USB host side like on previous devices, where it is instead viewed as an array of 1024 16-bit words. On the FT20xX and FT22xX, it can also be accessed from the I2C/FT1248 side through special requests, where it is viewed as a 2048-byte array.

Note that the vendor calls the EEPROM "MTP memory" on this device. The difference, if any, is unknown.

The EEPROM format is (viewed as 1024×16-bit words, like from the host):

  • word 0x00:
    • bit 0: battery charge detect: enable
    • bit 1: battery charge detect: force PWREN# low when charger detected
    • bit 2: battery charge detect: disable sleep mode when charger detected
    • bit 3: RS485 echo suppression (FT23xX only)
    • bit 4: use external oscillator (?!? how? unbonded pads?)
    • bit 5: external oscillator feedback resistor enable
    • bit 6: USB suspend VBUS (set if one of CBUS is allocated as VBUS sense)
    • bit 7: enable bind to VCP driver
  • word 0x01: idVendor (USB VID)
  • word 0x02: idProduct (USB PID)
  • word 0x03: bcdDevice (0x1000)
  • word 0x04: USB config (goes straight to configuration descriptor)
    • bits 0-7: bmAttributes
      • bit 5: remote wakeup enabled
      • bit 6: self-powered
      • bit 7: always set to 1
    • bits 8-15: bMaxPower (max power in units of 2mA)
  • word 0x05: device control
    • bit 2: IO pulldown in suspend
    • bit 3: serial number enabled
    • bit 4: FT1248 clock polarity (CPOL) (FT22xX only)
      • 0: low
      • 1: high
    • bit 5: FT1248 bit order (FT22xX only)
      • 0: MSB
      • 1: LSB
    • bit 6: FT1248 flow control enable (FT22xX only)
    • bit 7: I2C disable schmitt trigger (FT20xX only)
    • bit 8: invert TXD (FT23xX only)
    • bit 9: invert RXD (FT23xX only)
    • bit 10: invert RTS (FT23xX only)
    • bit 11: invert CTS (FT23xX only)
    • bit 12: invert DTR (FT23xX only)
    • bit 13: invert DSR (FT23xX only)
    • bit 14: invert DCD (FT23xX only)
    • bit 15: invert RI (FT23xX only)
  • word 0x06:
    • bits 0-1: DBUS drive strength
      • 0: 4mA
      • 1: 8mA
      • 2: 12mA
      • 3: 16mA
    • bit 2: DBUS slow slew rate
    • bit 3: DBUS schmitt trigger
    • bits 4-5: CBUS drive strength
    • bit 6: CBUS slow slew rate
    • bit 7: CBUS schmitt trigger
  • word 0x07: manufacturer string pointer
  • word 0x08: product description string pointer
  • word 0x09: serial number string pointer
  • word 0x0a: I2C slave address (FT20xX only)
  • word 0x0b: I2C device ID low word (FT20xX only)
  • word 0x0c: I2C device ID high word (FT20xX only)
  • word 0x0d:
    • bits 0-7: CBUS0 function
    • bits 8-15: CBUS1 function
  • word 0x0e:
    • bits 0-7: CBUS2 function
    • bits 8-15: CBUS3 function
  • word 0x0f:
    • bits 0-7: CBUS4 function
    • bits 8-15: CBUS5 function
  • word 0x10:
    • bits 0-7: CBUS6 function
  • words 0x12..0x40: user area (not checksummed)
  • words 0x40..0x50: factory configuration area
    • word 0x49:
      • bits 8-15: device type
        • 0: UART (FT23xX)
        • 1: FIFO (FT24xX)
        • 2: FT1248 (FT22xX)
        • 3: I2C (FT20xX)
  • words 0x50..0x7f: string area
  • word 0x7f: checksum
  • word 0x80..0x400: user area (not checksummed)

String pointers are formatted as follows:

  • bits 0-7: pointer to descriptor within EEPROM (counted in bytes)
  • bits 8-15: total length of descriptor in bytes

The string descriptors are stored in ROM with the descriptor header included, as follows:

  • word 0: header
    • bits 0-7: total length of descriptor in bytes (includes header)
    • bits 8-15: descriptor type (always 3 — string)
  • words 1 and up: string in UTF-16

The checksum can be computed as follows:

#![allow(unused)]
fn main() {
fn checksum(eeprom: &[u16; 0x400]) -> u16 {
    let mut res: u16 = 0xaaaa;
    for pos in 0..0x12 {
        res ^= eeprom[pos];
        res = res.rotate_left(1);
    }
    for pos in 0x40..0x7f { // checksum word is NOT included — we're calculating it
        res ^= eeprom[pos];
        res = res.rotate_left(1);
    }
    res
}
}