Radio Control Layer (RCL)
LRFCC23X0.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <ti/devices/DeviceFamily.h>
#include <ti/drivers/rcl/RCL_Types.h>
+ Include dependency graph for LRFCC23X0.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  LRF_TxPowerTable_Value
 Type for tx power configuration. More...
 
union  LRF_Events
 
struct  LRF_RegConfig
 
union  LRF_TxPowerTable_Index
 Index of the tx power table. More...
 
struct  LRF_TxPowerTable_Entry
 Single entry of the tx power table. Maps power in dBm to specific register settings. More...
 
struct  LRF_TxPowerTable
 Tx power table, containing all characterized dBm to register settings mappings. More...
 
struct  LRF_TxShape
 
struct  LRF_DoubleWord
 
union  LRF_Trim0
 
union  LRF_Trim1
 
union  LRF_Trim2
 
union  LRF_Trim_Variant
 
struct  LRF_Trim_tempLdoRtrim
 
struct  LRF_Trim_tempRssiAgc
 
union  LRF_Trim3
 
union  LRF_Trim4
 
struct  LRF_TrimDef
 
struct  LRF_SwConfig
 Software defined PHY parameters. More...
 
struct  LRF_SwParam
 Software defined PHY parameter list. More...
 
struct  LRF_Config
 Radio configuration structure. More...
 
struct  LRF_TxPowerTable_Value.__unnamed__
 
struct  LRF_Events_u.__unnamed__
 
struct  LRF_TxPowerTable_Index.__unnamed__
 
struct  LRF_TxShape.__unnamed__
 
struct  LRF_Trim0.fields
 
struct  LRF_Trim0.fields.pa0
 
struct  LRF_Trim0.fields.atstRefH
 
struct  LRF_Trim0.__unnamed__
 
struct  LRF_Trim1.fields
 
struct  LRF_Trim1.fields.lna
 
struct  LRF_Trim1.fields.ifampRfLdo
 
struct  LRF_Trim1.fields.divLdo
 
struct  LRF_Trim1.fields.tdcLdo
 
struct  LRF_Trim1.__unnamed__
 
struct  LRF_Trim2.fields
 
struct  LRF_Trim2.fields.dcoLdo0
 
struct  LRF_Trim2.fields.ifadcAldo
 
struct  LRF_Trim2.fields.ifadcDldo
 
struct  LRF_Trim2.fields.dco
 
struct  LRF_Trim2.__unnamed__
 
struct  LRF_Trim_Variant.fields
 
struct  LRF_Trim_Variant.fields.ifadcQuant
 
struct  LRF_Trim_Variant.fields.ifadc0
 
struct  LRF_Trim_Variant.fields.ifadc1
 
struct  LRF_Trim_Variant.fields.ifadclf
 
struct  LRF_Trim_Variant.__unnamed__
 
struct  LRF_Trim3.fields
 
struct  LRF_Trim3.fields.lrfdrfeExtTrim1
 
struct  LRF_Trim3.__unnamed__
 
struct  LRF_Trim4.fields
 
struct  LRF_Trim4.fields.fend0Rssi
 
struct  LRF_Trim4.fields.syntDiv0
 
struct  LRF_Trim4.fields.ifamprfldo
 
struct  LRF_Trim4.__unnamed__
 

Macros

#define LRF_TxPowerTable_INVALID_VALUE   ((LRF_TxPowerTable_Value){.rawValue = 0xFFFF})
 
#define LRF_EventNone   ((LRF_Events){ .value = (0U << 0U)})
 
#define LRF_EventOpDone   ((LRF_Events){ .value = (1U << 0U)})
 
#define LRF_EventPingRsp   ((LRF_Events){ .value = (1U << 1U)})
 
#define LRF_EventRxCtrl   ((LRF_Events){ .value = (1U << 2U)})
 
#define LRF_EventRxCtrlAck   ((LRF_Events){ .value = (1U << 3U)})
 
#define LRF_EventRxNok   ((LRF_Events){ .value = (1U << 4U)})
 
#define LRF_EventRxIgnored   ((LRF_Events){ .value = (1U << 5U)})
 
#define LRF_EventRxEmpty   ((LRF_Events){ .value = (1U << 6U)})
 
#define LRF_EventRxBufFull   ((LRF_Events){ .value = (1U << 7U)})
 
#define LRF_EventRxOk   ((LRF_Events){ .value = (1U << 8U)})
 
#define LRF_EventTxCtrl   ((LRF_Events){ .value = (1U << 9U)})
 
#define LRF_EventTxCtrlAckAck   ((LRF_Events){ .value = (1U << 10U)})
 
