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: SPI read delay in FT2232H with libMPSSE  (Read 9430 times)

Eisenheim

  • Newbie
  • *
  • Posts: 1
    • View Profile
SPI read delay in FT2232H with libMPSSE
« on: November 11, 2022, 12:11:50 PM »

Hi,

I have been using the ft2232H board with libmpsse module for SPI reading in windows/raspberry pi. In both cases, I read 3KB of data with 20Mhz frequency. It takes about 4ms seconds for every read. My problem is that when I read 20 minutes one or two times the read time goes above 100ms. Is it related to ftdi driver issue?

Regards,
Eisenheim
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 891
    • View Profile
Re: SPI read delay in FT2232H with libMPSSE
« Reply #1 on: November 14, 2022, 04:08:47 PM »

Hello,

There may be a number of factors due to the nature of USB to take into consideration. If there is more USB traffic then the OS and USB have to schedule the communication with each of the USB devices.
It’s highly dependent on the OS and USB Host and is out with our control.
FTDI devices use USB Bulk transfers and those are designed to transfer large amounts of data with error-free delivery, but with no guarantee of bandwidth.
You could try disconnecting all other USB device to see if it has an effect.

You may also want to try and reduce the latency timer.
The default latency timer is 16ms when using the FTDI drivers.
The latency timer can only be set to 1ms for our USB High Speed products (like FT2232H).

You can read more about this in Data Throughput, Latency & Handshaking.

The other option that you might want to explore is by not using LibMPSSE.
You could try using the D2xx drivers direct and implement your own SPI communication.
See AN_108 Command Processor For MPSSE and MCU Host Bus Emulation Modes which should help.

Also there may be other FTDI Community users who might be able to help you further.

Best Regards,
FTDI Community
Logged

Mikexx

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SPI read delay in FT2232H with libMPSSE
« Reply #2 on: February 06, 2023, 12:30:20 PM »

Hi,

I have been using the ft2232H board with libmpsse module for SPI reading in windows/raspberry pi. In both cases, I read 3KB of data with 20Mhz frequency. It takes about 4ms seconds for every read. My problem is that when I read 20 minutes one or two times the read time goes above 100ms. Is it related to ftdi driver issue?

Regards,
Eisenheim

Are you using c#? Typically the PC will hiccup through garbage collection but 100ms is a bit high.

What's the spec of your PC?

I would recommend using an application like Latencymon to check native PC latency.
Logged