33 #ifndef ti_drivers_LRFCC2340_h__include 34 #define ti_drivers_LRFCC2340_h__include 39 #include <ti/devices/DeviceFamily.h> 40 #include DeviceFamily_constructPath(inc/hw_memmap.h) 41 #include DeviceFamily_constructPath(inc/hw_lrfdpbe.h) 42 #include DeviceFamily_constructPath(inc/pbe_generic_regdef_regs.h) 50 #ifdef DeviceFamily_CC27XX 52 #define LRFDPBE32_BASE 0x40081400 // LRFDPBE32 53 #define LRFDMDM32_BASE 0x40082400 // LRFDMDM32 54 #define LRFDRFE32_BASE 0x40083400 // LRFDRFE32 63 uint16_t noIfampRfLdoBypass: 1;
75 uint16_t noIfampRfLdoBypass: 1;
80 #define LRF_TxPowerTable_INVALID_VALUE ((LRF_TxPowerTable_Value){.rawValue = 0xFFFF}) 82 typedef uint8_t LRF_TxPowerTable_TempCoeff; 84 typedef enum LRF_TxPowerResult_e {
90 #define LRF_EventNone ((LRF_Events){ .value = (0U << 0U)}) 91 #define LRF_EventOpDone ((LRF_Events){ .value = (1U << 0U)}) 92 #define LRF_EventPingRsp ((LRF_Events){ .value = (1U << 1U)}) 93 #define LRF_EventRxCtrl ((LRF_Events){ .value = (1U << 2U)}) 94 #define LRF_EventRxCtrlAck ((LRF_Events){ .value = (1U << 3U)}) 95 #define LRF_EventRxNok ((LRF_Events){ .value = (1U << 4U)}) 96 #define LRF_EventRxIgnored ((LRF_Events){ .value = (1U << 5U)}) 97 #define LRF_EventRxEmpty ((LRF_Events){ .value = (1U << 6U)}) 98 #define LRF_EventRxBufFull ((LRF_Events){ .value = (1U << 7U)}) 99 #define LRF_EventRxOk ((LRF_Events){ .value = (1U << 8U)}) 100 #define LRF_EventTxCtrl ((LRF_Events){ .value = (1U << 9U)}) 101 #define LRF_EventTxCtrlAckAck ((LRF_Events){ .value = (1U << 10U)}) 102 #define LRF_EventTxRetrans ((LRF_Events){ .value = (1U << 11U)}) 103 #define LRF_EventTxAck ((LRF_Events){ .value = (1U << 12U)}) 104 #define LRF_EventTxDone ((LRF_Events){ .value = (1U << 13U)}) 105 #define LRF_EventTxCtrlAck ((LRF_Events){ .value = (1U << 14U)}) 106 #define LRF_EventOpError ((LRF_Events){ .value = (1U << 15U)}) 107 #define LRF_EventRxfifo ((LRF_Events){ .value = (1U << 16U)}) 108 #define LRF_EventTxfifo ((LRF_Events){ .value = (1U << 17U)}) 109 #define LRF_EventLossOfLock ((LRF_Events){ .value = (1U << 18U)}) 110 #define LRF_EventLock ((LRF_Events){ .value = (1U << 19U)}) 111 #define LRF_EventRfesoft0 ((LRF_Events){ .value = (1U << 20U)}) 112 #define LRF_EventRfesoft1 ((LRF_Events){ .value = (1U << 21U)}) 113 #define LRF_EventRfedone ((LRF_Events){ .value = (1U << 22U)}) 114 #define LRF_EventMdmsoft0 ((LRF_Events){ .value = (1U << 23U)}) 115 #define LRF_EventMdmsoft1 ((LRF_Events){ .value = (1U << 24U)}) 116 #define LRF_EventMdmsoft2 ((LRF_Events){ .value = (1U << 25U)}) 117 #define LRF_EventMdmout ((LRF_Events){ .value = (1U << 26U)}) 118 #define LRF_EventMdmin ((LRF_Events){ .value = (1U << 27U)}) 119 #define LRF_EventMdmdone ((LRF_Events){ .value = (1U << 28U)}) 120 #define LRF_EventSystim0 ((LRF_Events){ .value = (1U << 29U)}) 121 #define LRF_EventSystim1 ((LRF_Events){ .value = (1U << 30U)}) 122 #define LRF_EventSystim2 ((LRF_Events){ .value = (1U << 31U)}) 128 uint32_t pingRsp : 1;
130 uint32_t rxCtrlAck : 1;
133 uint32_t rxIgnored : 1;
134 uint32_t rxEmpty : 1;
135 uint32_t rxBufFull : 1;
138 uint32_t txCtrlAckAck : 1;
139 uint32_t txRetrans : 1;
142 uint32_t txCtrlAck : 1;
143 uint32_t opError : 1;
146 uint32_t lossOfLock : 1;
148 uint32_t rfesoft0 : 1;
149 uint32_t rfesoft1 : 1;
150 uint32_t rfedone : 1;
151 uint32_t mdmsoft0 : 1;
152 uint32_t mdmsoft1 : 1;
153 uint32_t mdmsoft2 : 1;
156 uint32_t mdmdone : 1;
157 uint32_t systim0 : 1;
158 uint32_t systim1 : 1;
159 uint32_t systim2 : 1;
164 typedef struct LRF_RegConfig_s {
166 uint32_t regConfig[];
175 uint8_t fraction : 1;
192 #define LRF_TxPowerEntry_INVALID_VALUE \ 193 ((LRF_TxPowerTable_Entry) {\ 194 .power = LRF_TxPower_None,\ 196 .value = LRF_TxPowerTable_INVALID_VALUE,\ 209 typedef struct LRF_TxShape_s {
212 uint32_t numCoeff :15;
217 #define LRF_TRIM_NUM_VARIANTS 2 218 #define LRF_TRIM_NORMAL_BW 0 219 #define LRF_TRIM_HIGH_BW 1 221 #define LRF_TRIM_MIN_VERSION_FULL_FEATURES 4 224 #define LRF_TRIM_VERSION_RSSIOFFSET_ISSUE 4 225 #define LRF_TRIM_LIMIT_RSSIOFFSET_ISSUE (-4) 226 #define LRF_TRIM_CORRECTION_RSSIOFFSET_ISSUE 5 243 uint16_t irefTrim : 5;
270 uint16_t voutTrim : 7;
276 uint16_t voutTrim : 7;
294 uint16_t firstTrim : 4;
295 uint16_t secondTrim : 6;
301 uint16_t trimout : 6;
307 uint16_t trimout : 6;
313 uint16_t tailresTrim : 4;
330 uint16_t quantThr : 3;
337 uint16_t int2Adj : 4;
339 uint16_t ditheren : 2;
340 uint16_t dithertrim : 3;
368 uint16_t rtrimMinOffset : 2;
369 uint16_t rtrimMaxOffset : 2;
370 uint16_t divLdoMinOffset: 2;
371 uint16_t divLdoMaxOffset: 2;
372 uint16_t tdcLdoMinOffset: 2;
373 uint16_t tdcLdoMaxOffset: 2;
379 int32_t rssiTcomp : 4;
380 int32_t magnTcomp : 4;
381 int32_t magnOffset : 4;
383 int32_t agcThrTcomp : 4;
384 int32_t agcThrOffset : 4;
385 int32_t lowGainOffset : 4;
386 int32_t highGainOffset : 4;
400 uint32_t lrfdrfeExtTrim1;
401 uint32_t lrfdrfeExtTrim0;
412 uint16_t trimCompleteN : 1;
429 uint8_t trimCompleteN;
454 typedef struct LRF_SwConfig_s {
467 typedef struct LRF_SwParam_s {
476 typedef struct LRF_Config_s {
483 #define LRF_BASE_ADDR 0x40080000U 484 #define PBE_RAM_BASE_ADDR 0x40090000U 485 #define BUF_RAM_BASE_ADDR 0x40092000U 486 #define RXF_UNWRAPPED_BASE_ADDR 0x40093000U 487 #define TXF_UNWRAPPED_BASE_ADDR 0x40093800U 488 #define MCE_RAM_BASE_ADDR 0x40094000U 489 #define RFE_RAM_BASE_ADDR 0x40096000U 490 #define S2R_RAM_BASE_ADDR 0x40098000U 491 #define TOPSM_RAM_SZ 0x00001000U 492 #define MAX_REG_CONFIG_LEN 1024U 494 #define LRF_TXPOWER_REFERENCE_TEMPERATURE 25 495 #define LRF_TXPOWER_TEMPERATURE_SCALING 0x100 497 extern const LRF_TxShape LRF_shapeBaseGfsk05; 505 HWREG(LRFDPBE_BASE + LRFDPBE_O_API) = PBE_GENERIC_REGDEF_API_OP_STOP;
512 HWREG(LRFDPBE_BASE + LRFDPBE_O_API) = PBE_GENERIC_REGDEF_API_OP_EOPSTOP;
522 return HWREG_READ_LRF(LRFDPBE_BASE + LRFDPBE_O_TXFWRITABLE);
LRF_Trim3 trim3
Definition: LRFCC23X0.h:447
uint16_t rawValue
Definition: LRFCC23X0.h:77
LRF_DoubleWord data
Definition: LRFCC23X0.h:286
LRF_TxPowerTable_TempCoeff tempCoeff
Definition: LRFCC23X0.h:187
static void LRF_sendGracefulStop(void)
Definition: LRFCC23X0.h:508
const LRF_TxShape LRF_shapeBaseGfsk20
static void LRF_hardStop(void)
Definition: LRFCC23X0.h:515
Software defined PHY parameters.
Definition: LRFCC23X0.h:454
uint8_t revision
Definition: LRFCC23X0.h:440
Definition: LRFCC23X0.h:209
LRF_Trim4 trim4
Definition: LRFCC23X0.h:448
int8_t rawValue
Definition: LRFCC23X0.h:178
const LRF_SwConfig * swConfig
Definition: LRFCC23X0.h:468
Single entry of the tx power table. Maps power in dBm to specific register settings.
Definition: LRFCC23X0.h:185
uint8_t LRF_TxPowerTable_TempCoeff
Definition: LRFCC23X0.h:82
const LRF_TOPsmImage * mceImage
Definition: LRFCC23X0.h:478
LRF_Trim1 trim1
Definition: LRFCC23X0.h:444
Tx power table, containing all characterized dBm to register settings mappings.
Definition: LRFCC23X0.h:204
Definition: LRFCC23X0.h:86
Definition: LRFCC23X0.h:233
Definition: LRFCC23X0.h:254
Definition: LRFCC23X0.h:289
Definition: LRFCC23X0.h:389
Definition: LRFCC23X0.h:406
LRF_TxPowerTable_Index power
Definition: LRFCC23X0.h:186
Index of the tx power table.
Definition: LRFCC23X0.h:172
int32_t txFrequencyOffset
Definition: LRFCC23X0.h:457
Radio configuration structure.
Definition: LRFCC23X0.h:476
const LRF_TOPsmImage * rfeImage
Definition: LRFCC23X0.h:479
#define LRF_TRIM_NUM_VARIANTS
Definition: LRFCC23X0.h:217
LRF_TxPowerTable_Value value
Definition: LRFCC23X0.h:188
LRF_Trim0 trim0
Definition: LRFCC23X0.h:443
uint32_t data
Definition: LRFCC23X0.h:251
const LRF_RegConfigList * regConfigList
Definition: LRFCC23X0.h:480
uint32_t value
Definition: LRFCC23X0.h:161
LRF_Trim2 trim2
Definition: LRFCC23X0.h:445
uint32_t data
Definition: LRFCC23X0.h:434
uint8_t bwIndex
Definition: LRFCC23X0.h:460
Definition: LRFCC23X0.h:439
Definition: LRFCC23X0.h:85
Definition: LRFCC23X0.h:366
LRF_DoubleWord data
Definition: LRFCC23X0.h:323
int32_t rxFrequencyOffset
Definition: LRFCC23X0.h:456
const LRF_TxShape * txShape
Definition: LRFCC23X0.h:459
uint8_t nToolsClientOffset
Definition: LRFCC23X0.h:441
static uint32_t LRF_getTxFifoWritable(void)
Definition: LRFCC23X0.h:520
const LRF_TrimDef * trimDef
Definition: LRFCC23X0.h:470
uint32_t modFrequencyDeviation
Definition: LRFCC23X0.h:458
const LRF_TxPowerTable * txPowerTable
Definition: LRFCC23X0.h:469
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 t...
Definition: LRFCC23X0.c:1425
void LRF_programTemperatureCompensatedTxPower(void)
Programs current TX power setting in radio with temperature compensation.
Definition: LRFCC23X0.c:1390
uint32_t configLen
Definition: LRFCC23X0.h:165
Definition: LRFCC23X0.h:326
LRF_TxPowerResult
Definition: LRFCC23X0.h:84
uint32_t data
Definition: LRFCC23X0.h:403
int32_t rxIntFrequency
Definition: LRFCC23X0.h:455
Definition: LRFCC23X0.h:164
uint32_t numEntries
Definition: LRFCC23X0.h:205
Definition: LRFCC23X0.h:229
const LRF_TxShape LRF_shapeBaseGfsk067
uint8_t bwIndexDither
Definition: LRFCC23X0.h:461
const LRF_TOPsmImage * pbeImage
Definition: LRFCC23X0.h:477
LRF_DoubleWord data
Definition: LRFCC23X0.h:363
Type for tx power configuration.
Definition: LRFCC23X0.h:68
Software defined PHY parameter list.
Definition: LRFCC23X0.h:467
static void LRF_sendHardStop(void)
Definition: LRFCC23X0.h:501