#define LRF_EventTxRetrans   ((LRF_Events){ .value = (1U << 11U)})
 
#define LRF_EventTxAck   ((LRF_Events){ .value = (1U << 12U)})
 
#define LRF_EventTxDone   ((LRF_Events){ .value = (1U << 13U)})
 
#define LRF_EventTxCtrlAck   ((LRF_Events){ .value = (1U << 14U)})
 
#define LRF_EventOpError   ((LRF_Events){ .value = (1U << 15U)})
 
#define LRF_EventRxfifo   ((LRF_Events){ .value = (1U << 16U)})
 
#define LRF_EventTxfifo   ((LRF_Events){ .value = (1U << 17U)})
 
#define LRF_EventLossOfLock   ((LRF_Events){ .value = (1U << 18U)})
 
#define LRF_EventLock   ((LRF_Events){ .value = (1U << 19U)})
 
#define LRF_EventRfesoft0   ((LRF_Events){ .value = (1U << 20U)})
 
#define LRF_EventRfesoft1   ((LRF_Events){ .value = (1U << 21U)})
 
#define LRF_EventRfedone   ((LRF_Events){ .value = (1U << 22U)})
 
#define LRF_EventMdmsoft0   ((LRF_Events){ .value = (1U << 23U)})
 
#define LRF_EventMdmsoft1   ((LRF_Events){ .value = (1U << 24U)})
 
#define LRF_EventMdmsoft2   ((LRF_Events){ .value = (1U << 25U)})
 
#define LRF_EventMdmout   ((LRF_Events){ .value = (1U << 26U)})
 
#define LRF_EventMdmin   ((LRF_Events){ .value = (1U << 27U)})
 
#define LRF_EventMdmdone   ((LRF_Events){ .value = (1U << 28U)})
 
#define LRF_EventSystim0   ((LRF_Events){ .value = (1U << 29U)})
 
#define LRF_EventSystim1   ((LRF_Events){ .value = (1U << 30U)})
 
#define LRF_EventSystim2   ((LRF_Events){ .value = (1U << 31U)})
 
#define LRF_TxPowerEntry_INVALID_VALUE
 
#define LRF_TRIM_NUM_VARIANTS   2
 
#define LRF_TRIM_NORMAL_BW   0
 
#define LRF_TRIM_HIGH_BW   1 /* Revision >= 4 only */
 
#define LRF_TRIM_MIN_VERSION_FULL_FEATURES   4 /* Only AppTrims revision 4 and above has all features */
 
#define LRF_TRIM_VERSION_RSSIOFFSET_ISSUE   4 /* AppTrims revision with issue in rssiOffset field */
 
#define LRF_TRIM_LIMIT_RSSIOFFSET_ISSUE   (-4) /* If rssiOffset is less or equal to this, apply correction */
 
#define LRF_TRIM_CORRECTION_RSSIOFFSET_ISSUE   5 /* Correction to apply to devices with wrong RSSI offset */
 
#define LRF_BASE_ADDR   0x40080000U
 
#define PBE_RAM_BASE_ADDR   0x40090000U
 
#define BUF_RAM_BASE_ADDR   0x40092000U
 
#define MCE_RAM_BASE_ADDR   0x40094000U
 
#define RFE_RAM_BASE_ADDR   0x40096000U
 
#define S2R_RAM_BASE_ADDR   0x40098000U
 
#define TOPSM_RAM_SZ   0x00001000U /* 4 KB */
 
#define MAX_REG_CONFIG_LEN   1024U /* 1024 entries, using 4 KB */
 
#define LRF_TXPOWER_REFERENCE_TEMPERATURE   25
 
#define LRF_TXPOWER_TEMPERATURE_SCALING   0x100
 

Typedefs

typedef uint8_t LRF_TxPowerTable_TempCoeff
 

Enumerations

enum  LRF_TxPowerResult { TxPowerResult_Ok, TxPowerResult_Error }
 

Functions

static void LRF_sendHardStop (void)
 
static void LRF_sendGracefulStop (void)
 
static void LRF_hardStop (void)
 
static uint32_t LRF_getTxFifoWritable (void)
 
void LRF_programTemperatureCompensatedTxPower (void)
 Programs current TX power setting in radio with temperature compensation. More...
 
LRF_TxPowerResult LRF_programTxPower (LRF_TxPowerTable_Index powerLevel)
 Finds settings corresponding to the highest tx power lower than the specified value in the tx power table and programs it in the radio. More...
 

Variables

const LRF_TxShape LRF_shapeBaseGfsk05
 
const LRF_TxShape LRF_shapeBaseGfsk067
 
