Le 19.02.2013 00:07, Peter Henn a écrit :
> 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.
Maybe try to do the same scope-test with d2xx driver and 'send immediat'
command. To make sure only hardware is in concern.
Regards,
Laurent
http://www.amontec.com
Amontec JTAGkey-2 High-Speed USB JTAG Dongle 1.3V to 5.5V auto-sense.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel