From f9d343af3edc9ec2213939f58731e48f1c2b89a4 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 22 Oct 2021 13:28:27 +0200 Subject: [PATCH] cmsis: AP reads are posted. Read from RDBUFF. --- src/platforms/hosted/dap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platforms/hosted/dap.c b/src/platforms/hosted/dap.c index 565d576..1732e9d 100644 --- a/src/platforms/hosted/dap.c +++ b/src/platforms/hosted/dap.c @@ -619,7 +619,8 @@ void dap_read_single(ADIv5_AP_t *ap, void *dest, uint32_t src, enum align align) uint8_t buf[63]; uint8_t *p = mem_access_setup(ap, buf, src, align); *p++ = SWD_AP_DRW | DAP_TRANSFER_RnW; - buf[2] = 4; + *p++ = SWD_DP_R_RDBUFF | DAP_TRANSFER_RnW; + buf[2] = 5; uint32_t tmp = wait_word(buf, 63, p - buf, &ap->dp->fault); dest = extract(dest, src, tmp, align); }