General Category > Discussion - Software

FT201X - How to purge the FX-Buffer

(1/1)

boodoooo:
Im trying to purge the FX-Buffer of the FT201X I2C-Slave. Somehow it seems not to work, the master still reads old data sets even after the purge-function is called. Im using C++(Visual Studio 2019) with the D2XX-functions given in the D2XX-Programmers-Guide.

I did try to use the StopInTask and RestartInTask functions before and after the purge command, but it still does not clear my buffer.
Any help is really appreciated!

Kind regards,
Hendrik

FTDI Community:
Hi ,
Can you try FT_Purge? This function purges receive and transmit buffers in the device.

Regards
FTDI Community

boodoooo:
Hello,

i did try FT_Purge already.

What buffer holds the data coming from the USB-Host? (Data sent via FT_Write)
The FT201X-datasheet has two statements to this, but they are mismatching.

Note that the Transmit buffer is the buffer which holds data which has come from the host computer and is going to be read by the external I2C master.

Data sent from the USB host controller to the I2C interface via the USB data OUT endpoint is stored in the FIFO RX (receive) buffer.

Regards, Hendrik

Navigation

[0] Message Index

Go to full version