diff --git a/fet.c b/fet.c index cb675b8..0f0a245 100644 --- a/fet.c +++ b/fet.c @@ -698,8 +698,8 @@ static void fet_destroy(device_t dev_base) { struct fet_device *dev = (struct fet_device *)dev_base; - if (xfer(dev, C_RUN, NULL, 0, 2, FET_RUN_FREE, 1) < 0) - printc_err("fet: failed to restart CPU\n"); + if (xfer(dev, C_RESET, NULL, 0, 3, FET_RESET_ALL, 1, 1) < 0) + printc_err("fet: final reset failed\n"); if (xfer(dev, C_CLOSE, NULL, 0, 1, 0) < 0) printc_err("fet: close command failed\n"); @@ -950,13 +950,6 @@ device_t fet_open(transport_t transport, int proto_flags, int vcc_mv, if (do_configure(dev) < 0) goto fail; - /* Reset first, if requested */ - if (!(proto_flags & FET_PROTO_NORESET)) { - printc_dbg("Sending initial reset...\n"); - if (xfer(dev, C_RESET, NULL, 0, 3, FET_RESET_ALL, 0, 0) < 0) - printc_err("warning: fet: initial reset failed\n"); - } - /* set VCC */ if (xfer(dev, C_VCC, NULL, 0, 1, vcc_mv) < 0) printc_err("warning: fet: set VCC failed\n"); diff --git a/fet.h b/fet.h index 775fd8e..0a2baaf 100644 --- a/fet.h +++ b/fet.h @@ -26,7 +26,6 @@ #define FET_PROTO_SPYBIWIRE 0x01 #define FET_PROTO_RF2500 0x02 #define FET_PROTO_OLIMEX 0x04 -#define FET_PROTO_NORESET 0x08 device_t fet_open(transport_t transport, int proto_flags, int vcc_mv, const char *force_id); diff --git a/main.c b/main.c index 82f3592..96a72cf 100644 --- a/main.c +++ b/main.c @@ -125,7 +125,6 @@ struct cmdline_args { const char *usb_device; const char *fet_force_id; int want_jtag; - int no_reset; int no_rc; int vcc_mv; int long_password; @@ -144,8 +143,6 @@ static device_t driver_open_fet(const struct cmdline_args *args, if (!args->want_jtag) flags |= FET_PROTO_SPYBIWIRE; - if (args->no_reset) - flags |= FET_PROTO_NORESET; dev = fet_open(trans, flags, args->vcc_mv, args->fet_force_id); if (!dev) { @@ -292,8 +289,6 @@ static void usage(const char *progname) " Set the supply voltage, in millivolts.\n" " -n\n" " Do not read ~/.mspdebug on startup.\n" -" --no-reset\n" -" Do not reset the device on startup.\n" " --long-password\n" " Send 32-byte IVT as BSL password (flash-bsl only)\n" " --help\n" @@ -379,7 +374,6 @@ static int parse_cmdline_args(int argc, char **argv, {"fet-force-id", 1, 0, 'F'}, {"usb-list", 0, 0, 'I'}, {"version", 0, 0, 'V'}, - {"no-reset", 0, 0, 'R'}, {"long-password", 0, 0, 'P'}, {NULL, 0, 0, 0} }; @@ -439,10 +433,6 @@ static int parse_cmdline_args(int argc, char **argv, args->no_rc = 1; break; - case 'R': - args->no_reset = 1; - break; - case 'P': args->long_password = 1; break; diff --git a/mspdebug.man b/mspdebug.man index a947610..dce16a5 100644 --- a/mspdebug.man +++ b/mspdebug.man @@ -47,8 +47,6 @@ Specify a particular USB device to connect to. Without this option, the first device of the appropriate type is opened. .IP "\-n" Do not process the startup file (~/.mspdebug). -.IP "\--no-reset" -Do not reset the device on startup. .IP "\--long-password" When using the flash-bsl driver, send a 32-byte BSL password instead of the standard 16-byte password.