Radio Control Layer (RCL)
ble_cs.h File Reference
#include <ti/drivers/rcl/RCL_Command.h>
#include <ti/drivers/rcl/RCL_Buffer.h>
#include <ti/drivers/rcl/handlers/ble_cs.h>
#include <ti/drivers/utils/List.h>
+ Include dependency graph for ble_cs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RCL_CmdBleCs_IQSample
 BLE Channel Sounding IQ Sample. More...
 
struct  RCL_CmdBleCs
 BLE Channel Sounding. More...
 
struct  RCL_CmdBleCs_Step_Internal
 BLE Channel Sounding Step. More...
 
struct  MagnData
 BLE Channel Sounding QQ data. More...
 
struct  RCL_CmdBleCs_StepResult_Internal
 BLE Channel Sounding Step Result. More...
 
union  S2RSample
 BLE Channel Sounding S2R Sample type definition. More...
 
struct  RCL_CmdBleCs_S2r
 BLE Channel Sounding S2R IQ Data. More...
 
struct  RCL_CmdBleCs_Stats
 BLE Channel Sounding Statistics. More...
 
struct  RCL_CmdBleCs_DCSample
 BLE Channel Sounding DC Sample. More...
 
struct  RCL_CmdBleCs_PrecalEntry
 DC precalibration entry. More...
 
struct  RCL_CmdBleCs_PrecalTable
 DC precalibration table. More...
 
struct  RCL_CmdBleCs_Precal
 DC precalibration command. More...
 
struct  RCL_CmdBleCs_PctCompEntry
 Channel entry for PCT compensation for antenna/front-end delay. More...
 
struct  RCL_CmdBleCs_PctCompTable
 PCT compensation table for antenna/front-end delay. More...
 
struct  RCL_CmdBleCs_Step
 Container format for a single step in the subevent. More...
 
struct  RCL_CmdBleCs_SubeventResults
 Container format for a batch of step results in the subevent (first segment) More...
 
struct  RCL_CmdBleCs_SubeventResultsContinue
 Container format for a batch of step results in the subevent (second+ segment) More...
 
struct  RCL_CmdBleCs_Tone
 Container format for tones. More...
 
struct  RCL_CmdBleCs_Result
 Container format for common section of step results. More...
 
struct  RCL_CmdBleCs_ResultI0
 Container format for mode-0 step results. More...
 
struct  RCL_CmdBleCs_ResultR0
 Container format for mode-0 step results. More...
 
struct  RCL_CmdBleCs_ResultIR1
 Container format for mode-1 step results. More...
 
struct  RCL_CmdBleCs_ResultIR2
 Container format for mode-2 step results. More...
 
struct  RCL_CmdBleCs_ResultIR3
 Container format for mode-3 step results. More...
 
union  RCL_CMD_BLE_CS_t.mode
 
struct  RCL_CMD_BLE_CS_t.mode.__unnamed__
 
struct  RCL_CMD_BLE_CS_t.antennaConfig
 
struct  RCL_CMD_BLE_CS_t.timing
 
struct  RCL_CMD_BLE_CS_t.frontend
 

Macros

#define RCL_CMDID_BLE_CS   0x1101U
 
#define RCL_CMDID_BLE_CS_PRECAL   0x1102U
 
#define RCL_BLE_CS_US_TO_MCE_TIMER(x)   ((x)*48)
 
#define RCL_BLE_CS_US_TO_PBE_TIMER(x)   ((x)*4)
 
#define RCL_BLE_CS_MCE_TIMER_TO_US(x)   ((x)/48)
 
#define RCL_BLE_CS_PBE_TIMER_TO_US(x)   ((x)/12)
 
#define RCL_BLE_CS_MCE_TIMER_TO_PBE_TIMER(x)   ((x)/4)
 
#define RCL_BLE_CS_DELAY_PS_TO_LUT(x)   (((x)+16)/32)
 
#define RCL_BLE_CS_MAX_NUM_ANT   4
 
#define RCL_BLE_CS_MAX_NUM_ANT_PATH   5
 
#define RCL_BLE_CS_MAX_PAYLOAD_SIZE   4
 
#define RCL_BLE_CS_NUM_CORR   3
 
#define RCL_BLE_CS_NUM_STIM   2
 
#define RCL_BLE_CS_MAX_S2R_LEN   1024
 
#define RCL_BLE_CS_NUM_RX_GAIN_LEVEL   2
 
#define RCL_BLE_CS_STEP_RX_GAIN_DB   3
 
#define RCL_BLE_CS_NUM_PRECAL_CHANNELS   8
 
#define RCL_CmdBleCs_Default()
 
#define RCL_CmdBleCs_DefaultRuntime()   (RCL_CmdBleCs) RCL_CmdBleCs_Default()
 
#define RCL_CmdBleCs_PrecalTable_Default()
 
#define RCL_CmdBleCs_Precal_Default(pTable)
 
#define RCL_CmdBleCs_Precal_DefaultRuntime(pTable)   (RCL_CmdBleCs_Precal) RCL_CmdBleCs_Precal_Default(pTable)
 
#define RCL_BLE_CS_PHASE_DELAY_PS   (1500UL)
 
#define RCL_CmdBleCs_PctCompTable_Default()
 
#define RCL_CMD_BLE_CS_FREQCOMP_NA   0xC000
 
#define RCL_CMD_BLE_CS_TOAD_NA   0x8000
 
#define RCL_CMD_BLE_CS_RSSI_NA   0x7F
 
#define RCL_CMD_BLE_CS_SUBEVENT_RESULTS_OPCODE   0x31
 
#define RCL_CMD_BLE_CS_SUBEVENT_RESULTS_CONTINUE_OPCODE   0x32
 

Typedefs

typedef enum RCL_CMD_BLE_CS_Phy_e RCL_CmdBleCs_Phy
 
typedef enum RCL_CMD_BLE_CS_Role_e RCL_CmdBleCs_Role
 
typedef enum RCL_CMD_BLE_CS_StepMode_e RCL_CmdBleCs_StepMode
 
typedef enum RCL_CMD_BLE_CS_PacketResult_e RCL_CmdBleCs_PacketResult
 
typedef enum RCL_CMD_BLE_CS_Tfcs_e RCL_CmdBleCs_Tfcs
 
