Dear Support:
I am trying to get a simultaneous transmit and receive example working such that I can receive a packet and parse the packet and based on the contents create a new packet and transmit it. I am using the CC1350 LP running SDK1.30 . I have my own CCS project where I used code from the rfPacketRx and rfPacketTx examples to create a task that can receive and transmit packets. When I am just receiving packets back to back - no problem. I can receive packets over and over with no problem. And when I transmit packets over and over - also no issue. I am using the code below when transmitting a packet:
RF_cancelCmd(rfHandle, rfRxCmd, 0);
RF_cmdPropTx.commandNo = CMD_PROP_TX;
RF_cmdPropTx.pPkt = ( uint8_t * )message.FramePtr;
RF_cmdPropTx.pktLen = message.FrameBytes;
RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
RF_cmdPropTx.startTrigger.pastTrig = 1;
RF_cmdPropTx.startTime = 0;
rfTxCmd = RF_postCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0 );
EventMask = RF_pendCmd(rfHandle, rfTxCmd,
(RF_EventCmdDone | RF_EventCmdError | RF_EventLastCmdDone | RF_EventCmdAborted | RF_EventCmdCancelled | RF_EventCmdStopped));
where I do a cancel of any previous rfRxCmd with the RF_cancelCmd(...) and then update the Tx structure RF_cmdPropTx prior to transmitting the packet and then transmit the packet. I have also used the code below:
RF_cancelCmd(rfHandle, rfRxCmd, 0);
RF_cmdPropTx.commandNo = CMD_PROP_TX;
RF_cmdPropTx.pPkt = ( uint8_t * )message.FramePtr;
RF_cmdPropTx.pktLen = message.FrameBytes;
RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
RF_cmdPropTx.startTrigger.pastTrig = 1;
RF_cmdPropTx.startTime = 0;
EventMask = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, TxCallback,
IRQ_COMMAND_DONE | IRQ_LAST_COMMAND_DONE | IRQ_TX_DONE | IRQ_TX_ENTRY_DONE );
and also no issues where in this case I am using a transmit callback to know that I transmitted the packet successfully. As long as I transmit over and over - no issues. However if I receive a packet and then follow the reception of this packet with a transmit of a new packet and it runs this code above, it never transmits the packet and either blocks in the RF_pendCmd(...) in the 1st case or the RF_runCmd(...) in the 2nd case. However the receiving of the packets continues along just fine. For some reason, after receiving a packet and then calling this code above, I can no longer transmit any packets. Do you know what I may be doing wrong? Please advise.
Alternatively when doing simultaneous transmit and receive what is the proper procedure to follow such that the transmission of a packet does not lock up as I am experiencing in the above 2 cases?
Thanks,
Tim