Hi Peter,

Am 18.02.2013 13:54, schrieb Peter Stuge:
> Peter Henn wrote:
>> A patched libusb allow me to setup also latency timer values of 0 for
>> the FT2232H chip.
>
> Please tell more about this patch?
>

sorry, I used the wrong name. It was libftdi, which is only used by the
ft2232 driver and no longer by the ftdi driver.  So that could be
applied to libftdi-0.20:

FTDI-2232H and FTDI-4232H USB High Speed devices allow latency timer
values of 0 ms.
Setting this values allow a short package Bulk read latest for the next
USB micro frame on
an USB 2.0 Bus or every 125 us.
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -1822,8 +1822,8 @@
 {
     unsigned short usb_val;

-    if (latency < 1)
-        ftdi_error_return(-1, "latency out of range. Only valid for
1-255");
+    if (latency < 0)
+        ftdi_error_return(-1, "latency out of range. Only valid for
0-255");

     if (ftdi == NULL || ftdi->usb_dev == NULL)
         ftdi_error_return(-3, "USB device unavailable");


> 
>> Here the updated and used patch for my measurements:
>> --- a/src/jtag/drivers/mpsse.c
>> +++ b/src/jtag/drivers/mpsse.c
>> @@ -305,7 +305,7 @@
>>         }
>>
>>         err = libusb_control_transfer(ctx->usb_dev, FTDI_DEVICE_OUT_REQTYPE,
>> -                       SIO_SET_LATENCY_TIMER_REQUEST, 255, ctx->index, 
>> NULL, 0,
>> +                       SIO_SET_LATENCY_TIMER_REQUEST, 2, ctx->index, NULL, 
>> 0,
>>                         ctx->usb_write_timeout);
>>         if (err < 0) {
>>                 LOG_ERROR("unable to set latency timer: %d", err);
> 
> Do you suggest the above for inclusion to the mpsse.c code?

No. Using the 255ms latency timer would show now clearly that a send
immediate commad does not work as expected.


> 
> 
> //Peter


------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to