Skip to content

Commit

Permalink
samples: matter: Fixed NVS sectors count in samples configurations
Browse files Browse the repository at this point in the history
Several configurations contain settings partition of a size
inconsistent with the default NVS sectors count, which results
in using smaller NVS size than expected.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
  • Loading branch information
kkasperczyk-no committed Jul 31, 2024
1 parent 479238a commit 539e5b5
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 1 deletion.
3 changes: 3 additions & 0 deletions applications/matter_weather_station/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS=y

# Enable test event triggers for diagnostic logs testing purposes.
CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_TEST=y

# Set the NVS sector count to match the settings partition size that is 64 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=16
3 changes: 3 additions & 0 deletions applications/matter_weather_station/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS=y

# Enable test event triggers for diagnostic logs testing purposes.
CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_TEST=y

# Set the NVS sector count to match the settings partition size that is 64 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=16
5 changes: 5 additions & 0 deletions doc/nrf/protocols/matter/end_product/bootloader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ The nRF Connect platform in Matter uses Zephyr's :ref:`zephyr:settings_api` API
This requires that you define the ``settings_storage`` partition in the flash.
The recommended minimum size of the partition is 32 kB, but you can reserve even more space if your application uses the storage extensively.

The Zephyr settings storage is implemented by the Zephyr NVS (Non-Volatile Storage) module.
The NVS uses multiple sectors of a 4 kB size each and it has to use the appropriate number of sectors to cover all settings partition area.
To configure the number of sectors used by the NVS, set the :kconfig:option:`CONFIG_SETTINGS_NVS_SECTOR_COUNT` Kconfig option to the desired value.
For example, to cover the settings partition of a 32 kB size, you require 8 sectors of 4 kB size each.

As you can see in :ref:`ug_matter_hw_requirements_layouts`, Matter samples in the |NCS| reserve exactly 32 kB for the ``settings_storage`` partition.

Factory data partition
Expand Down
10 changes: 10 additions & 0 deletions doc/nrf/releases_and_maturity/known_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,16 @@ Matter

The issues in this section are related to the :ref:`ug_matter` protocol.

.. rst-class:: v2-7-0 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0

KRKNWK-19300: The Matter weather station application has NVS size inconsistent wiht the settings partition size.
The settings partition size for Matter weather station is configured to the value of 64 kB.
Effectively, the application cannot use 64 kB of the settings space, because it depends on the NVS size that is limited by the :kconfig:option:`CONFIG_SETTINGS_NVS_SECTOR_COUNT` and in this scenario equal to 32 kB.

**Affected platforms:** Thingy53

**Workaround:** Set the :kconfig:option:`CONFIG_SETTINGS_NVS_SECTOR_COUNT` to ``16`` in the application :file:`prj.conf`.

.. rst-class:: v2-7-0

KRKNWK-19199: Matter Lock and Matter Template samples cannot be built in the release configuration for the nRF54H20 platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ CONFIG_TICKLESS_KERNEL=y
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
4 changes: 4 additions & 0 deletions samples/matter/lock/boards/nrf54l15pdk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
CONFIG_MPSL_WORK_STACK_SIZE=2048
CONFIG_CHIP_TASK_STACK_SIZE=7168

# Set the NVS sector count to match the settings partition size that is 40 kB for this application.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ manifest:
- name: matter
repo-path: sdk-connectedhomeip
path: modules/lib/matter
revision: a16456f1557cbc0d12a42639b5f858b0e2b71840
revision: pull/467/head
west-commands: scripts/west/west-commands.yml
submodules:
- name: nlio
Expand Down

0 comments on commit 539e5b5

Please sign in to comment.