Profiler synchronization module

Use the profiler synchronization module to synchronize the timestamps of Profiler events between two devices connected over a physical wire. Timestamp synchronization is required to increase the accuracy of the measured times between the profiler events that come from two different devices.

The profiler data is collected separately from both devices using dedicated Python scripts. The data can then be merged using the merge_data.py script with sync_event used as a synchronization event for both Peripheral and Central. For more details, see the Profiler documentation.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Source modules for module_state_event

module_state_event

profiler_sync

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

A predefined signal on the GPIO is used to simultaneously generate synchronization profiler events on both devices. For this reason, you must enable the CONFIG_GPIO option.

You must also enable the CONFIG_APP_EVENT_MANAGER_PROFILER_TRACER Kconfig option. The profiler synchronization module generates a Profiler event (sync_event) that is not an Application Event Manager event. For this reason, the sync_event execution is not traced.

You must also define the following:

Implementation details

The profiler synchronization Central generates a predefined signal that is received by Peripheral over the physical wire. Both devices generate a profiler event (sync_event) on every signal edge. This results in sync_event being generated on both devices at the same time. You can use the timestamps of this event on both devices for clock drift compensation.