嗨、团队,
使用的 SDK 为 simplelink_cc13x0_sdk_4_20_02_07、代码编译环境为 IAR。
使用 TI-RTOS、请参阅 rfPacketTx 和 rfPacketRx
客户当前的项目是将 CC1310上电至长 RX 状态。 接收到数据后、它通过串行端口输出信息。 串行端口接收到外部命令后、将取消当前 RX 状态、切换到 TX 并发送数据。 传输完成后、长 RX 模式将继续。 现在 RF 接收没有问题、但是一旦 RX 命令被取消、调用 RF_runCmd (rfHandle、(RF_Op*)&RF_cmdPropTx、RF_PriorityNormal、NULL、 0)将导致器件重新启动。 我通过调试确定取消状态成功。 它感觉像重新启动是一个概率问题,因为我有多个自己的板. 它们中的一个可以正常执行 TX 命令、但另一个无法发送调试。 发现每次调用 RF_runCmd (rfHandle、(RF_OP*)和 RF_cmdPropTx、RF_PriorityNormal、NULL)、0)然后重新启动时都是如此。
下面是一些配置代码:
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_cmdPropRx.pQueue = &dataQueue;
/* Discard ignored packets from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1;
/* Discard packets with CRC error from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1;
/* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
RF_cmdPropRx.maxPktLen = MAX_LENGTH;
RF_cmdPropRx.pktConf.bRepeatOk = 1;
RF_cmdPropRx.pktConf.bRepeatNok = 1;
RF_cmdPropRx.rxConf.bAppendRssi = 1;
RF_cmdPropRx.rxConf.bAppendStatus = 0;
取消调用的函数:rf_cancelCmd (rfHandle、rfCmdHandle、0);//终止接收
发送被调用函数:RF_runCmd (rfHandle、(RF_Op*)&RF_cmdPropTx、RF_PriorityNormal、NULL、0);
谢谢和最好的问候,
约兰德




