主题中讨论的其他器件: CC2630、 TIMAC
在哪里可以找到 CC2650的 PER 测试程序?
在 TI RTOS 中、我找到了适用于 cc2650的 PER 测试程序、但未提供802.15.4模式。
从哪里可以找到它?
谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
当 我使用 RF_runCmd 发送消息时,我使用了一个简单的示例来测试 IEEE 802.15.4模式,但程序在"
rf_runCmd (rfHandle、(rf_Op*)&rf_cmdIeeeTx、rf_PriorityNormal、NULL、0);
"
这是我的代码。
/*
=== pwmled.c ===
//
//* XDCtools 头文件*/
#include
#include
/* BIOS 头文件*/
#include
#include
#include
#include
#include
#include
#include
/* TI-RTOS 头文件*/
#include
/***** 包括***** //*
XDCtools 头文件*/
#include
/* TI-RTOS 头文件*/
#include
/*板头文件*/
#include "Board.h"
#include "smartrf_settings.h"
#include
#include
#include
#include
#define PAYLOAD_LENGTH 30 //要发送的数据包的长度*/
static uint8_t packet[PAYLOAD_LENGTH];
//
////*示例/板头文件*/
#include "Board.h"
GPTimerCC26XX_Handle hTimer0、hTimer1;
PIN_STATE gpTimerPinState;
PIN_Handle gpTimerPinHandle;
//***** 变量声明***** /
static rf_Object rfObject;
static rf_handle rfHandle;
rf_ScheduleCmdParams schParams;
//
*应用程序 LED 引脚配置表:
*-所有 LED 板 LED 均关闭。
*/
PIN_Config ledPinTable[]={
BOARD_LED0 | PIN_GPIO_OUTP_EN | PIN_GPIO_LOW | PIN_PushPull | PIN_DRVSTR_MAX、
BOARD_LED1 | PIN_GPIO_OUTP_EN | PIN_GPIO_LOW | PIN_PushPull | PIN_DRVSTR_MAX、
PIN_TERMINATE
};
/*
=== main ====
*/
int main()
{
PIN_init (BoardGpioInitTable);
gpTimerPinHandle = PIN_OPEN (&gpTimerPinState、ledPinTable);
if (!gpTimerPinHandle)
{
System_abort ("初始化板 LED 引脚时出错");
}
rf_params rfParams;
rf_params_init (&rfParams);
rfParams.nInactivityTimeout = 500;// 500us
//配置射频计划命令参数
schParams.priority = rf_PriorityNormal;
schParams.EndTime = 0;
rf_cmdIeeeTx.payloadLen =有效载荷长度;
rf_cmdIeeeTx.pPayload =数据包;
rf_cmdIeeeTx.startTrigger.triggerType = trig_now;
/*请求对讲机的访问*/
rfHandle = RF_OPEN (&rfObject、&RF_prop、(RF_RadioSetup*)&RF_cmdRadioSetup、&rfParams);
while (1)
{
/*创建具有随机有效载荷的数据包*/
uint8_t i;
对于(I = 0;I < PAYLOAD_LENGTH;I++)
{
数据包[i]= 0x55;
}
RF_cmdFs.frequency = 0x0965;//通道11
rf_postCmd (rfHandle、(rf_Op*)&rf_cmdf、rf_PriorityNormal、NULL、0);
RF_EventMask 结果= RF_runCmd (rfHandle、(RF_OP*)&RF_cmdIeeTx、RF_PriorityNormal、NULL、0);
//RF_cmdFs.frequency = 0x0983;//通道17
//RF_postCmd (rfHandle、(RF_OP*)&RF_cmdF、RF_PriorityNormal、NULL、0);
//result= rf_runCmd (rfHandle、(rf_Op*)&rf_cmdIeeeTx、rf_PriorityNormal、NULL、0);
//安排一个专有的 TX 命令
//rf_scheduleCmd (rfHandle、(rf_Op*)&rf_cmdIeeeTx、&schParams、NULL、RF_EventLastCmdDone);
PIN_setOutputValue (gpTimerPinHandle、Board_LED1、!PIN_getOutputValue (Board_LED1));
}
// Hwi_Params HP;
// Hwi_Params_init (&HP);
////中断默认启用
// HP.enableInt = true;
//
////// Hwi_Params_init
(&HP);// HtimerInt 结构、HtimerInt (针对 HtimerInt、#rback、HtimerInt、H0a 中断)
// Hwi_setPriority (INT_GPT0A、0);
/*启用中断并启动 SYS/BIOS */
}
----------------------------------
// //由 SmartRF Studio 版本2.11.0 (内部版本号126)生成 //应用的模板与 tirtos_simplelink_2_21_00兼容 //器件:CC2650版本2.2 // ********* // //参数摘要 // IEEE 通道:11 //频率:2405MHz // SFD:0 //数据包数据:255 //前导码 (32位):01010101... // TX 功率:5dBm #include #include #include #include #include #include "smartrf_settings.h" // TI-RTOS 射频模式对象 rf_Mode rf_prop = { rfMode = RF_MODE_IEEE_15_4、 .cpePatchFxn =&rf_patch_cpe_IEEE、 .mcePatchFxn = 0、 .rfePatchFxn = 0、 }; //覆盖 CMD_RADIO_SETUP UINT32_t 覆盖[]= { // override_synth_ieee_15_4.xml //合成:将建议的 RTRIM 设置为5 HW_REG_OVERRIDE (0x4038、0x0035)、 //合成:将频率设置为3.43MHz (uint32_t) 0x000784A3、 //合成:将锁定后的环路带宽设置为80kHz (uint32_t) 0xA47E0583、 //合成:将锁定后的环路带宽设置为80kHz (uint32_t) 0xAE00603、 //合成:将锁定后的环路带宽设置为80kHz (uint32_t) 0x00010623、 //合成:配置 PLL 偏置 HW32_array_override (0x405C、1)、 //合成:配置 PLL 偏置 (uint32_t) 0x1801F800、 //合成:配置 PLL 延迟 HW32_array_override (0x402C、1)、 //合成:配置 PLL 延迟 (uint32_t) 0x00608402、 //合成:使用24MHz XOSC 作为同步时钟、启用额外的 PLL 滤波 (uint32_t) 0x02010403、 //合成:配置额外的 PLL 滤波 HW32_array_override (0x4034、1)、 //合成:配置额外的 PLL 滤波 (uint32_t) 0x177F0408、 //合成:配置额外的 PLL 滤波 (uint32_t) 0x38000463、 // override_phy_ieee_15_4.xml //合成:增加合成编程超时 (uint32_t) 0x05000243、 // Rx:调整 Rx FIFO 阈值以避免溢出 (uint32_t) 0x002082C3、 // override_frontend_id.xml // Rx:设置 RSSI 偏移以将报告的 RSSI 调整-2dB (uint32_t) 0x000288A3、 // Rx:配置 LNA 偏置电流修整偏移 (uint32_t) 0x000F8883、 // Rx:调整 AGC DC 滤波器 HW_REG_OVERRIDE (0x50DC、0x002B)、 (uint32_t) 0xFFFFFFFF }; // CMD_RADIO_SETUP //预定义方案的无线电设置命令 RFC_CMD_RADIO_SETUP_t RF_RadiocmdSetup = { .commandNo = 0x0802、 .status = 0x0000、 .pNextOp = 0、//插入适用的指针:(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、 .__dummy0 = 0x00、 .config.frontEndMode = 0x0、 config.biasMode = 0x0、 config.analogCfgMode = 0x0、 config.bNoFsPowerUp = 0x0、 TxPower = 0x9330、 .pRegOverride = pOverrides }; // CMD_FS //频率合成器编程命令 RFC_CMD_FS_t RF_cmdF = { .commandNo = 0x0803、 .status = 0x0000、 .pNextOp = 0、//插入适用的指针:(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 = 0x1、 .synthConf.refFreq = 0x0、 .__dummy0 = 0x00、 .__dummy1 = 0x00、 .__dummy2=0x00, .__dummy3=0x0000 }; // CMD_IEEE_TX //命令 ID 号0x2C1 RFC_CMD_IEEE_TX_t RF_cmdieeTx = { .commandNo = 0x20001、 .status = 0x0000、 .pNextOp = 0、//插入适用的指针:(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、//插入适用的指针:(uint8_t*)&xxx 时间戳= 0x00000000 }; // CMD_IEEE_RX //命令 ID 号0x2801 RFC_CMD_IEEE_RX_t RF_cmdieeRx = { .commandNo = 0x2801、 .status = 0x0000、 .pNextOp = 0、//插入适用的指针:(uint8_t*)&xxx .StartTime = 0x00000000、 .startTrigger.triggerType = 0x0、 .startTrigger.bEnaCmd = 0x0、 .startTrigger.triggerNo = 0x0、 .startTrigger.PastTrig = 0x0、 .condition.rule = 0x1、 .condition.nSkip = 0x0、 .channel = 0x00、 rxConfig.bAutoFlushCrc = 0x0、 rxConfig.bAutoFlushIgn = 0x0、 rxConfig.bIncludePhyHdr = 0x0、 rxConfig.bIncludeCrc = 0x0、 rxConfig.bAppendRssi = 0x1、 rxConfig.bAppendCORCrc = 0x1、 rxConfig.bAppendSrcInd = 0x0、 rxConfig.bAppendTimestamp = 0x0、 .pRxQ = 0、//插入适用的指针:(dataQueue_t*)&xxx .pOutput = 0、//插入适用的指针:(uint8_t*)&xxx .frameFiltOpt.frameFiltEn = 0x0、 .frameFiltOpt.frameFiltStop = 0x0、 .frameFiltOpt.autoAckEn = 0x0、 .frameFiltOpt.slotedAckEn = 0x0、 .frameFiltOpt.autoPendEn = 0x0、 .frameFiltOpt.defaultPend = 0x0、 .frameFiltOpt.bPendDataReqOnly = 0x0、 .frameFiltOpt.bPanCoord = 0x0、 .frameFiltOpt.maxFrameVersion = 0x3、 .frameFiltOpt.fcfReservedMask = 0x0、 .frameFiltOpt.modifyFtFilter = 0x0、 .frameFiltOpt.bStrictLenFilter = 0x0、 .frametypes.bAcceptFt0Beacon = 0x1、 .frametypes.bAcceptFt1数据= 0x1、 .frametypes.bAccint2Ack = 0x1、 .frametypes.bAcceptFt3MacCmd = 0x1、 .frametypes.bAccint4保留= 0x1、 .frametypes.bAcceptFt5保留= 0x1、 .frametypes.bAcceptFt6保留= 0x1、 .frametypes.bAccint7保留= 0x1、 ccaOpt.ccaEnEnergy = 0x0、 ccaOpt.ccaEnCorr = 0x0、 ccaOpt.ccaEnSync = 0x0、 ccaOpt.ccaCorrOp = 0x1、 ccaOpt.ccaSyncOp = 0x1、 ccaOpt.ccaCorrThr = 0x0、 ccaRssiThr = 0x64、 .__dummy0 = 0x00、 .numExtEntry = 0x00、 .numShortEndries = 0x00、 .pExtEntryList = 0、//插入适用的指针:(uint32_t*)&xxx .pShortEntryList = 0、//插入适用的指针:(uint32_t*)&xxx .localExtAddr = 0x000012345678、 .localShortAddr = 0xABBA、 .localPanID = 0x0000、 .__dummy1 = 0x000000, endTrigger.triggerType = 0x1、 .endTrigger.bEnaCmd = 0x0、 .endTrigger.triggerNo = 0x0、 .endTrigger.PastTrig = 0x0、 .EndTime = 0x00000000 };
我使用 tirtos_cc13xx_cc26xx_2_21_01_08、IAR 和 CC2650芯片。
我可以使用 tirtos_cc13xx_cc26xx_2_21_01_08中的射频数据包错误率测试示例发送数据包。
但我无法使用 tirtos_cc13xx_cc26xx_2_21_01_08发送 IEEE 数据包。
可以帮帮我吗?
为什么 TX 无法正常工作?
@Siri