On Thu, Apr 2, 2009 at 8:43 PM, Thomas Jarosch
<thomas.jarosch@xxxxxxxxxxxxx> wrote:
> Hello Florian,
>
> Florian Beier wrote:
>>
>> Hi again,
>> I managed to use the libftdi without the D2xx commands to communicate
>> with my sensor.
>> I have on issue, I do not understand.
>> I am checking the buffer of my FT2232 chip. If it is empty, the
>> usb_bulk_read in the ftdi_read_data function takes almost 12 ms. If
>> the buffer has data, it only takes about 1 ms.
>> I tried to change the ftdi->usb_read_timeout, but it had no effect at all.
>> Any ideas?
>
> Sounds like the on-chip latency timer, try to decrease it via
> ftdi_set_latency_timer().
Thanks, Thomas.
To be honest, I am not sure, what I changed, but my ftdi_read_data
times are down to approx. 1ms (independently from thich
ftdi_set_latency_time I use)
Actually I do not understand, what the set_latency_timer does. I
thougth the ftdi_read_data would "wait" the given latency time, till
something is in the buffer. But even if I do set the latency to 255,
and nothing is in the buffer, the READ returns in 1-2ms. What is the
unit of the param latency?
My second question is: Does anyone know why an FT_Read with FT's D2XX
lib does return so fast? (I measured approx. 0.01ms compared to my 1ms
with the ftdi_read_data.)
Thanks for any help!
Florian
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|