const LRF_TxShape LRF_shapeBaseGfsk20
 

Data Structure Documentation

◆ LRF_TxPowerTable_Value

union LRF_TxPowerTable_Value

Type for tx power configuration.

Register value to be written to registers, prior to temperature compensation

Data Fields
struct LRF_TxPowerTable_Value __unnamed__
uint16_t rawValue

◆ LRF_Events_u

union LRF_Events_u
Data Fields
struct LRF_Events_u __unnamed__
uint32_t value

◆ LRF_RegConfig

struct LRF_RegConfig
Data Fields
uint32_t configLen
uint32_t regConfig[]

◆ LRF_TxPowerTable_Index

union LRF_TxPowerTable_Index

Index of the tx power table.

Data Fields
struct LRF_TxPowerTable_Index __unnamed__
int8_t rawValue

◆ LRF_TxPowerTable_Entry

struct LRF_TxPowerTable_Entry

Single entry of the tx power table. Maps power in dBm to specific register settings.

+ Collaboration diagram for LRF_TxPowerTable_Entry:
Data Fields
LRF_TxPowerTable_Index power

Power level

LRF_TxPowerTable_TempCoeff tempCoeff

Temperature coefficient

LRF_TxPowerTable_Value value

Settings to be compensated and written into register

◆ LRF_TxPowerTable

struct LRF_TxPowerTable

Tx power table, containing all characterized dBm to register settings mappings.

The table must be sorted from lowest to highest power level

+ Collaboration diagram for LRF_TxPowerTable:
Data Fields
uint32_t numEntries
LRF_TxPowerTable_Entry powerTable[]

◆ LRF_TxShape

struct LRF_TxShape
Data Fields
struct LRF_TxShape __unnamed__
uint8_t coeff[]

◆ LRF_DoubleWord

struct LRF_DoubleWord
Data Fields
uint32_t word[2]

◆ LRF_Trim0

union LRF_Trim0
Data Fields
struct LRF_Trim0 fields
struct LRF_Trim0 __unnamed__
uint32_t data

◆ LRF_Trim1

union LRF_Trim1
+ Collaboration diagram for LRF_Trim1:
Data Fields
struct LRF_Trim1 fields
struct LRF_Trim1 __unnamed__
LRF_DoubleWord data

◆ LRF_Trim2

union LRF_Trim2
+ Collaboration diagram for LRF_Trim2:
Data Fields
struct LRF_Trim2 fields
struct LRF_Trim2 __unnamed__
LRF_DoubleWord data

◆ LRF_Trim_Variant

union LRF_Trim_Variant
+ Collaboration diagram for LRF_Trim_Variant:
Data Fields
struct LRF_Trim_Variant fields
struct LRF_Trim_Variant __unnamed__
LRF_DoubleWord data

◆ LRF_Trim_tempLdoRtrim

struct LRF_Trim_tempLdoRtrim
Data Fields
uint16_t rtrimMinOffset: 2
uint16_t rtrimMaxOffset: 2
uint16_t divLdoMinOffset: 2
uint16_t divLdoMaxOffset: 2
uint16_t tdcLdoMinOffset: 2
uint16_t tdcLdoMaxOffset: 2
uint16_t tThrl: 2
uint16_t tThrh: 2

◆ LRF_Trim_tempRssiAgc

struct LRF_Trim_tempRssiAgc
Data Fields
int32_t rssiTcomp: 4
int32_t magnTcomp: 4
int32_t magnOffset: 4
int32_t rfu: 4
int32_t agcThrTcomp: 4
int32_t agcThrOffset: 4
int32_t lowGainOffset: 4
int32_t highGainOffset: 4

◆ LRF_Trim3

union LRF_Trim3
Data Fields
struct LRF_Trim3 fields
struct LRF_Trim3 __unnamed__
uint32_t data

◆ LRF_Trim4

union LRF_Trim4
Data Fields
struct LRF_Trim4 fields
struct LRF_Trim4 __unnamed__
uint32_t data

◆ LRF_TrimDef

struct LRF_TrimDef
+ Collaboration diagram for LRF_TrimDef:
Data Fields
uint8_t revision
uint8_t nToolsClientOffset
uint8_t reserved[2]
LRF_Trim0 trim0
LRF_Trim1 trim1
LRF_Trim2 trim2
LRF_Trim_Variant trimVariant[LRF_TRIM_NUM_VARIANTS]
LRF_Trim3 trim3
LRF_Trim4 trim4

◆ LRF_SwConfig

struct LRF_SwConfig

Software defined PHY parameters.

+ Collaboration diagram for LRF_SwConfig:
Data Fields
int32_t rxIntFrequency

