English
Language : 

AN91267 Datasheet, PDF (53/62 Pages) Ramtron International Corporation – Getting Started with PSoC
Getting Started with PSoC® 4 BLE
 24-bit CRC and AES-128-bit encryption for robust and secure data exchange
 Establishing fast connections and low-duty-cycle advertising for low-power operation
 Adaptive Frequency Hopping (AFH), which changes the communication channel used for packet transmission so
that the interference from other devices is reduced
At the link layer, two roles are defined:
 Master: A smartphone is an example that configures the link layer in the master configuration.
 Slave: A heart-rate monitor device is an example that configures the link layer in the slave configuration.
PSoC/PRoC BLE devices can operate in either configuration.
The link-layer slave is the one that advertises its presence to another link-layer master. A link-layer master receives
the advertisement packets and can choose to connect to the slave based on the request from an application (see
Figure 62). In this example implementation of a heart-rate monitor application, a heart-rate monitor device acts as the
slave and sends the data to a smartphone, which acts as the master. A smartphone app then can display the reading
on the smartphone.
PSoC/PRoC BLE devices implement the time-critical and processor-intensive parts of the link layer such as
advertising, CRC, and AES encryption in hardware. Link-layer control operations such as entering the advertisement
state and starting encryption are implemented in firmware.
Figure 62 shows the BLE link-layer packet structure and sizes of the individual fields in the link-layer packet. The link-
layer packet carries all upper layer data in its payload field. It has a 4-byte access address that is used to uniquely
identify communications on a physical link, and ignore packets from a nearby BLE device operating in the same RF
channel. 24-bit CRC provides data robustness.
Figure 62. BLE Link Layer Protocol
Smartphone
Heart Rate Monitor
Link Scan, establish &
Master manage the link
Advertise
capabilities
Link
Slave
Link
Layer
Packet
Format
Example
1 byte
Preamble
0x55
4 bytes
Access Address
Random Number
(0x8E89BED0)
Header Payload
(1B) Length (1B)
0x60 0x1A
2 to 33 bytes
Protocol Data Unit (PDU)
Payload
Protocol Data Unit (PDU)
Higher Layer Protocol Data Packet
3 bytes
CRC
(x24+x10+x9+x6+x4+x3+x1+x0)
CRC for PDU data
Host Control Interface (HCI)
The HCI is the standard-defined interface between the host and the controller. It allows the host and the controller to
exchange information such as commands, data, and events over different physical transports such as USB or UART.
The HCI requires a physical transport only when the controller and the host are different devices.
In PSoC/PRoC BLE devices, the HCI is just a firmware protocol layer that passes the messages and events between
the controller and the host.
Logical Link Control and Adaptation Protocol (L2CAP)
L2CAP provides protocol multiplexing, segmentation, and reassembly services to upper-layer protocols.
Segmentation breaks the packet received from the upper layer into smaller packets that the link layer can transmit,
while reassembly combines the smaller packets received from the link layer into a meaningful packet. The L2CAP
layer supports three protocol channel IDs for Attribute Protocol (ATT), Security Manager (SM), and L2CAP control, as
shown in Figure 63. Bluetooth 4.1 allows direct data channels through the L2CAP connection-oriented channels on
top of these protocol channels.
The L2CAP and the layers above it are implemented in firmware in PSoC/PRoC BLE.
www.cypress.com
Document No. 001-91267 Rev. *D
53