CPU measurement module

Use the CPU measurement module to monitor CPU load.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Source modules for module_state_event

module_state_event

cpu_meas

cpu_load_event

None

module_state_event

Sink modules for module_state_event

Note

See the Overview: Firmware architecture for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

Enable the module using the CONFIG_DESKTOP_CPU_MEAS_ENABLE option. This Kconfig option selects the CONFIG_CPU_LOAD option. The CONFIG_CPU_LOAD option enables CPU load measurement, that is used to perform the measurements.

Set the time between subsequent CPU load measurements, in milliseconds, using the CONFIG_DESKTOP_CPU_MEAS_PERIOD option.

Implementation details

The module periodically submits the measured CPU load as cpu_load_event and resets the measurement. The event can be displayed in the logs or using the Profiler. The cpu_load_event.load presents the CPU load in 0.001% units.