hosted/stlinkv2.c: Handle AP_WAIT error when switching to SWD

This commit is contained in:
Uwe Bonnes 2020-07-24 15:16:48 +02:00 committed by UweBonnes
parent a392480631
commit 72387164eb
1 changed files with 1 additions and 1 deletions

View File

@ -1089,7 +1089,7 @@ int stlink_enter_debug_swd(bmp_info_t *info, ADIv5_DP_t *dp)
STLINK_DEBUG_ENTER_SWD_NO_RESET};
uint8_t data[2];
DEBUG_INFO("Enter SWD\n");
send_recv(info->usb_link, cmd, 16, data, 2);
stlink_send_recv_retry(cmd, 16, data, 2);
if (stlink_usb_error_check(data, true))
return -1;
dp->idcode = stlink_read_coreid();