Hello FTDI Community
Thank you for the reply.
Our key requirement is throughput, we need to write around 8 Mbyte of Data in the optimal amount of time. In our case, we expect the target to be able to store data at around 1Mbit/s.
The I2C connection itself is capped at around 1.8 MBits/s (Target and physical limitations). With the gaps, the actual throughput is less than half of this, i.e. less then 900 kBit/s. This is below our target, but also far from having a margin. Furthermore, I believe it to be an advantage to use the lowest clock rate reasonable, around 1.2 Mbit/s, as this would improve stability of the communication. Obviously, with the gap situation, this is not feasible either.
Our expectation was that the FT4222H would use its large buffer and very fast USB upstream connection to keep the buffer filled. However, when sending 16 Bytes in a single burst, we did not expect buffering or USB throughput to be an issues in the first place, which is part of our concern.
It was our understanding that the FT4222H will simply ignore a NACK? We do also see the gaps when our slave device acknowledges each byte correctly. In those cases, we believe that the FT4222H is producing the gaps, as it has a stronger driver than our device and the low level is lower. However, to remove uncertainty regarding this, we elected to go for a test without any slave connected.
Here is the information regarding the calls we use:
Using the simple api call we have an initialization part:
1. ftd2xx.h: FTD2XX_API FT_STATUS WINAPI FT_CreateDeviceInfoList(LPDWORD lpdwNumDevs);
• To obtain the number of devices connected. Success if returns FT_OK
2. ftd2xx.h: FTD2XX_API FT_STATUS WINAPI FT_Open(int deviceNumber, FT_HANDLE *pHandle);
• For deviceNumber 0.. lpdwNumDevs loop around calling FT_Open returns FT_OK
3. LibFT4222.h: LIBFT4222_API FT4222_STATUS FT4222_I2CMaster_Init(FT_HANDLE ftHandle, uint32 kbps);
• ftHandle is the handle from the FT_Open. Success if returns FT4222_OK
and an I2C Write command / read response part:
1. LibFT4222.h: LIBFT4222_API FT4222_STATUS FT4222_I2CMaster_Write(FT_HANDLE ftHandle, uint16 deviceAddress, uint8* buffer, uint16 bufferSize, uint16* sizeTransferred);
• Writing the Tx Bufffer. Success if returns FT4222_OK and sizeTransferred== bufferSize
2. LibFT4222.h: LIBFT4222_API FT4222_STATUS FT4222_I2CMaster_Read(FT_HANDLE ftHandle, uint16 deviceAddress, uint8* buffer, uint16 bufferSize, uint16* sizeTransferred);
• Reading into the Rx Bufffer. Success if returns FT4222_OK and sizeTransferred== bufferSize