typedef enum RCL_CMD_BLE_CS_Tpm_e RCL_CmdBleCs_Tpm
 
typedef enum RCL_CMD_BLE_CS_Tip_e RCL_CmdBleCs_Tip
 
typedef enum RCL_CMD_BLE_CS_Tsw_e RCL_CmdBleCs_Tsw
 
typedef enum RCL_CMD_BLE_CS_AntennaConfig_e RCL_CmdBleCs_AntennaConfig
 
typedef enum RCL_CMD_BLE_CS_Payload_e RCL_CmdBleCs_Payload
 
typedef enum RCL_CMD_BLE_CS_RxGain_e RCL_CmdBleCs_RxGain
 
typedef enum RCL_CMD_BLE_CS_ToneQuality_e RCL_CmdBleCs_ToneQuality
 
typedef enum RCL_CMD_BLE_CS_ToneExtensionSlot_e RCL_CmdBleCs_ToneExtensionSlot
 
typedef enum RCL_CMD_BLE_CS_ReportFormat_e RCL_CmdBleCs_ReportFormat
 
typedef enum RCL_CMD_BLE_CS_PacketAntenna_e RCL_CmdBleCs_PacketAntenna
 
typedef enum RCL_CMD_BLE_CS_Nadm_e RCL_CmdBleCs_Nadm
 
typedef void(* RCL_CmdBleCs_PrecalCallback) (RCL_CmdBleCs_PrecalTable *table, uint8_t channel, RCL_CmdBleCs_IQSample *pHigh, RCL_CmdBleCs_IQSample *pLow)
 Callback function for DC precalibration feature. More...
 

Enumerations

enum  RCL_CMD_BLE_CS_Phy_e { RCL_CmdBleCs_Phy_1M, RCL_CmdBleCs_Phy_2M, RCL_CmdBleCs_Phy_2M2BT, RCL_CmdBleCs_Phy_Length }
 Enumerator of phy types. More...
 
enum  RCL_CMD_BLE_CS_Role_e { RCL_CmdBleCs_Role_Initiator, RCL_CmdBleCs_Role_Reflector, RCL_CmdBleCs_Role_Length }
 Enumerator of role types. More...
 
enum  RCL_CMD_BLE_CS_StepMode_e {
  RCL_CmdBleCs_StepMode_0, RCL_CmdBleCs_StepMode_1, RCL_CmdBleCs_StepMode_2, RCL_CmdBleCs_StepMode_3,
  RCL_CmdBleCs_StepMode_Length
}
 Enumerator of step types. More...
 
enum  RCL_CMD_BLE_CS_PacketResult_e {
  RCL_CmdBleCs_PacketResult_Error = -1, RCL_CmdBleCs_PacketResult_Ok = 0, RCL_CmdBleCs_PacketResult_BitError = 1, RCL_CmdBleCs_PacketResult_Lost = 2,
  RCL_CmdBleCs_PacketResult_Length
}
 Enumerator of packet status options. More...
 
enum  RCL_CMD_BLE_CS_Tfcs_e {
  RCL_CmdBleCs_Tfcs_80us, RCL_CmdBleCs_Tfcs_100us, RCL_CmdBleCs_Tfcs_120us, RCL_CmdBleCs_Tfcs_150us,
  RCL_CmdBleCs_Tfcs_Length
}
 Enumerator of tFcs duration options. More...
 
enum  RCL_CMD_BLE_CS_Tpm_e { RCL_CmdBleCs_Tpm_10us, RCL_CmdBleCs_Tpm_20us, RCL_CmdBleCs_Tpm_40us, RCL_CmdBleCs_Tpm_Length }
 Enumerator of tPm duration options. More...
 
enum  RCL_CMD_BLE_CS_Tip_e {
  RCL_CmdBleCs_Tip_40us, RCL_CmdBleCs_Tip_50us, RCL_CmdBleCs_Tip_60us, RCL_CmdBleCs_Tip_80us,
  RCL_CmdBleCs_Tip_145us, RCL_CmdBleCs_Tip_Length
}
 Enumerator of tIp duration. More...
 
enum  RCL_CMD_BLE_CS_Tsw_e {
  RCL_CmdBleCs_Tsw_0us, RCL_CmdBleCs_Tsw_1us, RCL_CmdBleCs_Tsw_2us, RCL_CmdBleCs_Tsw_4us,
  RCL_CmdBleCs_Tsw_10us, RCL_CmdBleCs_Tsw_Length
}
 Enumerator of antenna switch duration. More...
 
enum  RCL_CMD_BLE_CS_AntennaConfig_e {
  RCL_CmdBleCs_AntennaConfig_1x1, RCL_CmdBleCs_AntennaConfig_2x1, RCL_CmdBleCs_AntennaConfig_3x1, RCL_CmdBleCs_AntennaConfig_4x1,
  RCL_CmdBleCs_AntennaConfig_1x2, RCL_CmdBleCs_AntennaConfig_1x3, RCL_CmdBleCs_AntennaConfig_1x4, RCL_CmdBleCs_AntennaConfig_2x2,
  RCL_CmdBleCs_AntennaConfig_Length
}
 Enumerator of antenna configuration. More...
 
enum  RCL_CMD_BLE_CS_Payload_e {
  RCL_CmdBleCs_Payload_None, RCL_CmdBleCs_Payload_32bit, RCL_CmdBleCs_Payload_64bit, RCL_CmdBleCs_Payload_96bit,
  RCL_CmdBleCs_Payload_128bit, RCL_CmdBleCs_Payload_Length
}
 Enumerator of payload length. More...
 
enum  RCL_CMD_BLE_CS_RxGain_e { RCL_CmdBleCs_RxGain_Auto = 0, RCL_CmdBleCs_RxGain_Low = 7, RCL_CmdBleCs_RxGain_High = 15 }
 Enumerator of RX gain. More...
 
enum  RCL_CMD_BLE_CS_ToneQuality_e {
  RCL_CmdBleCs_ToneQuality_High, RCL_CmdBleCs_ToneQuality_Medium, RCL_CmdBleCs_ToneQuality_Low, RCL_CmdBleCs_ToneQuality_Unavailable,
  RCL_CmdBleCs_ToneQuality_Length
}
 Enumerator of tone quality. More...
 
