Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
Bluetooth Low Energy
23.6.4.2 Slave Command
A slave radio operation is started by a CMD_BLE_SLAVE command. In the command structure, it has a
pParams parameter of the type defined in
, and a pOutput parameter of the type defined in
. 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. The startTrigger
and pParams->timeoutTrigger together define the receive window for the slave.
The very first received packet of a new LL connection on a slave is given special treatment, and 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 is not viewed as an ACK or
NACK of a previous transmitted packet. When a packet has been transmitted, pParams-
>seqStat.bFirstPkt is cleared by the radio CPU.
The radio CPU writes 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 is also defined as event #1, and may be used for timing subsequent
chained operations. If no anchor point is found, event #1 is the time of the start of the slave operation.
If a packet is received with CRC error, the radio CPU ends the radio operation if the previous packet in the
same radio operation was also received with CRC error (see
). Otherwise if a packet is
received, the radio CPU starts the transmitter and transmits from the TX queue, or transmits an
automatically empty packet if the TX queue is empty. The transmission may be a retransmission. Unless
the operation ends due to the criteria in
the receiver starts after the transmission is done.
A slave operation ends due to one of the causes listed in
. The status field of the command
structure after the operation is ended indicates the reason why the operation ended. In all cases, a
COMMAND_DONE interrupt is raised. In each case, it is indicated if the result is True, False, or Abort,
which decides the next action.
Table 23-111. End of Slave Operation
Condition
Status Code
Result
Transmitted packet with MD=0 after having successfully received packet
BLE_DONE_OK
True
where MD bit of header is 0
Transmitted packet with MD=0 after having received packet which did not fit
BLE_DONE_OK
True
in RX queue
Finished transmitting packet and nPkt counted to 0
BLE_DONE_OK
True
Trigger indicated by pParams->timeoutTrigger occurred before demodulator
BLE_DONE_RXTIMEOUT
False
sync is ever obtained after starting the command
No sync obtained on receive operation after transmit
BLE_DONE_NOSYNC
True
Two subsequent packets in the same operation were received with CRC
BLE_DONE_RXERR
True
error
Finished transmitting packet after the internal counter nNack had counted
BLE_DONE_MAXNACK
True
down to 0
Finished transmitting packet after having observed trigger indicated by
BLE_DONE_ENDED
False
pParams->endTrigger
Finished transmitting packet after having observed 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
23.6.4.3 Master Command
A master radio operation is started by a CMD_BLE_MASTER command. In the command structure, it has
a pParams parameter of the type defined in
and a pOutput parameter of the type defined in
. The operation starts with transmission. After each transmission, the receiver is started.
1530
Radio
SWCU117A – February 2015 – Revised March 2015
Copyright © 2015, Texas Instruments Incorporated