FTDI Community

General Category => Discussion - Software => Topic started by: atom1477 on December 10, 2018, 08:26:36 AM

Title: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: atom1477 on December 10, 2018, 08:26:36 AM
As I understand, synchronus WritePipe is blocking function.
Instead, asynchronus WritePipeAsync is non-blocking functions which begin a transfer and then return immediately (and also setting FT_IO_PENDING / FT_IO_INCOMPLETE status).
So there must be such a buffer inside the D3xx DLL. FIFO buffer I guess.

But what about ReadPipe functions?
I expected it would be buffer (FIFO) in receive part of D3xx DLL.
So when I call ReadPipe function, I expect to read all previous received data. Regardless of whether I use ReadPipe or ReadPipeAsync function.
But I have some issues with it.
When I use ReadPipe, I lost some data. As I see, ReadPipe reads only new packets. It waits for new packet. All packet between this and previous function call, will be lost.
Maybe I should use ReadPipeAsyns function? Is this non-blocking function? And returns all previous received packets?
Title: Re: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: FTDI Community on December 10, 2018, 02:48:30 PM
Hello,

Please may I ask you to have a look at AN_379 - D3XX Programmers Guide, which is available here:

https://www.ftdichip.com/Support/Documents/ProgramGuides/AN_379%20D3xx%20Programmers%20Guide.pdf

This should provide some further information on the functions and help with your question.

If you are still having problems please may I ask you to contact email support with a screenshot of your

Regards,
FTDI Community
Title: Re: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: atom1477 on December 10, 2018, 06:18:36 PM
Of course I read Programmers Guide.
But this version (seems to be better):
https://www.ftdichip.com/Support/Documents/AppNotes/AN_407%20D3xx%20.NET%20Programmers%20Guide.pdf
Unfortunately, it does not answer my questions. It does not tell if there are FIFO buffers inside DLL, or whether PipeReadAsync is non-blocking, and able to read past data (buffered data from previous packets).
Title: Re: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: FTDI Community on December 11, 2018, 09:23:52 AM
Hi,

Thanks for getting back. It looks like my previous message was cut short.

What I meant to say was please contact private support with a screenshot of your FT60X chip Configurator Programmer. You can contact private support on suport1@ftdichip.com.

Regards,
FTDI Community.
Title: Re: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: atom1477 on December 11, 2018, 01:05:44 PM
I asking here because of this:
(https://obrazki.elektroda.pl/1626790200_1544533489_thumb.jpg) (https://obrazki.elektroda.pl/1626790200_1544533489.jpg)
Title: Re: Difference betweenen synchronus and asynchronus ReadPipe functions.
Post by: FTDI Community on December 11, 2018, 04:36:25 PM
Hello,

Apologies the email address is support1@ftdichip.com.

Thanks,
FTDI Community