The PRoC BLE or PSoC 4 BLE is the main component on the BLE Module. It provides the RF
interface and analog and digital capability. The PRoC BLE or PSoC 4 BLE pins are mapped to the
Bluetooth module headers (see Figure 5-20). For more information, refer to the BLE web page.
Figure 5-20. Schematics and Board Highlight of Bluetooth Module Headers for BLE Pins
The PSoC 4 BLE and PRoC BLE Modules connect to the Pioneer board using the two (20-pin and
24-pin) Bluetooth module headers (Figure 5-21). All GPIOs and power domains are brought out to
these headers. These headers are the counterparts of the connectors in section 5.1.4.
Figure 5-21. Schematics and Board Highlight of Headers
An Antenna Matching Network is required between the BLE device and the antenna to achieve optimum performance (Figure 5-23). The matching network has four main tasks:
■ Transform the balanced output of the radio to an unbalanced connection to the antenna (balun).
■ Transform the output impedance of the ra dio to a 50-ohm antenna.
■ Suppress harmonics to a level below the regulations lev el in TX mod e.
■ Suppress the local oscillator (LO) leakage in RX mode.
Figure 5-23. Schematics and Board Highlight of Antenna Matching Network and Antenna
Module boards include a 24-MHz cryst al and a 32-kHz crysta l, the CMOD and shield (CT ANK) circuit
for CapSense, a SAR bypass capacitor, and adequate decoupling capacitors for all the power
domains, as shown in Figure 5-24.
Figure 5-24. Schematics and Board Highlight of External Crystal, CMOD, CT ANK, Decap s, Jumpers
All power domains are brought out as test points for easy probing.
5.3BLE Dongle Board
See PSoC 4 BLE or PRoC BLE on page 106.
See Wiggle Antenna on page 108.
See Antenna Matching Network on page 109.
See Pioneer Board LEDs on page 101.
See Push Buttons on page 102.
Figure 5-25. Board Highlight
The PSoC 5LP connects to the USB port of a PC through a USB type A plug (Figure 5-27). This plug
can also be used to power the board. A resettable polyfuse is used to protect the computer's USB
ports from shorts and overcurrent. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. The VBUS, D+, and D– lines
from the USB connector are also protected again st ESD eve n ts using TVS diod es.
Figure 5-27. Schematics and Board Highlight of USB Ty pe A Plug
This chapter describes advanced features of the BLE Pioneer kit as well as the corresponding
projects. It can be used as referenc e to exploit these features for other applications, according to
project requirements.
6.1Using PSoC 5LP as USB-UART Bridge
The PSoC 5LP serves as a USB-UART bridge, which can communicate with the COM terminal
software. This section explains how to create a PSoC 4 BLE code example to communicate with the
COM terminal software.
Users who have a Windows operating system that does not have HyperTerminal can use an
alternative terminal software such as PuTTY.
1. Create a new PSoC 4 BLE project in PSoC Creator, as shown in Figure 6-1. Select an
appropriate location for your project and rename the project as required.
for(;;)
{
/* Get received character or zero if nothing has been received yet
*/
ch = UART_UartGetChar();
if(0u != ch)
{
/* Send the data through UART. This function is blocking and waits until
there is an entry into the TX FIFO. */
UART_UartPutChar(ch);
}
}
}
7. Build the project by clicking Build > Build {Project Name} or [Shift][F6]. After the project is built
without errors and warnings, program (by choosing
Debug > Program) the project to PSoC 4
BLE/PRoC BLE through the PSoC 5LP USB programmer or MiniProg3.
Note: UART RX and UART TX can be rou ted to any digit al p in on PSoC 4 BL E/PRoC BLE based
on the configuration of the UART component. An SCB implementation of UART will route the RX
and TX pins to one of the following subsets: (P0[0], P0[1] or P0[4], P0[5] or P1[4], P1[5] or P3[0],
P3[1] or P3[4], P3[5] or P5[0], P5[1]).
To communicate with the PSoC 4 from the terminal software, follow this procedure:
1. Connect USB mini-B to J13. The kit enumerates as a
KitProg USB-UART and is available in the
Device Manager, Ports (COM & LPT). A communication port is assigned to the
KitProg USB-UART, as shown in Figure 6-8.
3. A new window opens, where the communication port can be selected.
In HyperTerminal, select COMx (or the specific communication port that is assigned to the Kit-
Prog USB-UART) in
COMx in
Serial line to connect to. This code example uses COM12.
Connect using and click OK, as shown in Figure 6-10. In PuTTY enter the
5. Enable Echo typed characters locally in File > Properties > Settings > ASCII Setup, to
display the typed characters on HyperTerminal, as shown in Figure 6-12. In PuTTY, select
on
in T erminal > Line disciplineoptions to display the typed characters on PuTTY, as shown in
Force
Figure 6-13.
Figure 6-12. Enable Echo of Typed Characters in HyperTerminal
Figure 6-13. Enabling Echo of Typed Characters in PuTTY
6. The COM terminal software displays both the typed data and the echoed data from the PSoC 4
BLE or PRoC BLE UART, as shown in Figure 6-14 and Figure 6-15.
The PSoC 5LP serves as a USB-I2C bridge that can be used to communicate with the USB-I2C
software running on the PC. The following step s describe how to use the USB-I
communicate between the BCP and the PSoC 4 BLE/PRoC BLE.
1. Create a new project targeting the PSoC 4 BLE/PRoC BLE dev ice in PSoC Creator, as shown in
10.Open Protocol Configuration from the Tools menu and s elect the appropriate I2C Speed, as
shown in Figure 6-23. Make sure the I
component. Click
OK to close the window.
2
C speed is the same as the one configured in the I2C
Figure 6-23. Opening Protocol Configuration Window in BCP
11. From the BCP, transfer five bytes of data to the I
command shown in Figure 6-24 and press
[Enter] or click the Send button in the BCP. The log
2
C device with slave address 0x08. Type the
shows whether the transaction was successful. A '+' indication after each b yte indicates that the
transaction was successful and a '–' indicates that the transaction was a failure.
12.From the BCP, read five bytes of data from the I2C slave device with slave address 0x08. The log
shows whether the transaction was successful, as shown in Figure 6-25.
Figure 6-25. Read Data Bytes from BCP
Note: Refer to Help Contents under Help in BCP or press [F1] for details of I
The BLE Pioneer kit has an onboard PSoC 5LP whose primar y function is that of a programmer and
a bridge. You can build either a normal project or a bootloadable project using the PSoC 5LP.
The PSoC 5LP connections in the Pioneer board are summarized in Figure 6-26. J8 is the I/O
connector. The USB (J13) is connected and used as the PC interface. However, you can still use this
USB connection to create customized USB designs.
Figure 6-26. PSoC 5LP Connections on BLE Pioneer Kit
Advanced Topics
The programming header (J7) is meant for standalone programming. This header needs to be
populated. See the 'No Load Components' section in Bill of Materials (BOM) on page 184.
6.3.1Building a Bootloadable Project for PSoC 5LP
All bootloadable applications developed for the PSoC 5LP should be based on the bootloader hex
file, which is programmed onto the kit.
The hex files are included in the following kit installer directory:
8. In the Bootloader Host tool, click the Open File button (Figure 6-38) to browse to the location of
the bootloadable file (*.cyacd), as shown in Figure 6-38.
Figure 6-38. Open Bootloadable File in Bootloader Host Tool
Figure 6-39. Select Bootloadable .cyacd File in Bootloader Host
9. Keep the reset switch (
SW1) pressed and plug in the USB mini-B connector. If the switch is
pressed for more than 100 ms, the PSoC 5LP enters into bootloader. Click the
(Figure 6-38) in the Bootloader Host tool to program the device.
10.If bootload is successful, the log of the tool displays “Programming Finished Successfully”;
otherwise, it displays “Failed” and a reason for the failure.
Notes:
■ The PSoC 5LP pins are brought to the PSoC 5LP GPIO header (J8). These pins are selected to
support high-performance analog and digital projects. See PSoC 5LP GPIO Header (J8) on
page 97 for pin information.
■ Take care when allocating the PSoC 5LP pins for custom applicatio ns. For example, P2[0]–P2[4]
are dedicated for programming the PSoC 4 BLE/PRoC BLE. See Schematics on page 168
before allocating the pins.
■ When a custom project is programmed onto the PSo C 5LP, the initial capability of the PSoC 5LP
to act as a programmer, USB-UART bridge, or USB-I
■ The status LED does not function unless used by the custom project.
2
C bridge in not available.
For additional information on bootloaders, refer to Cypress application note, AN73503 -
A normal project is a completely new project created for the PSoC 5LP device on the CY8CKIT-042.
Here the entire flash of the PS oC 5LP is programmed, overwriting all bootloader and programming
code. To recover the programmer, reprogram the PSoC 5LP device with the factory-set
file, which is shipped with the kit installer.
KitProg.hex file is available at the following location:
This advanced functionality requires a MiniProg3 programmer, which is not included with this kit. The
MiniProg3 can be purchased from www.cypress.com/go/CY8CKIT-002.
To build a normal project for the PSoC 5LP, follow these steps:
1. In PSoC Creator, choose
Advanced, select Device as CY8C5868LTI-LP039, andselect Application Type as Normal
from the drop-down list, as shown in Figure 6-40.
Figure 6-40. Create New Project in PSoC Creato r_PSoC 5LP
New > Project > PSoC 5LP, click the expand button adjacent to
4. Connect the 10-pin connector of MiniProg3 to the onboard 10-pin SWD debug and programming
header J7 (which needs to be populated).
5. To program the PSoC 5LP with PSoC Creator, choose
Debug > Program or press [Ctrl] [F5]. If
the Programming window appears and shows MiniProg3 and the selected device in the project
under it (CY8C5868LTI-LP039); click on the device and click
Connect to program.
Notes:
■ The 10-pin SWD debug and programming header (J7) is not populated. See the 'No Load
Components' section of A.3 Bill of Materials (BOM) for details.
■ The PSoC 5LP pins are brought to the PSoC 5LP GPIO header (J8). These pins are selected to
support high-performance analog and digital projects. See PSoC 5LP GPIO Header (J8) on
page 97 for pin information.
■ Take care when allocating the PSoC 5LP pins for custom applicatio ns. For example, P2[0]–P2[4]
are dedicated for programming the PSoC 4. Refer to A.1 Schematics before allocating the pins.
■ When a normal project is programmed onto the PSoC 5LP, the initial capability of the PSoC 5LP
to act as a programmer, USB-UART bridge, or USB-I
■ The status LED does not function unless it is used by the custom project.
2
C bridge is not available.
6.4PSoC 5LP Factory Program Restore Instructions
Advanced Topics
The BLE Pioneer Kit features a PSoC 5LP device that comes factory-programmed as the onboard
programmer and debugger for the PSoC 4 BLE/PRoC BLE device.
In addition to creating applications for the BLE device, you can also create custom applications for
the PSoC 5LP device on this kit. For details, see section Developing Applications for PSoC 5LP on
page 134. Reprogramming or bootloading the PSoC 5LP device with a new flash image will
overwrite the factory program and forfeit the ability to use the PSoC 5LP device as a programmer/
debugger for the BLE device. Follow the instructions to restore the factory program on the PSoC
5LP and enable the programmer/debugger functiona lity.
6.4.1PSoC 5LP is Programmed with a Bootloadable Application
If the PSoC 5LP is programmed with a bootloadable application, restore the factory program by
using one of the following two methods.
6.4.1.1Restore PSoC 5LP Factory Program Using PSoC Programmer
1. Launch PSoC Programmer 3.21.1 or later from Start > Cypress > PSoC Programmer.
2. Configure the BLE Pioneer Kit in service m ode. To do this, while holding down the reset button
(SW1 Reset), plug in the BLE Pioneer Kit to the computer using the included USB cable (USB A
to mini-B). This puts the PSoC 5LP into service mode, which is indicated by the blinking green
status LED.
4. Switch to the Utilities tab in PSoC Programmer and press the Upgrade Firmware button, as
shown in Figure 6-42. Unplug all other PSoC programmers (such as MiniProg3 and DVKProg)
from the PC before pressing the
3. Configure the Pioneer Kit in service mode. To do this, while holding down the reset button (SW1
Reset), plug in the BLE Pioneer Kit to the computer using the included USB cable (USB A to
mini-B). This puts the PSoC 5LP into service mode, which is indicated by the blinking green
status LED.
4. In the Bootloader Host tool, set the filters for the USB devices with VID:
The
USB Human Interface Device port appears in the Ports list. Click that port to select it, as
04B4 and PID: F13B.
shown in Figure 6-45.
Figure 6-45. Select USB Human Interface Device
5. Click the
Program button (or choose Actions > Program) to restore the factory-program by
6. After programming has completed, the following message appears, as shown in Figure 6-46:
“Programming Finished Successfully”.
Figure 6-46. Programming Finished Successfully
7. The factory program is now successfully restored on the PSoC 5LP. It can be used as the
programmer/debugger for the PSoC 4 BLE/PRoC BLE device.
6.5Using FM24V10 F-RAM
The BLE Pioneer board has an onboard ferroelectric RAM chip that can h old up to 1 Mb of dat a. The
chip provides an I
and P3_5); the same lines are also routed to the PSoC 5LP I
2
an I
C slave, it can be accessed or shared among various I2C masters on the same line. For more
details on the F-RAM device, refer to the device datasheet.
2
C communication interface for data access. It is hardwired to the I2C lines (P3_4
The slave address of the F-RAM device consists of three parts, as shown in Figure 6-47: slave ID,
device select, and page select. Slave ID is an F-RAM family-specific ID located in the datasheet of
the particular F-RAM device. For the device used in BLE Pioneer board (FM24V10), the slave ID is
1010b. Device select bits are set using the two physical pins A2 and A1 in the device. The setting of
these two pins on the BLE Pioneer board is controlled by resistors R32/R36 (A1) and R33/R37 (A2).
Because the memory location in F-RAM is divided into two pages of 64 KB each, the page select bit
is used to refer to one of the two pages in which the read or write operations will take place.
Figure 6-47. F-RAM I
2
C Address Byte Structure
6.5.2Write/Read Operation
The device's datasheet includes details on how to perform a write/read operation with the F-RAM.
Figure 6-48 and Figure 6-49 provide a snapshot of the write/read packet structure as a quick
reference.
Advanced Topics
Figure 6-48. F-RAM Single-Byte and Multiple-Byte Write Packet Structure
Figure 6-49. F-RAM Single-Byte and Multiple-Byte Read Packet Structure
Advanced Topics
As shown in the figures, all operations start with the slave address followed by the memory address.
For write operations, the bus master sends each byte of data to the memory, and the memory
generates an acknowledgement condition. For read operations, after receiving the complete slave
address and memory address, the memory begins shifting dat a from the curren t address on the next
clock.
6.6CySmart iOS/Android Application
The CySmart mobile application is a powerful tool that allows the mobile device (iOS/Android) with
BLE capability to connect to a BLE peripheral device and communicate with it. It supports various
standard BLE services along with two custom services for CapSense and LED control. It also
provides a common support for all profiles, standard or custom.
This app is free. You can download and install it for Apple iOS devices from the App Store and for
Android Devices from Play Store. Make sure that the mobile device being used supp orts BLE.
To verify the example project using the CySmart mobile app, follow these steps.
1. Plug the BLE Pioneer Kit into the PC for power, using the J13 USB connector .
2. Program the kit with the desired BLE example project.
4. If Bluetooth is not enabled on the device, the app will ask to enable it, as shown in Figure 6-50.
Figure 6-50. Turn on Bluetooth on Device
5. After Bluetooth is enabled, the app will automatically search for available BLE peripherals and list
them, as shown in Figure 6-51. Select the BLE Pioneer Kit peripheral in the list. The name
displayed in the list will be the same as that set in the BLE Component.
6. When connected, the app will list the supported profiles by the peripherals, as shown in
Figure 6-52. Tap on the desired profile.
Figure 6-52. Profiles Page
7. Depending on the type of profile chosen, the app will display options for the profile. Figure 6-53
shows an example for the CapSense slider custom profile, where swiping a finger on the
CapSense slider of the BLE Pioneer Kit is reflected in the app. See Pioneer Baseboard on
page 88.
Figure 6-53. CapSense Slider GUI
8. To go to a different service, go back to the service page in the GUI.
Two custom profiles are created for demonstrating the BLE Pioneer Kit features: the CapSense
profile and the RGB LED profile. Both these profiles are integrated into the CySmart mobile app, as
easy-to-use GUI.
The CapSense profile GUI supports three CapSense functiona lities.
■ CapSense Buttons: After connecting to the BLE peripheral, the CapSense Buttons service page
displays the number of CapSense buttons supported by the peripheral, as shown in Figure 6-56.
Any touch on one of the CapSense buttons on the peripheral is reflected in the CySmart GUI.
■ CapSense Slider: After connecting to the BLE peripheral, the CapSense Slider service page
displays the CapSense slider as supported by the peripheral, as shown in Figure 6-57. Swiping a
finger on the CapSense slider on the peripheral is reflected in the CySmart GUI.
For example, the CapSense_Slider_LED project (CapSense Slider and LED on page47) will
show this utility on the app.
■ CapSense Proximity: After connecting to the BLE peripheral, the CapSense Proximity service
page displays the CapSense proximity supported by the peripheral, as shown in Figure 6-58. A
change in proximity on the proximity sensor (such as a wire) on the peripheral is reflected in the
CySmart GUI.
For example, the CapSense_Proximity project (CapSense Proximity on page 62) will show this
utility on the app.
The RGB LED profile allows you to control the color and intensity of the BLE Pioneer Kit onboard
RGB LED, as shown in Figure 6-59. Pressing any part of the color gamut on the GUI is reflected on
the BLE peripheral device with the onboard RGB LED.
Note: The onboard RGB LED color range depends on the LED being used. It is possible that the
complete color gamut is not reflected on the onboard RGB LED due to limitations on the LED itself.
For example, the CapSense_Slider_LED project (CapSense Slider and LED on page 47) will show
this utility on the app.
Figure 6-59. RGB LED Profile
The CySmart PC tool is a BLE Central host emulation tool that, along with the dongle, allows you to
connect to a BLE peripheral device and transfer data over BLE services. Also, it displays all the
packets that are involved during the connection, which can be analyzed for details.
The CySmart PC tool is installed as part of the BLE Pioneer Kit installer. To launch the software,
choose
Follow these steps to connect to a BLE peripheral device using the dongle and CySmart PC tool and
to transfer data.
1. Connect the dongle to one of the USB ports on the PC.
2. Start the CySmart PC tool on the PC. You will see a list of dongles connected to it. Select the
dongle you want to use and click
Connect, as shown in Figure 6-61.
Figure 6-61. Selecting Dongle in CySmart PC Tool
3. The CySmart PC tool can be used to connect to any BLE peripheral device, including the BLE
Pioneer kit. To connect to the BLE Pioneer kit, power the kit through the J13 USB connector and
program the appropriate BLE peripheral project to it. Follow the steps according to the project
description to start advertising.
4. When the dongle is selected and connected to, the main window shown in Figure 6-62 opens up.
Figure 6-62. CySmart PC Tool Main Window
The important parts of this window are as follows:
■ Menu bar: This contains options to exit or find help about the CySmart PC tool.
■ Dongle settings: These settings comprise of Select Dongle, Configure Master Settings, and
Manage PSMs. Select the dongle allows to connect to a dongle that is listed by the system. If a
different dongle needs to be connected, then this option can be used. Configure Master Settings
option allows to modify the various settings that the dongle requires to act as a BLE Central
device such as connection parameters, scan parameters, or security parameters. Manage PSMs
allows to register for PSM or modify them.
■ Discovered devices options: The Master tab provides three options by default: Start Scan ,
Connect, and Add to Whitelist. The Start Scan button allows the tool to start scanning for
available BLE peripheral devices and list them in the Discovered Devices window. This option
also allows to stop an ongoing scan. The Connect option allows to connect to a particular BLE
peripheral device that is listed in the D iscove red D evice windo w. Add to Whitelist allows to add a
selected device address to the whitelist.
■ Advertisement Data/Scan response data tabs: These tabs provide the description of the data
received in the advertisement packet and scan response packet from the selected device.
■ Discovered Devices window: This window lists all the peripheral devices found after starting a
scan. Selecting any device populates the information on advertisement data and scan response
data on the right side window.
■ Whitelist window: This window lists the devices that have been added as whitelist and provides
options to add, remove, or clear devices from the whitelist.
■ Raw Data window: This window displays the raw data (in hexadecimal) of the field selected.
■ Log window: This window displays all the activities that occur on the dongle and the data
communicated. This feature is also useful for debugging.
3. If the connection is successful, you will see another tab opening besides the Master tab. This tab
provides options with respect to the connected BLE device, as shown in Figure 6-65.
Figure 6-65. Connected Device Tab
4. On the device tab, click
Discover All Attributes to find the supported attributes by the connected
BLE device. This action populates the list of services and characteristics in the Attribute window
along with their values, if any, as shown in Figure 6-66.
5. You can read the characteristics individually or you can use the Read All Characteristics option
to update the values for all readable characteristics, as shown in Figure 6-67.
Figure 6-67. Read All Characteristics
6. To modify the value of a characteristic individually, select the particular characteristic from the
attribute list. The Attribute Details window on the right will display the properties of the selected
characteristics as well as the options to modify or read the values, as shown in Figure 6-68.
Figure 6-68. Modify a Characteristic
7. Similarly, notifications or indications can be enabled on the characteristics that support those
properties.
LED starts blinking at power up,
if bootloadable file is corrupt.
Entered Bootloader mode by
holding the PSoC 4 Reset button
during kit power-up.
SWD operation is in progress.
Any I2C traffic.
Kit's COM port connect/discon-
nect event (one blink).
USB enumeration successful.
Kit is in the idle state waiting for
commands.
Bootload the KitProg.cyacd file: in PSoC Programmer, connect to the kit, open the Utilities tab and press Upgrade Firmware button.
Release the Reset button and re-plug power if you entered
this mode by mistake. If the mode entry was intentional,
bootload the new.cyacd file using the Bootloader Host tool
shipped with PSoC Creator.
In PSoC Programmer, watch the log window for status messages for SWD operations. In the Bridge Control Panel, the
LED blinks on I2C command requests. In BCP or any other
serial port terminal program, distinguish the kit's COM port
number by the blinking LED when the port is connected or
disconnected.
The kit functions can be used by PSoC Creator, PSoC Programmer, Bridge Control Panel, and any serial port terminal
program.
This means that the USB enumeration was unsuccessful.
This can happen if the kit is not powered from the USB host
or the kit is not connected to the USB host through the USB
cable. Verify the USB cable and check if PSoC Programmer
is installed on the PC.
Updated Appendix chapter on page 168:
Updated “Schematics” on page 168:
Updated entire section.
Updated “Bill of Materials (BOM)” on page 184:
Updated “BLE Pioneer Board” on page 184:
Updated entire section.
Updated “BLE Module” on page 188:
Updated “CY5671 PRoC BLE Module” on page 188:
Updated entire section.
Updated “CY8CKIT-142 PS oC 4 BLE Mo du le ” on page 190:
Updated entire section.
Updated “Dongle” on page 192:
Updated entire section.
Added “Adding BLE module compatible headers on your own baseboard” on