libftdi Archives

Subject: Re: Minimum chunk size and latency

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Daryl Lee <daryl@xxxxxxxxxxxx>
Date: Mon, 27 Jul 2009 11:25:41 +0200
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


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

Current Thread