Awhile ago, Cypress Semiconductor acquired the Broadcom wireless IoT business unit. This move has allowed them to add Bluetooth Low Energy (BLE) solutions integrating an embedded cortex M3 microcontroller to their portfolio. Up to now, Cypress BLE solutions were based on Cortex M0 microcontroller.
What sets Cypress apart from their competition is the ecosystem around their PSOC creator, which is an Integrated Design Environment (IDE) to support PSOC and PROC microcontroller developments. PSOC stands for Programmable System on Chip, while PROC represents Programmable Radio on Chip. In comparison to PROCs, a PSOC integrates comparators, operational amplifiers and some programmable logic. The Bluetooth Low Energy component, however, is the same.
Voir les produits connexes
When developing an application with PSOC creators, designers use a drag-and-drop graphical interface to select and connect pre-defined components. These components are inherently connected to the processor via the main system bus. Double clicking on a component icon allows the designer to access and configure that component's parameters.
In our case, we drag the Bluetooth component and double click on it. A window to configure the component pops up.
The first tab generally has options to define the requested profile and whether the device will be master or slave in a connection. If the device is programmed as a broadcaster or an observer, the tabs are changed adequately. In most cases, a profile must be programmed in the profile tab where all the services, characteristics, and descriptors are set up.
The GAP and GATT services are defined automatically since the touch sensor service was programmed. If we want to add a battery service, just add service with the required characteristics and descriptors defined by the SIG. The UUIDs are programmed automatically.
The GAP settings tabs allow you to enter GAP parameters, like device name, all the timing for advertisement, the information in the advertisement packet, the scan response, and the required security.
The last tab is the L2CAP setting with 2 main parameters:
MPS - maximum payload unit. It gives the maximum data that L2CAP layer can accept from low layers.
MTU - maximum transmission unit. It gives the maximum data the upper layers can accept from L2CAP.
This allows the L2CAP to perform the segmentation and fragmentation. By default, it is 23 as specified in the initial BLE, but it can be programmed with higher value thanks to the updated specifications.
The BLE component has no pin out, so the program can be built to generate APIs. APIs are explained in the datasheet, which you can open directly from the configuration window. Then the C code can be written. Inside a handler, constants and functions are defined. Thanks to this middleware, a Bluetooth application can be written quickly without entering in details of the architecture of a cortex M0 microcontroller.
In order to help in the development of BLE applications, Cypress offers the CY8CKIT-042-BLE Bluetooth low energy Pioneer kit. It integrates an Arduino base with a touch sensor and a socket to plug in the PSOC BLE or the PROC BLE.
The BLE dongle works in conjunction with a program called CySmart and is the master of the connection. It has a very nice user interface to help you understand all the services of an application and to find any bug quickly as shown below.