Receiver intermediate frequency [Hz]

int32_t rxFrequencyOffset

Receiver frequency offset [Hz]

int32_t txFrequencyOffset

Transmitter frequency offset [Hz]

uint32_t modFrequencyDeviation

Transmitter frequency deviation [Hz]

const LRF_TxShape * txShape

Transmitter shape definition

uint8_t bwIndex

Index to use for bandwitdh dependent settings (0: normal 1: high)

uint8_t bwIndexDither

Index to use for bandwitdh dependent ADC dithering settings (0: low 1: normal/high)

◆ LRF_SwParam

struct LRF_SwParam

Software defined PHY parameter list.

+ Collaboration diagram for LRF_SwParam:
Data Fields
const LRF_SwConfig * swConfig

Software defined parameters.

const LRF_TxPowerTable * txPowerTable

TX power table

const LRF_TrimDef * trimDef

Trim definitions. NULL: Do not apply trim.

◆ LRF_Config

struct LRF_Config

Radio configuration structure.

Data Fields
const LRF_TOPsmImage * pbeImage

Image for the PBE

const LRF_TOPsmImage * mceImage

Image for the MCE

const LRF_TOPsmImage * rfeImage

Image for the RFE

const LRF_RegConfigList * regConfigList

List of pointers to register definitions

◆ LRF_TxPowerTable_Value.__unnamed__

struct LRF_TxPowerTable_Value.__unnamed__
Data Fields
uint16_t reserved: 5
uint16_t ib: 6
uint16_t gain: 3
uint16_t mode: 1
uint16_t noIfampRfLdoBypass: 1

◆ LRF_Events_u.__unnamed__

struct LRF_Events_u.__unnamed__
Data Fields
uint32_t opDone: 1

The PBE operation has finished

uint32_t pingRsp: 1

When receiving a CMD_PING, PBE responds with a PINGRSP.

uint32_t rxCtrl: 1

LL control packet received correctly

uint32_t rxCtrlAck: 1

LL control packet received with CRC OK, not to be ignored, then acknowledgement sent

uint32_t rxNok: 1

Packet received with CRC error

uint32_t rxIgnored: 1

Packet received, but may be ignored by MCU

uint32_t rxEmpty: 1

Empty packet received

uint32_t rxBufFull: 1

Packet received which did not fit in the RX FIFO and was not to be discarded. 

uint32_t rxOk: 1

Packet received with CRC OK and not to be ignored by the MCU

uint32_t txCtrl: 1

Transmitted LL control packet

uint32_t txCtrlAckAck: 1

Acknowledgement received on a transmitted LL control packet, and acknowledgement transmitted for that packet

uint32_t txRetrans: 1

Packet retransmitted with same SN

uint32_t txAck: 1

Acknowledgement received on a transmitted packet.

uint32_t txDone: 1

Packet transmitted

uint32_t txCtrlAck: 1

Acknowledgement received on a transmitted LL control packet

uint32_t opError: 1

Something went awfully wrong, the reason is indicated in RAM-based register BLE_ENDCAUSE.

uint32_t rxfifo: 1

Event from fifo, triggered when crossing threshold. Normal use for rxfifo is to generate IRQ when crossing threshold upwards (filling fifo). But downwards is also possible to configure, could be use case for using both fifos for TX or both for RX

uint32_t txfifo: 1

Event from fifo, triggered when crossing threshold. Normal use for txfifo is to generate IRQ when crossing threshold downwards (emptying fifo). But upwards is also possible to configure, could be use case for using both fifos for TX or both for RX

uint32_t lossOfLock: 1

LOSS_OF_LOCK event

uint32_t lock: 1

LOCK event

uint32_t rfesoft0: 1

RFESOFT0 event

uint32_t rfesoft1: 1

RFESOFT1 event

uint32_t rfedone: 1

RFEDONE event

uint32_t mdmsoft0: 1

MDMSOFT event

uint32_t mdmsoft1: 1

MDMSOFT1 event

uint32_t mdmsoft2: 1

MDMSOFT event

uint32_t mdmout: 1

MDMOUT event

uint32_t mdmin: 1

MDMIN event

uint32_t mdmdone: 1

MDMDONE event

uint32_t systim0: 1

SYSTIM0 event

uint32_t systim1: 1

SYSTIM1 event

uint32_t systim2: 1

SYSTIM2 event

◆ LRF_TxPowerTable_Index.__unnamed__

struct LRF_TxPowerTable_Index.__unnamed__
Data Fields
uint8_t fraction: 1
int8_t dBm: 7

◆ LRF_TxShape.__unnamed__

