On 20 July 2011 08:47, Simon Barner <bar...@gmx.de> wrote: > Hi, > >>> I can see one change that the referred commit introduced >>> to the ARM-JTAG-EW driver. It is that a speed setting in >>> the init script now actually is executed. Any such setting >>> was previously silently ignored. >> >> Do you mean the following in jtag/core.c? >> >> + retval = jtag->speed(jtag_speed_var); >> + if (retval != ERROR_OK) >> + return retval; >> >>> >>> The log shows that it is the speed setting that result in >>> the crash. > > I did some further investigations and noticed the following: > > When setting the speed in armjtagew_speed(), the length of > the outgoing message is obviously 5 not 4 (command + 4 bytes > of length information). Getting this right, fixes the error > when establishing the JTAG connection. > > However, when I try to upload an image (size ~50kb), the upload fails > with the following error (full log as attachment to the ticket). > > Debug: 46257 35631 arm-jtag-ew.c:815 armjtagew_usb_read(): > armjtagew_usb_read, result = -116 > Error: 46258 35631 arm-jtag-ew.c:775 armjtagew_usb_message(): > usb_bulk_read failed (requested=1631, result=-116) > Error: 46259 35631 arm-jtag-ew.c:717 armjtagew_tap_execute(): > armjtagew_tap_execute, wrong result -1, expected 1627 > > However, when the CMD_SET_TCK_FREQUENCY command is not executed, *and* > the subsequent CMD_GET_TCK_FREQUENCY, everything works fine (see patch). > > The reported JTAG speed is 5867kHz most of the time, sometimes also > weird speeds are reported (including negativ ones), so there seems to be > a problem with this command, too. > > The actual speed seems to be slower since flashing the 50kb takes about 80s. > > The tests where performed using an Olimex ARM-JTAG-EW, firmware version > 1.0.6.0, Olimex drivers (=libusb-win32-1.2.2.0), HEAD version of OpenOCD > built against libusb-win32-1.2.2.0 on Windows 7/x64. > > My suggestion is to commit the attached workaround for the 0.5.0 release > in order to unbreak the ARM-JTAG-EW, and to investigate on the source of > the problems in a second step. >
I am not keen on committing hacks unless it is the last resort. Does anyone else have one of these dongles that can test the patch? Or look into the problem. Cheers Spen _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development