enum  RCL_CMD_BLE_CS_ToneExtensionSlot_e { RCL_CmdBleCs_ToneExtensionSlot_Disabled, RCL_CmdBleCs_ToneExtensionSlot_Enabled_NoToneExpected, RCL_CmdBleCs_ToneExtensionSlot_Enabled_ToneExpected, RCL_CmdBleCs_ToneExtensionSlot_Length }
 Enumerator of tone extension slot. More...
 
enum  RCL_CMD_BLE_CS_ReportFormat_e { RCL_CmdBleCs_ReportFormat_HCI = 0, RCL_CmdBleCs_ReportFormat_Custom = 1 }
 Enumerator of report format. More...
 
enum  RCL_CMD_BLE_CS_PacketAntenna_e { RCL_CmdBleCs_PacketAntenna_1 = 1, RCL_CmdBleCs_PacketAntenna_2 = 2, RCL_CmdBleCs_PacketAntenna_3 = 3, RCL_CmdBleCs_PacketAntenna_4 = 4 }
 
enum  RCL_CMD_BLE_CS_Nadm_e {
  RCL_CmdBleCs_Nadm_ExtremelyUnlikely, RCL_CmdBleCs_Nadm_VeryUnlikely, RCL_CmdBleCs_Nadm_Unlikely, RCL_CmdBleCs_Nadm_Possible,
  RCL_CmdBleCs_Nadm_Likely, RCL_CmdBleCs_Nadm_VeryLikely, RCL_CmdBleCs_Nadm_ExtremelyLikely, RCL_CmdBleCs_Nadm_Unknown = 0xFF
}
 

Functions

void RCL_Handler_BLE_CS_PrecalDefaultCallback (RCL_CmdBleCs_PrecalTable *table, uint8_t channel, RCL_CmdBleCs_IQSample *pHigh, RCL_CmdBleCs_IQSample *pLow)
 
struct RCL_CMD_BLE_CS_SUBEVENT_RESULTS_t __attribute__ ((packed))
 

Variables

uint8_t subeventCode
 
uint16_t connectionHandle
 
uint8_t configID
 
uint16_t startAclConnectionEvent
 
uint16_t procedureCounter
 
int16_t frequencyCompensation
 
int8_t referencePowerLevel
 
uint8_t procedureDoneStatus
 
uint8_t subeventDoneStatus
 
uint8_t abortReason
 
uint8_t numAntennaPath
 
uint8_t numStepsReported
 
uint8_t data []
 
struct RCL_CMD_BLE_CS_STEP_RESULTS_TONE_t __attribute__
 
uint8_t mode
 
uint8_t channel
 
uint8_t dataLength
 

Data Structure Documentation

§ RCL_CMD_BLE_CS_IQ_SAMPLE_t

struct RCL_CMD_BLE_CS_IQ_SAMPLE_t

BLE Channel Sounding IQ Sample.

Container to store complex vectors

Data Fields
int16_t i

Sample I-branch

int16_t q

Sample Q-branch

§ RCL_CMD_BLE_CS_t

struct RCL_CMD_BLE_CS_t

BLE Channel Sounding.

Command to execute a BLE Channel Sounding event

Data Fields
RCL_Command common
union RCL_CMD_BLE_CS_t mode
struct RCL_CMD_BLE_CS_t antennaConfig
struct RCL_CMD_BLE_CS_t timing
struct RCL_CMD_BLE_CS_t frontend
int16_t foffOverride

Frequency offset compensation override value in [4xFOFF = 4x (FRF/2^21)] units.

uint8_t foffOverrideEnable:1

Disables automatic frequency offset estimation and enforces the use of the provided override value

uint8_t reportFormat

Select a vendor specific report format instead of the default HCI LE CS subevent result

RCL_CmdBleCs_PrecalTable * precalTable

Pointer to a table contains DC values from precalibration

RCL_CmdBleCs_StepResult_Internal * results

Pointer to result list

RCL_CmdBleCs_Stats * stats

Pointer to statistics structure

List_List stepBuffers

Linked list of steps to be executed

List_List stepBuffersDone

Linked list of steps have been executed

List_List resultBuffers

Linked list of empty result buffers

List_List resultBuffersDone

Linked list of result buffers containing data

List_List s2rBuffers

Linked list of empty s2r containers

List_List s2rBuffersDone

Linked list of s2r containers with data

§ RCL_CMD_BLE_CS_STEP_INTERNAL_t

struct RCL_CMD_BLE_CS_STEP_INTERNAL_t

BLE Channel Sounding Step.

Descriptor to configure a single step within the BLE Channel Sounding Event

Data Fields
uint16_t channelIdx

Integer index of channel information (0: 2402MHz)

uint16_t mode

Step mode RCL_CmdBleCs_StepMode

uint16_t toneExtension

Configuration of tone extension

uint16_t payloadLen

Length of payload in units of 32bit words RCL_CmdBleCs_Payload

uint16_t foffErr

Internal! Used for frequency offset compensation

uint16_t tAdjustA

Internal! Used for timegrid adjustment

uint16_t tAdjustB

Internal! Used for timegrid adjustment

uint16_t reserved0
RCL_CmdBleCs_IQSample dcComp[RCL_BLE_CS_NUM_RX_GAIN_LEVEL]

Internal! Used for DC compensation with precalibrated values

uint32_t payloadTx[RCL_BLE_CS_MAX_PAYLOAD_SIZE]

Payload to transmit containing random bit sequence (TX)

uint32_t payloadRx[RCL_BLE_CS_MAX_PAYLOAD_SIZE]

Expected payload to receive containing random bit sequence (RX)

uint32_t aaTx

Access Address to be transmitted

uint32_t aaRx

Access Address to be received

uint8_t antennaPermIdx

Index of entry to be used from the antenna permutation table RCL_CmdBleCs_AntennaConfig

uint8_t antennaPacket

Index of physical antenna to be used for all packet exchanges RCL_CMD_BLE_CS_PacketAntenna_e

uint16_t antennaSequence

Internal! Decoded antenna control sequence based on permutation table

uint16_t tStep

Internal! The total duration of step dynamically calculated

uint16_t tAntennaA

Internal! Antenna timing adjustment

uint16_t tAntennaB

