最近在使用SmartRF Studio对CC1310 B版本进行smartrf-settings.c的配置,
需要配置出625bps长距离模式的CMD_PROP_TX_ADV/CMD_PROP_RX_ADV命令参数,
然而SmartRF studio只能配置出CMD_PROP_TX/CMD_PROP_RX的参数,而不能配置出
CMD_PROP_TX_ADV/CMD_PROP_RX_ADV命令参数,那怎么能够配置出高级模式的
CMD_PROP_TX_ADV/CMD_PROP_RX_ADV命令参数??
XiaoBing Huang:
回复 Felix ZF:
这个我早试过了,移植到contikI的驱动下不能够工作。主要的原因是SmartRF只针对CMD_PROP_TX 和CMD_PROP_RX命令,对于
CMD_PROP_TX_ADV 和CMD_PROP_RX_ADV命令不能够配置出相应的参数,比如变化CMD_PROP_TX的参数,CMD_PROP_TX_ADV
参数不会跟着变化。具体原因我参考是https://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/t/479285?tisearch=e2e-sitesearch&keymatch=CC1310%20CMD_PROP_TX_ADV
目前我采用的配置如下,CC1310-A版本的长距离模式(625bps)能够在contiki上运行。
/*---------------------------------------------------------------------------*/ /* Overrides for CMD_PROP_RADIO_DIV_SETUP */ static uint32_t overrides[] = {// override_use_patch_prop_lrm.xml// PHY: Use MCE ROM bank 3, RFE RAM patchMCE_RFE_OVERRIDE(0,3,0,1,0,0),// override_synth_prop_430_510_div10.xml// Synth: Set recommended RTRIM to 7HW_REG_OVERRIDE(0x4038,0x0037),// Synth: Set Fref to 4 MHz(uint32_t)0x000684A3,// Synth: Configure fine calibration settingHW_REG_OVERRIDE(0x4020,0x7F00),// Synth: Configure fine calibration settingHW_REG_OVERRIDE(0x4064,0x0040),// Synth: Configure fine calibration setting(uint32_t)0xB1070503,// Synth: Configure fine calibration setting(uint32_t)0x05330523,// Synth: Set loop bandwidth after lock to 20 kHz(uint32_t)0x0A480583,// Synth: Set loop bandwidth after lock to 20 kHz(uint32_t)0x7AB80603,// Synth: Configure VCO LDO (in ADI1, set VCOLDOCFG=0x9F to use voltage input reference)ADI_REG_OVERRIDE(1,4,0x9F),// Synth: Configure synth LDO (in ADI1, set SLDOCTL0.COMP_CAP=1)ADI_HALFREG_OVERRIDE(1,7,0x4,0x4),// Synth: Use 24 MHz XOSC as synth clock, enable extra PLL filtering(uint32_t)0x02010403,// Synth: Configure extra PLL filtering(uint32_t)0x00108463,// Synth: Increase synth programming timeout (0x04B0 RAT ticks = 300 us)(uint32_t)0x04B00243,// override_phy_rx_aaf_bw_0xd.xml// Rx: Set anti-aliasing filter bandwidth to 0xD (in ADI0, set IFAMPCTL3[7:4]=0xD)ADI_HALFREG_OVERRIDE(0,61,0xF,0xD),// override_phy_gfsk_rx.xml// Rx: Set LNA bias current trim offset to 3(uint32_t)0x00038883,// Rx: Freeze RSSI on sync found eventHW_REG_OVERRIDE(0x6084,0x35F1),// override_phy_gfsk_pa_ramp_agc_reflevel_0x1a.xml// Tx: Configure PA ramping setting (0x41). Rx: Set AGC reference level to 0x1A.HW_REG_OVERRIDE(0x6088,0x411A),// Tx: Configure PA ramping settingHW_REG_OVERRIDE(0x608C,0x8213),// override_phy_lrm_rom_dsss8.xml// PHY: Configure DSSS=8HW_REG_OVERRIDE(0x505C,0x073C),// override_phy_rx_rssi_offset_neg2db.xml// Rx: Set RSSI offset to adjust reported RSSI by +5 dB(uint32_t)0x00FB88A3,// TX power override// Tx: Set PA trim to max (in ADI0, set PACTL0=0xF8)ADI_REG_OVERRIDE(0,12,0xF8),(uint32_t)0xFFFFFFFF, }; /*---------------------------------------------------------------------------*/ /* CMD_PROP_RADIO_DIV_SETUP */ rfc_CMD_PROP_RADIO_DIV_SETUP_t smartrf_settings_cmd_prop_radio_div_setup = {.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 = 0x0,.modulation.deviation = 0x14,.symbolRate.preScale = 0xF,.symbolRate.rateWord = 0x199A,.rxBw = 0x20,.preamConf.nPreamBytes = 0x3,// number of PreamBytes.preamConf.preamMode = 0x0,.formatConf.nSwBits = 0x18,//24-bits Sync word length.formatConf.bBitReversal = 0x0,.formatConf.bMsbFirst = 0x1,//MSB transmitted first.formatConf.fecMode = 0x8,//1000:long range mode.formatConf.whitenMode = 0x7,//Dynamically 802.15.4g compatible whitener and 16/32-bit CRC.config.frontEndMode = 0x0,.config.biasMode = 0x1,//.config.analogCfgMode = 0x0,.config.bNoFsPowerUp = 0x0,.txPower = 0x003F,//set application power.pRegOverride = overrides,.centerFreq = 0x01B1,//set application centerFreq.intFreq = 0x8000,.loDivider = 0x0A, }; /*---------------------------------------------------------------------------*/ /* CMD_FS */ rfc_CMD_FS_t smartrf_settings_cmd_fs = {.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 = 0x01B1,//// .frequency = 868,.fractFreq = 0x0000,//set application fractFreq.synthConf.bTxMode = 0x0,.synthConf.refFreq = 0x0,.__dummy0 = 0x00,.__dummy1 = 0x00,.__dummy2 = 0x00,.__dummy3 = 0x0000, }; /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /* CMD_PROP_TX_ADV */ rfc_CMD_PROP_TX_ADV_t smartrf_settings_cmd_prop_tx_adv = {.commandNo = 0x3803,.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.bCrcIncSw = 0x0, /* .4g mode */.pktConf.bCrcIncHdr = 0x0, /* .4g mode */.numHdrBits = 0x10 /* 16: .4g mode */,.pktLen = 0x0000,.startConf.bExtTxTrig = 0x0,.startConf.inputMode = 0x0,.startConf.source = 0x0,.preTrigger.triggerType = TRIG_REL_START,.preTrigger.bEnaCmd = 0x0,.preTrigger.triggerNo = 0x0,.preTrigger.pastTrig = 0x1,.preTime = 0x00000000,.syncWord = 0x0055904e,.pPkt = 0, }; /*---------------------------------------------------------------------------*/ /* CMD_PROP_RX_ADV */ rfc_CMD_PROP_RX_ADV_t smartrf_settings_cmd_prop_rx_adv = {.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 = 0x1,.pktConf.bRepeatNok = 0x1,.pktConf.bUseCrc = 0x1,.pktConf.bCrcIncSw = 0x0, /* .4g mode */.pktConf.bCrcIncHdr = 0x0, /* .4g mode */.pktConf.endType = 0x0,.pktConf.filterOp = 0x1,.rxConf.bAutoFlushIgnored = 0x1,.rxConf.bAutoFlushCrcErr = 0x1,.rxConf.bIncludeHdr = 0x0,.rxConf.bIncludeCrc = 0x0,.rxConf.bAppendRssi = 0x1,.rxConf.bAppendTimestamp = 0x0,.rxConf.bAppendStatus = 0x1,.syncWord0 = 0x0055904e,.syncWord1 = 0x00000000,.maxPktLen = 0x0000, /* To be populated by the driver. */.hdrConf.numHdrBits = 0x10, /* 16: .4g mode */.hdrConf.lenPos = 0x0, /* .4g mode */.hdrConf.numLenBits = 0x0B, /* 11 = 0x0B .4g mode */.addrConf.addrType = 0x0,.addrConf.addrSize = 0x0,.addrConf.addrPos = 0x0,.addrConf.numAddr = 0x0,.lenOffset = -4, /* .4g mode */.endTrigger.triggerType = TRIG_NEVER,.endTrigger.bEnaCmd = 0x0,.endTrigger.triggerNo = 0x0,.endTrigger.pastTrig = 0x0,.endTime = 0x00000000,.pAddr = 0,.pQueue = 0,.pOutput = 0, };