From bea8436561124ab15158dfd13f5093ecd68c6363 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Tue, 14 Apr 2020 17:46:46 +0200 Subject: [PATCH] NRF5: Always set CORTEXM_TOPT_INHIBIT_SRST(#230) The problem also happens with NRF52840. Set CORTEXM_TOPT_INHIBIT_SRST for all NRF5 device. People should be more persistent! --- src/target/nrf51.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/target/nrf51.c b/src/target/nrf51.c index 41f3ffb..17a673d 100644 --- a/src/target/nrf51.c +++ b/src/target/nrf51.c @@ -127,6 +127,7 @@ bool nrf51_probe(target *t) if ((uid0 == 0xffffffff) || (uid1 == 0xffffffff) || (uid0 == 0) || (uid1 == 0)) return false; + t->target_options |= CORTEXM_TOPT_INHIBIT_SRST; /* Test for NRF52 device*/ uint32_t info_part = target_mem_read32(t, NRF52_PART_INFO); if ((info_part != 0xffffffff) && (info_part != 0) && @@ -150,6 +151,7 @@ bool nrf51_probe(target *t) target_add_commands(t, nrf51_cmd_list, "nRF51"); return true; } + t->target_options = 0; return false; }