nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_vs_cs_params_set()

uint8_t sdc_hci_cmd_vs_cs_params_set ( const sdc_hci_cmd_vs_cs_params_set_t * p_params)

#include <softdevice_controller/include/sdc_hci_vs.h>

Set custom control parameters for CS.

Set various parameters for finer control of CS steps, events and procedures.

The cs_param_type is used to determine the parameters being set and how to interpret the data in the cs_param_data.

If cs_param_type is SDC_HCI_VS_CS_PARAM_TYPE_CS_EVENT_LENGTH_SET:

Set the event length for CS events.

In case the number of subevents per event is one, the event length is the same as the subevent length.

In case the number of subevents per event is greater than one, the event length is the total expected time occupied by all subevents and the spacing between them, given by the formula:

event length = T_SUBEVENT_INTERVAL x (N_SUBEVENTS_PER_EVENT - 1) + T_SUBEVENT_LEN

Some additional margin may also be needed.

If cs_param_type is SDC_HCI_VS_CS_PARAM_TYPE_CS_T_PM_SET:

Set the preferred tone length (T_PM) of CS tones

In Channel Sounding, tones in step mode-2 and -3 have a length of t_pm microseconds. T_PM can be 10, 20 or 40 microseconds.

Since the T_PM can affect the quality of tone measurements, it is important for certain use-cases to be able to set a preferred T_PM. The controller will then use this value when the LE CS Create Config command is issued.

If the local or peer device does not support the suggested preferred T_PM, it cannot be used. The controller will then select a T_PM value supported by both local and peer devices when the LE CS Create Config command is issued.

If cs_param_type is SDC_HCI_VS_CS_PARAM_TYPE_CS_BOARD_DISTANCE_OFFSET_SET: Set the distance offset in cm for the board. This can be used to compensate for delays on board which are causing an offset in distance estimates.

The distance offset is a signed value in centimeters. The distance offset is applied as phase rotations to the PCT measurements taken on that board.

When applying a distance offset the distance estimates are expected to be affected as follows: distance_estimate_with_offset = distance_estimate_without_offset - distance_offset

Note: Currently the distance offset is not applied to RTT measurements.

Event(s) generated (unless masked away):

When the command has completed, an HCI_Command_Complete event shall be generated.

Parameters
[in]p_paramsInput parameters.
Return values
0if success.
Returns
Returns value between 0x01-0xFF in case of error. See Vol 2, Part D, Error for a list of error codes and descriptions.