Other Parts Discussed in Thread: WMBUS
Hi,
I'm trying to implement something like range extender. I need to listen for specific packets continuously and for each packet received, I need to verify whether that packet needs to be extended. If yes, I need to start the TX command and after finishing the TX command, go back to start (listening).
I have to do some custom decode and CRC verification on the received packets in order to decide whether the received packet should be transmitted or not. I have some ideas below on how to achieve this, but I'm not sure which way would be the fastest.
- Chain TX to the end of RX. Use CMD_TRIGGER as a software trigger for the startTrigger of the TX command. When RF_EventRxEntryDone occurred, verify the packet INSIDE THE CALLBACK (otherwise we would have to use another task to do it because commands are chained and RF_runCmd will not return until the TX is finished.). If the packet needs to be extended, trig the TX command using RF_runImmediateCmd.
- Do not use command chaining, just start RX command. When RX finished, verify the packet and start the TX command if the packet needs to be extended. In this method, I can do the verification of the received packet inside the main task after RF_runCmd for RX command returned.
Regarding the above ways;
The way1 is doing the packet verification inside the callback. Normally I don't want to do that. And I don't want to use another task too because I have read that it is not recommended to send RF commands from 2 different tasks.
The way2 does not use command chaining, I will be responsible for starting the RX and TX commands consecutively after the verification of the packet. In this case, as I know it will be slower compared to command chaining because I will send another command to start TX.
Regards.