From ced1763c5204afd1da04229d41072d2567aefbb5 Mon Sep 17 00:00:00 2001 From: Mateusz Kapala Date: Wed, 16 Oct 2024 15:15:13 +0200 Subject: [PATCH] applications: nrf_desktop: Switch to ZMS for RRAM-based devices Switched to using the Zephyr Memory Storage (ZMS) instead of Non-Volatile Storage (NVS) for all devices that uses the RRAM non-volatile memory (currently only the nRF54L15). Jira: NCSDK-29634 Signed-off-by: Mateusz Kapala --- .../Kconfig.caf_settings_loader.default | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/applications/nrf_desktop/src/modules/Kconfig.caf_settings_loader.default b/applications/nrf_desktop/src/modules/Kconfig.caf_settings_loader.default index 786dcd959f9..50a00fd0eaf 100644 --- a/applications/nrf_desktop/src/modules/Kconfig.caf_settings_loader.default +++ b/applications/nrf_desktop/src/modules/Kconfig.caf_settings_loader.default @@ -10,7 +10,8 @@ config DESKTOP_SETTINGS_LOADER bool "Settings loader module (CAF)" select CAF_SETTINGS_LOADER select SETTINGS - imply NVS + imply ZMS if SOC_FLASH_NRF_RRAM + imply NVS if !SOC_FLASH_NRF_RRAM imply FLASH imply FLASH_MAP imply FLASH_PAGE_LAYOUT @@ -18,17 +19,16 @@ config DESKTOP_SETTINGS_LOADER nRF Desktop uses settings loader module from Common Application Framework (CAF). - By default, nRF Desktop application uses non-volatile storage backend - and the settings partition is located in internal FLASH. + The settings partition is located in internal non-volatile memory. + By default, nRF Desktop application, depending on the non-volatile + memory technology used by the device, uses either the Zephyr Memory + Storage (ZMS) or Non-Volatile Storage (NVS) settings backend. + ZMS is used for the devices with the RRAM non-volatile memory that + do not require explicit erase. Otherwise, the NVS is used. if DESKTOP_SETTINGS_LOADER -choice SETTINGS_BACKEND - default SETTINGS_NVS - help - By default, nRF Desktop application uses non-volatile storage - settings backend. -endchoice +if NVS config NVS_LOG_LEVEL default 2 @@ -36,6 +36,18 @@ config NVS_LOG_LEVEL The nRF Desktop shows only warning and error logs related to the NVS. This is done to avoid flooding logs. +endif # NVS + +if ZMS + +config ZMS_LOG_LEVEL + default 2 + help + The nRF Desktop shows only warning and error logs related to the ZMS. + This is done to avoid flooding logs. + +endif # ZMS + config SETTINGS_DYNAMIC_HANDLERS default n help