Erasing all through CTRL-AP

Use the standard Serial Wire Debug (SWD) Arm® CoreSight™ Debug Access Port (DAP) protocol to erase all while Control Access Port (CTRL-AP) is still selected by the debug port.

  1. Write 0x00000001 to the ERASEALL register (0x004) of CTRL-AP.
    This will start the ERASEALL operation which erases all flash and RAM on the device.
  2. Read the ERASEALLSTATUS register (0x008) of the CTRL-AP until the value read is 0x00 or wait 15 seconds after the ERASEALL write has expired.
  3. Issue a pin reset.