X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Fcortex_m3.c;h=ab2c8f8e7d35a2439bae4559e19ac0b46e4747ba;hp=efa94ea4f1eb55e35604e7f149ef2c9568b01059;hb=6dc2c2ce970863a079f101d84a0c47b37b682c76;hpb=2a8e37173ad93c6c63aef28e365cc341d4c06fdb diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index efa94ea4f1..ab2c8f8e7d 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -544,7 +544,7 @@ int cortex_m3_halt(target_t *target) if (target->state == TARGET_RESET) { - if ((jtag_reset_config & RESET_SRST_PULLS_TRST) && jtag_get_srst()) + if ((jtag_get_reset_config() & RESET_SRST_PULLS_TRST) && jtag_get_srst()) { LOG_ERROR("can't request a halt while in reset if nSRST pulls nTRST"); return ERROR_TARGET_FAILURE; @@ -753,6 +753,7 @@ int cortex_m3_assert_reset(target_t *target) LOG_DEBUG("target->state: %s", Jim_Nvp_value2name_simple( nvp_target_state, target->state )->name ); + enum reset_types jtag_reset_config = jtag_get_reset_config(); if (!(jtag_reset_config & RESET_HAS_SRST)) { LOG_ERROR("Can't assert SRST");