aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.c
diff options
context:
space:
mode:
authorGareth McMullin2015-04-11 16:08:59 -0700
committerGareth McMullin2015-04-11 16:08:59 -0700
commit9009ed6581fddbd5c7cc1353aaec7144c4f778f6 (patch)
treebf63eddf07a28f88dafab3240cc17e15fd46e31b /src/cortexm.c
parent24122aa31894524867536469c5a9b055c82b25af (diff)
cortexm: Add target option to inhibit assersion of SRST.
Diffstat (limited to 'src/cortexm.c')
-rw-r--r--src/cortexm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cortexm.c b/src/cortexm.c
index e7bed5b..028af21 100644
--- a/src/cortexm.c
+++ b/src/cortexm.c
@@ -418,8 +418,10 @@ static void cortexm_pc_write(target *t, const uint32_t val)
* using the core debug registers in the NVIC. */
static void cortexm_reset(target *t)
{
- jtagtap_srst(true);
- jtagtap_srst(false);
+ if ((t->target_options & CORTEXM_TOPT_INHIBIT_SRST) == 0) {
+ jtagtap_srst(true);
+ jtagtap_srst(false);
+ }
/* Read DHCSR here to clear S_RESET_ST bit before reset */
target_mem_read32(t, CORTEXM_DHCSR);