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
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
Thank you for the help
Greetings
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