Discussion:
FT232H Read returns zero byte
Ali Ebrahimi
2017-09-25 08:35:01 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello,</div>

<div>&nbsp;</div>

<div>I have a FT232H chip connected to a FPGA. It is set to comunicate using the sync fifo mode. I used to have a software on Linux written based on the D2XX driver to communicate with the chip and everything was fine except that the troughput was limited to less than 10 MB/s.</div>

<div>&nbsp;</div>

<div>Now I have switched to libftdi but ftdi_read_data() frequently (but not always) returns zero bytes. I have checked the mailing list archive and I guess my problem is very similar as the one discussed here:</div>

<div>http://developer.intra2net.com/mailarchive/html/libftdi/2010/msg00295.html</div>

<div>&nbsp;</div>

<div>I checked the code of libftdi.c and the patch is not implemented there nor I can find any trace of it on the git.&nbsp;</div>

<div>Would you please let me knwo what has happened to this patch? Also I would appreciate other suggestions to fix the problem.</div>

<div>&nbsp;</div>

<div>best regards,<br/>
Ali</div></div>
<br>
<hr><p><b>libftdi</b>&nbsp;-&nbsp;see <a href="http://www.intra2net.com/en/developer/libftdi">http://www.intra2net.com/en/developer/libftdi</a> for details.<br>
To unsubscribe send a mail to <a href="mailto:libftdi+***@developer.intra2net.com">libftdi+***@developer.intra2net.com</a></p>
<br>
</body></html>
Thomas Jarosch
2017-09-25 09:04:19 UTC
Permalink
Hello Ali,
Post by Ali Ebrahimi
I have a FT232H chip connected to a FPGA. It is set to comunicate using the
sync fifo mode. I used to have a software on Linux written based on the
D2XX driver to communicate with the chip and everything was fine except
that the troughput was limited to less than 10 MB/s.
Now I have switched to libftdi but ftdi_read_data() frequently (but not
always) returns zero bytes. I have checked the mailing list archive and I
http://developer.intra2net.com/mailarchive/html/libftdi/2010/msg00295.html
I checked the code of libftdi.c and the patch is not implemented there nor I
can find any trace of it on the git. Would you please let me knwo what has
happened to this patch? Also I would appreciate other suggestions to fix
the problem.
the fix was for libftdi 0.x only:

$ git show 3b92d479565a413c7b9f830c34c93886ba366347
commit 3b92d479565a413c7b9f830c34c93886ba366347
Author: Uwe Bonnes <***@elektron.ikp.physik.tu-darmstadt.de>
Date: Fri Jun 25 17:41:28 2010 +0200

Let ftdi_read_data() honor usb_read_timeout

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Ali Ebrahimi
2017-09-25 10:35:45 UTC
Permalink
Thank you for the quick reply, Thomas.

Does this mean libftdi 1.x should not have this problem?

Also, would you please let me know if the sync fifo mode of 232h has been tested and if there is a working example?

Thank you again,
Ali
Post by Thomas Jarosch
Hello Ali,
Post by Ali Ebrahimi
I have a FT232H chip connected to a FPGA. It is set to comunicate using the
sync fifo mode. I used to have a software on Linux written based on the
D2XX driver to communicate with the chip and everything was fine except
that the troughput was limited to less than 10 MB/s.
Now I have switched to libftdi but ftdi_read_data() frequently (but not
always) returns zero bytes. I have checked the mailing list archive and I
http://developer.intra2net.com/mailarchive/html/libftdi/2010/msg00295.html
I checked the code of libftdi.c and the patch is not implemented there nor I
can find any trace of it on the git.  Would you please let me knwo what has
happened to this patch? Also I would appreciate other suggestions to fix
the problem.
$ git show 3b92d479565a413c7b9f830c34c93886ba366347
commit 3b92d479565a413c7b9f830c34c93886ba366347
Date:   Fri Jun 25 17:41:28 2010 +0200
    Let ftdi_read_data() honor usb_read_timeout
Cheers,
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mai
Thomas Jarosch
2017-10-13 11:31:39 UTC
Permalink
Hi Ali,
Post by Ali Ebrahimi
Thank you for the quick reply, Thomas.
Does this mean libftdi 1.x should not have this problem?
Also, would you please let me know if the sync fifo mode of 232h has been
tested and if there is a working example?
I think the timeout code was never forward-ported to libftdi 1.x
and so far nobody complained :)

Back in the days I was a bit hesitant about the code change
since it will change the behavior for existing applications.

Regarding the sync FIFO mode, either someone else on
the list has an idea or I would look around the git history
who contributed the code and ask this person. It will probably work.

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Loading...