From 69feeaa6003ec1450280bed7e0e9c552cdc1aa1d Mon Sep 17 00:00:00 2001 From: mlu Date: Fri, 21 Aug 2015 15:44:34 +0200 Subject: [PATCH] Revert "Make _stlink_usb_reset use hardreset" --- src/stlink-common.h | 1 - src/stlink-usb.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stlink-common.h b/src/stlink-common.h index 9268da2..76f977e 100644 --- a/src/stlink-common.h +++ b/src/stlink-common.h @@ -68,7 +68,6 @@ extern "C" { #define STLINK_DEBUG_WRITEDEBUGREG 0x0f #define STLINK_DEBUG_ENTER_SWD 0xa3 #define STLINK_DEBUG_ENTER_JTAG 0x00 -#define STLINK_DEBUG_HARDRESET 0x3c // TODO - possible poor names... #define STLINK_SWD_ENTER 0x30 diff --git a/src/stlink-usb.c b/src/stlink-usb.c index 47924c7..d8b6c46 100644 --- a/src/stlink-usb.c +++ b/src/stlink-usb.c @@ -413,8 +413,7 @@ void _stlink_usb_reset(stlink_t * sl) { int i = fill_command(sl, SG_DXFER_FROM_DEV, rep_len); cmd[i++] = STLINK_DEBUG_COMMAND; - cmd[i++] = STLINK_DEBUG_HARDRESET; - cmd[i++] = 0x2; + cmd[i++] = STLINK_DEBUG_RESETSYS; size = send_recv(slu, 1, cmd, slu->cmd_len, data, rep_len); if (size == -1) {