nRF Profiler synchronization module
Use the nRF Profiler synchronization module to synchronize the timestamps of nRF Profiler events between two devices connected over a physical wire. The timestamp synchronization is required to increase the accuracy of the amount of time measured between the nRF Profiler events originating from two different devices.
The nRF 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 nRF Profiler documentation.
Module events
Source Module |
Input Event |
This Module |
Output Event |
Sink Module |
---|---|---|---|---|
|
|
|||
|
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
A predefined signal on the GPIO is used to simultaneously generate synchronization nRF 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 nRF Profiler synchronization module generates an nRF 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 options:
The GPIO port (CONFIG_DESKTOP_NRF_PROFILER_SYNC_GPIO_PORT) and the pin (CONFIG_DESKTOP_NRF_PROFILER_SYNC_GPIO_PIN) that are used for synchronization. These GPIOs must be defined separately for both devices and connected using a physical wire.
The device role. One of the devices must be set as Central (CONFIG_DESKTOP_NRF_PROFILER_SYNC_CENTRAL) and the other device must be set as Peripheral (CONFIG_DESKTOP_NRF_PROFILER_SYNC_PERIPHERAL).
Implementation details
The nRF Profiler synchronization Central
generates a predefined signal that is received by Peripheral
over the physical wire.
Both devices generate an nRF 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.