FTDI Community

General Category => Discussion - Software => Topic started by: krish_iyer on June 24, 2020, 06:58:23 AM

Title: Performance difference in libft4222's windows and linux drivers
Post by: krish_iyer on June 24, 2020, 06:58:23 AM
I have been interfacing an IMU(BNO080) with an umft4222ev board. I am interfacing it over I2C protocol and wrote exact code for windows and linux. The windows program works perfectly fine but the linux program couldn't read on time(within 10ms of data available) due to which my sensor resets. I feel the I2C master write function is missing some clock cycles or resolution. Is there any workaround for this?

Details of the device: 'FT4222 A' Chip version: 42220400, LibFT4222 version: 01040409
Title: Re: Performance difference in libft4222's windows and linux drivers
Post by: FTDI Community on June 26, 2020, 05:03:32 PM
Hello,

You are using a very old revision of silicon.
Please test with the latest revision of FT4222H silicon which is Rev D.

You can find the chip errata here:

FT4222H Errata Technical Note (https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_161_FT4222H%20Errata%20Technical%20Note.pdf)
FT4222H Rev.D Technical Note (https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_175_FT4222H%20Rev.D%20Technical%20Note.pdf)

Also ensure that you are using the latest versions of LibFT4222 found here:

https://www.ftdichip.com/Products/ICs/FT4222H.html (https://www.ftdichip.com/Products/ICs/FT4222H.html)

Best Regards,
FTDI Community
Title: Re: Performance difference in libft4222's windows and linux drivers
Post by: krish_iyer on June 27, 2020, 04:20:57 PM
Ok, here's the issue.  imprint on my chip ends with 'D' hence I am actually using revision 'D' of the silicon. In windows with "FT prog" software, my chip version is detected as 'D' but in linux it's 'A'. Also, I am using latest Llibft4222(linux) version.

I am using Ubuntu 18.04 on 64bit machine.

am I missing something?
Title: Re: Performance difference in libft4222's windows and linux drivers
Post by: FTDI Community on July 01, 2020, 04:55:20 PM
Hello,

In Linux, 'FT4222 A' is the interface 0 description of device. Not the chip code of the device.
See code output below:

Code: [Select]
cc get-version.c -lft4222 -WI,-path,/usr/local/lib
sudo./a.out

Device 0: 'FT4222 A'
  Chip version: 42220400, LibFT4222 version: 01040409

I have requested support from our R&D engineers to see if there are any known issues with LibFT4222 which could cause issues like you are seeing. Please expect significant delays in the process.

Best Regards,
FTDI Community
Title: Re: Performance difference in libft4222's windows and linux drivers
Post by: FTDI Community on July 06, 2020, 04:34:38 PM
Hello,

We have measured i2c write/read on Windows and Linux platform.

The test consists of:
1.            Read / Write 10 bytes
2.            Using different frequency 500Kbps/1000Kbps/3400Kbps

The difference is very small:

Linux i2c write                                 
500Kbps  1000Kbps   3400Kbps
305us      206us        250us

Windows i2c write                                         
500Kbps  1000Kbps   3400Kbps
309us      170us        250us

Linux i2c read                                   
500Kbps  1000Kbps   3400Kbps
818us      760us        577us

Windows i2c read                                           
500Kbps  1000Kbps  3400Kbps
712us      660us       652us

So this shouldn't cause an issue of data within 10ms of data available.

You are also in contact with our support team via email. Please work with the support person and post any resolution here to help other community users.

Best Regards,
FTDI Community