Skip to content

Commit 5736ed3

Browse files
ArekBalysNordicrlubos
authored andcommitted
samples: matter: Add guide on how to flash factory data on nRF54H
Until we do not have a proper solution for merging the factory data hex file with the firmware hex file, we need to flash the factory data manually. This commit allows doing that on nRF54H20 DK and describes how to do it in Matter samples. Signed-off-by: Arkadiusz Balys <[email protected]>
1 parent d67ed70 commit 5736ed3

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

applications/matter_bridge/doc/matter_bridge_description.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,17 @@ The application supports the following configurations:
697697

698698
Enables the Matter Bridge to work with Wi-Fi on nRF5340 DK.
699699

700+
Factory data support
701+
====================
702+
703+
.. include:: ../../../samples/matter/lock/README.rst
704+
:start-after: matter_door_lock_sample_factory_data_start
705+
:end-before: matter_door_lock_sample_factory_data_end
706+
707+
.. include:: ../../../samples/matter/lock/README.rst
708+
:start-after: matter_door_lock_sample_factory_data_nrf54h20_start
709+
:end-before: matter_door_lock_sample_factory_data_nrf54h20_end
710+
700711
Building and running
701712
********************
702713

samples/matter/common/dts/nrf54h20/nrf54h20_cpuapp_memory_map.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
aliases {
1313
factory-data = &factory_data;
1414
factory-data-memory-region = &cpuapp_rw_partitions;
15+
factory-data-location = &mram1x;
1516
};
1617
};
1718

samples/matter/lock/README.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,44 @@ To learn more about factory data, read the :doc:`matter:nrfconnect_factory_data_
363363

364364
.. matter_door_lock_sample_factory_data_end
365365
366+
.. matter_door_lock_sample_factory_data_nrf54h20_start
367+
368+
Merging the factory data hex file with the firmware hex file is currently not available on the nRF54H20 DK.
369+
The factory data support is disabled by default on this board.
370+
You can still use it, but you need to flash the :file:`factory_data.hex` file manually.
371+
372+
To use factory data on the nRF54H20 DK, complete the following steps:
373+
374+
1. Flash the :file:`factory_data.hex` file into the device using the following command:
375+
376+
.. code-block:: console
377+
378+
nrfutil device program --firmware build/template/zephyr/factory_data.hex
379+
380+
#. Enable factory data support by building the sample with the :kconfig:option:`CONFIG_CHIP_FACTORY_DATA` Kconfig option set to ``y`` using the following command:
381+
382+
.. code-block:: console
383+
384+
west build -p -b nrf54h20dk/nrf54h20/cpuapp -- -DCONFIG_CHIP_FACTORY_DATA=y
385+
386+
#. Flash the firmware into the device:
387+
388+
.. code-block:: console
389+
390+
west flash --erase
391+
392+
The ``west flash --erase`` command does not clear the factory data partition.
393+
If you want to clear it, use the following command, and fill the ``<address>`` argument as an address of the factory data partition.
394+
By default, the address is set to ``0xe174000``.
395+
396+
.. code-block:: console
397+
398+
nrfutil device erase --pages <address>
399+
400+
Migrating the DAC private key from the factory data set to Trusted Storage is not supported yet on nRF54H20 DK.
401+
402+
.. matter_door_lock_sample_factory_data_nrf54h20_end
403+
366404
User interface
367405
**************
368406

samples/matter/template/README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ Factory data support
161161
:start-after: matter_door_lock_sample_factory_data_start
162162
:end-before: matter_door_lock_sample_factory_data_end
163163

164+
.. include:: ../lock/README.rst
165+
:start-after: matter_door_lock_sample_factory_data_nrf54h20_start
166+
:end-before: matter_door_lock_sample_factory_data_nrf54h20_end
167+
164168
User interface
165169
**************
166170

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ manifest:
161161
- name: matter
162162
repo-path: sdk-connectedhomeip
163163
path: modules/lib/matter
164-
revision: 668f104204ca3856818283d970501bd2a0e21f91
164+
revision: 95a8c0fbcc94deb32c9365c5e88279d9292f8fdd
165165
west-commands: scripts/west/west-commands.yml
166166
submodules:
167167
- name: nlio

0 commit comments

Comments
 (0)