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

Author Topic: FT201X - How to purge the FX-Buffer  (Read 7295 times)

boodoooo

  • Newbie
  • *
  • Posts: 2
    • View Profile
FT201X - How to purge the FX-Buffer
« on: November 26, 2021, 10:46:57 AM »

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
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 891
    • View Profile
Re: FT201X - How to purge the FX-Buffer
« Reply #1 on: November 26, 2021, 03:10:49 PM »

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

Regards
FTDI Community
Logged

boodoooo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: FT201X - How to purge the FX-Buffer
« Reply #2 on: November 29, 2021, 09:04:01 AM »

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
Logged