Target doesn't halt when starting a debug
Particularly when changing projects, or after a few days doing a bunch of other things, when I try to start up a debug sessión, it says
Error: Target not halted
Error: failed erasing sectors 0 to 36
Error: flash_erase returned -304
shutdown command invoked
Often unplugging and replugging the ST-Link or “resetting” the USB port it gets oriented.
But sometimes it’s more serious. I recently reset the whole computer and unplugged everything.
Still hangs.
I’ve rechecked the SWD connections, the reset pin is connected as always.
I be sure all modules are stopped.
What’s going on?