Internal! Antenna timing adjustment

uint16_t reserved1

§ MagnData

struct MagnData

BLE Channel Sounding QQ data.

Container to store RSSI data for postprocess of the quality of tone

Data Fields
int16_t magnMin

Minimum of signal magnitude during TPM

int16_t magnMax

Maximum of signal magnitude during TPM

int16_t magnAvg

Average of signal magnitude during TPM

int16_t magnAvgdB

Average of signal magnitude during TPM in dB

§ RCL_CMD_BLE_CS_STEP_RESULT_INTERNAL_t

struct RCL_CMD_BLE_CS_STEP_RESULT_INTERNAL_t

BLE Channel Sounding Step Result.

Container to store the results of a single step within the BLE Channel Sounding Event

+ Collaboration diagram for RCL_CmdBleCs_StepResult_Internal:
Data Fields
uint16_t channelIdx

Integer index of channel information (0: 2402MHz)

uint16_t mode

Step mode RCL_CmdBleCs_StepMode

uint16_t toneExtension

Configuration of tone extension

uint16_t payloadLen

Length of payload in units of 32bit words RCL_CmdBleCs_Payload

uint16_t reserved
int16_t foffMeasured

Frequency offset between devices (only set on Initiator Mode 0)

uint16_t pktResult

Result of packet reception RCL_CmdBleCs_PacketResult

uint8_t gain

LNA gain used (Low/High)

int8_t pktRssi

Receiver Signal Strength Indicator [dBm] captured during packet reception

uint16_t rtt

RTT timestamp

uint16_t corr[RCL_BLE_CS_NUM_CORR]

Correlator before-peak-after values for fractional time estimation

RCL_CmdBleCs_IQSample dc

DC offset measured on packet

RCL_CmdBleCs_IQSample pct[RCL_BLE_CS_MAX_NUM_ANT_PATH]

Phase Correction Terms per antenna path (incl. extension)

uint32_t payload[RCL_BLE_CS_MAX_PAYLOAD_SIZE]

Payload containing random bit sequence (RX)

MagnData magn[RCL_BLE_CS_MAX_NUM_ANT_PATH]

Received magnitude data of tone per antenna path for quality estimation (incl. extension)

uint8_t antennaPermIdx

Index of entry to be used from the antenna permutation table RCL_CmdBleCs_AntennaConfig

uint8_t antennaPacket

Index of physical antenna to be used for all packet exchanges RCL_CMD_BLE_CS_PacketAntenna_e

uint16_t reserved1

§ S2RSample

union S2RSample

BLE Channel Sounding S2R Sample type definition.

One S2R sample can be interpreted multiple ways, depending of the signal source

Data Fields
uint32_t word

Sample format for copying data

uint8_t byte[4]

Sample format of the Decoding Stage

RCL_CmdBleCs_IQSample iq

Sample format of the Front End Stage

§ RCL_CMD_BLE_CS_S2R_t

struct RCL_CMD_BLE_CS_S2R_t

BLE Channel Sounding S2R IQ Data.

Container to store raw S2R samples of a BLE Channel Sounding Step

+ Collaboration diagram for RCL_CmdBleCs_S2r:
Data Fields
uint8_t idx

The index of entry in the step list which the data belongs to

uint8_t phy

Phy the samples captured on

uint8_t channel

Frequency channel

uint8_t payloadLen

Payload length in bits

uint32_t payload0

Payload bits [00:31]

uint32_t payload1

Payload bits [32:63]

uint32_t payload2

Payload bits [64:95]

uint32_t payload3

Payload bits [96:127]

uint16_t iqLength

Number of valid iq samples in data[]

uint16_t reserved
S2RSample data[]

Raw samples captured

§ RCL_CMD_BLE_CS_STATS_t

struct RCL_CMD_BLE_CS_STATS_t

BLE Channel Sounding Statistics.

Container to store the statistical outputs of the BLE Channel Sounding Event

Data Fields
uint16_t nStepsWritten

Number of steps sent to the PBE through the FIFO

uint16_t nResultsRead

Number of results read from the PBE through the FIFO

uint16_t nStepsDone

Number of steps have been executed by the PBE

uint16_t nRxOk

Number of steps where pktResult == OK, filled by the CM0

uint16_t nRxNok

Number of steps where pktResult != OK, filled by the CM0

uint8_t nS2RDone

Number of Samples-To-Ram containers filled by the CM0

int8_t lastRssi

Last valid RSSI received by the PBE

int16_t lastFoff

Last valid frequency offset received by the PBE

int16_t foffComp

Frequency offset compensation value

uint8_t numAntennaPath

Number of true antenna paths (1...4)

uint8_t rplScaler

Log2 scaler of the internal PCT values when converting to HCI format

uint16_t reserved

§ RCL_CMD_BLE_CS_DC_SAMPLE_t

struct RCL_CMD_BLE_CS_DC_SAMPLE_t

BLE Channel Sounding DC Sample.

Container to store DC information

Data Fields
int16_t i

DC I-branch

int16_t q

DC Q-branch

int8_t phaseStart

Cordic at start of integration

int8_t phaseStop

Cordic at stop of integration

uint16_t magnMin

Minimum value of signal magnitude during integration

uint16_t magnMax

Maximum value of signal magnitude during integration

uint16_t magnAvg

Average value of signal magnitude during integration

§ RCL_CMD_BLE_CS_PRECAL_ENTRY_t

struct RCL_CMD_BLE_CS_PRECAL_ENTRY_t

DC precalibration entry.

Data structure to store a single DC precalibration entry.

Data Fields
uint8_t channel
uint8_t lowValid: 1
uint8_t highValid: 1
RCL_CmdBleCs_DCSample high
RCL_CmdBleCs_DCSample low

§ RCL_CMD_BLE_CS_PRECAL_TABLE_t

struct RCL_CMD_BLE_CS_PRECAL_TABLE_t

DC precalibration table.

Data structure to store and use the DC precalibration table.

Data Fields
RCL_CmdBleCs_PrecalCallback callback
uint32_t timestamp
uint8_t highThreshold
uint8_t lowThreshold
uint8_t rxGain
int8_t temperature
uint8_t chSpacing
uint8_t numEntries: 7
uint8_t valid: 1
RCL_CmdBleCs_PrecalEntry entries[]

