aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.c
diff options
context:
space:
mode:
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);