aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.c
diff options
context:
space:
mode:
authorGareth McMullin2012-07-01 22:40:43 +1200
committerGareth McMullin2012-07-01 22:40:43 +1200
commit5dff26307861e05c765a7d245a99eed120513ca7 (patch)
treeebd3b4647536d8e3611767934f7005d0ca21ea73 /src/cortexm.c
parentd64cec686a8cabe4f727149356f9dbc9e8ff10fb (diff)
Add delay after reset request.
Hopefully this fixes problems observed with failing vFlashWrite.
Diffstat (limited to 'src/cortexm.c')
-rw-r--r--src/cortexm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cortexm.c b/src/cortexm.c
index 0cab4cf..e6f2a99 100644
--- a/src/cortexm.c
+++ b/src/cortexm.c
@@ -526,6 +526,8 @@ cortexm_reset(struct target_s *target)
while(adiv5_ap_mem_read(ap, CORTEXM_AIRCR) &
(CORTEXM_AIRCR_VECTRESET | CORTEXM_AIRCR_SYSRESETREQ));
+ platform_delay(2);
+
/* Reset DFSR flags */
adiv5_ap_mem_write(ap, CORTEXM_DFSR, CORTEXM_DFSR_RESETALL);
}