Tool/software:
We use CC1352P7 to transmit and receive 104 bits test data, target system will be 5952 bits user data, with symbol rate of about 384000sps, using Advanced Packet Format of proprietary radio, the sender wave has been seen in spectrum analyzer, but the receiver datas are all 0s, what is problem, would anyone help us to solve this?
0 1. The packet tx code is as follows.
RF_Params_init(&rfParams);
GPIO_setConfig(CONFIG_GPIO_GLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_write(CONFIG_GPIO_GLED, CONFIG_GPIO_LED_OFF);
Radio_init(8,&RF_cmdPropRadioDivSetup,&RF_cmdFs);// Configuration of the cmdPropRadioDivSetup and RF_cmdFs structures; the code is attached in the configuration code provided later.
RF_cmdPropTxAdv.pktLen = tx_len;
RF_cmdPropTxAdv.pktConf.bUseCrc = 0x0;
RF_cmdPropTxAdv.pPkt = g_data;
RF_cmdPropTxAdv.startTrigger.triggerType = TRIG_NOW;
RF_cmdPropTxAdv.numHdrBits = 0x0;
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
/* Set the frequency */
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
// Radio_setPower(0,rfHandle);
while(1)
{
/* Create packet with incrementing sequence number and random payload */
int8_t payload_in[DATA_LEN] = {1 ,1 ,1 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,1 ,1 ,0 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,0 ,1 ,0 ,0 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,1 ,0 ,0 ,1 ,0 ,0 ,1 ,1 ,1 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,0 ,1 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,1 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,0 ,0 ,0 ,1 ,1 ,0 ,1 ,1 ,1};
memset(g_data, 0, tx_len * sizeof(int8_t));
g_data[0] = (uint8_t)(seqNumber >> 8);
g_data[1] = (uint8_t)(seqNumber++);
memcpy(g_data+2,payload_in,DATA_LEN);
/* Send packet */
RF_EventMask terminationReason = RF_EventCmdAborted | RF_EventCmdPreempted;
while(( terminationReason & RF_EventCmdAborted ) && ( terminationReason & RF_EventCmdPreempted ))
{
terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv,
RF_PriorityNormal, NULL, 0);
}
The configuration code is as follows.:
bool Radio_setPower(int8_t i8TxPowerDbm,RF_Handle rfHandle)
{
RF_TxPowerTable_Value newValue;
newValue =RF_TxPowerTable_findValue(txPowerTable_2400_pa5,i8TxPowerDbm);
if(newValue.rawValue == RF_TxPowerTable_INVALID_VALUE)
{
return false;
}
RF_Stat rfStatus = RF_setTxPower(rfHandle, newValue);
if(rfStatus == RF_StatSuccess)
{
return true;
}
else
{
return false;
}
return false;
}
uint8_t Radio_init(uint8_t sc_id,rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t* p_RF_cmdPropRadioDivSetup,rfc_CMD_FS_t* p_RF_cmdFs){
switch(sc_id){
case 0:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2478;
p_RF_cmdFs->frequency = (uint16_t)2478;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)635000*65536/1000000);
break;
case 1:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2479;
p_RF_cmdFs->frequency = (uint16_t)2479;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)133000*65536/1000000);
break;
case 2:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2479;
p_RF_cmdFs->frequency = (uint16_t)2479;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)631000*65536/1000000);
break;
case 3:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2480;
p_RF_cmdFs->frequency = (uint16_t)2480;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)129000*65536/1000000);
break;
case 4:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2480;
p_RF_cmdFs->frequency = (uint16_t)2480;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)627000*65536/1000000);
break;
case 5:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2481;
p_RF_cmdFs->frequency = (uint16_t)2481;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)125000*65536/1000000);
break;
case 6:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2481;
p_RF_cmdFs->frequency = (uint16_t)2481;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)623000*65536/1000000);
break;
case 7:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2482;
p_RF_cmdFs->frequency = (uint16_t)2482;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)121000*65536/1000000);
break;
case 8:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2482;
p_RF_cmdFs->frequency = (uint16_t)2482;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)619000*65536/1000000);
break;
case 9:
// p_RF_cmdPropRadioDivSetup->centerFreq = (uint16_t)2483;
p_RF_cmdFs->frequency = (uint16_t)2483;
p_RF_cmdFs->fractFreq = (uint16_t)((uint64_t)117000*65536/1000000);
// p_RF_cmdFs->frequency = 0x09B3;
// p_RF_cmdFs->fractFreq = 0x1E00;
break;
default:
break;
}
p_RF_cmdPropRadioDivSetup->formatConf.fecMode = 0x00;
p_RF_cmdPropRadioDivSetup->formatConf.whitenMode = 0x00;
p_RF_cmdPropRadioDivSetup->formatConf.nSwBits = 8;
p_RF_cmdPropRadioDivSetup->modulation.modType = 1;
p_RF_cmdPropRadioDivSetup->modulation.deviation = 96000/1000* 4;//5000/1000* 4;
p_RF_cmdPropRadioDivSetup->symbolRate.rateWord = (uint32_t)(round((48000*8*8)*65536.0/100000.0));
p_RF_cmdPropRadioDivSetup->txPower = 0x762E;//0x2C5D;
p_RF_cmdPropRadioDivSetup->rxBw = 0x5D;
// p_RF_cmdPropRadioDivSetup->symbolRate.rateWord = 0x3E7;
// p_RF_cmdPropRadioDivSetup->pRegOverride = pOverrides_X6;
p_RF_cmdPropRadioDivSetup->preamConf.nPreamBytes = 4;
p_RF_cmdPropRadioDivSetup->preamConf.preamMode = 2;
return 1;
}
The configuration file ti_radio_config.c in packet_tx is as follows:
/*
* ======== ti_radio_config.c ========
* Configured RadioConfig module definitions
*/
#include "ti_radio_config.h"
#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_prop.h)
// RF design based on: LP_CC1352P7-1
// TX Power tables
// The RF_TxPowerTable_DEFAULT_PA_ENTRY and RF_TxPowerTable_HIGH_PA_ENTRY macros are defined in RF.h.
// The following arguments are required:
// RF_TxPowerTable_DEFAULT_PA_ENTRY(bias, gain, boost, coefficient)
// RF_TxPowerTable_HIGH_PA_ENTRY(bias, ibboost, boost, coefficient, ldoTrim)
// See the Technical Reference Manual for further details about the "txPower" Command field.
// The PA settings require the CCFG_FORCE_VDDR_HH = 0 unless stated otherwise.
// 2400 MHz, 5 dBm
RF_TxPowerTable_Entry txPowerTable_2400_pa5[TXPOWERTABLE_2400_PA5_SIZE] =
{
{-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(8, 3, 0, 2) }, // 0x04C8
{-18, RF_TxPowerTable_DEFAULT_PA_ENTRY(10, 3, 0, 2) }, // 0x04CA
{-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(13, 3, 0, 3) }, // 0x06CD
{-12, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 3, 0, 5) }, // 0x0AD0
{-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 3, 0, 5) }, // 0x0AD3
{-9, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 3, 0, 6) }, // 0x0CD4
{-6, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 2, 0, 11) }, // 0x1693
{-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(21, 2, 0, 11) }, // 0x1695
{-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(25, 2, 0, 12) }, // 0x1899
{0, RF_TxPowerTable_DEFAULT_PA_ENTRY(29, 1, 0, 22) }, // 0x2C5D
{1, RF_TxPowerTable_DEFAULT_PA_ENTRY(33, 1, 0, 25) }, // 0x3261
{2, RF_TxPowerTable_DEFAULT_PA_ENTRY(38, 1, 0, 31) }, // 0x3E66
{3, RF_TxPowerTable_DEFAULT_PA_ENTRY(47, 1, 0, 36) }, // 0x486F
{4, RF_TxPowerTable_DEFAULT_PA_ENTRY(32, 0, 0, 65) }, // 0x8220
{5, RF_TxPowerTable_DEFAULT_PA_ENTRY(46, 0, 0, 59) }, // 0x762E
RF_TxPowerTable_TERMINATION_ENTRY
};
// TI-RTOS RF Mode Object
// TI-RTOS RF Mode Object
RF_Mode RF_prop =
{
.rfMode = RF_MODE_AUTO,
.cpePatchFxn = &rf_patch_cpe_prop,
.mcePatchFxn = 0,
.rfePatchFxn = 0
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverrides[] =
{
// override_tc706.xml
// Tx: Configure PA ramp time, PACTL2.RC=0x3 (in ADI0, set PACTL2[4:3]=0x3)
ADI_2HALFREG_OVERRIDE(0,16,0x8,0x8,17,0x1,0x1),
// Rx: Set AGC reference level to 0x1A (default: 0x2E)
HW_REG_OVERRIDE(0x609C,0x001A),
// Rx: Set RSSI offset to adjust reported RSSI by -1 dB (default: -2), trimmed for external bias and differential configuration
(uint32_t)0x000188A3,
// Rx: Set anti-aliasing filter bandwidth to 0xD (in ADI0, set IFAMPCTL3[7:4]=0xD)
ADI_HALFREG_OVERRIDE(0,61,0xF,0xD),
// override_prop_common_sub1g.xml
// TX: Set FSCA divider bias to 1
HW32_ARRAY_OVERRIDE(0x405C,0x0001),
// TX: Set FSCA divider bias to 1
(uint32_t)0x08141131,
// override_prop_common.xml
// DC/DC regulator: In Tx with 14 dBm PA setting, use DCDCCTL5[3:0]=0xF (DITHER_EN=1 and IPEAK=7). In Rx, use default settings.
(uint32_t)0x00F788D3,
(uint32_t)0xFFFFFFFF
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverridesTxStd[] =
{
// override_txstd_placeholder.json
// TX Standard power override
TX_STD_POWER_OVERRIDE(0x013F),
// The ANADIV radio parameter based on LO divider and front end settings
(uint32_t)0x11310703,
// override_phy_tx_pa_ramp_genfsk_std.json
// Tx: Configure PA ramping, set wait time before turning off (0x1A ticks of 16/24 us = 17.3 us).
HW_REG_OVERRIDE(0x6028,0x001A),
// Set TXRX pin to 0 in RX and high impedance in idle/TX.
HW_REG_OVERRIDE(0x60A8,0x0401),
(uint32_t)0xFFFFFFFF
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverridesTx20[] =
{
// override_tx20_placeholder.json
// TX HighPA power override
TX20_POWER_OVERRIDE(0x001B8ED2),
// The ANADIV radio parameter based on LO divider and front end settings
(uint32_t)0x11C10703,
// override_phy_tx_pa_ramp_genfsk_hpa.json
// Tx: Configure PA ramping, set wait time before turning off (0x1F ticks of 16/24 us = 20.3 us).
HW_REG_OVERRIDE(0x6028,0x001F),
// Set TXRX pin to 0 in RX/TX and high impedance in idle.
HW_REG_OVERRIDE(0x60A8,0x0001),
(uint32_t)0xFFFFFFFF
};
// CMD_PROP_RADIO_DIV_SETUP_PA
// Proprietary Mode Radio Setup Command for All Frequency Bands
rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t RF_cmdPropRadioDivSetup =
{
.commandNo = 0x3807,
.status = 0x0000,
.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.modulation.modType = 0x1,
.modulation.deviation = 0x64,
.modulation.deviationStepSz = 0x0,
.symbolRate.preScale = 0xF,
.symbolRate.rateWord = 0x8000,
.symbolRate.decimMode = 0x0,
.rxBw = 0x5D,
.preamConf.nPreamBytes = 0x4,
.preamConf.preamMode = 0x0,
.formatConf.nSwBits = 0x20,
.formatConf.bBitReversal = 0x0,
.formatConf.bMsbFirst = 0x1,
.formatConf.fecMode = 0x0,
.formatConf.whitenMode = 0x0,
.config.frontEndMode = 0x0,
.config.biasMode = 0x1,
.config.analogCfgMode = 0x0,
.config.bNoFsPowerUp = 0x0,
.config.bSynthNarrowBand = 0x0,
.txPower = 0x762E,
.pRegOverride = pOverrides,
.centerFreq = 0x00AF,
.intFreq = 0x8000,
.loDivider = 0x00,
.pRegOverrideTxStd = 0,
.pRegOverrideTx20 = 0
};
// CMD_FS
// Frequency Synthesizer Programming Command
rfc_CMD_FS_t RF_cmdFs =
{
.commandNo = 0x0803,
.status = 0x0000,
.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.frequency = 0x00DF,
.fractFreq = 0x2200,
.synthConf.bTxMode = 0x0,
.synthConf.refFreq = 0x0,
.__dummy0 = 0x00,
.__dummy1 = 0x00,
.__dummy2 = 0x00,
.__dummy3 = 0x0000
};
// CMD_PROP_TX
// Proprietary Mode Transmit Command
rfc_CMD_PROP_TX_t RF_cmdPropTx =
{
.commandNo = 0x3801,
.status = 0x0000,
.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bUseCrc = 0x1,
.pktConf.bVarLen = 0x1,
.pktLen = 0x14,
.syncWord = 0x930B51DE,
.pPkt = 0 // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};
rfc_CMD_PROP_TX_ADV_t RF_cmdPropTxAdv =
{
.commandNo = 0x3803, // CMD_PROP_TX_ADV鍛戒护鍙�
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x1,
.pktConf.bUseCrc = 0x0,
.pktConf.bCrcIncSw = 0x0,
.pktConf.bCrcIncHdr = 0x0,
.numHdrBits = 0x0,
.pktLen = 6816,
.startConf.bExtTxTrig = 0x0,
.startConf.inputMode = 0x0,
.startConf.source = 0x0,
.preTrigger.triggerType = 0x0,
.preTrigger.bEnaCmd = 0x0,
.preTrigger.triggerNo = 0x0,
.preTrigger.pastTrig = 0x0,
.preTime = 0x00000000,
.syncWord = 0x930B51DE, // sync word
.pPkt = 0,
};
// CMD_PROP_RX
// Proprietary Mode Receive Command
rfc_CMD_PROP_RX_t RF_cmdPropRx =
{
.commandNo = 0x3802,
.status = 0x0000,
.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bRepeatOk = 0x0,
.pktConf.bRepeatNok = 0x0,
.pktConf.bUseCrc = 0x1,
.pktConf.bVarLen = 0x1,
.pktConf.bChkAddress = 0x0,
.pktConf.endType = 0x0,
.pktConf.filterOp = 0x0,
.rxConf.bAutoFlushIgnored = 0x0,
.rxConf.bAutoFlushCrcErr = 0x0,
.rxConf.bIncludeHdr = 0x1,
.rxConf.bIncludeCrc = 0x0,
.rxConf.bAppendRssi = 0x0,
.rxConf.bAppendTimestamp = 0x0,
.rxConf.bAppendStatus = 0x1,
.syncWord = 0x930B51DE,
.maxPktLen = 0xFF,
.address0 = 0xAA,
.address1 = 0xBB,
.endTrigger.triggerType = 0x1,
.endTrigger.bEnaCmd = 0x0,
.endTrigger.triggerNo = 0x0,
.endTrigger.pastTrig = 0x0,
.endTime = 0x00000000,
.pQueue = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
.pOutput = 0 // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};
0 2. The packet rx code is as follows.
Radio_init(8,&RF_cmdPropRadioDivSetup,&RF_cmdFs);//the same as the boves
if( RFQueue_defineQueue(&dataQueue,
rxDataEntryBuffer,
sizeof(rxDataEntryBuffer),
NUM_DATA_ENTRIES,
MAX_LENGTH + NUM_APPENDED_BYTES))
{
/* Failed to allocate space for all data entries */
while(1);
}
/* Modify CMD_PROP_RX command for application needs */
/* Set the Data Entity queue for received data */
RF_cmdPropRxAdv.pQueue = &dataQueue;
/* Discard ignored packets from Rx queue */
RF_cmdPropRxAdv.rxConf.bAutoFlushIgnored = 1;
/* Discard packets with CRC error from Rx queue */
RF_cmdPropRxAdv.rxConf.bAutoFlushCrcErr = 1;
/* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
RF_cmdPropRxAdv.maxPktLen = MAX_LENGTH;
RF_cmdPropRxAdv.pktConf.bRepeatOk = 1;
RF_cmdPropRxAdv.pktConf.bRepeatNok = 1;
/* Request access to the radio */
#if defined(DeviceFamily_CC26X0R2)
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioSetup, &rfParams);
#else
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
#endif// DeviceFamily_CC26X0R2
/* Set the frequency */
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
RF_EventMask terminationReason = RF_EventCmdAborted | RF_EventCmdPreempted;
while(( terminationReason & RF_EventCmdAborted ) && ( terminationReason & RF_EventCmdPreempted ))
{
/* Enter RX mode and stay forever in RX */
// Re-run if command was aborted due to SW TCXO compensation
terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxAdv,
RF_PriorityNormal, &callback,
RF_EventRxEntryDone);
for(int i = 0;i<MAX_LENGTH;i++){
printf(" %d,",packet[i]);// want to print receive bits ,is right?
}
printf("\n");
}
The configuration file ti_radio_config.c in packet_rx is as follows:
/*
* ======== ti_radio_config.c ========
*/
#include "ti_radio_config.h"
#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_prop.h)
// *********************************************************************************
// RF Frontend configuration
// *********************************************************************************
// RF design based on: LP_CC1352P7-1
// See the Technical Reference Manual for further details about the "txPower" Command field.
// The PA settings require the CCFG_FORCE_VDDR_HH = 0 unless stated otherwise.
// 2400 MHz, 5 dBm
RF_TxPowerTable_Entry txPowerTable_2400_pa5[TXPOWERTABLE_2400_PA5_SIZE] =
{
{-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(8, 3, 0, 2) }, // 0x04C8
{-18, RF_TxPowerTable_DEFAULT_PA_ENTRY(10, 3, 0, 2) }, // 0x04CA
{-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(13, 3, 0, 3) }, // 0x06CD
{-12, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 3, 0, 5) }, // 0x0AD0
{-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 3, 0, 5) }, // 0x0AD3
{-9, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 3, 0, 6) }, // 0x0CD4
{-6, RF_TxPowerTable_DEFAULT_PA_ENTRY(19, 2, 0, 11) }, // 0x1693
{-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(21, 2, 0, 11) }, // 0x1695
{-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(25, 2, 0, 12) }, // 0x1899
{0, RF_TxPowerTable_DEFAULT_PA_ENTRY(29, 1, 0, 22) }, // 0x2C5D
{1, RF_TxPowerTable_DEFAULT_PA_ENTRY(33, 1, 0, 25) }, // 0x3261
{2, RF_TxPowerTable_DEFAULT_PA_ENTRY(38, 1, 0, 31) }, // 0x3E66
{3, RF_TxPowerTable_DEFAULT_PA_ENTRY(47, 1, 0, 36) }, // 0x486F
{4, RF_TxPowerTable_DEFAULT_PA_ENTRY(32, 0, 0, 65) }, // 0x8220
{5, RF_TxPowerTable_DEFAULT_PA_ENTRY(46, 0, 0, 59) }, // 0x762E
RF_TxPowerTable_TERMINATION_ENTRY
};
// TI-RTOS RF Mode Object
RF_Mode RF_prop =
{
.rfMode = RF_MODE_AUTO,
.cpePatchFxn = &rf_patch_cpe_prop,
.mcePatchFxn = 0,
.rfePatchFxn = 0
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverrides[] =
{
// override_tc706.json
// Tx: Configure PA ramp time, PACTL2.RC=0x3 (in ADI0, set PACTL2[4:3]=0x3)
ADI_2HALFREG_OVERRIDE(0,16,0x8,0x8,17,0x1,0x1),
// Rx: Set AGC reference level to 0x1A (default: 0x2E)
HW_REG_OVERRIDE(0x609C,0x001A),
// Rx: Set RSSI offset to adjust reported RSSI by -1 dB (default: -2), trimmed for external bias and differential configuration
(uint32_t)0x000188A3,
// Rx: Set anti-aliasing filter bandwidth to 0xD (in ADI0, set IFAMPCTL3[7:4]=0xD)
ADI_HALFREG_OVERRIDE(0,61,0xF,0xD),
// override_prop_common_sub1g.json
// TX: Set FSCA divider bias to 1
HW32_ARRAY_OVERRIDE(0x405C,0x0001),
// TX: Set FSCA divider bias to 1
(uint32_t)0x08141131,
// override_prop_common.json
// DC/DC regulator: In Tx with 14 dBm PA setting, use DCDCCTL5[3:0]=0xF (DITHER_EN=1 and IPEAK=7). In Rx, use default settings.
(uint32_t)0x00F788D3,
(uint32_t)0xFFFFFFFF
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverridesTxStd[] =
{
// override_txstd_placeholder.json
// TX Standard power override
TX_STD_POWER_OVERRIDE(0x013F),
// The ANADIV radio parameter based on LO divider and front end settings
(uint32_t)0x11310703,
// override_phy_tx_pa_ramp_genfsk_std.json
// Tx: Configure PA ramping, set wait time before turning off (0x1A ticks of 16/24 us = 17.3 us).
HW_REG_OVERRIDE(0x6028,0x001A),
// Set TXRX pin to 0 in RX and high impedance in idle/TX.
HW_REG_OVERRIDE(0x60A8,0x0401),
(uint32_t)0xFFFFFFFF
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP_PA
uint32_t pOverridesTx20[] =
{
// override_tx20_placeholder.json
// TX HighPA power override
TX20_POWER_OVERRIDE(0x001B8ED2),
// The ANADIV radio parameter based on LO divider and front end settings
(uint32_t)0x11C10703,
// override_phy_tx_pa_ramp_genfsk_hpa.json
// Tx: Configure PA ramping, set wait time before turning off (0x1F ticks of 16/24 us = 20.3 us).
HW_REG_OVERRIDE(0x6028,0x001F),
// Set TXRX pin to 0 in RX/TX and high impedance in idle.
HW_REG_OVERRIDE(0x60A8,0x0001),
(uint32_t)0xFFFFFFFF
};
// CMD_PROP_RADIO_DIV_SETUP_PA
// Proprietary Mode Radio Setup Command for All Frequency Bands
rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t RF_cmdPropRadioDivSetup =
{
.commandNo = 0x3807,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.modulation.modType = 0x1,
.modulation.deviation = 0x64,
.modulation.deviationStepSz = 0x0,
.symbolRate.preScale = 0xF,
.symbolRate.rateWord = 0x8000,
.symbolRate.decimMode = 0x0,
.rxBw = 0x5D,
.preamConf.nPreamBytes = 0x4,
.preamConf.preamMode = 0x0,
.formatConf.nSwBits = 0x20,
.formatConf.bBitReversal = 0x0,
.formatConf.bMsbFirst = 0x1,
.formatConf.fecMode = 0x0,
.formatConf.whitenMode = 0x0,
.config.frontEndMode = 0x0,
.config.biasMode = 0x1,
.config.analogCfgMode = 0x0,
.config.bNoFsPowerUp = 0x0,
.config.bSynthNarrowBand = 0x0,
.txPower = 0x762E,
.pRegOverride = pOverrides,
.centerFreq = 0x09B2,
.intFreq = 0x8000,
.loDivider = 0x00,
.pRegOverrideTxStd = 0,
.pRegOverrideTx20 = 0
};
// CMD_FS
// Frequency Synthesizer Programming Command
rfc_CMD_FS_t RF_cmdFs =
{
.commandNo = 0x0803,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.frequency = 0x09B2,
.fractFreq = 0x9E67,
.synthConf.bTxMode = 0x0,
.synthConf.refFreq = 0x0,
.__dummy0 = 0x00,
.__dummy1 = 0x00,
.__dummy2 = 0x00,
.__dummy3 = 0x0000
};
// CMD_PROP_TX
// Proprietary Mode Transmit Command
rfc_CMD_PROP_TX_t RF_cmdPropTx =
{
.commandNo = 0x3801,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bUseCrc = 0x1,
.pktConf.bVarLen = 0x1,
.pktLen = 0x14,
.syncWord = 0x930B51DE,
.pPkt = 0
};
// CMD_PROP_RX
// Proprietary Mode Receive Command
rfc_CMD_PROP_RX_t RF_cmdPropRx =
{
.commandNo = 0x3804,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bRepeatOk = 0x0,
.pktConf.bRepeatNok = 0x0,
.pktConf.bUseCrc = 0x1,
.pktConf.bVarLen = 0x1,
.pktConf.bChkAddress = 0x0,
.pktConf.endType = 0x0,
.pktConf.filterOp = 0x0,
.rxConf.bAutoFlushIgnored = 0x0,
.rxConf.bAutoFlushCrcErr = 0x0,
.rxConf.bIncludeHdr = 0x1,
.rxConf.bIncludeCrc = 0x0,
.rxConf.bAppendRssi = 0x0,
.rxConf.bAppendTimestamp = 0x0,
.rxConf.bAppendStatus = 0x1,
.syncWord = 0x930B51DE,
.maxPktLen = 0xFF,
.address0 = 0xAA,
.address1 = 0xBB,
.endTrigger.triggerType = 0x1,
.endTrigger.bEnaCmd = 0x0,
.endTrigger.triggerNo = 0x0,
.endTrigger.pastTrig = 0x0,
.endTime = 0x00000000,
.pQueue = 0,
.pOutput = 0
};
rfc_CMD_PROP_RX_ADV_t RF_cmdPropRxAdv =
{
.commandNo = 0x3802,
.status = 0x0000,
.pNextOp = 0,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bRepeatOk = 0x1,
.pktConf.bRepeatNok = 0x1,
.pktConf.bUseCrc = 0x1,
.pktConf.bCrcIncSw = 0x1,
.pktConf.bCrcIncHdr = 0x0,
.pktConf.endType = 0x0,
.pktConf.filterOp = 0x0,
.rxConf.bAutoFlushIgnored = 0x0,
.rxConf.bAutoFlushCrcErr = 0x0,
.rxConf.bIncludeHdr = 0x1,
.rxConf.bIncludeCrc = 0x0,
.rxConf.bAppendRssi = 0x0,
.rxConf.bAppendTimestamp = 0x0,
.rxConf.bAppendStatus = 0x1,
.syncWord0 = 0x930B51DE,
.syncWord1 = 0x0,
.maxPktLen = 0xFF,
.hdrConf.numHdrBits = 0,
.hdrConf.lenPos = 0,
.hdrConf.numLenBits = 0,
.addrConf.addrType = 1,
.addrConf.addrSize = 0,
.addrConf.addrPos = 0,
.addrConf.numAddr = 0,
.endTrigger.triggerType = 0x1,
.endTrigger.bEnaCmd = 0x0,
.endTrigger.triggerNo = 0x0,
.endTrigger.pastTrig = 0x0,
.endTime = 0x00000000,
.pAddr = 0,
.pQueue = 0,
.pOutput = 0
};