Skip to content

Commit c328db4

Browse files
greg-fernordicjm
authored andcommitted
doc: ap-protect: edit nrfjprog to nrfutil
Changed nrfjprog commands to nrfutil in the AP-Protect documentation. Updated the note about multi-image builds. NCSDK-30148. Signed-off-by: Grzegorz Ferenc <[email protected]>
1 parent 9e79a32 commit c328db4

File tree

2 files changed

+38
-20
lines changed

2 files changed

+38
-20
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ Developing with PMICs
105105
Security
106106
========
107107

108-
* Added support for HKDF-Expand and HKDF-Extract in CRACEN.
109-
* Added support for Ed25519ph(HashEdDSA) to CRACEN
108+
* Added:
109+
110+
* Support for HKDF-Expand and HKDF-Extract in CRACEN.
111+
* Support for Ed25519ph(HashEdDSA) to CRACEN.
112+
113+
* Updated the :ref:`app_approtect` page with nRF Util commands that replaced the nrfjprog commands.
114+
This is part of the ongoing work of archiving `nRF Command Line Tools`_ and replacing them with nRF Util.
110115
* Moved the :ref:`app_boards_spe_nspe` documentation page under :ref:`security` from the :ref:`ug_app_dev` section.
111116

112117
Protocols

doc/nrf/security/ap_protect.rst

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ Enabling the Kconfig option writes the debugger register in the ``SystemInit()``
179179
In addition to this, the ``UICR.APPROTECT`` register should be written as instructed in :ref:`app_approtect_uicr_approtect`.
180180

181181
.. note::
182-
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
182+
For multi-image builds, :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` needs to be set for the first image (usually a bootloader).
183183
Otherwise, the software AP-Protect will not be sufficient as the debugger can be attached to the device after the first image opens the software AP-Protect with the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option, which is the default value.
184184

185-
When using sysbuild, set the ``SB_CONFIG_APPROTECT_LOCK`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option for all images.
185+
You can set this option manually or use sysbuild's ``SB_CONFIG_APPROTECT_LOCK`` Kconfig option to set it for all images at once.
186186

187187
.. important::
188188
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
@@ -200,11 +200,11 @@ You can use this option for example to implement the authenticated debug and loc
200200
See the SoC or SiP hardware documentation for more information.
201201

202202
.. note::
203-
For multi-image builds, this Kconfig option has to be set for all images.
203+
For multi-image builds, :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` needs to be set for all images.
204204
The default value is to open the device if the ``UICR.APPROTECT`` register is not set.
205205
This allows the debugger to be attached to the device.
206206

207-
When using sysbuild, set the ``SB_CONFIG_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option for all images.
207+
You can set this option manually for each image or use sysbuild's ``SB_CONFIG_APPROTECT_USER_HANDLING`` Kconfig option to set it for all images at once.
208208

209209
.. _app_approtect_ncs_use_uicr:
210210

@@ -227,16 +227,28 @@ If the access port protection is configured this way, it cannot be disabled with
227227
.. note::
228228
This is the only mechanism supported by the nRF52 Series and the nRF9160 devices that do not support both hardware and software AP-Protect.
229229

230-
To lock the ``UICR.APPROTECT`` register, complete the following steps:
230+
To lock the ``UICR.APPROTECT`` register, use the following set of commands:
231231

232-
.. code-block:: console
232+
.. tabs::
233233

234-
nrfjprog --rbp ALL
234+
.. tab:: SoCs or SiPs other than nRF5340
235235

236-
.. note::
237-
|nrfjprog_deprecation_note|
236+
.. code-block:: console
237+
238+
nrfutil device protection-set All
239+
240+
.. tab:: nRF5340
241+
242+
.. code-block:: console
243+
244+
nrfutil device protection-set All --core Network
245+
nrfutil device protection-set All
238246
239-
This command enables the hardware AP-Protect (and Secure AP-Protect) and resets the device.
247+
This set of commands enables the hardware AP-Protect (and Secure AP-Protect) and resets the device.
248+
249+
.. note::
250+
With devices that use software AP-Protect, nRF Util cannot enable hardware AP-Protect if the software AP-Protect is already enabled.
251+
If you encounter errors with nRF Util, make sure that :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` is set.
240252

241253
.. _app_secure_approtect:
242254

@@ -266,10 +278,10 @@ Enabling this Kconfig option writes the secure debugger register in the ``System
266278
In addition to this, the ``UICR.SECUREAPPROTECT`` register should be written as instructed in :ref:`app_secure_approtect_uicr_approtect`.
267279

268280
.. note::
269-
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
281+
For multi-image builds, :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` needs to be set for the first image (usually a bootloader).
270282
Otherwise, the software Secure AP-Protect will not be sufficient as the debugger can be attached to the SPE after the first image opens the software Secure AP-Protect with the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USE_UICR` Kconfig option, which is the default value.
271283

272-
When using sysbuild, set the sysbuild Kconfig option ``SB_CONFIG_SECURE_APPROTECT_LOCK``, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option for all images.
284+
You can set this option manually or use sysbuild's ``SB_CONFIG_SECURE_APPROTECT_LOCK`` Kconfig option to enable it for all images.
273285

274286
.. important::
275287
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
@@ -285,11 +297,11 @@ You can for example use this option to implement an authenticated debug and lock
285297
See the SoC or SiP hardware documentation for more information.
286298

287299
.. note::
288-
For multi-image builds, this Kconfig option needs to be set for all images.
300+
With multi-image builds, :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` needs to be set for all images.
289301
The default value is to open the device if the ``UICR.SECUREAPPROTECT`` is not set.
290302
This allows the debugger to be attached to the device.
291303

292-
When using sysbuild, set the ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` Kconfig option for all images.
304+
You can set this option manually for each image or use sysbuild's ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` Kconfig option to set it for all images at once.
293305

294306
Enabling software Secure AP-Protect with :kconfig:option:`CONFIG_SECURE_NRF_APPROTECT_USE_UICR`
295307
-----------------------------------------------------------------------------------------------
@@ -311,9 +323,10 @@ To enable only the hardware Secure AP-Protect mechanism, run the following comma
311323

312324
.. code-block:: console
313325
314-
nrfjprog --rbp SECURE
315-
316-
.. note::
317-
|nrfjprog_deprecation_note|
326+
nrfutil device protection-set SecureRegions
318327
319328
This command enables hardware Secure AP-Protect and resets the device.
329+
330+
.. note::
331+
With devices that use software AP-Protect, nRF Util cannot enable hardware Secure AP-Protect if the software Secure AP-Protect is already enabled.
332+
If you encounter errors with nRF Util, make sure that :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` and :kconfig:option:`CONFIG_SECURE_NRF_APPROTECT_USE_UICR` are set.

0 commit comments

Comments
 (0)