§ RCL_CMD_BLE_CS_PRECAL_t

struct RCL_CMD_BLE_CS_PRECAL_t

DC precalibration command.

Command to run precalibration for a list of channels.

Data Fields
RCL_Command common
RCL_CmdBleCs_PrecalTable * table

§ RCL_CMD_BLE_CS_PCT_COMP_ENTRY_t

struct RCL_CMD_BLE_CS_PCT_COMP_ENTRY_t

Channel entry for PCT compensation for antenna/front-end delay.

Data structure for PCT compensation for antenna delay (phase) and magnitude.

Data Fields
uint8_t phaseDelay

Phase delay to subtract, in multiple of 32 picoseconds (i.e. max compensation is 255*32=8.16ns)

uint8_t magnCoeff

Linear magnitude compensation coefficient of I/Q of PCT, k = magnCoeff/128

§ RCL_CMD_BLE_CS_PCT_COMP_TABLE_t

struct RCL_CMD_BLE_CS_PCT_COMP_TABLE_t

PCT compensation table for antenna/front-end delay.

Data describing the magnitude/phase compensation to adjust PCT due to antenna/fronte-end.

Data Fields
uint8_t firstChannelIdx

Integer channel index (0: 2402MHz) for first entry

uint8_t chSpacing: 7

Channel spacing between entries in the table, assuming uniform spacing

uint8_t enPhaseComp: 1

Enable phase compensation

uint8_t enMagnComp: 1

Enable magnitude compensation

uint8_t numEntries: 7

Number of channel entries per antenna

RCL_CmdBleCs_PctCompEntry entries[]

§ RCL_CMD_BLE_CS_STEP_t

struct RCL_CMD_BLE_CS_STEP_t

Container format for a single step in the subevent.

Compressed format used within a multibuffer

Data Fields
uint32_t channelIdx: 7

Integer index of channel information (0: 2402MHz)

uint32_t mode: 2

Step mode RCL_CmdBleCs_StepMode

uint32_t antennaPacket: 3

Index of physical antenna for the packet exchange RCL_CMD_BLE_CS_PacketAntenna_e

uint32_t antennaPermIdx: 5

Index of entry to be used from the antenna permutation table RCL_CmdBleCs_AntennaConfig

uint32_t toneExtension: 2

Enable tone extension, [0]=first tone (transmitted by initiator), [1]=second tone (transmitted by reflector)

uint32_t payloadLen: 3

Length of payload in units of 32bit words RCL_CmdBleCs_Payload

uint32_t reserved: 10
uint32_t aaTx

Access Address to be transmitted

uint32_t aaRx

Access Address to be received

uint32_t payloadTx[RCL_BLE_CS_MAX_PAYLOAD_SIZE]

Payload to transmit containing random bit sequence (TX)

uint32_t payloadRx[RCL_BLE_CS_MAX_PAYLOAD_SIZE]

Expected payload to receive containing random bit sequence (RX)

§ RCL_CMD_BLE_CS_SUBEVENT_RESULTS_t

struct RCL_CMD_BLE_CS_SUBEVENT_RESULTS_t

Container format for a batch of step results in the subevent (first segment)

The data[] field contains the results in mode specific format (size varies with step-mode)

Data Fields
uint8_t subeventCode
uint16_t connectionHandle
uint8_t configID
uint16_t startAclConnectionEvent
uint16_t procedureCounter
int16_t frequencyCompensation
int8_t referencePowerLevel
uint8_t procedureDoneStatus
uint8_t subeventDoneStatus
uint8_t abortReason
uint8_t numAntennaPath
uint8_t numStepsReported
uint8_t data[]

§ RCL_CMD_BLE_CS_SUBEVENT_RESULTS_CONTINUE_t

struct RCL_CMD_BLE_CS_SUBEVENT_RESULTS_CONTINUE_t

Container format for a batch of step results in the subevent (second+ segment)

The data[] field contains the results in mode specific format (size varies with step-mode)

Data Fields
uint8_t subeventCode
uint16_t connectionHandle
uint8_t configID
uint8_t procedureDoneStatus
uint8_t subeventDoneStatus
uint8_t abortReason
uint8_t numAntennaPath
uint8_t numStepsReported
uint8_t data[]

§ RCL_CMD_BLE_CS_STEP_RESULTS_TONE_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_TONE_t

Container format for tones.

Data Fields
uint32_t i: 12
uint32_t q: 12
uint32_t quality: 8

§ RCL_CMD_BLE_CS_STEP_RESULTS_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_t

Container format for common section of step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t data[]

§ RCL_CMD_BLE_CS_STEP_RESULTS_I0_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_I0_t

Container format for mode-0 step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t packetAAQuality
int8_t packetRssi
uint8_t packetAntenna
int16_t measuredFreqOffset

§ RCL_CMD_BLE_CS_STEP_RESULTS_R0_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_R0_t

Container format for mode-0 step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t packetAAQuality
int8_t packetRssi
uint8_t packetAntenna

§ RCL_CMD_BLE_CS_STEP_RESULTS_IR1_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_IR1_t

Container format for mode-1 step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t packetAAQuality
uint8_t nadm
int8_t packetRssi
int16_t packetToF
uint8_t packetAntenna

§ RCL_CMD_BLE_CS_STEP_RESULTS_IR2_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_IR2_t

Container format for mode-2 step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t antennaPermutationIndex
RCL_CmdBleCs_Tone tones[]

§ RCL_CMD_BLE_CS_STEP_RESULTS_IR3_t

struct RCL_CMD_BLE_CS_STEP_RESULTS_IR3_t

Container format for mode-3 step results.

Data Fields
uint8_t mode
uint8_t channel
uint8_t dataLength
uint8_t packetAAQuality
uint8_t nadm
int8_t packetRssi
int16_t packetToF
uint8_t packetAntenna
uint8_t antennaPermutationIndex
RCL_CmdBleCs_Tone tones[]

§ RCL_CMD_BLE_CS_t.mode

union RCL_CMD_BLE_CS_t.mode
Data Fields
mode __unnamed__
uint16_t val

§ RCL_CMD_BLE_CS_t.mode.__unnamed__

struct RCL_CMD_BLE_CS_t.mode.__unnamed__
Data Fields
uint16_t role:2

