X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Fcortex_m.c;h=09a51b7b3b35f53996feaebe564f91d87e23ea60;hb=7743e0fb4390d09c315ce9c6edbb2c3ba6b8c2d9;hp=488899cbe9430ac814db859efb9219bc2d0d38d5;hpb=a2935397b48ce2a1bbb8e49258b340479e0b9c8e;p=fw%2Fopenocd diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 488899cbe..09a51b7b3 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -31,6 +31,7 @@ #include "config.h" #endif +#include "jtag/interface.h" #include "breakpoints.h" #include "cortex_m.h" #include "target_request.h" @@ -995,10 +996,7 @@ static int cortex_m3_assert_reset(struct target *target) if (jtag_reset_config & RESET_HAS_SRST) { /* default to asserting srst */ - if (jtag_reset_config & RESET_SRST_PULLS_TRST) - jtag_add_reset(1, 1); - else - jtag_add_reset(0, 1); + adapter_assert_reset(); } else { /* Use a standard Cortex-M3 software reset mechanism. * We default to using VECRESET as it is supported on all current cores. @@ -1051,7 +1049,7 @@ static int cortex_m3_deassert_reset(struct target *target) target_state_name(target)); /* deassert reset lines */ - jtag_add_reset(0, 0); + adapter_deassert_reset(); return ERROR_OK; }