struct LRF_TxShape.__unnamed__
Data Fields
uint32_t scale:17
uint32_t numCoeff:15

◆ LRF_Trim0.fields

struct LRF_Trim0.fields
Data Fields
fields pa0
fields atstRefH

◆ LRF_Trim0.fields.pa0

struct LRF_Trim0.fields.pa0
Data Fields
uint16_t trim: 5
uint16_t zero: 11

◆ LRF_Trim0.fields.atstRefH

struct LRF_Trim0.fields.atstRefH
Data Fields
uint16_t zero0: 10
uint16_t irefTrim: 5
uint16_t zero1: 1

◆ LRF_Trim0.__unnamed__

struct LRF_Trim0.__unnamed__
Data Fields
uint16_t pa0
uint16_t atstRefH

◆ LRF_Trim1.fields

struct LRF_Trim1.fields
Data Fields
fields lna
fields ifampRfLdo
fields divLdo
fields tdcLdo

◆ LRF_Trim1.fields.lna

struct LRF_Trim1.fields.lna
Data Fields
uint16_t zero0: 4
uint16_t trim: 4
uint16_t zero1: 8

◆ LRF_Trim1.fields.ifampRfLdo

struct LRF_Trim1.fields.ifampRfLdo
Data Fields
uint16_t zero: 9
uint16_t trim: 7

◆ LRF_Trim1.fields.divLdo

struct LRF_Trim1.fields.divLdo
Data Fields
uint16_t zero0: 8
uint16_t voutTrim: 7
uint16_t zero1: 1

◆ LRF_Trim1.fields.tdcLdo

struct LRF_Trim1.fields.tdcLdo
Data Fields
uint16_t zero0: 8
uint16_t voutTrim: 7
uint16_t zero1: 1

◆ LRF_Trim1.__unnamed__

struct LRF_Trim1.__unnamed__
Data Fields
uint16_t lna
uint16_t ifampRfLdo
uint16_t divLdo
uint16_t tdcLdo

◆ LRF_Trim2.fields

struct LRF_Trim2.fields
Data Fields
fields dcoLdo0
fields ifadcAldo
fields ifadcDldo
fields dco

◆ LRF_Trim2.fields.dcoLdo0

struct LRF_Trim2.fields.dcoLdo0
Data Fields
uint16_t zero0: 4
uint16_t firstTrim: 4
uint16_t secondTrim: 6
uint16_t zero1: 2

◆ LRF_Trim2.fields.ifadcAldo

struct LRF_Trim2.fields.ifadcAldo
Data Fields
uint16_t zero0: 8
uint16_t trimout: 6
uint16_t zero1: 2

◆ LRF_Trim2.fields.ifadcDldo

struct LRF_Trim2.fields.ifadcDldo
Data Fields
uint16_t zero0: 8
uint16_t trimout: 6
uint16_t zero1: 2

◆ LRF_Trim2.fields.dco

struct LRF_Trim2.fields.dco
Data Fields
uint16_t zero0: 3
uint16_t tailresTrim: 4
uint16_t zero1: 9

◆ LRF_Trim2.__unnamed__

struct LRF_Trim2.__unnamed__
Data Fields
uint16_t dcoLdo0
uint16_t ifadcAldo
uint16_t ifadcDldo
uint16_t dco

◆ LRF_Trim_Variant.fields

struct LRF_Trim_Variant.fields
Data Fields
fields ifadcQuant
fields ifadc0
fields ifadc1
fields ifadclf

◆ LRF_Trim_Variant.fields.ifadcQuant

struct LRF_Trim_Variant.fields.ifadcQuant
Data Fields
uint16_t quantThr: 3
uint16_t zero: 13

◆ LRF_Trim_Variant.fields.ifadc0

struct LRF_Trim_Variant.fields.ifadc0
Data Fields
uint16_t zero0: 2
uint16_t aafcap: 2
uint16_t int2Adj: 4
uint16_t zero1: 2
uint16_t ditheren: 2
uint16_t dithertrim: 3
uint16_t zero2: 1

◆ LRF_Trim_Variant.fields.ifadc1

struct LRF_Trim_Variant.fields.ifadc1
Data Fields
uint16_t zero0: 9
uint16_t trim: 6
uint16_t nrz: 1

◆ LRF_Trim_Variant.fields.ifadclf

struct LRF_Trim_Variant.fields.ifadclf
Data Fields
uint16_t int3: 4
uint16_t ff1: 4
uint16_t ff2: 4
uint16_t ff3: 4

◆ LRF_Trim_Variant.__unnamed__

