Part Number: CC1352P
Dear Support:
I am creating several chained commands with some of them having more than 2 commands in the chain and I want to determine in the callback when specific commands are completed. There is the RF_EventCmdDone and RF_EventLastCmdDone events that can help you know when an event has completed, but how can you use this to tell which event in the chain just completed?
Strangely to test this out, I tried using the RF Echo example in the SDK and am able to see the event RF_EventRxEntryDone in the callback as a result of using the run command as follows:
RF_EventMask terminationReason = RF_runCmd( rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal,echoCallback, ( RF_EventCmdDone | RF_EventRxEntryDone | RF_EventLastCmdDone ) );
However when I try to trigger on the end of the transmit command by modifying this command to the following (adding the RF_EventTxEntryDone event):
RF_EventMask terminationReason = RF_runCmd( rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, echoCallback, ( RF_EventTxEntryDone | RF_EventCmdDone | RF_EventRxEntryDone | RF_EventLastCmdDone ) );
I never see the RF_EventTxEntryDone in the callback get detected by looking at the event mask. I detect the end of the transmit command as a result of the RF_EventCmdDone at the end of the transmit packet, however I would have expected the RF_EventTxEntryDone to get set as a result of the end of the transmit packet, but it does not. Yet the RF_EventRxEntryDone event gets set as a result of the end of the receive packet. Any idea as to why the RF Echo example would not allow me to detect the end of the transmit packet by signalling RF_EventTxEntryDone, yet it does so by setting the even RF_EventRxEntryDone at the end of the receive packet?
More importantly, I have a series of transmit and receive commands in a command chain and need to detect when the transmit and/or receive command has completed within the chain and need to know what is the best way to determine what command in the chain has just completed within the callback method so I can do certain things at certain times as a result of specific commands completing within the chain. I can trigger on RF_EventCmdDone in the callback, but I want to know which event. What is the best method to do this? Please advise.
Thanks,
Tim