Skip to content

Commit

Permalink
samples: openthread: Enabled ZMS for OpenThread samples
Browse files Browse the repository at this point in the history
The settings backend for the nRF54L SoC family should be
selected to the ZMS, so it was applied for all OpenThread samples.

Additionally, added a cmake check that prints warning in case
someone uses NVS with nRF54L SoC and informs about
the consequences.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
  • Loading branch information
kkasperczyk-no authored and rghaddab committed Oct 16, 2024
1 parent ed6324d commit 43ceb65
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions samples/openthread/cli/boards/nrf54l15dk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ CONFIG_NRFX_UARTE0=n
# while using CRACEN
CONFIG_MAIN_STACK_SIZE=6144
CONFIG_SHELL_STACK_SIZE=5120

# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
# It should be removed once the proper fix will be applied in Zephyr.
CONFIG_NVS=n
CONFIG_ZMS=y
CONFIG_SETTINGS_ZMS=y
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@

CONFIG_FPU=n
CONFIG_SPI_NOR=n

# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
# It should be removed once the proper fix will be applied in Zephyr.
CONFIG_NVS=n
CONFIG_ZMS=y
CONFIG_SETTINGS_ZMS=y
1 change: 1 addition & 0 deletions subsys/net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ add_subdirectory(lib)
add_subdirectory_ifdef(CONFIG_OPENTHREAD_RPC openthread/rpc)
add_subdirectory_ifdef(CONFIG_L2_WIFI_CONNECTIVITY l2_wifi_if_conn)
add_subdirectory_ifdef(CONFIG_OPENTHREAD_REPORT openthread/report)
add_subdirectory_ifdef(CONFIG_NET_L2_OPENTHREAD openthread/settings_check)
23 changes: 23 additions & 0 deletions subsys/net/openthread/settings_check/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# This script checks if NVS settings backend is used with nRF54L SoC target and prints
# the warning that the recommended backend is ZMS due to the RRAM design.

if (CONFIG_SOC_SERIES_NRF54LX AND CONFIG_SETTINGS_NVS)
message(WARNING " ###################################################################################\n"
" # #\n"
" # Your application uses NVS backend for the settings storage that is not #\n"
" # optimal solution for the nRF54L SoC family and it may negatively impact #\n"
" # the non-volatile RRAM life-time. #\n"
" # #\n"
" # The recommended settings backend for nRF54L SoC family is ZMS. #\n"
" # You can enable it by selecting CONFIG_SETTINGS_ZMS=y and CONFIG_ZMS=y. #\n"
" # Please note that the other Kconfig options related to NVS like cache #\n"
" # or block size will require alignment on the ZMS side as well. #\n"
" # #\n"
" ###################################################################################\n")
endif()

0 comments on commit 43ceb65

Please sign in to comment.