UG-1308
Rev. A | Page 22 of 24
MASS ERASING A DEVICE NOT RESPONDING TO SWD COMMANDS
The SWD debug tools can only communicate with the
microcontroller when the device is in active mode.
Similarly, watchdog or software resets that occur when a debug
session starts cause the debug session to end with errors.
To recover a device that is locked in this way, mass erase the
user flash.
To mass erase the user flash, take the following steps:
1.
Hold the S3
button down to place the device in boot mode.
2.
While holding the S3 button down, press and release the
reset button (S1) to lock the device in a loop in the kernel
space so that the device does not execute user code.
3.
In the IAR Embedded Workbench, navigate to
Project
>
Download
>
Erase memory
4.
The window shown in Figure 40 opens. Click
OK
.
16887
-031
Erase Flash Memory Option
16887-
032
Figure 40. Erase All Flash Memory