Entering SWIM mode on ST-LINK does not update swim status word.
As a consequence of a previous failed SWIM command any subsequent attempts to enter SWIM mode fails. Change stlink_usb_mode_enter to use stlink_usb_xfer_noerrcheck instead. Change-Id: I5c6a1a8e68d3dc77ec37264880383366fa6a75d9 Signed-off-by: Ake Rehnman <ake.rehnman@gmail.com> Reviewed-on: http://openocd.zylin.com/5547 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
68e200c660
commit
b9a30e0892
|
@ -1230,9 +1230,8 @@ static int stlink_usb_mode_enter(void *handle, enum stlink_mode type)
|
|||
case STLINK_MODE_DEBUG_SWIM:
|
||||
h->cmdbuf[h->cmdidx++] = STLINK_SWIM_COMMAND;
|
||||
h->cmdbuf[h->cmdidx++] = STLINK_SWIM_ENTER;
|
||||
/* no answer for this function... */
|
||||
rx_size = 0;
|
||||
break;
|
||||
/* swim enter does not return any response or status */
|
||||
return stlink_usb_xfer_noerrcheck(handle, h->databuf, 0);
|
||||
case STLINK_MODE_DFU:
|
||||
case STLINK_MODE_MASS:
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue