X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fjtag%2Fjlink.c;h=5cf944c7ee8e3156fbb9ba6dca8c54ba117a5e1e;hb=2b1bd97508ebaf33c76d4f36ec4bb85592801055;hp=d8bfb0f391162b0e9f461ba855b4e851d4789a67;hpb=ebd46e23b3822abe29658eb02bce8e56afd7c356;p=openocd diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index d8bfb0f3..5cf944c7 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -314,7 +314,7 @@ static int jlink_init(void) LOG_ERROR("Cannot find jlink Interface! Please check connection and permissions."); return ERROR_JTAG_INIT_FAILED; } - + /* * The next three instructions were added after discovering a problem while using an oscilloscope. For the V8 * SAM-ICE dongle (and likely other j-link device variants), the reset line to the target microprocessor was found to @@ -324,7 +324,7 @@ static int jlink_init(void) * following a new USB session. Keeping the processor in reset during the first read collecting version information * seems to prevent errant "J-Link command EMU_CMD_VERSION failed" issues. */ - + LOG_INFO("J-Link initialization started / target CPU reset initiated"); jlink_simple_command(EMU_CMD_HW_TRST0); jlink_simple_command(EMU_CMD_HW_RESET0); @@ -499,12 +499,10 @@ static void jlink_reset(int trst, int srst) { jlink_simple_command(EMU_CMD_HW_TRST0); } + if (trst == 0) { jlink_simple_command(EMU_CMD_HW_TRST1); - jtag_sleep(5000); - jlink_end_state(TAP_RESET); - jlink_state_move(); } } @@ -883,7 +881,7 @@ static jlink_jtag_t* jlink_usb_open() if (result->usb_handle) { - + /* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS AREA!!!!!!!!!!! * The behavior of libusb is not completely consistent across Windows, Linux, and Mac OS X platforms. The actions taken * in the following compiler conditionals may not agree with published documentation for libusb, but were found