Settings loader module

Use the settings loader module to trigger loading the data from non-volatile memory. The settings loader module is by default enabled, along with all of the required dependencies for every nRF Desktop device.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Source modules for module_state_event

module_state_event

settings_loader

module_state_event

Sink modules for module_state_event

Note

See the Application overview for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

nRF Desktop uses the settings loader module from the Common Application Framework (CAF). The CONFIG_DESKTOP_SETTINGS_LOADER Kconfig option selects CONFIG_CAF_SETTINGS_LOADER and aligns the module configuration to the application requirements. The CONFIG_DESKTOP_SETTINGS_LOADER Kconfig option is implied by the CONFIG_DESKTOP_COMMON_MODULES Kconfig option. The CONFIG_DESKTOP_COMMON_MODULES option is enabled by default and is not user-assignable.

For details on the default configuration alignment, see the following sections.

Settings backend

By default, nRF Desktop devices use non-volatile storage settings backend (CONFIG_SETTINGS_NVS). The storage partition is located in the internal non-volatile memory.

Settings load in a separate thread

Enabling the CONFIG_CAF_SETTINGS_LOADER_USE_THREAD option is recommended for the keyboard reference design (nRF52832 Desktop Keyboard). The CAF: Buttons module uses the system workqueue to scan the keyboard matrix. Loading the settings in the system workqueue context could block the workqueue and result in missing key presses on system reboot.

Implementation details

See the CAF Settings loader module page for implementation details.