libftdi Archives

Subject: Re: drain receive buffer

From: "Matwey V. Kornilov" <matwey.kornilov@xxxxxxxxx>
To: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 31 Aug 2017 15:39:29 +0300
2017-08-31 15:31 GMT+03:00 Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>:
> Hi Matwey,
>
> On Wednesday, 30 August 2017 18:12:43 CEST Matwey V. Kornilov wrote:
>> 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.

> 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+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread