Discussion:
drain receive buffer
Matwey V. Kornilov
2017-08-30 16:12:43 UTC
Permalink
Hello,

Is there a way to force receive buffer draining (send to the host) from
the host side? I know that the buffer is drained when either buffer is
full or latency timer is expired. Any other options, when I don't want
to wait until timer expiration?


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Thomas Jarosch
2017-08-31 12:31:54 UTC
Permalink
Hi Matwey,
Post by Matwey V. Kornilov
Is there a way to force receive buffer draining (send to the host) from
the host side? I know that the buffer is drained when either buffer is
full or latency timer is expired. Any other options, when I don't want
to wait until timer expiration?
the only way I currently see is to set the latency timer to one and set it
back afterwards. Otherwise I'm not aware of any USB command to trigger a
buffer drain.

Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
Matwey V. Kornilov
2017-08-31 12:39:29 UTC
Permalink
Post by Thomas Jarosch
Hi Matwey,
Post by Matwey V. Kornilov
Is there a way to force receive buffer draining (send to the host) from
the host side? I know that the buffer is drained when either buffer is
full or latency timer is expired. Any other options, when I don't want
to wait until timer expiration?
the only way I currently see is to set the latency timer to one and set it
back afterwards. Otherwise I'm not aware of any USB command to trigger a
buffer drain.
Hi,

Actually, this is why I am asking :) They changed default latency
timer In Linux kernel ftdi_sio.ko recently. It was 1ms, currently it
is 16ms.
Trying to recover previous behavior, I've found that when latency
timer is set from 16ms to 1ms, the device (at least FT232RL) stops to
transfer data to the host for about 250ms.
I am not sure, but it looks like timer counter being a value in range
[0,16) becomes out of range (old range [0,16), new [0,1) ) and
increments until overflow at 255.
I am trying to find a way to reset this after timer reset to somehow
avoid 250ms delay.
Post by Thomas Jarosch
Thomas
--
With best regards,
Matwey V. Kornilov

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