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.

CC1310: 设置CC1310为长接收模式(bRepeatOk以及bRepeatNok都为1),在RF接收到数据后通过串口输出正常,但是串口收到数据后RF切换发送之后异常(调用RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);导致设备重启)。

Part Number: CC1310

我现在的项目是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);