I am experimenting with two CC1310EM-7XD modules on SMARTRF06EB EVM kits. My starting point was the example project:
C:\ti\tirtos_cc13xx_cc26xx_2_21_00_06\examples\IAR\CC1310DK_7XD\rfPacketErrorRate
I have essentially merged Tx.c and Rx.c and the two boards running similar code are able to talk to each other. I want one board to Tx a packet then immediately Rx a packet with a timeout. I have added to RF_cmdPropRx to include a timeout and have Tx and Rx inside a loop:
RF_cmdPropRx.pQueue = &dataQueue; RF_cmdPropRx.pOutput = (uint8_t*)&rxStatistics_prop; RF_cmdPropRx.maxPktLen = MAX_LENGTH; RF_cmdPropRx.pktConf.bRepeatOk = 0; // changed RF_cmdPropRx.pktConf.bRepeatNok = 0; // changed RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1; RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1; // additionally: RF_cmdPropRx.rxConf.endTrigger.triggerType = TRIG_REL_START; RF_cmdPropRx.rxConf.endTrigger.pastTrig = 1; RF_cmdPropRx.rxConf.endTime = (uint32_t)(4000000*0.040f); // 40ms timeout . . . while(1) { time += packetInterval; RF_cmdPropTx.startTime = time; result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0); // Tx result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &rx_callback, RF_EventRxEntryDone); // Rx ... 'here'
The rx_callback() function is still in place but I believe it is not called by an RF_runCmd().
My question is, how can I determine 'here' if the Rx completed successfully or timed out (without looking at the data) please?