On Tue, Jul 7, 2009 at 4:30 PM, Spencer Oliver<[email protected]> wrote: > >> Author: zwelch >> Date: 2009-07-06 12:34:33 +0200 (Mon, 06 Jul 2009) New Revision: 2471 >> >> Modified: >> trunk/src/jtag/jlink.c >> Log: >> Gary Carlson <[email protected]>: >> >> Fix intermittent J-Link interface startup failures: >> - Use usb_reset to ensure selected dongle is in known good state. >> - Assert emulator reset durning status check to prevent >> supurious failures. >> - Eliminate status check loop; not needed due to other fixes. >> >> > > For info this breaks my v5 and v6 jlinks (tested stm32). > Not sure if any one else is having trouble?
How does it break? Strange. I tested V3 and V7 J-Link and STM3210E-Eval and the patch seem to work. I only tested the connection and some simple operations. The first part of the patch does help. Now I have zero startup "J-Link command EMU_CMD_VERSION failed" issues. Last time it was about 20-25% chance of errors. > Looks like the usb_reset is the culprit. > Im my opinion the code is incorrect as according to the docs the device will > need to be reopened after a reset. > I tend to agree with you on this part. The usb_handle will not survive the usb_reset(). The device needs to be reopened after a reset (and properly some delay) - Xiaofan http://mcuee.blogspot.com _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
