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

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - EEtaoin

Pages: [1]
1
Discussion - Software / LibFT4222H spi slave buffer question
« on: August 15, 2021, 11:30:26 AM »
Hello,

I am currently building a prototype relying the FT4222H as SPI slave, recieving data from a sensor at a high sample rate.
The chip is running in CNFMODE 0.
On the host computer (Raspberry Pi 4) I have a thread running that is just polling
Code: [Select]
FT4222_SPISlave_GetRxStatus and calls
Code: [Select]
FT4222_SPISlave_Read as soon as data is in the rxQueue, all other processing is handled in other threads.

The datasheet states that the usb entpoint buffer is 4160B large, and a maximum of 1024B can be 'allocated'  to a single usb out entpoint as two 512B buffers if I understand correctly?

After starting my programm, there is a brief moment where the chip is configured and recieving data but the thread in charge of reading the FT4222H's buffer is not yet started. During that time, I had up to 64kB accumulate in the queue, which confused me.

Now to my question: Is there another Buffer on the Host Computers side (managed by the D2XX driver or the LibFT4222) that is larger then the 4160B buffer on the FT4222H?
When I call
Code: [Select]
FT4222_SPISlave_Read, am I actually reading out data from the chip over USB?

Thank you for the help
Greetings

Pages: [1]