From 72387164eb52351e5c9c6afa1e9d7be1a097fa83 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 24 Jul 2020 15:16:48 +0200 Subject: [PATCH] hosted/stlinkv2.c: Handle AP_WAIT error when switching to SWD --- src/platforms/hosted/stlinkv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/hosted/stlinkv2.c b/src/platforms/hosted/stlinkv2.c index 18a7f2e3..1d41acc2 100644 --- a/src/platforms/hosted/stlinkv2.c +++ b/src/platforms/hosted/stlinkv2.c @@ -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();