Revert "Make _stlink_usb_reset use hardreset"
authormlu <lundin@mlu.mine.nu>
Fri, 21 Aug 2015 13:44:34 +0000 (15:44 +0200)
committermlu <lundin@mlu.mine.nu>
Fri, 21 Aug 2015 13:44:34 +0000 (15:44 +0200)
src/stlink-common.h
src/stlink-usb.c

index 9268da22cdbd0d8096f8c9a28621ff2b120cff5d..76f977e9bdd2eedf8ecbdddb01e9d3ea5854d067 100644 (file)
@@ -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
index 47924c7bef04fa0bef1a9caacd6d463feadbdd0f..d8b6c4673318a889147e6c8d76fcdac5de701f98 100644 (file)
@@ -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) {