libftdi Archives

Subject: Re: ftdi_read loses bytes (when latency is low)

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 2 Dec 2014 16:04:46 +0100
>>>>> "Hendrik" == Hendrik  <chasake@xxxxxxxxx> writes:

...

    Hendrik> They are there but a bit hidden:
    Hendrik> http://pastebin.com/raw.php?i=3Vwk2NAs You can see that the
    Hendrik> packet with size 327 comes in with 0162 and the following
    Hendrik> packets show 0160 again.

  5.977422 1<-- 33:     0160 0202 0619 001f 4000 0100 0102 ...
  5.978486 1<-- 52:     0160 1617 1819 1a1b 1c1d 1e1f 2021 ...
  5.985341 1<-- 327:    0162 4849 4a4b 4c4d 4e4f 5051 5253 ...
  5.986459 1<-- 52:     0160 a5a6 a7a8 a9aa abac adae afb0 ...
  5.987462 1<-- 44:     0160 d7d8 d9da dbdc ddde dfe0 e1e2 ...

More remarks:
- About 8 ms elapsed between the second and the third call. This is doomed for
overflow.
- Transfers only happen in milisecond frame. Is your USB hub not USB high
speed? 
- You transfer short packages due to the 1 ms latency. 1 ms with about 50
bytes is too small to fill up the USB buffer with 62 bytes.

Try to set latency to 2 ms. Then you transfer full 62 byte buffers.

Bye
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

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

Current Thread