libftdi Archives

Subject: Re: Minimum chunk size and latency

From: Daryl Lee <daryl@xxxxxxxxxxxx>
To: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 27 Jul 2009 09:50:58 -0600
I can't quite recall specifically what happens with a chunk size of 32,
except that it "doesn't work."  I ended up with a chunk size of 64 and
latency of 1, and I'm getting satisfactory results.  Not as good as on
Windows, but satisfactory.

Thomas Jarosch wrote:
> Hello Daryl,
> 
> On Tuesday, 23. June 2009 19:11:16 Daryl Lee wrote:
>> I'm doing my first libftdi app, and I don't quite understand "chunk size"
>> and latency.  I'm sending 32-byte messages to my device and getting
>> 32-byte messages back.  I need to do this at 1 millisecond intervals.  I
>> find experimentally that setting chunk size to 32 doesn't work very well.
>> Setting it to 64 works better, but the time to write the message out is
>> usually too long.  This is a port from Windows software using FTDI's own
>> drivers, so there's a lot of new stuff for me to figure out.  I'm going
>> to give async a try, but I wonder if there is some good explanation of
>> latency and chunk sizing somewhere?
> 
> What happens when you set the chunk size to 32?
> 
> The latency setting is used by a hardware timer on the chip
> to wait for more data if there's not a full buffer yet.
> They've done this to reduce the traffic on the USB bus.
> 
> Thomas
> 
> 
> 

-- 
Daryl Lee
www.daryllee.com
The music never ends till strangers turn to friends. -- Medema

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

Current Thread