> -----Original Message----- > From: Magnus Lundin [mailto:[email protected]] > Sent: 29 May 2009 16:42 > To: Spencer Oliver > Cc: 'Dylan Reid'; [email protected] > Subject: Re: [Openocd-development] jlink issues > > Spencer Oliver wrote: > >>> svn head (currently r1943) fails when connecting using a > >>> > >> v6/v5.3 jlink > >> > >>> and > >>> stm32 target. > >>> Connecting using r1192 is ok, just a little slow. > >>> > >>> The strange thing is if i then connect using r1943 it will work !! > >>> Replug the jlink and it will fail with r1943, run r1192 > >>> > >> then all is ok > >> > >>> again. > >>> > >>> I have attached logs to see if it inspires anyone, other > than i am > >>> trying to delve into the issue. > >>> > >>> Cheers > >>> Spen > >>> > >>> > >>> > >> I have seen the same behavior. 1938 works fine with older j-link > >> hardware (v3/v4). 1188 works with newer but is more than a little > >> slow. > >> > >> > > > > Tracing further in. > > For me the break is @ r1509 (tms pad patch) - now to find a > solution. > > > > Cheers > > Spen > > _______________________________________________ > > Openocd-development mailing list > > [email protected] > > https://lists.berlios.de/mailman/listinfo/openocd-development > > > Perhaps return packages that are exact multiple of 64 should > be broken in 2 smaller transactions, not padded. >
a bit more debugging
The issue seesms to be in the function jlink_tap_execute
the change in r1509 that causes the issue is:
// number of full bytes (plus one if some would be left over)
byte_length = tap_length / 8 + !!(tap_length % 8);
instead of r1508
/* Pad last byte so that tap_length is divisible by 8 */
while (tap_length % 8 != 0)
{
/* More of the last TMS value keeps us in the same state,
* analogous to free-running JTAG interfaces. */
jlink_tap_append_step(last_tms, 0);
}
byte_length = tap_length / 8;
I have attached logs of both rev, as you can see the line of interest for
r1508 is
Debug: 119 218 jlink.c:963 jlink_debug_buffer(): 0000 cf 00 08 00 ff 00
and r1509
Debug: 119 249 jlink.c:963 jlink_debug_buffer(): 0000 cf 00 07 00 7f 00
Cheers
Spen
jlink-r1508.log
Description: Binary data
jlink-r1509.log
Description: Binary data
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