Role of the device RCL_CmdBleCs_Role

uint16_t phy:2

Phy used for packet exchange RCL_CmdBleCs_Phy

uint16_t repeatSteps:1

Enable continuous repetition of step list

uint16_t chFilterEnable:1

Enable filtering of restricted channels at (2402, 2403, 2425, 2426, 2427, 2479, 2480 MHz)

uint16_t precal:1

Enable usage of DC precalibration values

uint16_t reserved:1
uint16_t nSteps:8

Total number of steps within the BLE CS Sub-Event

§ RCL_CMD_BLE_CS_t.antennaConfig

struct RCL_CMD_BLE_CS_t.antennaConfig
Data Fields
uint8_t select

Antenna path configuration by index RCL_CmdBleCs_AntennaConfig

uint8_t gpoMask

IO mask defining the actively used pins for antenna control

uint8_t gpoVal[RCL_BLE_CS_MAX_NUM_ANT]

IO value to be used to activate the corresponding antenna ([0]:ANT0, [1]:ANT1, [2]:ANT3, [3]:ANT3)

§ RCL_CMD_BLE_CS_t.timing

struct RCL_CMD_BLE_CS_t.timing
Data Fields
uint16_t tFcs

Config of time of Frequency Change period RCL_CmdBleCs_Tfcs

uint16_t tFm

Config of time of Frequency Measurement period

uint16_t tPm

Config of time of Phase Measurement Duration RCL_CmdBleCs_Tpm

uint16_t tIp1

Config of time of Interlude Period 1 RCL_CmdBleCs_Tip

uint16_t tIp2

Config of time of Interlude Period 2 RCL_CmdBleCs_Tip

uint16_t tRxWideningR0

Config of additional time of RX timeout of mode-0 steps on reflector.

uint16_t tSw

Config of time of Antenna Switching duration RCL_CmdBleCs_Tsw

uint16_t tSwAdjustA

Time adjustment of first set of antenna switching within a step (Pkt-Tn / ...)

uint16_t tSwAdjustB

Time adjustment of second set of antenna switching within a step (... / Tn-Pkt)

§ RCL_CMD_BLE_CS_t.frontend

struct RCL_CMD_BLE_CS_t.frontend
Data Fields
RCL_Command_TxPower txPower

Transmit power

uint8_t rxGain

0: Automatic Gain Control enabled, 1...15: Index value of manual RX gain RCL_CmdBleCs_RxGain

Macro Definition Documentation

§ RCL_CMDID_BLE_CS

#define RCL_CMDID_BLE_CS   0x1101U

§ RCL_CMDID_BLE_CS_PRECAL

#define RCL_CMDID_BLE_CS_PRECAL   0x1102U

§ RCL_BLE_CS_US_TO_MCE_TIMER

#define RCL_BLE_CS_US_TO_MCE_TIMER (   x)    ((x)*48)

§ RCL_BLE_CS_US_TO_PBE_TIMER

#define RCL_BLE_CS_US_TO_PBE_TIMER (   x)    ((x)*4)

§ RCL_BLE_CS_MCE_TIMER_TO_US

#define RCL_BLE_CS_MCE_TIMER_TO_US (   x)    ((x)/48)

§ RCL_BLE_CS_PBE_TIMER_TO_US

#define RCL_BLE_CS_PBE_TIMER_TO_US (   x)    ((x)/12)

§ RCL_BLE_CS_MCE_TIMER_TO_PBE_TIMER

#define RCL_BLE_CS_MCE_TIMER_TO_PBE_TIMER (   x)    ((x)/4)

§ RCL_BLE_CS_DELAY_PS_TO_LUT

#define RCL_BLE_CS_DELAY_PS_TO_LUT (   x)    (((x)+16)/32)

§ RCL_BLE_CS_MAX_NUM_ANT

#define RCL_BLE_CS_MAX_NUM_ANT   4

§ RCL_BLE_CS_MAX_NUM_ANT_PATH

#define RCL_BLE_CS_MAX_NUM_ANT_PATH   5

§ RCL_BLE_CS_MAX_PAYLOAD_SIZE

#define RCL_BLE_CS_MAX_PAYLOAD_SIZE   4

§ RCL_BLE_CS_NUM_CORR

#define RCL_BLE_CS_NUM_CORR   3

§ RCL_BLE_CS_NUM_STIM

#define RCL_BLE_CS_NUM_STIM   2

§ RCL_BLE_CS_MAX_S2R_LEN

#define RCL_BLE_CS_MAX_S2R_LEN   1024

§ RCL_BLE_CS_NUM_RX_GAIN_LEVEL

#define RCL_BLE_CS_NUM_RX_GAIN_LEVEL   2

§ RCL_BLE_CS_STEP_RX_GAIN_DB

#define RCL_BLE_CS_STEP_RX_GAIN_DB   3

§ RCL_BLE_CS_NUM_PRECAL_CHANNELS

#define RCL_BLE_CS_NUM_PRECAL_CHANNELS   8

§ RCL_CmdBleCs_Default