struct LRF_Trim_Variant.__unnamed__
Data Fields
uint16_t ifadcQuant
uint16_t ifadc0
uint16_t ifadc1
uint16_t ifadclf

◆ LRF_Trim3.fields

struct LRF_Trim3.fields
Data Fields
fields lrfdrfeExtTrim1
LRF_Trim_tempRssiAgc lrfdrfeExtTrim0

◆ LRF_Trim3.fields.lrfdrfeExtTrim1

struct LRF_Trim3.fields.lrfdrfeExtTrim1
Data Fields
LRF_Trim_tempLdoRtrim tempLdoRtrim
uint8_t hfxtPdError
uint8_t res

◆ LRF_Trim3.__unnamed__

struct LRF_Trim3.__unnamed__
Data Fields
uint32_t lrfdrfeExtTrim1
uint32_t lrfdrfeExtTrim0

◆ LRF_Trim4.fields

struct LRF_Trim4.fields
Data Fields
fields fend0Rssi
fields syntDiv0
uint16_t res1
fields ifamprfldo[LRF_TRIM_NUM_VARIANTS]

◆ LRF_Trim4.fields.fend0Rssi

struct LRF_Trim4.fields.fend0Rssi
Data Fields
uint16_t offset: 8
uint16_t trimCompleteN: 1
uint16_t zero: 7

◆ LRF_Trim4.fields.syntDiv0

struct LRF_Trim4.fields.syntDiv0
Data Fields
uint16_t iqmc: 16

◆ LRF_Trim4.fields.ifamprfldo

struct LRF_Trim4.fields.ifamprfldo
Data Fields
uint8_t zero: 4
uint8_t aafcap: 4

◆ LRF_Trim4.__unnamed__

struct LRF_Trim4.__unnamed__
Data Fields
int8_t rssiOffset
uint8_t trimCompleteN
uint16_t demIQMC0
uint16_t res1
uint8_t ifamprfldo[LRF_TRIM_NUM_VARIANTS]

Macro Definition Documentation

◆ LRF_TxPowerTable_INVALID_VALUE

#define LRF_TxPowerTable_INVALID_VALUE   ((LRF_TxPowerTable_Value){.rawValue = 0xFFFF})

Value indicating that no valid tx power could be found in the table.

◆ LRF_EventNone

#define LRF_EventNone   ((LRF_Events){ .value = (0U << 0U)})

No events

◆ LRF_EventOpDone

#define LRF_EventOpDone   ((LRF_Events){ .value = (1U << 0U)})

The PBE operation has finished

◆ LRF_EventPingRsp

#define LRF_EventPingRsp   ((LRF_Events){ .value = (1U << 1U)})

When receiving a CMD_PING, PBE responds with a PINGRSP.

◆ LRF_EventRxCtrl

#define LRF_EventRxCtrl   ((LRF_Events){ .value = (1U << 2U)})

LL control packet received correctly

◆ LRF_EventRxCtrlAck

#define LRF_EventRxCtrlAck   ((LRF_Events){ .value = (1U << 3U)})

LL control packet received with CRC OK, not to be ignored, then acknowledgement sent

◆ LRF_EventRxNok

#define LRF_EventRxNok   ((LRF_Events){ .value = (1U << 4U)})

Packet received with CRC error

◆ LRF_EventRxIgnored

#define LRF_EventRxIgnored   ((LRF_Events){ .value = (1U << 5U)})

Packet received, but may be ignored by MCU

◆ LRF_EventRxEmpty

#define LRF_EventRxEmpty   ((LRF_Events){ .value = (1U << 6U)})

Empty packet received

◆ LRF_EventRxBufFull

#define LRF_EventRxBufFull   ((LRF_Events){ .value = (1U << 7U)})

Packet received which did not fit in the RX FIFO and was not to be discarded. 

◆ LRF_EventRxOk

#define LRF_EventRxOk   ((LRF_Events){ .value = (1U << 8U)})

Packet received with CRC OK and not to be ignored by the MCU

◆ LRF_EventTxCtrl

#define LRF_EventTxCtrl   ((LRF_Events){ .value = (1U << 9U)})

Transmitted LL control packet

◆ LRF_EventTxCtrlAckAck

#define LRF_EventTxCtrlAckAck   ((LRF_Events){ .value = (1U << 10U)})

Acknowledgement received on a transmitted LL control packet, and acknowledgement transmitted for that packet

◆ LRF_EventTxRetrans

#define LRF_EventTxRetrans   ((LRF_Events){ .value = (1U << 11U)})

Packet retransmitted with same SN

◆ LRF_EventTxAck

#define LRF_EventTxAck   ((LRF_Events){ .value = (1U << 12U)})

