SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
There are two commands for receiving packets, CMD_PROP_RX and CMD_PROP_RX_ADV. The latter gives more flexibility in how the packet can be formed. Details of this are described in Section 26.10.5.4.1 and Section 26.10.5.4.2, respectively.
For both commands, the radio must be set up in a compatible mode (such as proprietary mode), and the synthesizer must be programmed using CMD_FS before the command is sent to the radio core.
Both commands have an end trigger, given by endTrigger and endTime. If this trigger occurs while the receiver is searching for sync, the operation ends with the status PROP_DONE_RXTIMEOUT. If the trigger occurs while receiving a packet, the action depends on pktConf.endType. If pktConf.endType = 0, the packet is received to the end and the operation then ends with PROP_DONE_ENDED as the status. If pktConf.endType = 1, the packet reception is aborted and the operation ends with PROP_DONE_BREAK as the status. The radio receives packets according to the details given in Section 26.10.5.4.1 and Section 26.10.5.4.2, respectively. After receiving a packet, an interrupt is raised. If pOutput is not NULL, an output structure as given in Table 26-173, pointed to by pOutput, is updated as well. The interrupt to raise and field to update is given in Table 26-185. This table also gives the result to write in the status field of the receive buffer, if enabled. The condition for packets being ignored is described in Section 26.10.5.4.1 and Section 26.10.5.4.2, respectively.
Condition | Interrupt Raised | Counter Incremented | Result Field of Status Byte |
---|---|---|---|
Packet fully received with CRC OK and not to be ignored | RX_OK | nRxOk | 0 |
Packet fully received with CRC error | RX_NOK | nRxNok | 1 |
Packet fully received with CRC OK and address mismatch (pktConf.filterOp = 1) | RX_IGNORED | nRxIgnored | 2 |
Packet reception aborted due to timeout (pktConf.endType = 1), CMD_ABORT, too short length in CMD_PROP_SET_LEN, or CMD_PROP_RESTART_RX | RX_ABORTED | nRxStopped | 3 (1) |
Packet reception aborted due to illegal length or address mismatch (pktConf.filterOp = 0) | RX_ABORTED | nRxStopped | – |
Packet could not be stored due to lack of buffer space | RX_BUF_FULL | nRxBufFull | 3 (1) |
For both types of commands, the packet length may be configured as unlimited or unknown at the start of packet reception, by setting maxPktLen to 0. This mode can only be used with partial-read RX buffers. If the length is later determined, it can be set by the immediate or direct command CMD_PROP_SET_LEN, where the number of bytes between the header (if any) and the CRC is given. In addition to setting the length this way, packet reception may be stopped in the following ways (CRC check is not performed in the following cases):
For ignored packets and packets with CRC error, automatic flush of the receive buffer can be configured. In this case, packets are removed from the receive buffer after they have been received, so the next packet overwrites it and the counters are not updated to reflect the packet received.
Automatic flush is not supported for partial-read RX entries. Packets with CRC error (that is, for which the RX_NOK interrupt is raised) are automatically flushed if rxConf.bAutoFlushCrcErr is 1.
Ignored packets (that is, for which the RX_IGNORED interrupt is raised) are automatically flushed if rxConf.bAutoFlushIgnored is 1. After a packet is received, the next action depends on pktConf.bRepeat. If this is 0, the command ends. Otherwise, it goes back into RX, unless another criterion exists that leads to the command to end. When the command ends, the frequency synthesizer is turned off if pktConf.bFsOff is 1. If pktConf.bFsOff is 0, the synthesizer keeps running, so that the command must either be followed by an RX or TX command (which operate on the same frequency) or a CMD_FS_OFF command to turn off the synthesizer.
The end statuses for CMD_PROP_RX and CMD_PROP_RX_ADV are listed in Table 26-186. This status decides the next operation, see Section 26.10.5.1.
Condition | Status Code | Result |
---|---|---|
Received packet with CRC OK and pktConf.bRepeatOk = 0 | PROP_DONE_OK | TRUE |
Received packet with CRC error and pktConf.bRepeatNok = 0 | PROP_DONE_RXERR | FALSE |
Observed end trigger while in sync search | PROP_DONE_RXTIMEOUT | FALSE |
Observed end trigger while receiving packet with pktConf.endType = 1 | PROP_DONE_BREAK | FALSE |
Received packet after observing an end trigger while receiving packet with pktConf.endType = 0 | PROP_DONE_ENDED | FALSE |
Received CMD_STOP after command started and, if sync found, packet is received | PROP_DONE_STOPPED | FALSE |
Received CMD_ABORT after command started | PROP_DONE_ABORT | ABORT |
No available RX buffer at the start of a packet | PROP_ERROR_RXBUF | FALSE |
Out of RX buffer during reception in a partial read buffer | PROP_ERROR_RXFULL | FALSE |
Observed illegal parameter | PROP_ERROR_PAR | ABORT |
Command sent without setting up the radio in a supported mode using CMD_PROP_RADIO_SETUP or CMD_RADIO_SETUP | PROP_ERROR_NO_SETUP | ABORT |
Command sent without the synthesizer being programmed | PROP_ERROR_NO_FS | ABORT |
TX overflow observed during operation | PROP_ERROR_RXOVF | ABORT |