Hi team,
The SDK used is simplelink_cc13x0_sdk_4_20_02_07, and the code compilation environment is IAR.
Using TI-RTOS, refer to rfPacketTx and rfPacketRx
The customer's current project is to power up the CC1310 to the long RX state. After receiving the data, it outputs information through the serial port. After the serial port receives the external command, it will cancel the current RX state and switch to TX and send the data. After the transmission is completed, the long RX mode will continue. Now there is no problem with RF reception, but once the RX command is canceled, calling RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0) will cause the device to restart. I determined through debugging that the cancellation status was successful. It feels like restarting is a probabilistic problem, because I have multiple boards of our own. One of them can execute the TX command normally, but the other one cannot send the debugging. It is found that every time RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL is called) , 0) and then restart.
Here is some configuration code:
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;
Function to cancel the call: RF_cancelCmd(rfHandle, rfCmdHandle, 0); // Terminate reception
Send the called function: RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
Thanks & Best regards,
Yolande