You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for BOOTMODE.DEBUGWAIT.
Add documentation for BOOTMODE.SECONDARYMODE.
Add documentation for BOOTSTATUS.SECONDARYMODE.
Expand on how to configure a secondary firmware.
Remove existing UICR secondary firmware docs as they were describing
the UICR interface instead of the Kconfig interface.
Signed-off-by: Sebastian Bøe <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_ironside.rst
+68-74Lines changed: 68 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -735,58 +735,6 @@ UICR.SECURESTORAGE.ITS
735
735
UICR.SECURESTORAGE.ITS.RADIOCORESIZE1KB
736
736
Sets the size of the ``RADIOCORE`` domain partition for ITS, specified in 1 kiB blocks.
737
737
738
-
UICR.SECONDARY
739
-
==============
740
-
741
-
:kconfig:option:`CONFIG_GEN_UICR_SECONDARY` configures the secondary firmware boot system, which allows |ISE| to boot alternative firmware in response to specific conditions or triggers.
742
-
This feature enables a recovery firmware setup through a dual-firmware configuration that includes both main and recovery firmware.
743
-
744
-
The UICR.SECONDARY configuration consists of multiple sub-registers organized into functional groups:
745
-
746
-
UICR.SECONDARY.ENABLE
747
-
Controls whether the secondary firmware boot feature is enabled.
748
-
749
-
UICR.SECONDARY.PROCESSOR
750
-
Specifies which processor should be used to boot the secondary firmware.
751
-
Valid values are:
752
-
753
-
* ``APPLICATION`` - Boot secondary firmware on the application domain CPU.
754
-
* ``RADIOCORE`` - Boot secondary firmware on the radio core CPU.
755
-
756
-
UICR.SECONDARY.ADDRESS
757
-
Sets the start address of the secondary firmware.
758
-
This value is used as the initial value of the secure Vector Table Offset Register (VTOR) after CPU reset.
759
-
The address must be aligned to a 4 KiB boundary.
760
-
Bits [11:0] are ignored.
761
-
762
-
UICR.SECONDARY.TRIGGER
763
-
Configures automatic triggers that cause |ISE| to boot the secondary firmware instead of the primary firmware.
764
-
765
-
UICR.SECONDARY.TRIGGER.ENABLE
766
-
Controls whether automatic triggers are enabled to boot the secondary firmware.
767
-
768
-
UICR.SECONDARY.TRIGGER.RESETREAS
769
-
Specifies which reset reasons will trigger an automatic boot into the secondary firmware.
770
-
Multiple triggers can be enabled simultaneously by setting the corresponding bits:
* ``APPLICATIONLOCKUP`` - Application domain CPU lockup reset
775
-
* ``RADIOCOREWDT0`` - Radio core watchdog 0 reset
776
-
* ``RADIOCOREWDT1`` - Radio core watchdog 1 reset
777
-
* ``RADIOCORELOCKUP`` - Radio core CPU lockup reset
778
-
779
-
UICR.SECONDARY.PROTECTEDMEM
780
-
Identical to :kconfig:option:`CONFIG_GEN_UICR_PROTECTEDMEM`, but applies to the secondary firmware.
781
-
782
-
UICR.SECONDARY.WDTSTART
783
-
Identical to :kconfig:option:`CONFIG_GEN_UICR_WDTSTART`, but applies to the secondary firmware boot process.
784
-
Note that if RADIOCORE is specified in ``UICR.SECONDARY.PROCESSOR``, the WDT instances used are the ones in the radio core.
785
-
786
-
UICR.SECONDARY.PERIPHCONF
787
-
Identical to UICR.PERIPHCONF, but applies to the secondary firmware boot process.
788
-
789
-
790
738
.. _ug_nrf54h20_ironside_se_debug:
791
739
792
740
Debugging
@@ -953,9 +901,9 @@ To enable secondary firmware support, you must complete the following steps:
953
901
954
902
CONFIG_GEN_UICR_SECONDARY=y
955
903
956
-
2. Create a separate Zephyr application for your secondary firmware (for example in a :file:`secondary/` directory).
904
+
#. Create a separate Zephyr application for your secondary firmware (for example in a :file:`secondary/` directory).
957
905
958
-
3. Include the secondary image as an external project in :file:`sysbuild.cmake`:
906
+
#. Include this Zephyr application as an external project in :file:`sysbuild.cmake`:
959
907
960
908
.. code-block:: cmake
961
909
@@ -964,14 +912,27 @@ To enable secondary firmware support, you must complete the following steps:
964
912
SOURCE_DIR ${APP_DIR}/secondary
965
913
)
966
914
967
-
4. **Configure secondary firmware**: The secondary firmware image itself must enable the appropriate Kconfig option to indicate it is a secondary firmware.
915
+
#. *Configure secondary firmware Kconfig*: The secondary firmware image itself must enable the appropriate Kconfig option to indicate it is a secondary firmware.
968
916
Add the following to your secondary firmware's :file:`prj.conf`:
969
917
970
918
.. code-block:: kconfig
971
919
972
920
CONFIG_IS_IRONSIDE_SE_SECONDARY_IMAGE=y
973
921
974
-
5. **Optional: Configure automatic triggers**: If you want automatic triggering based on reset reasons, add trigger options to your :file:`sysbuild/uicr.conf`:
922
+
#. *Configure secondary firmware placement*: The secondary firmware image must be placed in the DT partition named ``secondary_partition``.
923
+
Add the following to your secondary firmware's :file:`app.overlay`:
924
+
925
+
.. code-block:: devicetree
926
+
927
+
/ {
928
+
chosen {
929
+
zephyr,code-partition = &secondary_partition;
930
+
};
931
+
};
932
+
933
+
#. *Optional: Configure secondary firmware features*: Additional features can be configured by adding more options to your :file:`sysbuild/uicr.conf`:
934
+
935
+
For instance, if you want automatic triggering based on reset reasons, add trigger options:
975
936
976
937
.. code-block:: kconfig
977
938
@@ -994,9 +955,27 @@ Setting bit 5 in ``CTRLAP.BOOTMODE`` will also trigger secondary firmware.
994
955
995
956
* The integrity check of the memory specified in :kconfig:option:`CONFIG_GEN_UICR_PROTECTEDMEM` fails.
996
957
* Any boot failure occurs, such as missing primary firmware or failure to apply ``UICR.PERIPHCONF`` configurations.
997
-
* A local domain is reset with a reason configured to trigger the secondary firmware.
998
-
* If one of the triggers configured in :kconfig:option:`CONFIG_GEN_UICR_SECONDARY_TRIGGER` and related options occurs.
958
+
* If :kconfig:option:`CONFIG_GEN_UICR_SECONDARY_TRIGGER` is enabled, and a UICR-configurable trigger occurs.
959
+
See the following table for UICR-configurable triggers.
@@ -1014,7 +993,17 @@ As with the primary firmware, |ISE| does not facilitate updating the secondary f
1014
993
The secondary image can be updated by other components as long as :kconfig:option:`CONFIG_GEN_UICR_SECONDARY_PROTECTEDMEM` is not set.
1015
994
Using the secondary firmware as a bootloader capable of validating and updating a second image enables updating firmware in the secondary boot flow while having secure boot enabled through :kconfig:option:`CONFIG_GEN_UICR_SECONDARY_PROTECTEDMEM`.
1016
995
996
+
Secondary processor
997
+
===================
998
+
999
+
By default, the secondary firmware uses the application processor.
1000
+
The radio core can be used instead by enabling the :kconfig:option:`CONFIG_GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE` option.
1017
1001
1002
+
Changing the secondary firmware location
1003
+
========================================
1004
+
1005
+
You can customize the location of the secondary firmware by modifying the ``secondary_partition`` DT partition in both the UICR image and the secondary firmware image.
1006
+
This is typically done by editing the relevant devicetree source files (such as ``nrf54h20dk_nrf54h20_common.dts`` or board-specific overlay files) in your application and UICR image projects.
1018
1007
1019
1008
.. _ug_nrf54h20_ironside_se_cpuconf_service:
1020
1009
@@ -1137,11 +1126,11 @@ CTRLAP.BOOTMODE register format
1137
1126
1138
1127
The format of the CTRLAP.MAILBOX.BOOTMODE register is described in the following table.
0 commit comments