Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
Element 
length
BLE 
header
BLE payload
Received 
CRC
RSSI
Status
Time stamp
0
±
2 bytes
1
±
2 bytes
0
±
37 bytes
0 or 3 bytes
0 or 1 byte
0 or 1 byte
0 or x bytes
Mandatory fields
Optional fields
Optional
Bluetooth Low Energy
23.6.3.1 Receive Buffers
A packet being received is stored in a receive buffer. First, a length byte or word is stored, if configured in
the RX entry, by config.lenSz. This word is calculated from the length received over the air and the
configuration of appended information.
Following the optional length field, the received header and payload is stored as received over the air. If
RXConfig.bIncludeLenByte is 1, the full 16-bit header, including the received length field, is stored, despite
the length field being redundant information if a length byte or word is present. If
RXConfig.bIncludeLenByte is 0, only the first byte of the header is stored, so that the second byte, which
only contains the redundant length field and some RFU bits, is discarded.
If RXConfig.bIncludeCrc is 1, the received CRC value is stored in the RX buffer. If RXConfig.bAppendRssi
is 1, a byte indicating the received RSSI value is appended. If RXConfig.bAppendStatus is 1, a status byte
of the type RXStatus_t, as defined in , is appended. If RXConfig.bAppendTimeStamp is 1, a timestamp
indicating the start of the packet is appended. This timestamp corresponds to the ratmr_t data type. Even
though the timestamp is multi-byte, no word-address alignment is made, so the timestamp must be written
and read byte-wise.
The format of an entry element in the RX queue is shown in
Figure 23-8. Receive Buffer Entry Element
23.6.3.2 Transmit Buffers
For master and slave operations, transmit buffers are set up in a buffer queue. The length of the packet is
defined by the length field in the data entry. The first byte of the data entry gives the LLID that will go into
the data channel packet header. The NESN, SN, and MD bits are inserted automatically by the radio CPU,
the RFU bits are set to 0, and the length field is calculated from the length of the data entry.
For advertising channel packets, the radio CPU automatically generates the header and the address fields
of the payload. The data that comes after the address fields for each message type is given by a pointer
to a data buffer. The number of bytes in this buffer is given in a separate parameter. If no data bytes will
be transmitted, this can be indicated by setting the length to 0. In this case, the pointer is ignored, and
may be set to NULL. For BLE compliance, the ADV_DIRECT_IND and SCAN_REQ messages have no
payload, but for the possibility of overriding this, data buffers are still present. For CONNECT_REQ
messages, the data is required to have length 22 for BLE compliance, but the implementation allows any
length.
23.6.4 Radio Operation Command Descriptions
Before running any radio operation command described in this document, the radio must be set up in BLE
mode using the command CMD_RADIO_SETUP. Otherwise, the operation ends with an error.
The operations start with a radio operation command from the system CPU. The actual start of the
operation is set up by the radio CPU according to startTrigger and startTime in the command structure. At
this time, the radio CPU starts configuring the transmitter or receiver, depending on the type of operation.
The system CPU must take the setup time of the transmitter or receiver into account when calculating the
start time of the operation.
The radio CPU sets up the channel based on the channel parameter. If the channel is in the range 0–39, it
indicates a data channel index or advertising channel index. In this case, only the values 0–36 are allowed
in master and slave commands, and only the values 37–39 are allowed in advertiser, scanner, and initiator
commands. If the channel is in the range 60–207, it indicates an RF frequency with an offset of 2300 MHz.
If the channel is 255, the radio CPU does not program any frequency word, but keeps the frequency
already programmed with CMD_FS. If the channel is 255 and the frequency synthesizer is not running, the
operation ends with an error.
1525
SWCU117A – February 2015 – Revised March 2015
Radio
Copyright © 2015, Texas Instruments Incorporated