aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cortexm.c')
-rw-r--r--src/cortexm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cortexm.c b/src/cortexm.c
index 43f3d98..98707ce 100644
--- a/src/cortexm.c
+++ b/src/cortexm.c
@@ -358,6 +358,9 @@ cortexm_attach(struct target_s *target)
unsigned i;
uint32_t r;
+ /* Clear any pending fault condition */
+ target_check_error(target);
+
target_halt_request(target);
while(!target_halt_wait(target));