Acknowledgement received on a transmitted packet.

◆ LRF_EventTxDone

#define LRF_EventTxDone   ((LRF_Events){ .value = (1U << 13U)})

Packet transmitted

◆ LRF_EventTxCtrlAck

#define LRF_EventTxCtrlAck   ((LRF_Events){ .value = (1U << 14U)})

Acknowledgement received on a transmitted LL control packet

◆ LRF_EventOpError

#define LRF_EventOpError   ((LRF_Events){ .value = (1U << 15U)})

Something went awfully wrong, the reason is indicated in RAM-based register BLE_ENDCAUSE.

◆ LRF_EventRxfifo

#define LRF_EventRxfifo   ((LRF_Events){ .value = (1U << 16U)})

Event from fifo, triggered when crossing threshold. Normal use for rxfifo is to generate IRQ when crossing threshold upwards (filling fifo). But downwards is also possible to configure, could be use case for using both fifos for TX or both for RX

◆ LRF_EventTxfifo

#define LRF_EventTxfifo   ((LRF_Events){ .value = (1U << 17U)})

Event from fifo, triggered when crossing threshold. Normal use for txfifo is to generate IRQ when crossing threshold downwards (emptying fifo). But upwards is also possible to configure, could be use case for using both fifos for TX or both for RX

◆ LRF_EventLossOfLock

#define LRF_EventLossOfLock   ((LRF_Events){ .value = (1U << 18U)})

LOSS_OF_LOCK event

◆ LRF_EventLock

#define LRF_EventLock   ((LRF_Events){ .value = (1U << 19U)})

LOCK event

◆ LRF_EventRfesoft0

#define LRF_EventRfesoft0   ((LRF_Events){ .value = (1U << 20U)})

RFESOFT0 event

◆ LRF_EventRfesoft1

#define LRF_EventRfesoft1   ((LRF_Events){ .value = (1U << 21U)})

RFESOFT1 event

◆ LRF_EventRfedone

#define LRF_EventRfedone   ((LRF_Events){ .value = (1U << 22U)})

RFEDONE event

◆ LRF_EventMdmsoft0

#define LRF_EventMdmsoft0   ((LRF_Events){ .value = (1U << 23U)})

MDMSOFT event

◆ LRF_EventMdmsoft1

#define LRF_EventMdmsoft1   ((LRF_Events){ .value = (1U << 24U)})

MDMSOFT1 event

◆ LRF_EventMdmsoft2

#define LRF_EventMdmsoft2   ((LRF_Events){ .value = (1U << 25U)})

MDMSOFT event

◆ LRF_EventMdmout

#define LRF_EventMdmout   ((LRF_Events){ .value = (1U << 26U)})

MDMOUT event

◆ LRF_EventMdmin

#define LRF_EventMdmin   ((LRF_Events){ .value = (1U << 27U)})

MDMIN event

◆ LRF_EventMdmdone

#define LRF_EventMdmdone   ((LRF_Events){ .value = (1U << 28U)})

MDMDONE event

◆ LRF_EventSystim0

#define LRF_EventSystim0   ((LRF_Events){ .value = (1U << 29U)})

SYSTIM0 event

◆ LRF_EventSystim1

#define LRF_EventSystim1   ((LRF_Events){ .value = (1U << 30U)})

SYSTIM1 event

◆ LRF_EventSystim2

#define LRF_EventSystim2   ((LRF_Events){ .value = (1U << 31U)})

SYSTIM2 event

◆ LRF_TxPowerEntry_INVALID_VALUE

#define LRF_TxPowerEntry_INVALID_VALUE
Value:
.power = LRF_TxPower_None,\
.tempCoeff = 0,\
})

Value indicating that no valid tx power could be found in the table.

◆ LRF_TRIM_NUM_VARIANTS

#define LRF_TRIM_NUM_VARIANTS   2

◆ LRF_TRIM_NORMAL_BW

#define LRF_TRIM_NORMAL_BW   0

◆ LRF_TRIM_HIGH_BW

#define LRF_TRIM_HIGH_BW   1 /* Revision >= 4 only */

◆ LRF_TRIM_MIN_VERSION_FULL_FEATURES

#define LRF_TRIM_MIN_VERSION_FULL_FEATURES   4 /* Only AppTrims revision 4 and above has all features */

◆ LRF_TRIM_VERSION_RSSIOFFSET_ISSUE

#define LRF_TRIM_VERSION_RSSIOFFSET_ISSUE   4 /* AppTrims revision with issue in rssiOffset field */

◆ LRF_TRIM_LIMIT_RSSIOFFSET_ISSUE

