aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/target/cortex_m.c3
-rw-r--r--src/target/hla_target.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index 6fba9259..9521085b 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -989,7 +989,8 @@ static int cortex_m3_assert_reset(struct target *target)
bool srst_asserted = false;
- if (jtag_reset_config & RESET_SRST_NO_GATING) {
+ if ((jtag_reset_config & RESET_HAS_SRST) &&
+ (jtag_reset_config & RESET_SRST_NO_GATING)) {
adapter_assert_reset();
srst_asserted = true;
}
diff --git a/src/target/hla_target.c b/src/target/hla_target.c
index 65e05686..4564d46c 100644
--- a/src/target/hla_target.c
+++ b/src/target/hla_target.c
@@ -428,7 +428,8 @@ static int adapter_assert_reset(struct target *target)
bool srst_asserted = false;
- if (jtag_reset_config & RESET_SRST_NO_GATING) {
+ if ((jtag_reset_config & RESET_HAS_SRST) &&
+ (jtag_reset_config & RESET_SRST_NO_GATING)) {
jtag_add_reset(0, 1);
res = adapter->layout->api->assert_srst(adapter->fd, 0);
srst_asserted = true;