From 9009ed6581fddbd5c7cc1353aaec7144c4f778f6 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sat, 11 Apr 2015 16:08:59 -0700 Subject: cortexm: Add target option to inhibit assersion of SRST. --- src/cortexm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cortexm.c') 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); -- cgit v1.2.3