Use the nrfutil device protection-get command to get the current status of the access port of the specified device.
Readback protection prevents unauthorized access to the device's memory contents through debug interfaces. In Nordic Semiconductor hardware, the readback protection is implemented using the access port protection mechanism (AP-Protect). See Managing access port protection in the nRF Connect documentation and the hardware documentation for more information.
Depending on the device family, the command returns the following information:
-
For the nRF51 Series, the command returns the readback protection status for nRF51 memory regions.
-
For the nRF52 Series, the protection status is read from the
CTRL-AP.APPROTECTSTATUSregister and reflects whether or not AP-Protect is enabled. -
For nRF53, nRF54H, nRF54L, and nRF91 Series, the access status is read from the Control Status/Word (CSW) register of the access port to figure out what level of access is possible. For these devices, the output of this command reflects the current accessibility of the access port, not whether or not the AP-Protect mechanism is enabled. For example, the network core on an nRF53 Series device or cores on an nRF54H Series device can be disabled, which could show up as protection status
Allwithout the AP-Protect mechanism having been involved.
Given this, the information returned by protection-get does not necessarily reflect the readback protection status set by protection-set. The only exception are nRF51 Series and nRF52 Series devices, where the status of the protection-get does reflect the readback protection status set by protection-set.