#define RCL_CmdBleCs_Default ( )
Value:
{ \
}
#define RCL_CMDID_BLE_CS
Definition: ble_cs.h:87
#define RCL_Command_Default(_id, _handler)
Definition: RCL_Command.h:189
RCL_Events RCL_Handler_BLE_CS(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble_cs.c:2168

§ RCL_CmdBleCs_DefaultRuntime

#define RCL_CmdBleCs_DefaultRuntime ( )    (RCL_CmdBleCs) RCL_CmdBleCs_Default()

§ RCL_CmdBleCs_PrecalTable_Default

#define RCL_CmdBleCs_PrecalTable_Default ( )
Value:
{ \
.timestamp = 0, \
.highThreshold = 50, \
.lowThreshold = 10, \
.rxGain = 0xF7, \
.temperature = 0, \
.chSpacing = 10, \
.numEntries = 8, \
.valid = 0, \
.entries = {{.channel = 5}, \
{.channel = 15}, \
{.channel = 25}, \
{.channel = 35}, \
{.channel = 45}, \
{.channel = 55}, \
{.channel = 65}, \
{.channel = 75}}, \
}
void RCL_Handler_BLE_CS_PrecalDefaultCallback(RCL_CmdBleCs_PrecalTable *table, uint8_t channel, RCL_CmdBleCs_IQSample *pHigh, RCL_CmdBleCs_IQSample *pLow)
Definition: ble_cs.c:2451

§ RCL_CmdBleCs_Precal_Default

#define RCL_CmdBleCs_Precal_Default (   pTable)
Value:
{ \
.table = pTable \
}
RCL_Events RCL_Handler_BLE_CS_Precal(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble_cs.c:2321
#define RCL_CMDID_BLE_CS_PRECAL
Definition: ble_cs.h:88
#define RCL_Command_Default(_id, _handler)
Definition: RCL_Command.h:189

§ RCL_CmdBleCs_Precal_DefaultRuntime

#define RCL_CmdBleCs_Precal_DefaultRuntime (   pTable)    (RCL_CmdBleCs_Precal) RCL_CmdBleCs_Precal_Default(pTable)

§ RCL_BLE_CS_PHASE_DELAY_PS

#define RCL_BLE_CS_PHASE_DELAY_PS   (1500UL)

§ RCL_CmdBleCs_PctCompTable_Default

#define RCL_CmdBleCs_PctCompTable_Default ( )
Value:
{ \
.firstChannelIdx = 0, \
.chSpacing = 8, \
.enPhaseComp = 1, \
.enMagnComp = 0, \
.numEntries = 11, \
.entries = {{.phaseDelay = RCL_BLE_CS_DELAY_PS_TO_LUT(RCL_BLE_CS_PHASE_DELAY_PS)}, \
}
#define RCL_BLE_CS_PHASE_DELAY_PS
Definition: ble_cs.h:622
#define RCL_BLE_CS_DELAY_PS_TO_LUT(x)
Definition: ble_cs.h:96

§ RCL_CMD_BLE_CS_FREQCOMP_NA

#define RCL_CMD_BLE_CS_FREQCOMP_NA   0xC000

§ RCL_CMD_BLE_CS_TOAD_NA

#define RCL_CMD_BLE_CS_TOAD_NA   0x8000

§ RCL_CMD_BLE_CS_RSSI_NA

#define RCL_CMD_BLE_CS_RSSI_NA   0x7F

§ RCL_CMD_BLE_CS_SUBEVENT_RESULTS_OPCODE

#define RCL_CMD_BLE_CS_SUBEVENT_RESULTS_OPCODE   0x31

§ RCL_CMD_BLE_CS_SUBEVENT_RESULTS_CONTINUE_OPCODE

#define RCL_CMD_BLE_CS_SUBEVENT_RESULTS_CONTINUE_OPCODE   0x32

Typedef Documentation

§ RCL_CmdBleCs_Phy

§ RCL_CmdBleCs_Role

§ RCL_CmdBleCs_StepMode

§ RCL_CmdBleCs_PacketResult

§ RCL_CmdBleCs_Tfcs

§ RCL_CmdBleCs_Tpm

§ RCL_CmdBleCs_Tip

§ RCL_CmdBleCs_Tsw

§ RCL_CmdBleCs_AntennaConfig

§ RCL_CmdBleCs_Payload

§ RCL_CmdBleCs_RxGain

§ RCL_CmdBleCs_ToneQuality

§ RCL_CmdBleCs_ToneExtensionSlot

§ RCL_CmdBleCs_ReportFormat

§ RCL_CmdBleCs_PacketAntenna

§ RCL_CmdBleCs_Nadm

§ RCL_CmdBleCs_PrecalCallback

typedef void(* RCL_CmdBleCs_PrecalCallback) (RCL_CmdBleCs_PrecalTable *table, uint8_t channel, RCL_CmdBleCs_IQSample *pHigh, RCL_CmdBleCs_IQSample *pLow)

Callback function for DC precalibration feature.

Describes the method that can select the right compensation value from the available precalibration table.

Enumeration Type Documentation

§ RCL_CMD_BLE_CS_Phy_e

Enumerator of phy types.

Describes the phy packets shall be transmitted

Enumerator
RCL_CmdBleCs_Phy_1M 

(M) 1Mbps BT=0.5

RCL_CmdBleCs_Phy_2M 

(O) 2Mbps BT=0.5

RCL_CmdBleCs_Phy_2M2BT 

(O) 2Mbps BT=2.0

RCL_CmdBleCs_Phy_Length 

§ RCL_CMD_BLE_CS_Role_e

Enumerator of role types.

Describes the role of the device during a BLE channel sounding event

Enumerator
RCL_CmdBleCs_Role_Initiator 

(C.1) TX-RX

RCL_CmdBleCs_Role_Reflector 

(C.2) RX-TX

RCL_CmdBleCs_Role_Length 

§ RCL_CMD_BLE_CS_StepMode_e

Enumerator of step types.

Describes the available modes of a BLE CS step

Enumerator
RCL_CmdBleCs_StepMode_0 

(M) Pkt-Pkt-Tn

RCL_CmdBleCs_StepMode_1 

(M) Pkt-Pkt

RCL_CmdBleCs_StepMode_2 

(M) Tn-Tn

RCL_CmdBleCs_StepMode_3 

(O) Pkt-Tn-Tn-Pkt

RCL_CmdBleCs_StepMode_Length 

§ RCL_CMD_BLE_CS_PacketResult_e

Enumerator of packet status options.

Describes the available packet status words

Enumerator
RCL_CmdBleCs_PacketResult_Error 

NA for mode-2 steps, otherwise command execution error.

RCL_CmdBleCs_PacketResult_Ok 

The packet reception was succesfull

RCL_CmdBleCs_PacketResult_BitError 

The packet was received with one or more bit errors

RCL_CmdBleCs_PacketResult_Lost 

The packet reception was terminated by timeout

RCL_CmdBleCs_PacketResult_Length 

§ RCL_CMD_BLE_CS_Tfcs_e

Enumerator of tFcs duration options.

Describes the available durations for frequency change

Enumerator
RCL_CmdBleCs_Tfcs_80us 

(C.1)

RCL_CmdBleCs_Tfcs_100us 
RCL_CmdBleCs_Tfcs_120us 
RCL_CmdBleCs_Tfcs_150us 

(M)

RCL_CmdBleCs_Tfcs_Length 

§ RCL_CMD_BLE_CS_Tpm_e

Enumerator of tPm duration options.

Describes the available durations for phase measurement

Enumerator
RCL_CmdBleCs_Tpm_10us 
RCL_CmdBleCs_Tpm_20us 
RCL_CmdBleCs_Tpm_40us 

(M)

RCL_CmdBleCs_Tpm_Length 

§ RCL_CMD_BLE_CS_Tip_e

Enumerator of tIp duration.

Describes the available durations for interlude period

Enumerator
RCL_CmdBleCs_Tip_40us 

(C.1)

RCL_CmdBleCs_Tip_50us 
RCL_CmdBleCs_Tip_60us 
RCL_CmdBleCs_Tip_80us 

(C.1)

RCL_CmdBleCs_Tip_145us 

(M)

RCL_CmdBleCs_Tip_Length 

§ RCL_CMD_BLE_CS_Tsw_e

Enumerator of antenna switch duration.

Describes the available durations for antenna switching transient

Enumerator
RCL_CmdBleCs_Tsw_0us 

(M) for 1x1

RCL_CmdBleCs_Tsw_1us 
RCL_CmdBleCs_Tsw_2us 
RCL_CmdBleCs_Tsw_4us 
RCL_CmdBleCs_Tsw_10us 

(M)

RCL_CmdBleCs_Tsw_Length 

§ RCL_CMD_BLE_CS_AntennaConfig_e

Enumerator of antenna configuration.

Describes the available values for configuration of antenna control for PCT measurement.

Enumerator
RCL_CmdBleCs_AntennaConfig_1x1 

(M)

RCL_CmdBleCs_AntennaConfig_2x1 
RCL_CmdBleCs_AntennaConfig_3x1 
RCL_CmdBleCs_AntennaConfig_4x1 
RCL_CmdBleCs_AntennaConfig_1x2 
RCL_CmdBleCs_AntennaConfig_1x3 
RCL_CmdBleCs_AntennaConfig_1x4 
RCL_CmdBleCs_AntennaConfig_2x2 
RCL_CmdBleCs_AntennaConfig_Length 

§ RCL_CMD_BLE_CS_Payload_e

Enumerator of payload length.

Describes the available payload lengths

Enumerator
RCL_CmdBleCs_Payload_None 
RCL_CmdBleCs_Payload_32bit 
RCL_CmdBleCs_Payload_64bit 
RCL_CmdBleCs_Payload_96bit 
RCL_CmdBleCs_Payload_128bit 
RCL_CmdBleCs_Payload_Length 

§ RCL_CMD_BLE_CS_RxGain_e

Enumerator of RX gain.

Describes the available RX gain settings

Enumerator
RCL_CmdBleCs_RxGain_Auto 
RCL_CmdBleCs_RxGain_Low 
RCL_CmdBleCs_RxGain_High 

§ RCL_CMD_BLE_CS_ToneQuality_e

Enumerator of tone quality.

Describes the classification of tone quality

Enumerator
RCL_CmdBleCs_ToneQuality_High 
RCL_CmdBleCs_ToneQuality_Medium 
RCL_CmdBleCs_ToneQuality_Low 
RCL_CmdBleCs_ToneQuality_Unavailable 
RCL_CmdBleCs_ToneQuality_Length 

§ RCL_CMD_BLE_CS_ToneExtensionSlot_e

Enumerator of tone extension slot.

Describes the classification of tone extension slot

Enumerator
RCL_CmdBleCs_ToneExtensionSlot_Disabled 
RCL_CmdBleCs_ToneExtensionSlot_Enabled_NoToneExpected 
RCL_CmdBleCs_ToneExtensionSlot_Enabled_ToneExpected 
RCL_CmdBleCs_ToneExtensionSlot_Length 

§ RCL_CMD_BLE_CS_ReportFormat_e

Enumerator of report format.

Selects the format of step results

Enumerator
RCL_CmdBleCs_ReportFormat_HCI 
RCL_CmdBleCs_ReportFormat_Custom 

§ RCL_CMD_BLE_CS_PacketAntenna_e

Enumerator
RCL_CmdBleCs_PacketAntenna_1 

Default choice

RCL_CmdBleCs_PacketAntenna_2 
RCL_CmdBleCs_PacketAntenna_3 
RCL_CmdBleCs_PacketAntenna_4 

§ RCL_CMD_BLE_CS_Nadm_e

Enumerator
RCL_CmdBleCs_Nadm_ExtremelyUnlikely 
RCL_CmdBleCs_Nadm_VeryUnlikely 
RCL_CmdBleCs_Nadm_Unlikely 
RCL_CmdBleCs_Nadm_Possible 
RCL_CmdBleCs_Nadm_Likely 
RCL_CmdBleCs_Nadm_VeryLikely 
RCL_CmdBleCs_Nadm_ExtremelyLikely 
RCL_CmdBleCs_Nadm_Unknown 

Default value for RTT types that do not have a random or sounding sequence.

Function Documentation

§ RCL_Handler_BLE_CS_PrecalDefaultCallback()

void RCL_Handler_BLE_CS_PrecalDefaultCallback ( RCL_CmdBleCs_PrecalTable *  table,
uint8_t  channel,
RCL_CmdBleCs_IQSample *  pHigh,
RCL_CmdBleCs_IQSample *  pLow 
)

References BLE_CS_MAX_CHANNEL.

§ __attribute__()

struct RCL_CMD_BLE_CS_SUBEVENT_RESULTS_t __attribute__ ( (packed)  )

Variable Documentation

§ subeventCode

uint8_t subeventCode

§ connectionHandle

uint16_t connectionHandle

§ configID

uint8_t configID

§ startAclConnectionEvent

uint16_t startAclConnectionEvent

§ procedureCounter

uint16_t procedureCounter

§ frequencyCompensation

int16_t frequencyCompensation

§ referencePowerLevel

int8_t referencePowerLevel

§ procedureDoneStatus

uint8_t procedureDoneStatus

§ subeventDoneStatus

uint8_t subeventDoneStatus

§ abortReason

uint8_t abortReason

§ numAntennaPath

uint8_t numAntennaPath

§ numStepsReported

uint8_t numStepsReported

§ data

§ __attribute__

void __attribute__

§ mode

§ channel

§ dataLength