207 lines
5.9 KiB
C
207 lines
5.9 KiB
C
//*********************************************************************************
|
|
// Generated by SmartRF Studio version 2.8.0 ( build #41)
|
|
// Compatible with SimpleLink SDK version: CC13x2 SDK 1.60.xx.xx
|
|
// Device: CC1352 Rev. 1.0
|
|
//
|
|
//*********************************************************************************
|
|
|
|
|
|
//*********************************************************************************
|
|
// Parameter summary
|
|
// IEEE Channel: 11
|
|
// Frequency: 2405 MHz
|
|
// SFD: 0
|
|
// Preamble (32 bit): 01010101...
|
|
// TX Power: 5 dBm
|
|
|
|
#include <ti/devices/DeviceFamily.h>
|
|
#include DeviceFamily_constructPath(driverlib/rf_mailbox.h)
|
|
#include DeviceFamily_constructPath(driverlib/rf_common_cmd.h)
|
|
#include DeviceFamily_constructPath(driverlib/rf_ieee_cmd.h)
|
|
#include <ti/drivers/rf/RF.h>
|
|
#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_ieee_802_15_4.h)
|
|
#include DeviceFamily_constructPath(rf_patches/rf_patch_mce_ieee_802_15_4.h)
|
|
|
|
#include "rf-common.h"
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
/* Default TX power settings for the 2.4 GHz band */
|
|
RF_TxPower RF_ieeeTxPower[] = {
|
|
{ 5, 0x9330 },
|
|
{ 4, 0x9324 },
|
|
{ 3, 0x5a1c },
|
|
{ 2, 0x4e18 },
|
|
{ 1, 0x4214 },
|
|
{ 0, 0x3161 },
|
|
{ -3, 0x2558 },
|
|
{ -6, 0x1d52 },
|
|
{ -9, 0x194e },
|
|
{ -12, 0x144b },
|
|
{ -15, 0x0ccb },
|
|
{ -18, 0x0cc9 },
|
|
{ -21, 0x0cc7 },
|
|
{-128, 0xFFFF },
|
|
};
|
|
const size_t RF_ieeeTxPowerLen = sizeof(RF_ieeeTxPower) / sizeof(RF_ieeeTxPower[0]);
|
|
|
|
|
|
// TI-RTOS RF Mode Object
|
|
RF_Mode RF_ieeeMode =
|
|
{
|
|
.rfMode = RF_MODE_AUTO,
|
|
.cpePatchFxn = &rf_patch_cpe_ieee_802_15_4,
|
|
.mcePatchFxn = &rf_patch_mce_ieee_802_15_4,
|
|
.rfePatchFxn = 0,
|
|
};
|
|
|
|
|
|
// Overrides for CMD_RADIO_SETUP
|
|
static uint32_t pOverrides[] =
|
|
{
|
|
// override_use_patch_ieee_802_15_4.xml
|
|
// PHY: Use MCE RAM patch, RFE ROM bank 1
|
|
MCE_RFE_OVERRIDE(1,0,0,0,1,0),
|
|
// override_synth_ieee_802_15_4.xml
|
|
// Synth: Use 48 MHz crystal
|
|
(uint32_t)0x00408403,
|
|
// override_dcdc_rx_tx_common.xml
|
|
// DC/DC regulator: In Tx, use DCDCCTL5[3:0]=0xC (DITHER_EN=1 and IPEAK=4). In Rx, use DCDCCTL5[3:0]=0xC (DITHER_EN=1 and IPEAK=4).
|
|
(uint32_t)0xFCFC08C3,
|
|
(uint32_t)0xFFFFFFFF,
|
|
};
|
|
|
|
|
|
// CMD_RADIO_SETUP
|
|
// Radio Setup Command for Pre-Defined Schemes
|
|
rfc_CMD_RADIO_SETUP_t RF_cmdRadioSetup =
|
|
{
|
|
.commandNo = 0x0802,
|
|
.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,
|
|
.mode = 0x01,
|
|
.loDivider = 0x00,
|
|
.config.frontEndMode = 0x0,
|
|
.config.biasMode = 0x0,
|
|
.config.analogCfgMode = 0x0,
|
|
.config.bNoFsPowerUp = 0x0,
|
|
.txPower = 0x001F,
|
|
.pRegOverride = pOverrides,
|
|
};
|
|
|
|
|
|
// 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 = 0x0965,
|
|
.fractFreq = 0x0000,
|
|
.synthConf.bTxMode = 0x0,
|
|
.synthConf.refFreq = 0x0,
|
|
.__dummy0 = 0x00,
|
|
.__dummy1 = 0x00,
|
|
.__dummy2 = 0x00,
|
|
.__dummy3 = 0x0000,
|
|
};
|
|
|
|
|
|
// CMD_IEEE_RX
|
|
// IEEE 802.15.4 Receive Command
|
|
rfc_CMD_IEEE_RX_t RF_cmdIeeeRx =
|
|
{
|
|
.commandNo = CMD_IEEE_RX,
|
|
.status = IDLE,
|
|
.pNextOp = NULL,
|
|
.startTime = 0x00000000,
|
|
.startTrigger.triggerType = TRIG_NOW,
|
|
.condition.rule = COND_NEVER,
|
|
.channel = 0,
|
|
.rxConfig.bAutoFlushCrc = 0x1,
|
|
.rxConfig.bAutoFlushIgn = 0x0,
|
|
.rxConfig.bIncludePhyHdr = 0x0,
|
|
.rxConfig.bIncludeCrc = 0x1,
|
|
.rxConfig.bAppendRssi = 0x1,
|
|
.rxConfig.bAppendCorrCrc = 0x1,
|
|
.rxConfig.bAppendSrcInd = 0x0,
|
|
.rxConfig.bAppendTimestamp = 0x1,
|
|
.pRxQ = NULL,
|
|
.pOutput = NULL,
|
|
.frameFiltOpt.frameFiltEn = 0x0,
|
|
.frameFiltOpt.frameFiltStop = 0x1,
|
|
.frameFiltOpt.autoAckEn = 0x0,
|
|
.frameFiltOpt.slottedAckEn = 0x0,
|
|
.frameFiltOpt.autoPendEn = 0x0,
|
|
.frameFiltOpt.defaultPend = 0x0,
|
|
.frameFiltOpt.bPendDataReqOnly = 0x0,
|
|
.frameFiltOpt.bPanCoord = 0x0,
|
|
.frameFiltOpt.maxFrameVersion = 0x2,
|
|
.frameFiltOpt.bStrictLenFilter = 0x0,
|
|
.frameTypes.bAcceptFt0Beacon = 0x1,
|
|
.frameTypes.bAcceptFt1Data = 0x1,
|
|
.frameTypes.bAcceptFt2Ack = 0x1,
|
|
.frameTypes.bAcceptFt3MacCmd = 0x1,
|
|
.frameTypes.bAcceptFt4Reserved = 0x1,
|
|
.frameTypes.bAcceptFt5Reserved = 0x1,
|
|
.frameTypes.bAcceptFt6Reserved = 0x1,
|
|
.frameTypes.bAcceptFt7Reserved = 0x1,
|
|
.ccaOpt.ccaEnEnergy = 0x1,
|
|
.ccaOpt.ccaEnCorr = 0x1,
|
|
.ccaOpt.ccaEnSync = 0x1,
|
|
.ccaOpt.ccaCorrOp = 0x1,
|
|
.ccaOpt.ccaSyncOp = 0x0,
|
|
.ccaOpt.ccaCorrThr = 0x3,
|
|
.ccaRssiThr = 0x64,
|
|
.numExtEntries = 0x00,
|
|
.numShortEntries = 0x00,
|
|
.pExtEntryList = NULL,
|
|
.pShortEntryList = NULL,
|
|
.localExtAddr = 0x0000000012345678,
|
|
.localShortAddr = 0xABBA,
|
|
.localPanID = 0x0000,
|
|
.endTrigger.triggerType = TRIG_NEVER,
|
|
.endTrigger.bEnaCmd = 0x0,
|
|
.endTrigger.triggerNo = 0x0,
|
|
.endTrigger.pastTrig = 0x0,
|
|
.endTime = 0x00000000,
|
|
};
|
|
|
|
|
|
// CMD_IEEE_TX
|
|
// IEEE 802.15.4 Transmit Command
|
|
rfc_CMD_IEEE_TX_t RF_cmdIeeeTx =
|
|
{
|
|
.commandNo = 0x2C01,
|
|
.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,
|
|
.txOpt.bIncludePhyHdr = 0x0,
|
|
.txOpt.bIncludeCrc = 0x0,
|
|
.txOpt.payloadLenMsb = 0x0,
|
|
.payloadLen = 0x1E,
|
|
.pPayload = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
|
|
.timeStamp = 0x00000000,
|
|
};
|
|
|