TI中文支持网
TI专业的中文技术问题搜集分享网站

CC1310 SmartRF Studio 7 配置参数 移入代码中不能使用

论坛各位专家好

         我打开SmartRF Studio 7   -> CC1310 -> settings for 431-527MHz band -> 50kbps,2-GFSK,25kHz deviation  

         一、修改RF Parameters中的  Symbol Rate = 10.00061 kBaud ;Devuation =30kHz

         二、修改Command View中的 CMD_PROP_RADIO_DIV_SETUP 中的 modulation.modType=0(即FSK模式);其余参数默认

         网上购买的个人设计的1块开发板,在Packet TX 中start发射信号正常;在Packet RX中start也可正常接收到另外一个设备发过来的信号。

         通过Code Export导出配置覆盖  rfEasyLinkTx中的samrtrf_settings.c/.h发射信号正常;但同样的配置覆盖rfEasyLinkRx中的samrtrf_settings.c/.h后不能正常接收到另外一个设备发过来的信号,一直在EasyLink_receive中;编译环境是CCS。

         这是什么原因引起的~

Kevin Qiu1:

RX和TX的参数是否一致,用SmartRF Studio 7测试是否正常

user5201938:

回复 Kevin Qiu1:

1.导出的smartrf_settings.c 如下(我是用复制粘贴的方式,把ccs中的smartrf_settings.c内容覆盖掉)
rfc_CMD_PROP_RADIO_DIV_SETUP_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 = 0x0,.modulation.deviation = 0x78,.symbolRate.preScale = 0xF,.symbolRate.rateWord = 0x199A,.symbolRate.decimMode = 0x0,.rxBw = 0x24,.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,.txPower = 0x913F,.pRegOverride = pOverrides,.centerFreq = 0x01B1,.intFreq = 0x8000,.loDivider = 0x0A
};
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 = 0x01B1,.fractFreq = 0xE500,.synthConf.bTxMode = 0x0,.synthConf.refFreq = 0x0,.__dummy0 = 0x00,.__dummy1 = 0x00,.__dummy2 = 0x00,.__dummy3 = 0x0000
};
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_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
};
2.SmartRF Studio 7通信完全正常,Packet Error Rate 为 0

Kevin Qiu1:

回复 user5201938:

smartrf_settings.h是否做了替换?

user5201938:

回复 Kevin Qiu1:

1.也做了替换, 替换后如下
#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_prop_cmd.h)
#include <ti/drivers/rf/RF.h>

// TI-RTOS RF Mode Object
extern RF_Mode RF_prop;

// RF Core API Commands
extern rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup;
extern rfc_CMD_FS_t RF_cmdFs;
extern rfc_CMD_PROP_TX_t RF_cmdPropTx;
extern rfc_CMD_PROP_RX_t RF_cmdPropRx;

// RF Core API Overrides
extern uint32_t pOverrides[];

#endif // _SMARTRF_SETTINGS_H_

2.是否跟pOverrides[] 这个参数有关,这个参数配置如下
RF_Mode RF_prop =
{.rfMode = RF_MODE_PROPRIETARY_SUB_1,.cpePatchFxn = &rf_patch_cpe_genfsk,.mcePatchFxn = 0,.rfePatchFxn = &rf_patch_rfe_genfsk
};
// Overrides for CMD_PROP_RADIO_DIV_SETUP
uint32_t pOverrides[] =
{// override_use_patch_prop_genfsk.xml// PHY: Use MCE ROM bank 4, RFE RAM patchMCE_RFE_OVERRIDE(0,4,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,0×4,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_synth_disable_bias_div10.xml// Synth: Set divider bias to disabledHW32_ARRAY_OVERRIDE(0x405C,1),// Synth: Set divider bias to disabled (specific for loDivider=10)(uint32_t)0x18000280,// 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_rx_rssi_offset_neg2db.xml// Rx: Set RSSI offset to adjust reported RSSI by -2 dB (default: 0), trimmed for external bias and differential configuration(uint32_t)0x000288A3,// TX power override// Tx: Set PA trim to max (in ADI0, set PACTL0=0xF8)ADI_REG_OVERRIDE(0,12,0xF8),(uint32_t)0xFFFFFFFF
};

3.EasyLink_receive在什么条件下会有数值?
a.收到完整的PreamBytes 还是部分 即可->我设置的是4bytes
b.判断sync word正确?
c.len正确?->在 CMD_PROP_RX中pktConf.bVarLen=1即Receive length as first byte
d.crc校验 正确?->在 CMD_PROP_RX中pktConf.bUseCrc=1/0我全部尝试过,无作用

4. 有没有可以收到PreamBytes 后即可输出后面数据的函数?

user5201938:

回复 Kevin Qiu1:

上面的设置
1.是否需要覆盖smartrf_settings_predefined.c/.h中的内容。若需,如何覆盖
2.除了smartrf_settings和smartrf_settings_predefined是否需要覆盖其它文件的内容

Kevin Qiu1:

回复 user5201938:

参考这里的步骤dev.ti.com/…/node

user5201938:

回复 Kevin Qiu1:

SmartRF Studio 7生成的配置,导入 rfPacketRx_CC1310_LAUNCHXL_nortos_ccs 中的smartrf_settings.c/.h是可以接收到数据
导入到 rfEasyLinkRx_CC1310_LAUNCHXL_nortos_ccs接收不到数据

Kevin Qiu1:

回复 user5201938:

我测试正常,检查操作是否正确,RX、TX参数是否一致

赞(0)
未经允许不得转载:TI中文支持网 » CC1310 SmartRF Studio 7 配置参数 移入代码中不能使用
分享到: 更多 (0)