nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_802154_csl_writer_anchor_time_set()

void nrf_802154_csl_writer_anchor_time_set ( uint64_t anchor_time)

#include <nrf_802154/common/include/nrf_802154.h>

Sets the anchor time based on which the next CSL window time and the CSL phase is calculated.

This function sets an anchor time based on which the times of future CSL windows are calculated. When this anchor time is used for calculations, it is assumed that it points to a time where the first bit of MAC header of the frame received from a peer happens. In other words, the anchor time should point to a time where CSL phase would be equal 0. As a result, CSL phase can always be calculated relatively to a time given by the equation anchor_time + n * csl_period where n is an integer. Note that the reasoning holds irrespectively of signedness of n so the anchor time can be either in the past or in the future.

This function should be called after calling nrf_802154_csl_writer_period_set and every time when the CSL communication desynchronizes.

If this function is not called a legacy CSL operation mode is chosen. The CSL phase is then calculated based on the time of the nearest scheduled CSL reception window and can be undefined, if no such window was scheduled.

Parameters
[in]anchor_timeAnchor time in microseconds.