aboutsummaryrefslogtreecommitdiff
path: root/src/adiv5_swdp.c
diff options
context:
space:
mode:
authorGareth McMullin2015-02-28 20:53:25 -0800
committerGareth McMullin2015-03-22 12:26:45 -0700
commitd6225eec763bd49ef3cb8edac5138df9e524a073 (patch)
tree7db158a0e0adf742238a69b9e7ec6d2cfcc0192d /src/adiv5_swdp.c
parentfa046601a54ddf2137048f11594ed7d72ede995a (diff)
Raise timeout exception when target is in WFI.
Ignore the exception when polling for halt, and report the exception to the user if halting the target fails. Remove old allow_timeout flag in DP struct that's no longer needed.
Diffstat (limited to 'src/adiv5_swdp.c')
-rw-r--r--src/adiv5_swdp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adiv5_swdp.c b/src/adiv5_swdp.c
index d5193ac..1a6b158 100644
--- a/src/adiv5_swdp.c
+++ b/src/adiv5_swdp.c
@@ -136,8 +136,8 @@ static uint32_t adiv5_swdp_low_access(ADIv5_DP_t *dp, uint8_t RnW,
ack = swdptap_seq_in(3);
} while(--tries && ack == SWDP_ACK_WAIT);
- if (dp->allow_timeout && (ack == SWDP_ACK_WAIT))
- return 0;
+ if (ack == SWDP_ACK_WAIT)
+ raise_exception(EXCEPTION_TIMEOUT, "SWDP ACK timeout");
if(ack == SWDP_ACK_FAULT) {
dp->fault = 1;