#define LRF_TRIM_LIMIT_RSSIOFFSET_ISSUE   (-4) /* If rssiOffset is less or equal to this, apply correction */

◆ LRF_TRIM_CORRECTION_RSSIOFFSET_ISSUE

#define LRF_TRIM_CORRECTION_RSSIOFFSET_ISSUE   5 /* Correction to apply to devices with wrong RSSI offset */

◆ LRF_BASE_ADDR

#define LRF_BASE_ADDR   0x40080000U

◆ PBE_RAM_BASE_ADDR

#define PBE_RAM_BASE_ADDR   0x40090000U

◆ BUF_RAM_BASE_ADDR

#define BUF_RAM_BASE_ADDR   0x40092000U

◆ MCE_RAM_BASE_ADDR

#define MCE_RAM_BASE_ADDR   0x40094000U

◆ RFE_RAM_BASE_ADDR

#define RFE_RAM_BASE_ADDR   0x40096000U

◆ S2R_RAM_BASE_ADDR

#define S2R_RAM_BASE_ADDR   0x40098000U

◆ TOPSM_RAM_SZ

#define TOPSM_RAM_SZ   0x00001000U /* 4 KB */

◆ MAX_REG_CONFIG_LEN

#define MAX_REG_CONFIG_LEN   1024U /* 1024 entries, using 4 KB */

◆ LRF_TXPOWER_REFERENCE_TEMPERATURE

#define LRF_TXPOWER_REFERENCE_TEMPERATURE   25

Reference temperature for TX power, degrees C

◆ LRF_TXPOWER_TEMPERATURE_SCALING

#define LRF_TXPOWER_TEMPERATURE_SCALING   0x100

Scaling factor for TX power temperature coefficients

Typedef Documentation

◆ LRF_TxPowerTable_TempCoeff

typedef uint8_t LRF_TxPowerTable_TempCoeff

Enumeration Type Documentation

◆ LRF_TxPowerResult

Enumerator
TxPowerResult_Ok 

TX power value was OK

TxPowerResult_Error 

TX power value had an error

Function Documentation

◆ LRF_sendHardStop()

static void LRF_sendHardStop ( void  )
inlinestatic

◆ LRF_sendGracefulStop()

static void LRF_sendGracefulStop ( void  )
inlinestatic

◆ LRF_hardStop()

static void LRF_hardStop ( void  )
inlinestatic

◆ LRF_getTxFifoWritable()

static uint32_t LRF_getTxFifoWritable ( void  )
inlinestatic

◆ LRF_programTemperatureCompensatedTxPower()

void LRF_programTemperatureCompensatedTxPower ( void  )

◆ LRF_programTxPower()

LRF_TxPowerResult LRF_programTxPower ( LRF_TxPowerTable_Index  powerLevel)

Finds settings corresponding to the highest tx power lower than the specified value in the tx power table and programs it in the radio.

Parameters
powerLevelmaximum allowed power level in dBm, or special value (LRF_TxPower_Use_Min, LRF_TxPower_Use_Max, LRF_TxPower_Use_Raw, or LRF_TxPower_None)
Returns
TxPowerResult_Ok on success; TxPowerResult_Error if no valid settings were found

References LRF_programTemperatureCompensatedTxPower(), LRF_TxPower_None, LRF_TxPowerTable_findValue(), LRF_TxPowerTable_INVALID_VALUE, lrfPhyState, LRF_TxPowerTable_Value::rawValue, LRF_TxPowerTable_Index::rawValue, swParamList, TxPowerResult_Error, TxPowerResult_Ok, LRF_SwParam::txPowerTable, and LRF_TxPowerTable_Entry::value.

Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_conn(), RCL_Handler_BLE5_dtmTx(), RCL_Handler_BLE5_genericTx(), RCL_Handler_BLE5_scan_init(), RCL_Handler_Ble5_txTest(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().

Variable Documentation

◆ LRF_shapeBaseGfsk05

const LRF_TxShape LRF_shapeBaseGfsk05

◆ LRF_shapeBaseGfsk067

const LRF_TxShape LRF_shapeBaseGfsk067

◆ LRF_shapeBaseGfsk20

const LRF_TxShape LRF_shapeBaseGfsk20
LRF_TxPowerTable_INVALID_VALUE
#define LRF_TxPowerTable_INVALID_VALUE
Definition: LRFCC23X0.h:60
LRF_TxPower_None
#define LRF_TxPower_None
Definition: LRF.h:71
LRF_TxPowerTable_Entry
Single entry of the tx power table. Maps power in dBm to specific register settings.
Definition: LRFCC23X0.h:165