Radio Control Layer (RCL)
|
The generic Tx command allows to transmit a packet at a specific RF frequency and with a specific syncword. The following sections describe how the command can be configured and used, its life cycle, and how it fits into the RCL architecture.
In order to submit a Generic Tx command, the following steps must have taken place:
Once these steps have been completed, RCL_Command_submit and RCL_Command_pend are called to effectively send and then wait for the command to conclude. Once this has happened, the callback and the command status can be used for error checking and the application can proceed according to its specification.
The Generic Tx command is normally employed when the user wants to transmit a packet for which the RCL does not provide a dedicated handler for the communication protocol. In this case, it is up to the application to define how packets are built considering the internal packet format used to store packets in the LRF FIFOs.
This can be accomplished by using a struct to define the various fields that need to be considered when building the packet.
Just as with any command, it's necessary to declare it and configure it before submitting it. However, since this is a Tx operation, in addition to performing the command configuration, it is also necessary to set up the Tx buffers and build the packets.
The following function serves as an example of how packets can be generated so that they are compatible with the internal packet format of the LRF.
The Generic Tx command handler life cycle is relatively simple in that mostly depends on the packet being sent. Unlike the Generic Rx command handler, the operation itself is not bound by a timeout, and once the packet is sent and an LRF event is received, the command will end.
RCL Event (In) | Description |
---|---|
setup | Setup has been performed |
timerStart | Timer-based start signalled |
RCL Event (Out) | Description |
---|---|
lastCmdDone | The RCL is finished with the command |
cmdStarted | Command handler has accepted and started executing |
LRF Event | Description |
---|---|
opDone | The PBE operation has finished |
opError | Something went wrong. Cause located in the PBE ENDCAUSE register |