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: Problems with FT2232H VCP on Windows 10  (Read 10268 times)

jupiterman

  • Newbie
  • *
  • Posts: 1
    • View Profile
Problems with FT2232H VCP on Windows 10
« on: May 07, 2020, 07:03:04 PM »

Hello,
I have built a dual-channel serial-to-CAN bus bridge using the FT2232H chip.  Each serial port is connected to an independent CPU that bridges the serial stream into packets on the CAN bus using a protocol I wrote 12 years ago. Hardware handshaking is used to regulate the data flow in both directions.  I have the device working quite nicely and have written a test program that sends CAN messages on each channel at a high rate and have connected the two CAN ports together.  This program runs without issue on Windows CE 6 and 7 using the VCP drivers supplied by FTDI.  I have pumped nearly 700 million CAN messages through it in the last week or so without error.

The very *same* program behaves much differently when run from my Windows 10 host.  I've installed the latest VCP driver for Windows hosts from FTDI.  My program opens the ports successfully and appears to communicate with the chips on my board, however,  message data transmitted from the host to the FT2232 chip is delayed quite heavily (i.e seconds) *unless* there is a steady stream of data being sent from the chip to the host.  I have discovered that by sending a regular message from a CAN bus analyzer tapped into the line produces such steady input that kicks the drivers into gear, and at that point I get similar behavior as on Windows CE.

So I am curious if anyone knows why this might be occurring on Windows and what changes to the VCP driver configuration settings may remedy this.  I'd like to make the test program have reasonable performance running on a Windows system.

Thanks in advance.


Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: Problems with FT2232H VCP on Windows 10
« Reply #1 on: May 11, 2020, 04:36:42 PM »

Hello,

Are you using the default latency timer?

See AN232B-04 Data Throughput, Latency and Handshaking which applies to all FTDI devices.
Note that the minimum latency timer for full speed USB devices is 2ms, and for High Speed devices is 1ms.
The default latency timer is 16ms.
The easiest method to use would be through the D2XX Drivers. See the D2XX Programmer's Guide:
FT_SetLatencyTimer
So the application code would need to set this each time it’s executed.
The other option would be to edit the driver INF files (with custom PIDs), but this breaks driver signing so would have to be resigned by yourself and is a more complex process.
See section 6.3 Setting a Custom Default Latency Timer Value in AN_107 Advanced Driver Options.

It could also be inherently the way that USB operates.
Data is sent in USB packets which are scheduled and managed by the USB Host.
It’s dependant on a number of factors due to the nature of USB. 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.

Best Regards,
FTDI Community
Logged