Follow these steps to erase a MAX32660 with firmware loaded that prevents the device from connecting to the debugger.
NOTE: You must have company's Microcontrollers Software Development Kit(MSDK) installed.
1. Short RSTN to GND
2. Connect board to PC
3. Open a MinGW terminal
4. Enter command:
- For MSDK (MaximSDK folder in your C drive, windows):
- openocd -s $MAXIM_PATH/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg
- For Maxim LP Micros SDK (Maxim_LP folder in your C drive, windows):
- openocd -s $MAXIM_PATH/Toolchain/share/openocd/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg
5. Open a second MinGW terminal
6. Enter command:
- arm-none-eabi-gdb
7. Enter these commands:
- target remote localhost:3333
- monitor adapter_nsrst_delay 5000 (if deprecated use monitor adapter srst delay 5000 )
- monitor reset halt
8. Within 5 seconds of entering the previous command, remove the RSTN short to GND.
9. Enter command:
- monitor max32xxx mass_erase 0 (GBD may update commands, in case you see any warnings use "monitor help" for command updates)
10. Close both MiniGW terminals