Disabling APPROTECT

If the device has access port protection enabled and is not erase protected, you can disable access port protection with a Control Access Port (CTRL-AP) erase all operation.

  1. Write 1 to CTRLAP.ERASEALL.
  2. Wait until the value of CTRLAP.ERASEALLSTATUS becomes 1.
Note: nRF5340 devices have two CTRL-APs, one for each core.