SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
A slave radio operation is started by a CMD_BLE_SLAVE or CMD_BLE5_SLAVE command. In the command structure, it shall have a pParams parameter of the type defined in Table 26-96 or Table 26-103 and a pOutput parameter of the type defined in Table 26-109. The operation starts with reception. The parameters pParams->timeoutTrigger and pParams->timeoutTime define the time to end the operation if no sync is found by the demodulator. Together, the startTrigger and pParams->timeoutTrigger define the receive window for the slave.
The first received packet of a new LL connection on a slave shall be treated in a special way. This is signaled by the system CPU by setting pParams->seqStat.bFirstPkt to 1 when starting the first slave operation of a new connection. When this flag is set, the received packet shall not be viewed as an ACK or NACK of a packet transmitted previously. When a packet is transmitted, pParams->seqStat.bFirstPkt shall be cleared by the radio CPU.
The radio CPU shall write a timestamp of the first received packet of the radio operation into pOutput->timeStamp. The captured time can be used by the system CPU as an anchor point to calculate the start of future slave commands. This time shall also be defined as event 1. This may be used for timing subsequent chained operations. If no anchor point is found, event 1 will be the time of the start of the slave operation.
If a packet is received with CRC error, the radio CPU shall end the radio operation if the previous packet in the same radio operation was also received with CRC error (see Table 26-130). Otherwise if a packet is received, the radio CPU shall start the transmitter and transmit from the TX queue, or transmit an auto-empty packet if the TX queue is empty. The transmission may be a retransmission. Unless the operation is to end by the criteria listed in Table 26-130, the receiver will be started after the transmission is complete.
A slave operation shall end by one of the causes listed in Table 26-130. After the operation has ended, the status field of the command structure indicates the reason why the operation ended. In all cases, a Command_Done interrupt is raised. In each case, the result is indicated as TRUE, FALSE, or ABORT, which will decide the next action.
Condition | Status Code | Result |
---|---|---|
Transmitted packet with MD = 0 after successfully receiving a packet where the MD bit of the header is 0 | BLE_DONE_OK | TRUE |
Transmitted packet with MD = 0 after receiving a packet that did not fit in the RX queue | BLE_DONE_OK | TRUE |
Finished transmitting packet and nPkt counted to 0 | BLE_DONE_OK | TRUE |
Trigger indicated by pParams->timeoutTrigger occurred before demodulator sync is ever obtained after starting the command | BLE_DONE_RXTIMEOUT | FALSE |
No sync obtained on receive operation after transmit | BLE_DONE_NOSYNC | TRUE |
Two subsequent packets in the same operation were received with CRC error | BLE_DONE_RXERR | TRUE |
Finished transmitting packet after the internal counter nNack has counted down to 0 | BLE_DONE_MAXNACK | TRUE |
Finished transmitting packet after observing a trigger indicated by pParams->endTrigger | BLE_DONE_ENDED | FALSE |
Finished transmitting packet after observing a CMD_STOP | BLE_DONE_STOPPED | FALSE |
Received CMD_ABORT | BLE_DONE_ABORT | ABORT |
Illegal value of channel | BLE_ERROR_PAR | ABORT |
TX data entry length field has illegal value | BLE_ERROR_PAR | ABORT |