FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Fastest I2C transfer rate on FT2232HQ?  (Read 10843 times)

jaypdx

  • Newbie
  • *
  • Posts: 6
    • View Profile
Fastest I2C transfer rate on FT2232HQ?
« on: February 13, 2024, 01:59:21 AM »

We're using an FT2232HQ to interface with an I2C peripheral.  We're basically writing two bytes and then reading back four bytes over and over.  We're seeing a delay of between 1-2ms between each transfer (this is once we change the latency timer to 2).  Is there any way to reduce this dead time?  Is it limited by the USB 'polling interval'?  I understand the polling interval is 1ms for full-speed and 125us for high-speed USB.  Does the FT2232HQ support high-speed USB operation for I2C?
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 897
    • View Profile
Re: Fastest I2C transfer rate on FT2232HQ?
« Reply #1 on: February 13, 2024, 02:02:36 PM »

Hi,

You can try setting the latency timer to 1ms. This will make the device ran as fast as it can.

Best Regards
FTDI Community
Logged

jaypdx

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Fastest I2C transfer rate on FT2232HQ?
« Reply #2 on: February 13, 2024, 03:32:43 PM »

Yes I've done this and it is a little faster than set_latency_timer(2).  But doesn't this device support high-speed USB (480Mbits/s)?  Or does it only run at full-speed (12Mbps) for I2C transfers?
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 897
    • View Profile
Re: Fastest I2C transfer rate on FT2232HQ?
« Reply #3 on: February 14, 2024, 04:42:46 PM »

Hi,

yes, FT2232H is a high-speed device. The driver can only operate with 1ms latency minimum.

Best regards
FTDI Community
Logged

cioma

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Fastest I2C transfer rate on FT2232HQ?
« Reply #4 on: April 19, 2024, 12:01:34 PM »

I worked with FT2232H directly through libusb, without FTDI drivers.

Here are notes from my code regarding latency timer:

Set receive buffer latency timer (vendor-specific command)
Latency Timer is used as a timeout to flush short packets of data back to the host
The default is 16 ms, but it can be altered between 0 ms and 255 ms
At 0 ms latency packet transfer is done on every high speed microframe (every 125 us)
For MPSSE it's recommended to set it to the default 16 ms and use "send_immediate" command to send bytes back to host when required
This approach seems to be working fine for FT2232H but with FT232H there seems to be a latency delay present on the first small packet transfer therefore latency is set to 1
This was observed while programming SPI flash and checking its status register value
Logged