Cypress CY8CKIT-042-BLE User Manual

CY8CKIT-042-BLE
Bluetooth® Low Energy (BLE)
Pioneer Kit Guide
Doc. # 001-93731 Rev. *C
Cypress Semiconductor
198 Champion Court
Phone (USA): 800.858.1810
Phone (Intnl): +1.408.943.2600
www.cypress.com
Copyrights
Copyrights
© Cypress Semiconductor Corporation, 2014-2015. The inform ation contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsib ility for the use of any circu itry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control o r safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a C ypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement. CySmart, F-RAM, PRoC, Programmable System-on-Chip, and PSoC Creator are trademarks, and PSoC and CapSense are
registered trademarks of Cypress Semiconductor Corporation. All other products and company names mentioned in this document may be the trademarks of their respective holders.
2
Purchase of I Philips I
C components from Cypress or one of its sublicensed Associated Companies conveys a license under the
2
C Patent Rights to use these components in an I2C system, provided that the system conforms to the I2C Standard Specification as defined by Philips. As from October 1st, 2006 Philips Semiconductors has a new trade name - NXP Semiconductors.
Flash Code Protection
Cypress products meet the specifications contained in their particular Cypress Datasheets. Cypress believes that its family of products is one of the most secure families of its kind on the market today, regardless of how they are used. There may be methods, unknown to Cypress, that can breach the code protection features. Any of these methods, to our knowledge, would be dishonest and possibly illegal. Neither Cypress nor any o ther semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Cypress is willing to work with the customer who is concerned about the inte grity of their code. Co de prot ection i s constantly evolving. We at Cypress are committed to continuously improving the code protection features of our products.
2 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

Contents

Safety Information 7
1. Introduction 13
1.1 Kit Contents..................................... ... ... ....................................................................14
1.2 BLE Pioneer Baseboard Details ................................................................................15
1.3 PSoC Creator™.........................................................................................................17
1.4 Getting Started...........................................................................................................17
1.5 Additional Learning Resources........................ ... ... ... .... ... ... ... .... ... ... ..........................18
1.6 Technical Support......................................................................................................19
1.7 Documentation Conventions......................................................................................20
1.8 Acronyms...................................................................................................................21
1.5.1 Beginner Resources.......................................................................................18
1.5.2 Application Notes...........................................................................................18
1.5.3 PSoC Creator Example Projects....................................................................18
1.5.4 Component Datasheets .................................................................................19
1.5.5 Bluetooth Learning Resources.......................................................................19
1.5.6 Learning From Peers .....................................................................................19
1.5.7 Other Related Resources...............................................................................19
2. Software Installation 23
2.1 Before You Begin.......................................................................................................23
2.2 Install Software ..........................................................................................................23
2.3 Windows 8.1 USB selective suspend setting.............................................................25
3. Kit Operation 27
3.1 Theory of Operation............................................................... .... ... ... ... ... .... ................27
3.2 KitProg.......................................................................................................................29
3.3 BLE Pioneer Kit USB Connection..............................................................................29
3.4 Placing Modules on Baseboard.................................................................................29
3.5 Programming and Debugging BLE Device................................................................30
3.5.1 Programming using PSoC Creator.................................................................30
3.5.2 Debugging using PSoC Creator................................. .... ... ... ... ... .... ... ... ... .... ...32
3.5.3 Programming using PSoC Programmer.........................................................32
3.6 Updating BLE Dongle for CySmart Central Emulation Tool ......................................35
3.7 USB-UART Bridge................................................................. .... ... ... ... ... .... ... ... ... .... ...37
3.8 USB-I2C Bridge.........................................................................................................38
3.9 Updating the KitProg Firmware..................................................................................39
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 3
Contents
4. Example Projects 41
4.1 Using Example Projects ............................................................................................41
4.2 CapSense Slider and LED.........................................................................................45
4.2.1 Project Description............................................................................ .............45
4.2.2 Hardware Connections ..................................................................................48
4.2.3 Flow Chart .....................................................................................................49
4.2.4 Verify Output..................................................................................................50
4.3 CapSense Proximity..................................................................................................59
4.3.1 Project Description............................................................................ .............59
4.3.2 Hardware Connections ..................................................................................62
4.3.3 Flow Chart .....................................................................................................63
4.3.4 Verify Output..................................................................................................64
4.4 BLE Central Mode.....................................................................................................70
4.4.1 Project Description............................................................................ .............70
4.4.2 Hardware Connections ..................................................................................72
4.4.3 Flow Chart .....................................................................................................73
4.4.4 Verify Output..................................................................................................74
4.5 BLE Dongle and LED Control....................................................................................77
4.5.1 Project Description............................................................................ .............77
4.5.2 Hardware Connections ..................................................................................78
4.5.3 Flow Chart .....................................................................................................79
4.5.4 Verify Output..................................................................................................80
4.6 Direct Test Mode (DTM)............................................................................................80
4.6.1 Project Description............................................................................ .............80
4.6.2 Hardware Connection....................................................................................82
4.6.3 Verify Output..................................................................................................83
5. Hardware 85
5.1 BLE Pioneer Baseboard............................................................................................85
5.1.1 PSoC 5LP......................................................................................................85
5.1.2 Power System................................................................................................85
5.1.3 Programming Interface ..................................................................................92
5.1.4 Expansion Connectors...................................................................................92
5.1.5 USB Mini-B Connector...... ... ... ... .... ... ... ... .... ......................................... .... ... ...95
5.1.6 CapSense Circuit...........................................................................................96
5.1.7 BLE Pioneer Baseboard LEDs.......................................................................97
5.1.8 Push Buttons .................................................................................................99
5.1.9 Cypress Ferroelectric RAM (F-RAM)...........................................................100
5.1.10 Serial Interconnection between KitProg and Module...................................101
5.1.11 Module Headers ..........................................................................................102
5.2 Module Board..........................................................................................................103
5.2.1 PSoC 4 BLE or PRoC BLE Device..............................................................103
5.2.2 Module Headers (20-Pin and 24-Pin Headers)............................................104
5.2.3 Wiggle Antenna ...........................................................................................105
5.2.4 Antenna Matching Network.. ... ... .... .......................................... ... ... ... ... .... ... .106
5.2.5 BLE Passives...............................................................................................107
5.2.6 Test Points .................... .... ... ... .....................................................................108
5.3 BLE Dongle Board...................................................................................................108
5.3.1 Power System..............................................................................................109
5.3.2 USB Type-A Plug . ... ... ... .... ...........................................................................109
5.3.3 User LED .....................................................................................................110
4 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Contents
6. Advanced Topics 111
6.1 Using FM24V10 F-RAM...........................................................................................111
6.1.1 Address Selection........................................................................................111
6.1.2 Write/Read Operation ..................................................................................111
6.2 CySmart Mobile Application.....................................................................................112
A. Appendix 117
A.1 Schematics ..............................................................................................................117
A.2 Board Layout ...... ... ... ... ... .......................................... .... ... ... ... .... ..............................125
A.3 Bill of Materials (BOM).............................................................................................133
A.4 KitProg Status LED States.......................................................................................143
A.5 Adding BLE module compatible headers on your own baseboard..........................144
A.6 Migrating projects across different Pioneer series kits ............................................145
Revision History 149
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 5
Contents
6 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Safety Information
The CY8CKIT-042-BLE boards contain electrostatic discharge (ESD) sensitive devices. Electrostatic charges readily accumulate on the human body and any equipment, which can cause a discharge without detection. Permanent damage may occur on devices subjected to high-energy discharges. Proper ESD precautions are recommended to avoid performance degradation or loss of functionality. Store unused CY8CKIT-042-BLE boards in the protective shipping package.
The CY8CKIT-042-BLE Bluetooth Low Energy (BLE) Pioneer Kit is intended for use as a development platform for hardware or software in a laboratory environment. The board is an open system design, which does not include a shielded enclosure. Due to this reason, the board may cause interference with other electrical or electronic devices in close proximity. In a domestic environment, this product ma y cause radio interfe rence. In such cases, the user may be required to take adequate preventive measures. Also, this board should not be used near any medical equipment or critical RF devices.
The CY8CKIT-042-BLE Bluetooth Low Energy (BLE) Pioneer Kit is intended for use as a development, demonstration and evaluation platform for hardware or software in a laboratory environment. The kit is not intended for general consumer use. Cypress recommends that the kit only be used in a shielded room.
Attaching additional wiring to this product or modifying the product ope ration from the factory default may affect its performance and cause interference with other apparatus in the immediate vicinity. If such interference is detected, suitable mitigating measures should be taken.
The CY8CKIT-042-BLE as shipped from the factory has been verified to meet with requirements of CE as a Class A product.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 7

General Safety Instructions

End-of-Life/Product Recycling The end-of-life cycle for this kit is five years from the date of
manufacture mentioned on the back of the box. Contact your nearest recycler to discard the kit.
ESD Protection
ESD can damage boards and associated components. Cypress recommends that the user perform procedures only at an ESD workstation. If an ESD workstation is not available, use appropriate ESD protection by wearing an antistatic wrist stra p attached to the chassis ground (any unpainted metal surface) on the board when handling parts.
Handling Boards
CY8CKIT-042-BLE boards are sensitive to ESD. Hold the board only by its edges. After removing the board from its box, place it on a grounded, static-free surface. Use a conductive foam pad if available. Do not slide the board over any surface.
Battery Care and Use
Use the correct size and type of battery specified in this guide.
Keep battery contact surfaces and battery compartment contacts clean by rubbing them with a
clean pencil eraser or a rough cloth each time you replace batteries.
Remove the battery from a device when it is not expected to be in use for several months.
Make sure that you insert the battery into your device properly, with the + (plus) and – (minus)
terminals aligned correctly.
Do not place the battery next to metallic objects such as keys and coins.
Never throw the battery into fire.
Do not open up the battery.
Do not short the battery.
Do not subject the battery to high temperatures or high humidity.
Store the battery in a dry place.
Do not recharge a battery unless it is marked “rechargeable.”
Battery Disposal
Batteries can be safely disposed of with normal household waste. Never dispose of batteries in fire because they can explode. It is important not to dispose of large amounts of batteries in a group. Used batteries are often not completely “dead.” Grouping used batteries together can bring these “live” batteries into contact with one another, creating safety risks.
8 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

Regulatory Compliance Information

CAUTION: Any changes or modifications not expressly approved by the party responsible for compliance coul d void the user ’s authority to operate the equipment.
Only the PCB antenna(s) that were certified with the module may be used. Other antennas may be used only if they are of the same type and have the same or lower gain.
The module must be recertified as a Class II permissive change if the module is built into a different device than the EVB (evaluation board) it was certified with.
THE MANUFACTURER IS NOT RESPONSIBLE FOR ANY RADIO OR TV INTERFERENCE CAUSED BY UNAUTHORIZED MODIFICATIONS TO THIS EQUIPMENT. SUCH MODIFICATIONS COULD VOID THE USER'S AUTHORITY TO OPERATE THE EQUIPMENT.
The kit contains devices that transmit and receive radio signals in accordance with the spectrum regulations for the 2.4-GHz unlicensed frequency range.
Cypress Semiconductor Corporation has obtained regulatory approvals for this kit to be used in specific countries. These countries include United States (FCC Part 15), Canada (IC RSS210) and Japan (JRF/TELEC). Additional regional regulatory agency approval may be required to operate these throughout the world.
This kit as shipped from the factory has been tested and found to comply with the limits/ requirements for following compliances:
FCC as a class B digital device, pursuant to part 15 of the FCC Rules.
This Class B digital apparatus complies with Canadian ICES-003
Regulatory statements and Product Labeling

United States (FCC)

This equipment complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful inter ference, and (2) this d evice must accept any interference received, including interference that may cause undesired operation.
The CY8CKIT-142 PSoC 4 BLE and CY5671 PRoC BLE modular transmitter must be labeled with its own FCC ID number, and, if the FCC ID is not visible when the module is ins talled in to another device, then the outside of the device into which the module is installed must also display a label referring to the enclosed module. This exterior label can use wording such as the following:
Contains FCC ID: WAP-CY8CKIT-142 and WAP-CY5671, The enclosed device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference and (2) this device must accept any interference received, including interference that may cause undesired operation. Any similar wording that expresses the same meaning may be used.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 9
CAUTION: The changes or modifications not expressly approved by the party responsible for Compliance could void the user’s authority to operate the equipment and the antennas for this transmitter must be installed to provide a sep aration dist ance of 20 cm from all persons an d must not be co-located or operating in conjunction with any other antenna or transmitter.

Canada (IC)

This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device.
This equipment complies with radio frequency exposure limits set forth by Industry Canada for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the device and the user or bystanders.
CAUTION: Any changes or modifications not expressly approved by the party responsible for com­pliance could void the user’s authority to operate the equipment.
This Module is labelled with its own IC ID. If the IC ID Certification Number is not visible while installed inside another device, then the device should display the label on it referring the enclosed module. In that case, the final end product must be labelled in a visible area with the following:
“Contains Transmitter Module IC 7922A-CY8CKIT142 and 7922A-CY5671” OR “Contains IC: 7922A-CY8CKIT142 and 7922A-CY5671” Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio
exempts de licence. L'exploitation est autorisée aux deux conditions suivantes: (1) l'appareil ne doit pas produire de brouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d'en compromettre le fonctionnement.
Cet équipement est conforme aux limites d'exposition aux radiofréquences définies par Industrie Canada pour un environnement non contrôlé. Cet équipement doit être installé et utilisé avec un minimum de 20cm de distance entre le dispositif et l'utilisateur ou des tiers.
Ce module est étiqueté avec son propre ID IC. Si le numéro de certification IC ID n'est pas visible lorsqu'il est installé à l'intérieur d'un autre appareil, l'appareil doit afficher l'étiquette sur le module de référence ci-joint. Dans ce cas, le produit fi nal doit être étiqueté dans un endroit visible par le texte suivant:
“Contains Transmitter Module IC 7922A-CY8CKIT142 and 7922A-CY5671” OR “Contains IC: 7922A-CY8CKIT142 and 7922A-CY5671”
10 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

Japan (TELEC)

CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 11
12 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

1. Introduction

Thank you for your interest in the CY8CKIT-042-BLE Bluetooth Low Energy ( BLE) Pioneer Kit. The BLE Pioneer Kit enables customers to evaluate and develop BLE projects using the PSoC and PRoC
Bluetooth SMART™ or Bluetooth
®
BLE devices.
®
Low Energy (BLE) is a fully featured, layered , communication
®
4 BLE
protocol that includes a 2.4 GHz Radio, a link layer and an application layer. However, in order to implement your projects using PSoC 4 BLE or PRoC BLE, you do not need to understand the complex protocol. The Cypress BLE solution which includes the device, BLE Component and the BLE Firmware Stack will take care of it for you. The Cypress BLE Firmware Stack is royalty free.
You will use two software tools, PSoC Creator and CySmart Central Emulation Tool to develop and debug your BLE project. PSoC Creator is Cypress’ standard Integrated Development Environment (IDE). The BLE protocol has been abstracted into an easy drag-and-drop BLE Component in PSoC Creator. CySmart Central Emulation Tool is a Central emulation tool for Windows PCs. CySmart Central Emulation Tool provides an easy-to-use Graphical User Interface (GUI) to enable customers to test and debug their BLE projects.
The BLE Pioneer Kit offers footprint-compatibility with Arduino™ shields as well as 6-pin Digilent Pmod daughter cards. In addition, the kit features a CapSense
®
slider, an RGB LED, a push button switch, an onboard programmer/debugger and USB-UAR T/I2 C bridge functionality b lock (KitProg), a coin cell battery holder and a Cypress F-RAM. The BLE Pioneer Kit supports 1.9 V, 3.3 V or 5 V as operating voltages.
The BLE Pioneer Kit supports two devices: PSoC 4 BLE and PRoC BLE. PSoC 4 BLE is a 32-bit, 48-MHz ARM
®
Cortex™-M0 BLE solution with CapSense, 12-bit Analog Front End (1x SAR ADC, 4x Low-Power Opamps, 2x Low-Power Comparators, 2x Current DACs), 4x TCPWM
1
, 2x SCBs2, 4x UDBs3, LCD4, I2S5 and 36 GPIOs. PSoC 4 BLE provides a complete solution for sports and fitness monitors, wearable electronics, medical devices, home automation systems and sensor-based low-power systems for the Internet of Things (IoT).
PRoC BLE is a 32-bit, 48-MHz ARM 4x TCPWM
1
, 2x SCBs2, LCD4, I2S5 and 36 GPIOs.
®
Cortex™-M0 BLE solution with CapSense, 12-bit ADC,
PRoC BLE provides a complete solution for BLE connectivity, HID, remote controls and toys. Both devices are supported by a royalty-free Stack compatible with Bluetooth 4.1.
Notes:
1. Configurable timer, counter, pulse-width modulator.
2. Serial communication blocks (configurable to I
3. Universal Digital Blocks.
4. Configurable liquid crystal display driver.
5. Config urable integrated interchip sound serial bus interface.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 13
2
C, SPI or UART).
Introduction

1.1 Kit Contents

The BLE Pioneer Kit contains the following items, as shown in Figure 1-1.
BLE Pioneer Baseboard preloaded with the CY8CKIT-142 PSoC 4 BLE Module
CY5671 PRoC BLE Module
CY5670 CySmart USB Dongle (BLE Dongle)
Quick start guide
USB Standa rd-A to Mini-B cable
Four jumper wires (4 inch) and two proximity sensor wires (5 inch)
Coin cell (3V CR2032)
Figure 1-1. Kit Contents
If any part of the BLE Pioneer Kit is missing, contact your near est Cypress sales office for help:
www.cypress.com/go/support.
14 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

1.2 BLE Pioneer Baseboard Details

The BLE Pioneer Baseboard consists of the blocks shown in Figure 1-2.
1. RGB LED
2. Module reset button
3. CapSense proximity header
4. User button
5. CapSense slider
6. Arduino compatible I/O headers (J2/J3/J4)
7. Arduino compatible power header (J1)
8. Digilent Pmod compatible I/O header (J5)
9. Cypress F-RAM 1-Mb (FM24V10-G)
10.PSoC 5LP - programmer and debugger (CY8C5868LTI-LP039)
11.PSoC 5LP I/O header (J8)
12.Coin cell holder (bottom side)
13.USB conn ec to r (J1 3)
14.Po wer LE D an d Status LED
15.System power supply jumper (J16) - LDO 1.9 V~5 V
16.BLE power supply jumper (J15) - for current measurement
17.Module headers (J10/J11)
Introduction
Figure 1-2. BLE Pioneer Baseboard
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 15
Introduction
(/%7%%"
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
7%%3(/%
1@1@
1@1@
1@1@
1@73&'
1@1@
1@1@
1@1@
93&41@
(/%1@
7%%%1@
7%%
(/%
1@
8JHHMF
BOUFOOB
,)[ DSZTUBM CPUUPNTJEF
$NPE
$UBOL
"OUFOOB NBUDIJOH OFUXPSL"./
$:$-2*#-
14P$#-&EFWJDF
14P$ #-&NPEVMF IFBEFS+
14P$ #-&NPEVMF IFBEFS+
QJO6"35 IFBEFS
4"3CZQBTT
DBQBDJUPS
CPUUPNTJEF
(/%7%%"
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
1@1@
7%%3(/%
1@1@
1@1@
1@1@
1@73&'
1@1@
1@1@
1@1@
93&41@
(/%1@
7%%%1@
7%%
(/%
8JHHMF
BOUFOOB
$NPE
$UBOL
"OUFOOB NBUDIJOH OFUXPSL"./
.)[
DSZTUBM
$:#--29*
13P$#-&EFWJDF
13P$ #-&NPEVMF IFBEFS+
13P$ #-&NPEVMF IFBEFS+
QJO6"35 IFBEFS
4"3CZQBTT
DBQBDJUPS
CPUUPNTJEF
1@
1@
1@
.)[
DSZTUBM
,)[ DSZTUBM CPUUPNTJEF
32.768 KHz crystal
32.768 KHz crystal
Figure 1-3 shows a markup of the onboard components, where red module denotes the PSoC 4 BLE
module and black module denotes the PRoC BLE module. Figure 1-3. BLE Module Markup
16 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
The BLE Dongle board consists of the blocks shown in Figure 1-4. Figure 1-4. BLE Dongle Markup

1.3 PSoC Creator™

PSoC Creator is a state-of-the-art, easy-to-use integrated design environment (IDE). It is a revolutionary hardware and software co-design environment, powered by a library of preverified and precharacterized PSoC Components™.
Introduction
With PSoC Creator, you can:
Drag and drop PSoC Components to build a schematic of your custom design
Automatically place and route components and configure GPIOs
Develop and debug firmware using the included component APIs
PSoC Creator also enables you to tap into an entire tool e cosystem wit h integrate d compiler ch ains and production programmers for PSoC devices.
For more information, visit www.cypress.com/psoccreator.

1.4 Getting Started

This guide will help you get acquainted with the BLE Pioneer Kit:
The Software Installation chapter on page 23 describes the installation of the kit software. This
includes the PSoC Creator IDE for development and debu gging applications, PSoC Programmer for programming hex files, and the CySmart Central Emulation Tool for BLE Central emulation.
The Kit Operation chapter on page 27 describes the major features of the BLE Pioneer Kit such
as USB-UART and USB-I
The Example Projects chapter on page 41 describes multiple PSoC 4 BLE and PRoC BLE code
examples that will help you understand how to create your own BLE application using the BLE Component and device.
The Hardware chapter on page 85 details the hardware content of the BLE Pioneer Kit and BLE
Dongle, and the hardware operation.
The Advanced Topics chapter on page 111 explains the functionality of the kit features, such as
the USB-UART bridge, USB-I Tool.
The Appendix on page 117 provides schematics, board layouts, KitProg LED status, and the bill
of materials (BOM).
2
C bridges and functionalities such as programming and debugging.
2
C bridge, F-RAM, iOS app, and the CySmart Central Emulation
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 17
Introduction

1.5 Additional Learning Resources

Visit www.cypress.com/go/psoc4ble and www.cypress.com/procble for additional learning resources including datasheets, technical r eference manuals, and application notes.
Visit www.cypress.com/go/cysmart for information on the CySmart Central Emulation Tool.

1.5.1 Beginner Resources

PSoC Creator Traini ng: www.cypress.com/go/creatorstart/creatortraining

1.5.2 Application Notes

Visit www.cypress.com/appnotes to view a growing list of application notes for PSoC 3, PSoC 4, PSoC 4 BLE, PRoC BLE, and PSoC 5LP.
Visit this site for PSoC 4BLE and PRoC BLE application notes.

1.5.3 PSoC Creator Example Projects

These simple example projects demonstrate how to configure and us e PSoC Creator components. To open an example proje ct in PSoC Creator, go to File > Example Project (see Figure 1-5) and choose the required example project.
Figure 1-5. PSoC Creator Example Projects
18 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

1.5.4 Component Datasheets

To open the datasheet for any component, right-click on the component and select Open Datasheet (see Figure 1-6).
Figure 1-6. Opening Component Datasheet

1.5.5 Bluetooth Learning Resources

The Bluetooth Developer Portal provides material by the Special Interest Group (SIG) for learning various aspects of the Bluetooth Low Energy protocol and systems. Some of them are:
Training videos
GATT profiles
Bluetooth community forum
Introduction

1.5.6 Learning From Peers

Cypress Developer Community Forums: Visit www.cypress.com/forums

1.5.7 Other Related Resources

Digilent PMod: www.digilentinc.com/pmods/
Arduino: http://arduino.cc/en/Main/ArduinoBoardUno

1.6 Technical Support

For assistance, go to our support web page, www.cypress.com/support, or contact our customer support at +1 (800) 541-4736 Ext. 2 (in the USA) or +1 (408) 943-2600 Ext. 2 (International).
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 19
Introduction

1.7 Documentation Convent i ons

Table 1-1. Document Conventions for Guides
Convention Usage
Courier New
Italics
[Bracketed, Bold]
File > Open
Bold
Times New Roman
Text in gray boxes Describes cautions or unique functionality of the product.
Displays file locations, user entered text, and source code:
C:\...cd\icc\
Displays file names and reference documentation: Read about the sourcefile.hex file in the PSoC Creator User Guide.
Displays keyboard commands in procedures: [Enter] or [Ctrl] [C]
Represents menu paths: File > Open > New Project
Displays commands, menu paths, and icon names in procedures: Click the File icon and then click Open.
Displays an equation:
2 + 2 = 4
20 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

1.8 Acronyms

Table 1-2. Acronyms Used in this Document
Acronym Definition
ADC Analog-to-Digital Converter API Application Programming Interface BD address Bluetooth Device address BLE Bluetooth Low Energy CDC Communications Device Class COM Communication Port DVD Digital Video Disc ESD Electrostatic Discharge F-RAM Ferroelectric Random Access Memory GUI Graphical User Interface GPIO General Purpose Input/Output I2C Inter-Integrated Circuit IAS Immediate Alert Service IDAC Interconnecting Digital-Analog Converter IDE Integrated Development Environment LDO Low Drop Out (voltage regulator) LED Light-Emitting Diode LP Low Power LPT Line Print Terminal PHY Physical Layer PrISM Precise Illumination Signal Modulation PRoC Programmable Radio-on-Chip PRM Protocol Service Multiplexer PSoC Programmable Systems-on-Chip PWM Pulse-Width Modulation QFN Quad Flat No-lead (package) RGB Red Green Blue SAR Successi ve Approximation Register SMA SubMiniatur e version A SPI Serial Peripheral Interface SWD Serial Wire Debug UART Universal Asynchronous Receiver Transmitter USB Universal Serial Bus
Introduction
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 21
Introduction
22 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

2. Software Installation

This chapter describes the steps to install the software tools and packages on a PC for using the BLE Pioneer Kit. This includes the IDE in which the projects will be built and used for programming.

2.1 Before You Begin

All Cypress software installations require administrator privileges. Ensure you have the required privileges on the system for successful installation. Before you install the kit software, close any other Cypress software that is currently running.

2.2 Insta ll Software

Follow these steps to install the BLE Pioneer Kit software:
1. Download the BLE Pioneer Kit software from www.cypress.com/CY8CKIT-042-BLE. The software is available in the following formats:
a. CY8CKIT-042-BLE Kit Complete Setup: This installation package contains the files related to
the BLE Pioneer Kit. However, it does not include the Windows Installer or Microsoft .NET framework packages. If these packages are not on your computer, the installer directs you to download and install them from the Internet.
b. CY8CKIT-042-BLE Kit Only Package: This executable file installs only the BLE Pioneer Kit
contents, which include code examples, hardware files, and user documents. This package can be used if all the software prerequisites (listed in step 5) are installed on your PC.
c. CY8CKIT-042-BLE DVD ISO: This file is a complete package, stored in a DVD-ROM image
format, that you can use to create a DVD or extract using an ISO extraction program such as WinZip or WinRAR. The file can also be mounted similar to a virtual CD/DVD using virtual drive programs such as ‘Virtual CloneDrive’ and ‘MagicISO’. This file includes all the required software, utilities, drivers, hardware files, and user documents.
2. If you have downloaded the ISO file, mount it on a virtual drive; if you do not have a virtual drive to mount, extract the ISO contents using the appropriate ISO extractor (such as MagicISO or PowerISO). Double-click cyautorun.exe in the root directory of the extracted content or mounted ISO if “Autorun from CD/DVD” is not enabled on the PC. The installation window will appear automatically.
Note: If you are using the “Kit Complete Setup” or “Kit Only Package” file, then go to step 4 for installation.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 23
Software Installation
3. Click Install CY8CKIT-042-BLE Kit to start the installation, as shown in Figure 2-1. Figure 2-1. Installer Screen
4. Select the folder in which you want to install the CY8CKIT-042-BLE kit-related files. Choose the directory and click Next.
5. When you click Next, the CY8CKIT-042-BLE Kit installer automatically installs the required software, if it is not present on your computer. The following software packages are required: Note: For the Kit Only Package, download and install the following prerequisites.
a. PSoC Creator 3.1 or later: Download the latest version from www.cypress.com/psoccreator. b. PSoC Programmer 3.22 or later: This is installed as part of PSoC Creator installation
(www.cypress.com/programmer).
c. CySmart 1.0 or later: Download the latest version from www.cypress.com/cysmart.
24 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Software Installation
6. Choose the Typical/Custom/Complete installation type in the Product Installation Overview window, as shown in Figure 2-2. Click Next after you select the installation type.
Figure 2-2. Product Installation Overview
7. Read the license agreement and select I accept the terms in the license agreement to continue with installation. Click Next.
8. When the installation begins, a list of packages appears on the installation page. A green check mark appears next to each package after successful installation.
9. Click Finish to complete the CY8CKIT-042-BLE kit installation.
10.Enter your contact information or select the Continue Without Contact Information check box. Click Finish to complete the CY8CKIT-042-BLE kit installation.
11.After the installation is complete, the kit contents are available at the following location:
<Install_Directory>\CY8CKIT-042-BLE Kit
Default location: Windows 7 (64-bit): C:\Program Files (x86)\Cypress\CY8CKIT-042-BLE Kit Windows 7 (32-bit): C:\Program Files\Cypress\CY8CKIT-042-BLE Kit Note: For Windows 7/8/8.1 users, the installed files and the folder are read only. To use the installer
example project, follow the steps outlined in the Example Projects chapter on page 41. The BLE Pioneer Kit installer also installs the CySmart Central Emulation Tool on your PC. This
software, along with the BLE Dongle, allows the PC to emulate as a BLE Central device. Refer to
CySmart Mobile Application on page 112 for more details on how to use the CySmart Central
Emulation Tool.

2.3 Windows 8.1 USB selective suspend setting

Windows 8.1 operating system issues a suspend command to connected USB device if there is no activity on its USB bus. This may happen to BLE Pioneer Kit/BLE Dongle if the driver installation is not complete or driver not found. In this situation, as a response to the suspend command from the
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 25
Software Installation
operating system, the KitProg will shut down the on-board LDO to remain within the USB suspend current requirement. Due to this, the BLE Pioneer Kit will not be powered and will not be functional.
To prevent this, take either of the two actions below:
1. Allow complete driver installation to take place on Windows 8.1 operating system before using the BLE Pioneer Kit.
2. Disable the USB selective suspend setting for BLE Pioneer Kit from Power Options on Windows
8.1: a. From Control Panel, go to Power Options. b. Under Advanced settings, expand USB settings > USB selective suspend setting. c. Select option to Disabled for Plugged in and On battery operation. d. Select OK.
26 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

3. Kit Operation

GPIO
Status LED
Green
BLE/Arduino Compatible Headers
Proximity wire
header
CapSense Slider
5 Segment
Reset SW
(Push Button)
USB
Mini B
KitProg
Programmer/Serial
Communication
KitProg
10 pin Prog. header
KitProg I/Os
16 pin Expansion header
PMOD header
6 pin PMOD header
ESD
Protection
MOSFET
Protection ckt
LDO
ORing Diodes
BLE/Arduino Compatible Headers
Jumper
BLE current measuring
Coin cell
Battery holder
Power
LED Red
BLE Module I/Os
20 pin header
FRAM
I2C pull-up
via FET
ORing Diodes
User SW
(Push Button)
BLE Module I/Os
24 pin header
VIN
VBUS
VCC
D+ / D-
VDD
XRES
3.3V
~3V
SWD
I2C / UART
I2C
Voltage Ctrl
3 pin Jumper
RGB LED
MOSFET
Protection ckt
BLE SWD
10 pin Prog. header
3.3V
Power Signal
GPIO
This chapter introduces you to the BLE Pioneer Kit and the features that will be used as part of its operation. We will discuss features such as USB connection, programming/debugging, and programmer firmware update. The chapter also describes the USB-UART and USB-I along with the PC tools that can be used to communicate with the BLE device on the BLE Pioneer Kit.

3.1 Theory of Operation

Figure 3-1, Figure 3-2, and Figure 3-3 show the block diagrams for the BLE Pioneer Baseboard,
PSoC 4 BLE/PRoC BLE Module, and BLE Dongle. Figure 3-1. BLE Pioneer Baseboard Block Diagram
2
C bridges
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 27
The BLE Pioneer Baseboard acts as the baseboard for the PSoC 4 BLE (red module) and PRoC BLE (black module). The BLE Pioneer Baseboard contains a PSoC 5LP device, that has KitProg firmware, used as an onboard programmer or debugger, and for the USB-Serial interface.
The baseboard is Arduino form-factor compatible, enabling Arduino shields to be connected on top of the board to extend the functionality of BLE modules. The board also features a 1-Mb F-RAM, an RGB LED, a five-segment CapSense slider, a proximity header, a user switch, and a reset switch for the PSoC 4 BLE and PRoC BLE devices on the module. The Pioneer board supports three voltage levels: 1.9 V, 3.3 V, and 5 V.
Kit Operation
PRoC BLE/
PSoC 4
BLE
BLE I/Os
20 pin header (Digital pins)
GPIO
GPIO
KHz
Crystal
Decaps
CMOD
SAR
Bypass Cap
CTANK
VREF
RF Matching
Circuit
MHz
Crystal
Test
points
4 pin
header
RX/ TX
BLE I/Os
24 pin header (Analog pins)
Ferrite Bead
VDDD/A/R
Decaps
Power Signal
RF Matching
Circuit
KitProg
Programmer/Serial
Communication
I2C / UART
SWD
USB
2.0
Type-A
Plug
10 pin Programming
header
SWD
Test Points
D+ / D-
Crystals
PRoC BLE
VBUS
ESD
Protection
Power Signal
XRES
Status LED
Green
Power LED
Red
Reset SW
(Push Button)
User SW
(Push Button)
User LED
Blue
The BLE Pioneer Baseboard can also be used as a standalone programmer to program and debug other BLE devices using serial wire debug (SWD), and as a USB-Serial interface. The KitProg firmware on PSoC 5LP device enables bootloading PSoC 5LP over USB to upgrade the firmware.
Figure 3-2. PSoC 4 BLE/PRoC BLE Module Block Diagram
This BLE Pioneer Kit includes two modules. These modules act as a basic breakout board for the CY8C4247LQI-BL483 (PSoC 4 BLE) and CYBL10563-56LQXI (PRoC BLE) device. The PSoC 4 BLE and PRoC BLE Modules are identical except for the BLE device.
The BLE Dongle is the wireless interface for the CySmart Central Emulation Tool. The BLE Dongle has a PRoC BLE device for BLE communication and KitProg for onboard programming, debugging and for the USB-Serial interface, as shown in Figure 3-3.
The BLE Dongle has a USB Type-A plug to connect the KitProg to the USB port of the host PC. The KitProg then communicates with the PRoC BLE device over UART or multiplexed I
2
C or an SPI bus. The BLE Dongle also features a user LED, a user switch, and a reset switch for the PRoC BLE device. The BLE Dongle is powered directly through the USB port (VBUS) at 5.0 V.
Figure 3-3. BLE Dongle Block Diagram
28 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

3.2 KitProg

KitProg is the hardware/firmware block for on-board programming, debugging and bridge functionality. It is a common reusable hardware/firmware block used across many Cypress Kit platforms. It consists of a PSoC 5LP which connects to the PC over an USB interface and connects to the PSoC 4 BLE or PRoC BLE device over SWD, I2C and UART pins.
The KitProg communicates with PSoC Programmer and PSoC Creator software to program/debug the target PSoC 4 BLE or PRoC BLE over the SWD interface. The main advantage of an onboard programmer/debugger is that users don’t have to buy an extra programmer/debugger hardware.

3.3 BLE Pioneer Kit USB Connection

The BLE Pioneer Kit powers from a PC over the USB interface (J13). It enumerates as a composite device, as shown in Table 3-1. USB drivers required for this enumeration are part of the kit installer. The kit should be installed properly for its correct operation. Visit www.cypress.com/CY8CKIT-042-BLE for latest kit installer.
Table 3-1. BLE Pioneer Kit Enumerated Interfaces
Port Description
USB Composite Device Composite device USB Input Device
KitProg KitProg USB-UART USB-UART bridge, which appears as a COM# port
USB-I2C bridge, Kitprog Command Interface
2
USB-I
C bridge, Programmer and Debugger
Kit Operation
Figure 3-4. KitProg Driver Installation (appearance may differ depending on Windows version)

3.4 Placing Modules on Baseboard

Plug the module into the BLE Pioneer Baseboard on headers J10 and J11, while keeping the antenna directed outside. Note that the two parallel headers J10 and J11 are not equal (24-pin and 20-pin, respectively) and will not allow the module to be inserted in the opposite direction.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 29
Kit Operation
Figure 3-5. Baseboard with J10 and J11 Headers to connect modules
To remove the modules from the BLE Pioneer Kit, hold the BLE Pioneer Kit in one hand and the module in the other, as shown in Figure 3-6, and pull it out using a rocking motion.
Figure 3-6. Remove module connected on BLE Pioneer Kit

3.5 Programming and Debugging BLE Device

The BLE Pioneer Kit and BLE Dongle can be programmed and debugged using the KitProg. Before programming the device, ensure that PSoC Creator and PSoC Programmer are installed on the PC. See the section Install Software on page 23 for more information.

3.5.1 Programming using PSoC Creator

1. Connect the BLE Pioneer Kit/BLE Dongle to the PC USB port, as shown in Figure 3-7.
30 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Kit Operation
Figure 3-7. Connect USB Cable to J13
2. Load the desired example project in PSoC Creator from File > Open > Project/Workspace.
3. Build the project by choosing Build > Build <Project Name> or [Shift] [F6], as shown in
Figure 3-8.
Figure 3-8. Build an Example Project
4. If there are no errors during build, pr og ram the firmwa re by clicking Program button on toolbar or pressing [Ctrl] [F5], as shown in Figure 3-9. This will program the device on the BLE Pioneer Kit/ BLE Dongle and it will be ready for use.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 31
Kit Operation
Figure 3-9. Programming Device From PSoC Creator

3.5.2 Debugging using PSoC Creator

For debugging the project using PSoC Creator, follow steps 1-5 from Programming using PSoC Cre-
ator on page 30 followed by:
1. Click on Debug icon or press [F5], as shown in Figure 3-10. Figure 3-10. Start debug on PSoC Creator
2. Once Creator opens in debug mode, use the buttons on toolbar for debugging. For more details on using the debug features, see the Cypress application note Getting Started with
PSoC 4 BLE.

3.5.3 Programming using PSoC Programmer

PSoC Programmer (3.22 or later) can be used to program existing hex files into both the BLE Pio­neer Kit or BLE Dongle. To do this, follow these steps.
1. Connect the BLE Pioneer Kit or BLE Dongle to PC and open PSoC Progr ammer fr om Start > All Programs > Cypress > PSoC Programmer <version> > PSoC Programmer <version>.
32 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Kit Operation
2. Click the File Load button at the top left corner of the window . Browse for the desired hex file and click Open.
Figure 3-11. Select Hex File
3. Go to File > Program to start programing the kit with the selected file. Note: If the hex file does not match the device selected, then PSoC Programmer will throw an
error of device mismatch and terminate programming.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 33
Kit Operation
Figure 3-12. Program Hex File to Kit
4. When the programming is finished successfully , indicated by a PASS message on the status bar, the BLE Pioneer Kit/BLE Dongle is ready for use. Close PSoC Programmer.
34 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

3.6 Updating BLE Dongle for CySmart Central Emulation Tool

The BLE Dongle, provides a BLE Central mode capability using the CySmart Central Emulation Tool (see CySmart Mobile Application on page 112) on the PC. The CySmart Central Emulation Tool on the PC is the interface with which to configure the BLE Dongle and analyze the data transferred after connecting with a BLE peripheral.
The BLE Dongle works along with the CySmart Central Emulation Tool, as shown in Figure 3-13. The CySmart Central Emulation Tool is installed as part of the BLE Pioneer Kit installation and can be opened from Start > All Programs > Cypress > CySmart <version> > CySmart <version>. The tool operation is explained in user guide of the tool, which can be accessed from Help > Help Topics.
Figure 3-13. BLE Dongle Interface on CySmart Central Emulation Tool
Kit Operation
If the BLE Dongle contains custom firmware on PRoC BLE, the original CySmart firmware can be programmed back to restore the CySm art functionality. It must be connected through the USB and enumerated as KitProg. To do this, follow these steps:
1. Connect the BLE Dongle to the USB port on the PC.
2. Open PSoC Programmer by going to Start > All Programs > Cypress > PSoC Programmer <version> > PSoC Programmer <version>.
3. Click the File Load button and browse to the location of the BLE_Dongle_CySmart.hex file. The hex file is located at:
<Install_Directory>\CY8CKIT-042-BLE Kit\<version>\Firmware\ BLE Dongle\Hex Files\
Note: If Cypress releases new versions of the CySmart Central Emulation Tool and the BL E Don­gle firmware, then the CySmart Central Emulation Tool will display a message requesting to update the firmware, as shown in the followin g figu r es.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 35
Kit Operation
Figure 3-14. Update BLE Dongle Firmware with Hex from Latest Kit Installer
Figure 3-15. Update BLE Dongle Firmware with Hex from Web
In this scenario, choose the hex file from the respective location and update the BLE Dongle firm­ware with the following steps.
36 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Kit Operation
Figure 3-16. Open Hex File
4. Ensure the other settings match as shown in Figure 3-16. Click the Program button to start programming. The status bar at the bottom of the PSoC Programmer window will show the programming status and the result (Pass/Fail).
Figure 3-17. Programming Hex File to Dongle
5. After programming is completed successfully, the BLE Dongle firmware is updated and can be used to connect to the CySmart Central Emulation Tool.

3.7 USB-UART Bridge

The KitProg on both the BLE Pioneer Baseboard and BLE Dongle acts as a USB-UART bridge. When connected to PC, a device named KitProg USB-UART is available under Ports (COM & LPT) in the Device Manager. The UART lines between modules and KitProg are hard-wired on board, with UART_RX assigned to P1_4 and UART_TX assigned to P1_5 on PSoC 4 BLE/PRoC BLE device.
COM terminal software, such as Hyperterminal or TeraTerm, can be used to send and receive data. UART data sent from PSoC 4 BLE/PRoC BLE device on UART_TX line will be received by the software. Data entered in the software will be received by PSoC 4 BLE/PRoC BLE on UART_RX
line. Refer to Advanced section in CY8CKIT-042 PSoC
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 37
®
4 Pioneer Kit User Guide for more details.
Kit Operation
Table 3-2 lists the specifications supported by the USB-UART bridge.
Table 3-2. Specifications Supported by USB-UART Bridge
Parameter Supported Values
Baud Rate 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200 Data Bits 8 Parity None Stop Bits 1 Flow Control None File Transfer Protocols sup-
ported

3.8 USB-I2C Bridge

Xmodem, 1K Xmodem, Ymodem, Kermit, and Zmodem (only speeds greater than 2400 baud)
The KitProg can function as USB-I2C bridge and communicate with software utility Bridge Control Panel (BCP). When connected to BCP, the KitProg USB-I number> in the BCP. The I used to transfer data with BCP. The I and P3_5 (SCL), which are hardwired on board to I
2
C connection between PSoC 4 BLE/PRoC BLE device and KitProg is
2
C lines on PSoC 4 BLE/PRoC BLE device are P3_4 (SDA)
2
C lines of KitProg. The USB-I2C supports I2C
2
C is available under KitProg\<serial
speed of 50 kHz, 100 kHz, 400 kHz and 1 MHz. BCP is installed as part of PSoC Programm er inst allation and can be acce ssed fro m St art > All Pro-
grams > Cypress > Bridge Control Panel. Refer to Advanced section in CY8CKIT-042 PSoC
®
4
Pioneer Kit User Guide for more details.
To use the USB-I
2
C functionality, select the KitProg\<serial number> in the BCP. On successful
connection, the Connected and Powered status box turn green, as shown in Figure 3-18. Figure 3-18. KitProg USB-I
2
C Connected in Bridge Control Panel
38 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

3.9 Updating the KitProg Firmware

The KitProg firmware normally does not require any update. If an up date is required, then PSoC Pro­grammer will display a warning message when the kit is connected to it, as shown in Figure 3-19.
Figure 3-19. Update KitProg
To update the KitProg, go to the Utilities tab on PSoC Programmer and click Upgrade Firmware, as shown in Figure 3-20.
Figure 3-20. Update KitProg from PSoC Programmer
Kit Operation
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 39
Kit Operation
40 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4. Example Projects

This chapter demonstrates the functionality of the PSoC 4 BLE and PRoC BLE devices using the BLE Pioneer Kit-based example projects. Download and install the kit setup file from the kit web
page. The example projects can be accessed under the Examples and Kits on Start Page of PSoC
Creator.

4.1 Using Example Projects

Follow these steps to open and use the example projects:
1. Launch PSoC Creator from Start > All Programs > Cypress > PSoC Creator 3.1 > PSoC Creator 3.1.
2. On the St art Page, under Examples and Kits section, choose Kits > CY8CKIT-042-BLE. A list of example projects appears, as shown in Figure 4-1. Projects named with the prefix 'PSoC_4_BLE_' work on the BLE Pioneer Kit with the PSoC 4 BLE Module; projects named with the prefix 'PRoC_BLE_' work on the BLE Pioneer Kit with the PRoC BLE Module.
3. Click on the desired example project.
Figure 4-1. Open Example Project from PSoC Creator
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 41
Example Projects
4. Select the folder where you want to save the project and click OK.
5. Every BLE project use a public address set in the BLE component GUI to advertise and scan,
Figure 4-2. Change BLE Public Address and Name
depending on the role: peripheral or central mode. If multiple kits in close proximity have the same public address, then wrong devices may be connected or connections may fail. To prevent this, change the Public address (and preferably Device name ) in the BLE compone nt GAP Set- tings tab as shown in Figure 4-2. Click OK.
Alternatively, you can select the 'Silicon generated' device address by selecting the check box. This way, the Bluetooth Device (BD) address is generated using the silicon ID, unique to each device. Click OK.
6. Build the example project by choosing Build > Build <Project Name>, as shown in Figure 4-3. A .hex file will be generated.
Figure 4-3. Build Project from PSoC Creator
42 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
7. Connect the BLE Pioneer Baseboard to the PC through USB Mini-B connector J13. Ensure that the correct module (PSoC 4 BLE or PRoC BLE) is placed on the baseboard, depending on the project opened.
8. Choose Debug > Program in PSoC Creator, as shown in Figure 4-4.
Figure 4-4. Program Device in PSoC Creator
9. If the device is not yet acquired, PSoC Creator will open the programming window. Select
KitProg and click the Port Acquire button, as shown in Figure 4-5. Note: The serial ID starting with 'BLE' belongs to the BLE Dongle (see Updating BLE Dongle for
CySmart Central Emulation Tool on page 35).
Figure 4-5. Port Acquire
10.After the device is acquired, it is shown in a structure below the KitProg. Click the Connect but­ton and then OK to exit the window and start programming, as shown in Figure 4-6.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 43
Example Projects
Figure 4-6. Connect Device From PSoC Creator and Program
Note: As stated previously, the BLE Pioneer Kit supports both Cypress BLE devices: PSoC 4 BLE and PRoC BLE. The description, hardware configurations, and verification method of the Example projects explained in the following sections are valid for both PSoC 4 BLE and PRoC BLE devices. Unless explicitly mentioned, the theory and usability for these Example projects should be considered the same for both the modules.
This document refers to the BLE Pioneer Kits, BLE Dongle, and PC/mobile as Central or Peripheral devices. A Central device is normally the master and requests/commands data from the Peripheral device. BLE-enabled phones and PCs are one such example. Peripheral device, on the other hand, store the actual data and send it to Central device when requested. Examples include BLE-enabled sensors, proximity beacons, and so on.
44 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4.2 CapSense Slider and LED

4.2.1 Project Description

This project demonstrates connectivity between the BLE Pioneer Kit (acting as a Peripheral and GATT server device) and CySmart Central Emulation tool or mobile device running the CySmart mobile application (acting as a Central and GATT client device). This project demonstrates following:
Advertisement with timeout
Connection with any Central device
Two custom services in single profile
Data transfer over BLE custom service using notifications, read, and write
Low-power mode implementation for coin-cell operation
The BLE profile in this project consists of two BLE custom services: CapSense and RGB LED. The CapSense service consists of one custom characteristic, termed as CapSense Slider. The CapSense slider characteristic is us ed to send one b yte data, ranging from 0 to 100, as no tification to the GATT client device. This data is the finger location read by the CapSense component on the five-segment slider (CSS1) present on the kit. This characteristics supports notification, which allows the GATT server to send data to the connected client device whenever new data is available.
The RGB LED service also consists of one custom characteristic, termed as RGB LED Control. This characteristic supports two operations, read and write, through which the connected GATT cli­ent device can read data as well as write a new value to the characteristic. This data has four byte values indicating red, green, blue, and intensity values to control the onboard RGB LED.
Example Projects
These properties for the custom service/characteristics are configured in the BLE component under the Profiles tab, as shown in Figure 4-7.
Figure 4-7. Attributes Configuration in BLE Component for custom services
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 45
Example Projects
The project consists of the following files:
main.c/.h
BLEApplications.c/.h
HandleLowPower.c/.h
These files contain the main function, which is the entry point and execution of the firmware appli­cation. It also contains function definition for initialization of the sys tem an d re ad in g the CapSense slider data from the CapSense component.
These files contain all the macros and function definitions related to BLE communication and operation. It contains the event callback function definition that is registered with the BLE compo­nent startup and used by the component to send BLE-related events from the BLE stack to the application layer for processing. It contains a method to send CapSense not ifications to the GA TT client device and process the Read and Write commands on the RGB LED characteristic by the GATT client device. It updates the BLE Connection parameter, which is important for low-power mode usage.
These files contain the function to handle low-power mode. This function is continuously called in the main loop and is responsible for pushing the BLE hardware block (BLESS) as well as the CPU to Deep Sleep mode as much as possible. The wakeup source is either the BLE hardware block Link Layer internal timer or the interrupt from the user button press (SW2). This allows for very low power mode implementation and operation using a coin cell.
Additionally, the PRoC BLE version of this project consists of the RGB_PRSm.c/.h file, which con­tains the function to drive the software-based PrISM method and drive the color and intensity on the RGB LED.
This is the default firmware that comes in the modules shipped with the kit. Two projects demonstrate this functionality on two different devices:
PSoC_4_BLE_CapSense_Slider_LED works with the PSoC 4 BLE Module.
PRoC_BLE_CapSense_Slider_LED works with the PRoC BLE Module.
The PSoC 4 BLE project implements RGB color and intensity control using the PRiSM component whereas the PRoC BLE uses the software implementation of the PRiSM mode.
46 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-8. TopDesign for PSoC_4_BLE_CapSense_Slider_LED Project
Example Projects
Figure 4-9. TopDesign for PRoC_BLE_CapSense_Slider_LED Project
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 47
Example Projects

4.2.2 Hardware Connections

No specific hardware connections are required for this project because all connections are hardwired on the BLE Pioneer Baseboard. Ensure that the correct module is placed on the baseboard corresponding to the project being used. PSoC_4_BLE_CapSense_Slider_LED works with the PSoC 4 BLE Module. PRoC_BLE_CapSense_Slider_LED works with the PRoC BLE Module.
The pin assignment for this project is in PSoC_4_BLE_CapSense_Slider_LED.cydwr/ PRoC_BLE_CapSense_Slider_LED.cydwr in the Workspace Explor er, as shown in Figure 4-10.
Figure 4-10. Pin Selection for CapSense Slider and LED Project
48 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4.2.3 Flow Chart

Start
Advertisement
CapSense Slider
Swipped?
Received RGB
LED Data?
NO
BLE Connection
Still Present?
NO
Send finger position
over CapSense custom service
YES
Extract Data and
change color/
brightness on LED.
Keep LED ON for
set time
YES
Connected to
Central device before
timeout?
YES
NO
Notifications
Enabled?
YES
NO
System in Deep Sleep and
waiting for User button press
NO
Advertisement
Time-out?
NO
YES
Put system to low power
mode and wait for interrupt
from BLE Link Layer
YES
System initia lized.
Wait for interrupt from User
Button to Wakeup
Process BLE
Events
Figure 4-11 shows the flow chart of the code implemented.
Figure 4-11. CapSense Slider and LED Project Flow Chart
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 49
Example Projects

4.2.4 V erify Output

The project can be verified by two methods: using the CySmart Central Emulation Tool and BLE Dongle or using the CySmart mobile application.
4.2.4.1 CySmart Central Emulation Tool
To verify the CapSense and LED project using the CySmart Central Emulation Tool, follow these steps:
Note: Refer CySmart BLE Host Emulation tool to learn how to use the tool.
1. Connect the BLE Dongle to one of the USB ports on the PC.
2. St art the CySmart Central Emulation Tool on the PC by going to Start > All Programs > Cypress > CySmart <version> > CySmart <version>. You will see a list of BLE Dongles connected to it. If no BLE Dongle is found, click Refresh. Select the BLE Dongle and click Connect.
Figure 4-12. Connect to BLE Dongle
3. Place module on the BLE Pioneer Kit, depending on the project chosen.
4. Power the BLE Pioneer Kit through the USB connector J13.
5. Program the BLE Pioneer Kit with the CapSense and LED example project. Follo w steps in Using
Example Projects on page 41 to program the device.
6. After programming successfully, press the user button (SW2) on the BLE Pioneer kit to start the advertisement. Advertisement is indicated by a blinking red LED on the baseboard.
Note: The project has an advertisement timeout of 30 seconds after which it returns to Deep Sleep. Press SW2 again to restart the advertisement.
7. On the CySmart Central Emulation Tool, click Start Scan to see the list of available BLE peripheral devices.
50 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
8. Double-click the BLE Slider and LED device to connect, or click BLE Slider and LED and then click Connect.
Figure 4-13. Connect to BLE Slider and LED Peripheral
9. When connected, the CySmart Central Emulation Tool will display a message for the Update connection parameters. Select Yes, as shown in Figure 4-14.
Figure 4-14. Update Connection Parameter Option
Note: If you select No, the project will still work. However, th e current consumption will be higher due to faster connection interval.
10.Click Discover All Attributes to find all attributes supported.
Figure 4-15. Discover All Attributes
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 51
Example Projects
11.Locate the attribute Client Characteristic Configuration descriptor (UUID 0x2902) under
Figure 4-16. Read CCCD for CapSense Slider Characteristic
CapSense Slider characteristic (UUID 0xCAA2). C lick Read Value to read the existing Client Characteristic Configuration Descriptor (CCCD) value as shown in Figure 4-16.
12.Modify the Value field of CCCD to '01:00' and click Write Value. This enables the notifications on the CapSense Slider characteristic.
52 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-17. Write CCCD to Enable Notifications
Example Projects
13.Swipe your finger on the CapSense slider on the BLE Pioneer kit, as shown in Figure 4-18 and see the notification values in the CapSense Slider value fi eld , as shown in Figure 4-19.
Figure 4-18. CapSense Slider
Figure 4-19. CapSense Slider Notification Received
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 53
Example Projects
14.To disable notifications, modify the Value field of the Client Characteristic Configuration
Figure 4-20. Disable Notifications
descriptor to '00:00' and click Write Value.
15.Locate the RGB LED Control characteristic (UUID 0xCBB1). Click Read Value to read the exist­ing 4-byte onboard RGB LED color information, as shown in Figure 4-21.
Figure 4-21. Read RGB LED Control Characteristic Value
54 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
16.Modify the four bytes of data in the Value field and click Write Value. You will see the corresponding change in the color and intensity of the RGB LED on the BLE Pioneer kit, as shown in Figure 4-22. The RGB LED will be on for 3 seconds before switching off to conserve power.
Note: If the BLE Pioneer kit is powered from a c oin cell and not the USB Vbus, then the color mixing and intensity will vary. This is because the coin cell provides a lower driving voltage for RGB LEDs.
Figure 4-22. Write RGB LED Control Characteristic Value
Figure 4-23. RGB LED Control with PSoC 4 BLE Module and PRoC BLE Module
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 55
Example Projects
17.To disconnect from the device, click Disconnect, as shown in Figure 4-24. Figure 4-24. Disconnect from the Device
18.To connect to this Peripheral again, restart advertising by pressing the user button (SW2) on the BLE Pioneer Kit. Advertising is indicated by the blinking red LED.
4.2.4.2 CySmart Mobile Application
To verify the CapSense and LED project using the CySmart mobile application (see CySmart Mobile
Application on page 112), follow these steps:
1. Plug the desired module on the BLE Pioneer Baseboard.
2. Connect the BLE Pioneer Kit into the PC using the J13 USB connector.
3. Program the kit with the CapSense and LED example projects. See Using Example Projects on
page 41 for programming instructions.
4. Press the user button (SW2) on the BLE Pioneer Kit to start the advertisement. This is indicated by the blinking red LED on the BLE Pioneer Kit.
5. Open the application on the mobile device. If Bluetooth is not enabled on the device, the application will ask to enable it.
6. After Bluetooth is enabled, the CySmart mobile application will automatically search for available Peripherals and list them. Select the BLE Slider and LED Peripheral as shown in Figure 4-25.
56 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-25. BLE Slider and LED Peripheral
Example Projects
7. When connected, the CySmart mobile application will list the supported profiles by the Peripher­als. Scroll and select the CapSense icon, as shown in Figure 4-26.
Figure 4-26. CapSense Service Page
8. Swipe your finger on the CapSense slider on the BLE Pioneer Kit and see a similar response on the CapSense page in the CySmart application (Figure4-27).
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 57
Example Projects
Figure 4-27. CapSense Slider
9. Press the back button to return to the service selection page. Scroll and tap on the RGB LED ser­vice.
10.On the RGB LED service page, swipe over the color gamut to see a similar color response on the BLE Pioneer Kit RGB LED. The slider below the color gamut controls the intensity of the RGB LED color. The RGB LED will be on for 3 seconds before switching off. This is done to conserve power.
Figure 4-28. RGB LED Control with CySmart mobile application
58 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
11.To disconnect from the BLE Pioneer Kit, return to the CySmart mobile application home screen by pressing the back button.
12.To reconnect to the peripheral, press the user button (SW2) on the BLE Pioneer Kit again and then scan for devices using CySmart mobile application.

4.3 CapSense Proximity

4.3.1 Project Description

This project demonstrates connectivity between the BLE Pioneer Kit (acting as a Peripheral and GA TT server device) and the CySmart Centr al Emulation Tool or mobile device running the CySmart mobile application (acting as a Central and GATT client device). This project demonstrates the following:
Advertisement with timeout
Connection with any Central device
One custom service
Data transfer over BLE custom service using notifications
Low-power mode implementation for coin cell operation
The BLE profile in this project consists of a single BLE custom service, called CapSense. The CapSense service consists of a custom characteristic, termed as CapSense Proximity. The CapSense proximity characteristic is used to send one byte data, ranging from 0 to 255, as notification to the GATT client device. This data is the difference count read by the CapSense component on the one-wire proximity sensor (J14) connected on the kit. This characteristics supports notification, which allows the GATT server to send data to the connected GATT client device whenever new data is available.
Example Projects
The properties for the custom attributes are con fig ured in the BLE componen t under the Profiles t ab, as shown in Figure 4-29.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 59
Example Projects
Figure 4-29. Attributes Configuration in BLE Component for CapSense Proximity
The project consists the following files:
main.c/.h
These files contain the main function, which is the entry point and execution of the firmware appli­cation. It contains function definition for initialization of the system and reading the CapSense proximity data from the CapSense component.
BLEApplications.c/.h
These files contain all the macros and function definitions related to BLE communication and operation. It contains the event callback function definition that is registered with the BLE compo­nent startup and used by the component to send BLE-related event from the BLE stack to the application layer for processing. It contains a method to send CapSense not ifications to the GA TT client device. It updates the BLE Connection parameter, which is important for low-power mode usage.
HandleLowPower.c/.h
These files contain the function to handle low-power mode. This function is continuously called in the main loop and is responsible for pushing the BLE hardware block (BLESS) as well as the CPU to Deep Sleep mode as much as possible. The wakeup source is either the BLE hardware block Link Layer internal timer or the interrupt from the user button press (SW2). This allows for very low-power mode implementation and operation using a coin cell.
The red LED is used as the status LED and provides visual confirmation on advertising or connection states. A blinking red LED indicates advertising state .
Two projects demonstrate this functionality on two different devices:
PSoC_4_BLE_CapSense_Proximity works with the PSoC 4 BLE Module.
PRoC_BLE_CapSense_Proximity works with the PRoC BLE Module.
60 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-30. Top Design for PSoC_4_BLE_CapSense_Proximity Project
Example Projects
Figure 4-31. Top Design for PRoC_BLE_CapSense_Proximity Project
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 61
Example Projects

4.3.2 Hardware Connections

Ensure that the correct module is placed on the baseboard corresponding to the project being
used. PSoC_4_BLE_CapSense_Proximity works with the PSoC 4 BLE Module. PRoC_BLE_CapSense_Proximity works with the PRoC BLE Module.
Connect a five-inch wire (provided as part of this kit) to the proximity connector J14 on the
baseboard. Loop the wire as shown in Figure 4-32. Note: Ensure that the proximity sensor loop wire is kept away as much as possible from the BLE
antenna on the modules.
Figure 4-32. Proximity Sensor Connection on BLE Pioneer Kit with PSoC 4 BLE Module
Figure 4-33. Proximity Sensor Connection on BLE Pioneer Kit with PRoC BLE Module
The pin assignment for this project is in PSoC_4_BLE_CapSense_Proximity.cydwr/ PRoC_BLE_CapSense_Proximity.cydwr in the Workspace Explorer, as shown in Figure 4-34.
Figure 4-34. Pin Selection for CapSense Proximity Project
62 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4.3.3 Flow Chart

Start
Advertisement
Proximity value
Changed?
Send the proximity
data to
Central device
BLE connection
still exists?
YES
NO
YES
Connected to
Central device?
NO
Notification
enabled?
YES
NO
System is put in Sleep and
waits for User Button press
NO
Advertisement
Time-out?
NO
System initialized.
Wait for interrupt from User
Button to Wakeup
Put system to low power
mode and wait for interrupt
from BLE Link Layer
YES
YES
Process BLE
events
Figure 4-35 shows the flow chart of code implemented.
Figure 4-35. CapSense Proximity Project Flow Chart
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 63
Example Projects

4.3.4 V erify Output

The project can be verified by two methods: using the CySmart Central Emulation Tool and BLE Dongle or using the CySmart iOS/Android app.
4.3.4.1 CySmart Central Emulation Tool
To verify the CapSense proximity project using the CySmart Central Emulation Tool, follow these steps:
Note: Refer CySmart BLE Host Emulation tool to learn how to use the tool.
1. Connect the BLE Dongle to one of the USB ports on the PC.
2. St art the CySmart Central Emulation Tool on the PC by going to Start > All Programs > Cypress > CySmart <version> > CySmart <version>. You will see a list of dongles connected to it. If no BLE Dongle is found, click Refresh. Select the BLE Dongle and click Connect.
Figure 4-36. Connect to BLE Dongle
3. Connect a five-inch wire (included in the kit) to the proximity sensor connector J14 and make a loop of it.
4. Power the BLE Pioneer Kit through the USB connector J13.
5. Program the BLE Pioneer Kit with the CapSense proximity example project. Follow the steps in
Using Example Projects on page 41 to program the device.
6. After programming successfully, press the user button (SW2) on the BLE Pioneer kit to start the advertisement. This is indicated by a blinking red LED on the baseboard. Note: The project has an advertisement timeout of 30 seconds after which it returns to Deep Sleep. Press SW2 again to restart the advertisement.
7. On the CySmart Central Emulation Tool, click Start Scan to see the list of available Peripheral devices.
64 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
Figure 4-37. Sta rt Scanning
8. Double-click CapSense Proximity to connect or click Connect to connect to the BLE Pioneer Kit.
Figure 4-38. Connect to CapSense Proximity Peripheral
9. When connected, the CySmart Central Emulation Tool will display a message for the Update connection parameters. Select Yes, as shown in Figure 4-39.
Figure 4-39. Update Connection Parameter Option
Note: If you select No, the project will still work. However, th e current consumption will be higher due to faster connection interval.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 65
Example Projects
10.Click Discover All Attributes to find all attributes supported by the Peripheral. Figure 4-40. Discover All Attributes
11. When all the attributes are listed, locate the Client Characteristic Configuration descriptor
Figure 4-41. Read CapSense Proximity CCCD
(UUID 0x2902) under CapSense Proximity characteristic (UUID 0xCAA1). Click Read Value to read the existing CCCD value as shown in Figure 4-41.
12.Modify the Value field to '01:00' and click Write Value. This enables the notifications on the CapSense Proximity characteristic.
66 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-42. Write CCCD to Enable Notifications
Example Projects
13.Bring your hand closer to the prox imity sensor on the BLE Pione er Kit, as shown in Figure 4-43 and observe the value changing in the characteristic value field, as shown in Figure 4-44.
Figure 4-43. CapSense Proximity Sensing with PSoC 4 BLE Module
Figure 4-44. CapSense Proximity Notification Received
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 67
Example Projects
14.Modify the Value field of the Client Characteristic Configuration descriptor to '00:00' to disable
15.To disconnect from the device, click Disconnect, as shown in Figure 4-45. Figure 4-45. Disconnect from the Device
16.Press user button (SW2) to wake up from sleep and restart the advertisement for the next
notifications.
connection.
4.3.4.2 CySmart Mobile Application
To learn how to use the CySmart mobile application, see CySmart Mobile Application on p age 1 12 or the app user guide.
To verify the CapSense proximity project using the CySmart mobile application, follow these steps:
1. Place the desired module on BLE Pioneer Baseboard.
2. Connect the five-inch wire as a loop to the proximity connector J14 on the baseboard.
3. Plug the BLE Pioneer Kit into the PC, using the J13 USB connector.
4. Program the kit with the CapSense proximity example project. Follow steps in Using Example
Projects on page 41 to program the device.
5. Press the user button (SW2) on the BLE Pioneer Kit to start the advertisement.
6. Open the CySmart mobile application on the mobile device. If Bluetooth is not enabled on the device, the app will ask to enable it.
7. The app will automatically search for available Peripherals and list them. Select the CapSense Proximity Peripheral, as shown in Figure 4-46.
68 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-46. Connect to CapSense Proximity Peripheral
Example Projects
8. When connected, the app will list the services supported by the Peripherals. Scroll and select the CapSense service.
9. When the CapSense service page opens, bring your hand near the sensor wire on the BLE Pioneer Kit and see a similar response in the app as a bar graph, as shown in Figure 4-47.
Figure 4-47. CapSense Proximity Sensing with PSoC 4 BLE Module
10.To disconnect from the BLE Pioneer Kit, return to the device selection screen on the CySmart mobile application.
11.To reconnect to the Peripheral, press the user button (SW2) on the BLE Pioneer Kit to restart the advertisement and scan for the device in the CySmart mobile application.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 69
Example Projects

4.4 BLE Central Mode

4.4.1 Project Description

The BLE projects described above ha ve been fu nctioning as Periphe ral devices. This mea ns that the firmware role was set to be a Peripheral and GATT server; another device such as the CySmart Central Emulation Tool or CySmart mobile application will connect to it and collect the data.
This example project demonstrates the Central and GA TT client mode where it will scan for a Periph­eral device, connect to it, and send commands. In this project, the BLE Pioneer Kit scans and auto­connects to a particu lar Pe ripher al de vice sup por ting Immediat e Alert Service ( IAS). Whenever the Peripheral with a predetermined public address is found, a connection request is sent followed by discovering the attributes. When the discovery is over, you can send one of the three alert levels to the Peripheral device over the IAS. This is done by pressing the SW2 button on the BLE Pioneer Kit and cycling through the alert levels.
The BLE Central project supports low-power mode operation, where the firmware supports BLE Hardware Block and CPU Deep Sleep mode wheneve r possible. The system remains in De ep Sleep when disconnected. Press SW2 to wake up the system and start scanning (blinking blue LED). The scanning timeout interval is set to 30 seconds. If the p art icul ar Perip her al d evice is fou nd a dvertisin g before timeout, a connection is made (blue LED always ON). If no such device is found, then the system stops scanning and returns to Deep Sleep mode (LED OFF). Press SW2 again to wake the system and restart scanning.
To aid in evaluation, the Peripheral project with the particular public address is provided in the same workspace. This Peripheral project supports IAS and has fixed public address that the Central device will recognize and auto-connect to. This Peripheral project should be programmed on the BLE Dongle and powered through the USB port of PC. The received alert levels (No, Mid, and High alert) on the BLE Dongle are represented by different LED status. No Alert is represented by LED OFF, Mid Alert by blinking LED, and High Alert with LED always ON. Upon each successive button press on the BLE Pioneer Kit, the LED state on the BLE Dongle changes in a circular fashion.
Two projects demonstrate the BLE Central functionality on the two devices:
PSoC_4_BLE_Central_IAS works with the PSoC 4 BLE Module.
PRoC_BLE_Central_IAS works with the PRoC BLE Module.
Additionally, the BLE_Dongle_Peripheral_IAS project is to be programmed on the BLE Dongle. This project is present in both the PSoC_4_BLE_Central_IAS and the PRoC_BLE_Central_IAS workspace and can be used to program the BLE Dongle separately.
Note: If the BLE Dongle is programmed with the BLE_Dongle_Peripheral_IAS example, it will not work with the CySmart PC utility. Reprogram the BLE Dongle with the CySmart firmware according to Updating BLE Dongle for CySmart Central Emulation Tool on page 35 to use the CySmart Central Emulation Tool.
70 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-48. PSoC_4_BLE_Central_IAS TopDesign
Figure 4-49. PRoC_BLE_Central_IAS TopDesign
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 71
Example Projects
Figure 4-50. BLE_Dongle_Peripheral_IAS TopDesign

4.4.2 Hardware Connections

No specific hardware connections are required for this project because all connections are hardwired on the BLE Pioneer Baseboard.
Ensure that the correct module is plac ed on the BLE Pioneer Baseboard corresponding to the proj­ect being used. PSoC_4_BLE_Central_IAS works with the PSoC 4 BLE Module. PRoC_BLE_Central_IAS works with the PRoC BLE Module. BLE_Dongle_Peripheral_IAS is the common project for both workspaces and programs the BLE Dongle with Peripheral mode firmware.
The pin assignment for this project is in PSoC_4_BLE_Central_IAS.cydwr/ PRoC_BLE_Central_IAS.cydwr in the Workspace Explorer, as shown in Figure 4-51.
Figure 4-51. Pin Selection for BLE IAS Central Example Project
Similarly, the pin assignment for the BLE Dongle Peripheral project is in BLE_Dongle_Peripheral_IAS.cydwr in the Workspace Explorer as shown in Figure 4-52.
Figure 4-52. Pin Selection for BLE IAS Peripheral Example Project
72 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4.4.3 Flow Chart

Start
Initialize BLE
Module
Button press
detected ?
Yes
Discovered peripheral with IAS Peripheral
Addr ess ?
Initiate and complete
connect operation .
Provide LED indication
on connection complete
Write the next Alert
lev el (Alert lev els will
be repeated )
Yes
No
Check for configured
Button press event
No
Yes
Does
connection
exi s t ?
No
Figure 4-53 shows the flow chart for the IAS GATT client mode example project.
Figure 4-53. IAS GATT client mode Flow Chart
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 73
Example Projects
Start
In it i alize B LE
Module and start
Advertisement
Yes
Complete con n ect
operation and wait for
Alert notifications
Configure LED as per
alert level
Yes
No
Valid A lert level
is notified ?
Wait for connection
from GA TT clie nt
Figure 4-54 shows the flow chart for the IAS GATT server mode example project.
Figure 4-54. IAS GATT server mode Flow Chart

4.4.4 V erify Output

1. Connect the BLE Dongle to one of the USB ports on the PC. Figure 4-55. Connect BLE Dongle to USB Port
74 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
2. In the PSoC Creator Workspace Explorer, right-click on the BLE_Dongle_Peripheral_IAS project and select Set As Active Project, as shown in Figure 4-56.
Figure 4-56. Set Dongle Peripheral Project as Active
3. Program the BLE Dongle with the BLE_Dongle_Peripheral_IAS project described in Using
Example Projects on page 41.
Note: Do not update the public device address (inside the BLE component) for the BLE_Dongle_Peripheral_IAS example project. Changing the BLE_Dongle_Peripheral_IAS
example project public address will lead to no connection with the BLE Central device on the BLE Pioneer kit.
4. Power the BLE Pioneer Kit through USB connector J13.
5. In the Workspace Explorer, right-click on the PSoC_4_BLE_Central_IAS project and select Set As Active Project, as shown in Figure 4-57.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 75
Example Projects
Figure 4-57. Set Central IAS Project as Active
6. Program the BLE Pioneer Kit with either the PSoC_4_BLE_Central_IAS or the PRoC_BLE_Central_IAS project, depending on the module placed on the BLE Pioneer Kit.
7. Press button SW2 on the BLE Pioneer Kit to wake the system and start scanning. Scanning is indicated by a blinking LED.
8. Wait for the BLE connection between the BLE Dongle and the BLE Pioneer Kit. The connection success status is indicated on the baseboard in the following three stages:
a. Fast blinking blue LED represents scanning mode. Du ring this mode, the BLE Pioneer Kit is
scanning for peripheral devices.
b. Slow blinking blue LED represents discovery mode. During this mode, the BLE Pioneer Kit
has found the BLE Dongle Peripheral device and has started the connection procedure.
c. The blue LED remains on, representing the connected mode. This mode indicates that the
Peripheral device has been connected and the application can now send alert levels.
9. Press button SW2 on the BLE Pioneer Kit to send the next alert level to the BLE Dongle. The alert level will rotate from No Alert to Mid Alert to High Alert.
76 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 4-58. User Button on BLE Pioneer Kit with PSoC 4 BLE Module
Example Projects
10.Check if the LED behavior changes for each alert notification on the BLE Dongle according to the following table:
Alert Level LED State
No Alert LED Off Mild Alert LED Blinking High Alert LED On
Note: To revert the CySmart functionality to the dongle, program the dongle hex file, as described in
Updating BLE Dongle for CySmart Central Emulation Tool on page 35.

4.5 BLE Dongle and LED Control

4.5.1 Project Description

This firmware supports the CySmart debug tool (see CySmart Mobile Application on page 112) by acting as the BLE host emulator. This is the default firmware that comes in the BLE Dongle shipped with the kit.
This project additionally demonstrates LED brightness control via a custom BLE profile, which works with the CapSense slider example explained in CapSense Slider and LED on page 45.
The device will scan for the Peripheral acting as a CapSense Slider and LED device, and connect to it automatically. This is achieved by filtering the advertisement packets for the CapSense Slider service data. Then, it will enable slider notifications and process the received notifications. Whenever CapSense detects activity, it will notify the finger location to the BLE Dongle; it will update the LED brightness using PWM.
The custom GATT client LED control will be stopped if the CySmart Central Emulation Tool acquires the dongle. The dongle will enter the CySmart emulator mode, in which it will process all BLE commands as triggered by the user via the tool. The project uses custom command/event protocol to exchange data between the CySmart Ce n tra l Emulation Tool and the BLE device via a USB-CDC
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 77
Example Projects
interface. It uses the Cypress USB-UART bridge functionality from the PSoC 5LP-based KitProg module.
Note: This project is meant only for the PRoC BLE device and works on the dongle hardware. Figure 4-59. Top Design for BLE_Dongle_CySmart Project

4.5.2 Hardware Connections

No specific hardware connections are required for this project because all connections are hardwired on the BLE Dongle.
The pin assignment for this project is in BLE_Dongle_CySmart.cydwr in the Workspace Explorer, as shown in Figure 4-60.
Figure 4-60. Pin Selection for BLE Dongle Project
78 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

4.5.3 Flow Chart

Perform connect
sequence
Yes
Power BLE
Dongle
Start BLE, Prism and
UART Component
Scan for Capsense
device
Yes
Notification occurs
with valid position
value ?
Yes
Capsense
device found ?
Enter CySmart emulator mode
CySmart tool
started
Yes
No
No
Enable notifications for
Capsense slider
System in sleep and
waiting for user
button press
USB suspend
triggered ?
No
Update LED
brightness as per
slider position
Wait for slider
position change
notifications
No
Figure 4-61. Flow Chart for BLE_Dongle_CySmart Project
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 79
Example Projects
DUT
Upper
Tester
Lower Tester
RF (2.4 GHz)
HCI/UART

4.5.4 V erify Output

This project will be used whenever the CySmart Central Emulation Tool (see CySmart Mobile Appli-
cation on page 112) is invoked for testing other example proje ct s. In addi tion, the LED control oper a-
tion can be verified as follows.
1. Power the BLE Pioneer kit through the USB connector J13.
2. Program the BLE Pioneer kit with the CapSense and LED example project described in
CapSense Slider and LED on page 45.
3. Connect the BLE Dongle to one of the USB ports on the PC.
4. Program the BLE Dongle with the BLE_Dongle_CySmart project. See Using E xample Projects
on page 41 for programming instructions.
5. Press the user button SW2 on both the BLE Dongle and the BLE Pioneer Kit. The BLE Dongle will start scanning and the BLE Pioneer Kit will start advertising.
6. Wait for the BLE connection betwee n the BLE Don gle an d the BLE Pio nee r Ba sebo ard . The con­nection success status will be indicated by a 3-second ON state of the red LED followed by the OFF state on the BLE Pioneer Baseboard.
7. Swipe your finger on the CapSense slider and check the LED brightness variation on the BLE Dongle.

4.6 Direct Test Mode (DTM)

4.6.1 Project Description

Bluetooth Core specification (v4.0 and later), Volume 6, Part F defines Direct Test Mode (DTM) as a
method to test the BLE PHY layer and provide a report back to the tester. It uses one of the two methods, over Host Controller Interface (HCI) or through a two-wire UART interface.
Device under test (DUT) is the BLE system that is to be tested (for example, BLE Pioneer Kit). With DTM, the RF performance of the BLE system can be verified during development or in production line. The environment consists of the DUT and a tester. The tester ha s two parts; the upper tester sends commands through one of the two methods (HCI or two-wire UAR T) and the lower tester per­forms the corresponding action over the RF link. The tester compares the command sent over HCI and the response received over RF, and provides a result of the performance.
Figure 4-62. Direct Test Mode (DTM) Setup
The BLE Component allows configuring the device in DTM by enabling the HCI. The appropriate response to commands from the tester are performed by the BLE protocol stack and does not involve separate application handling. The only task is to start the BLE Component and call the API to process the events.
80 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Example Projects
The HCI is enabled in the BLE Component under the General Settings. Note that when the HCI mode is selected, all other tabs are hidden and cannot be configured. This is because in HCI mode, there are no upper layer processes. On enabling HCI mode in the components, the components automatically reserves a UART block to allow communication between the tester and BLE stack. The UART exposes the pins that can be assigned in <project.cydwr> file under Pins tab. The only option to be configured for HCI mode is the baud rate and the pins for communication with the te ster.
Figure 4-63. HCI Mode in BLE Component
Many companies develop BLE testers for Direct Test Mode. It is also possible to create PC-based software tools that will send HCI commands over serial communication links.
For PC-based software, the serial communication link is the COM port, which is enumerated by Kit­Prog on PSoC 5LP of the BLE Pioneer kit. In such a case, the UART pins in PSoC 4 BLE/PRoC BLE should be assigned to P1_4 and P1_5. These pins are hardwired to pins on PSoC 5LP and allows USB-UART data communication between the PC-based software and the BLE device.
For external BLE testers, the serial communication is mostly over the RS232. To test with this system, an external RS232 voltage translator is required, such as Digilent's Pmod RS232. This translator will modify the signal level of the serial communication between the BLE device and the RS232 port on the tester. The UART pins of the BLE device can be assigned to P0_0 and P0_1 and the header J5 can be used to connect to the RS232 translator.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 81
Example Projects
Figure 4-64. J5 Header to Interface RS232 Translator

4.6.2 Hardware Connection

For DTM test mode, it is recommended to use SMA connectors and connect the tester and DUT using a SMA to SMA connector cable. This ensures that there is minimum interference to RF communication between the DUT and tester, and the performance measured is the true RF performance of the device. The BLE Pioneer Kit module with SMA connector (CY8CKIT-141 PSo C 4 BLE) is available separately and can be ordered from the Cypress we b page.
Four UART pins are exposed wh en HCI mode is selecte d in the BLE Component. These pins shoul d be assigned to allow communication with the external tester. The connection depends on the tester being used.
If the tester is a PC-based software and communicated with HCI over serial link, then the onboard PSoC 5LP on the BLE Pioneer Kit can act as the USB-UART bridge. The KitProg on the PSoC 5LP enumerates as a USB-UART interface and opens a COM port in the PC. This COM port is then use d by the software tool to communicate commands to the BLE device. In this case, the UART pins should be assigned as follows.
Table 4-1. UART Pin Assignment for PC Software Tester
UART Pins Pin Assigned
RX P1_4 TX P1_5 RTS P1_6 CTS P1_7
The UART for HCI communication exposes hardware flow control lines CTS and RTS. They can either be connected to the hardware control lines of the tester or CTS connected to ground for oper­ation without hardware flow control.
If the tester is an external hardware tester (CBT), then connect any of the RS232 voltage translators to header J5 on the BLE Pioneer Kit. The UART pins should be assigned as follows.
82 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Table 4-2. UART Pin Assignment for RS232 Voltage Translator
UART Pins Pin Assigned
RX P0_0 TX P0_1 RTS P0_2 CTS P0_3

4.6.3 V erify Output

1. Connect the BLE Pioneer Kit through the USB connector J13.
2. Program the BLE Pioneer Kit with the PSoC_4_BLE_DTM or PRoC_BLE_DTM project, depend­ing on the module used (PSoC 4 BLE or PRoC BLE), as described in Using Examp le Project s on
page 41. Programming should complete successfully.
3. Connect the Serial link, UART or RS232 to the tester.
4. On the software tool for tester, configure the UART communication with the correct COM port and baud rate, as set in the BLE Component.
5. Start the test. The tool will generate the report after the end of the test. This depends on the tes­ter/tool being used.
Example Projects
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 83
Example Projects
84 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

5. Hardware

This chapter describes the contents of the BLE Pionee r Kit hardware and it s dif ferent bl ocks, such as the power block, USB connection, Arduino-compatible headers, module connectors, and CapSense slider.

5.1 BLE Pioneer Baseboard

5.1.1 PSoC 5LP

An onboard PSoC 5LP contains KitProg which is used to program and debug the BLE device. The PSoC 5LP connects to the USB port of the PC through a USB Mini-B connector and to the SWD interface of the BLE device. PSoC 5LP is a true system-level solution providing MCU, memory, analog, and digital peripheral functions in a single chip. The CY8C58LPxx family offers a modern method of signal acquisition, signal processing, and control with high accuracy, high bandwidth, and high flexibility. The analog capability spans the range from thermocouples (near DC voltages) to ultrasonic signals.
For more information, visit the PSoC 5LP web page. See Serial Interconnection between KitProg and Module on page 101 for more details.

5.1.2 Power System

The power supply system on BLE Pioneer Baseboard is versatile, allowing the input supply to come from the following sources:
5-V power from onboard USB connector
5-V to 12-V VIN power from Arduino power header (J1)
3-V from CR2032 coin cell
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 85
Hardware
VADJ VDD
VCC
EN_CTRL
EN_CTRL
VBUS
VIN
VCC
EN_CTRL
NO LOAD NO LOAD
1
2
3
4
5
6
CTL
VCC
N.C.
OUT
C
GND
Output Voltage ON / OFF control
Power supply voltage input
Unconnected terminal
Voltage output
Output voltage regulation terminal
Ground
Pin No Symbol Function
.
TABLE: LDO PIN FUNCTIONS
GND Test Points
TABLE: VOLTAGE SELECTION JUMPER SETTINGS
JUMPER SETTING O/P VOLTAGE
SHORT 2 & 3
SHORT 1 & 2
REMOVE JUMPER
3.3V
5V
1.9V
TP5 BLACK
SOD123
D1
U1
BA00BC0WFP-E2
VCC
2
CTL
1
NC
3
OUT
4
C
5
GND
6
R1 11K
1%
R4 10K 1%
+
3216
C2
4.7uF
R10 10K
R3
14.7K 1%
SOD123
D4
SOD123
D2
TP6 BLACK
R5
4.3K 1%
TP4 BLACK
J16
3 PIN HDR
1
3
2
+
3216
C1 1 uFd
SOD123
D3
An adjustable LDO is used to output three diffe rent volt age levels (1.9 V, 3.3 V, and 5 V) to power the module. These voltages are selected with the J16 jumper, as shown in Figure 5-1.
Figure 5-1. Schematics and Board Highlight of LDO and Power Selection Jumper
The input to the LDO can come from either the USB, th e VIN pin in the Arduino header J1 or header J9.
Note: The typical dropout voltage of the selected LDO is 0.3 V at 500-mA output current. This gives a minimum output of 4.6 V from the input voltage of 5 V from the VBUS. This drop also takes into account the voltage drop across the Schottky diod e connected at the output of the LDO to protect
86 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
against voltage applied at the output terminal of the regulator.
Hardware
I/OHeader
USB
Bluetooth
Module
5V
Vin
3.3V
PSoC 5LP
5V
PSoC 5LP 10 Pin
Prog. Header
PTC
LDO
ESD
Protection
MOSFET based
Protection Ckt
Coin cell
Battery Holder
PSoC 4 BLE 10
Pin Prog. Header
~3V
The BLE Pioneer Baseboard also contains a CR2032 coin cell holder to powe r it using a coin cell, as shown in Figure 5-2.
Figure 5-2. Schematics and Board Highlight of Coin Cell Holder
5.1.2.1 Protection Circuits
The power supply rail has reverse-voltage, overvoltage, short circuits, and excess current protection features, as shown in Figure 5-3.
Figure 5-3. Power Supply Block Diagram With Protection Circuits
A PTC resettable fuse is connected to protect the computer's USB ports from shorts and
overcurrent.
ORing diodes prevent damage to components when the BLE Pioneer Baseboard is powered
from different voltage sources at the same time.
ESD protection is provided for the USB Mini-B connector.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 87
Hardware
VDDV3.3
NO LOAD
R9 10K
R8 15K
Q2
PMOS( NTR4171PT1G)
R7 ZERO
D9
Vz=3.9V(BZT52C3V9-7-F)
Q3
PMOS(PMV48XP,215)
Q1
PMOS( DMP3098L-7)
A MOSFET-based pr otection circuit is provided for ove rvolt age a nd r everse-volt age protection for
the 3.3-V rail from J1.5, as shown in Figure 5-4.
Figure 5-4. Schematics and Board Highlight of MOSFET Protection Circuit for 3.3-V rail from J1.5
88 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
5.1.2.2 Current Measurement Jumper
NO LOAD
VDD BLE_VDD
VTARG
J15
HDR2
1
2
0805
R44 ZERO
0603
R45 ZERO
To demonstrate the low power consumption of PSoC 4 BLE/PRoC BLE Module, a two-pin header (J15) is populated in series with the power supply to the module. This can be used to measure cur­rent using an ammeter without the need to desolder any components from the BLE Pioneer Base­board, as shown in Figure 5-5.
Figure 5-5. Schematics and Board Highlight of Current Measurement Jumper
Hardware
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 89
Hardware
The following methods are supported for measuring the current consumption of the module.
When the BLE Pioneer Baseboard is powered through the USB port (J13), remove jumper J15
and connect an ammeter, as shown in Figure 5-6.
Figure 5-6. Current Measurement when Powered from USB Port
90 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Hardware
VOLTAGE
SOURCE
- +
When the BLE Pioneer Baseboard is powered from an external voltage supply, remove the USB
cable from J13. Connect the positive terminal of the external voltage supply to the positive termi­nal of the ammeter and the negative terminal of the ammeter to the upper pin of J15. Connect the negative terminal of the external voltage supply to and GND pin on board. Figure 5-7 shows the required connections.
Figure 5-7. Current Measurement when Powered Separately
To measure the power consumption of only module with coin cell, connect the coin cell directly to the modules, as shown in Figure 5-8. The BLE Pioneer Baseboard is designed with additional circuits to protect the BLE device and the F-RAM in Arduino environment. Note that power consumption measurements on the BLE Pioneer Baseboard will also include the power consumed by these additional circuits.
Connect the positive terminal of the coin cell to pin J2.2 and negative terminal to pin J2.4 using wires.
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 91
Hardware
Arduino compatible I/O header (J3/J4)
Arduino compatible I/O header (J3/J4)
Arduino compatible I/O header (J2)
Arduino compatible power header (J1)
Figure 5-8. Powering the module using a Coin Cell

5.1.3 Programming Interface

The BLE Pioneer Kit allows you to program and debug the PSoC 4 BLE/PRoC BLE in two ways:
Using the onboard KitProg
Using a CY8CKIT-002 MiniProg3 Programmer and Debugger

5.1.4 Expansion Connectors

5.1.4.1 Arduino Compatible Headers (J1, J2, J3, J4, and J12-unpopulated)
The BLE Pioneer Kit has five Arduino compatible headers: J1, J2, J3, J4, and J12, as shown in
Figure 5-9. You can develop applications based on the Arduino shield's hardware.
Figure 5-9. Arduino Headers
The J1 header contains I/O pins for reset, I/O reference voltage (IOREF), and power supply line. The J2 header is an analog port that contains I/O pins for SAR ADC, comparator, and Op-amp. The J3 header is primarily a digital port that contains I/O pins for PWM, I J4 header is also a digital port that contains I/O pins for UART and PWM. The J12 header is an Arduino ICSP compatible header for the SPI interface and is not populated. Refer to the “No Load Components” section of Bill of Materials (BOM) on page 133 for the header part number.
Note: Take care when powering the Arduino shields via Arduino-compatible power header (J1). The V3.3 pin will output 5 V when the board is powered from USB/VIN and the system power supply jumper (J16) is set to 5 V operation.
2
C, SPI, and analog reference. The
92 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Additional Functionality of Header J2
Digilent® Pmod
TM
­compatible I/O header (J5)
The J2 header is a 6×2 header that supports Arduino shields. The Port 2 and Port 3 pins of PSoC 4 BLE and PRoC BLE are brought to this header. The Port 2 pins also connect to the onboard CapSense slider through 560-ohm resistors. When the CapSense feature is not used, remove these resistors to help ensure better performance with these pins.
5.1.4.2 PMod Connector - Digilent Pmod Compatible (J5-unpopulated)
This port supports Digilent Pmod modules (see Figure 5-10). Pmods are small I/O interfaces that connect with the embedded control boards through either 6- or 12-pin connectors. The BLE Pioneer Kit supports the 6-pin Pmod type 2 (SPI) interface. For Digilent Pmod cards, go to
www.digilentinc.com.
This header is not populated on the BLE Pioneer Baseboard. You must populate this header before connecting the Pmod daughter cards. Refer to the “No Load Components” section of Bill of Materials
(BOM) on page 133 for the header part number.
Figure 5-10. Schematics and Board Highlight of PMod Connector
Hardware
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 93
Hardware
PSoC 5LP GPIO Expansion Header
USB-Serial Bridge Connections
P5LP12_6 ------------- UART RX P5LP12_7 ------------- UART TX P5LP12_0 ------------- SPI SCLK / I2C SCL P5LP12_1 ------------- SPI MISO / I2C SDA P5LP12_5 ------------- SPI MOSI P5LP2_5 ------------- SPI SSEL
P5LP12_7P5LP12_6
P5LP3_6 P5LP3_7
P5LP0_0
P5LP1_2
P5LP3_5P5LP3_4
P5LP3_0
P5LP0_1
P5LP12_1
P5LP12_5P5LP12_0
P5LP2_5
VDD
SPI_MOSI
SPI_SSEL
UART TXUART RX
J8
8x2 RECPT
112
2
334
4
556
6
778
8
10109
9
121211
11
141413
13
161615
15
5.1.4.3 PSoC 5LP GPIO Header (J8)
An 8×2 header is provided on the BLE Pioneer Baseboard to pull out several pins of PSoC 5LP to support advanced features such as a low-speed oscilloscope and a low-speed digital logic analyzer (see Figure 5-11). This header also contains the USB-Serial interface pins that can be used when these pins are not accessible on the Arduino headers because a shield is connected.
Note: You can use PSoC 5LP for your own custom firmware. Figure 5-11. Schematics and Board Highlight of PSoC 5LP GPIO Expansion Header
94 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

5.1.5 USB Mini-B Connector

NO LOAD
DP
DM
VBUS
P5LP_DM P5LP_DP
J13
USB MINI B
VBUS
1
DM
2
DP
3
GND
5
ID
4
S16S2
7
F1
PTC Resettable Fuse
1 2
0603
D6
0402
R6100K
0603
D8
0402
C3 0.01 uF
TP2 RED
0603
D7
The PSoC 5LP connects to the USB port of a PC through a Mini-B connector (see Figure 5-12), which can also be used to power the BLE Pineer Baseboard. A resettable polyfuse is used to protect the computer's USB ports from shorts and overcurrent. If more than 500 mA is drawn from the USB port, the fuse will automatically break the connection until the short or overload is removed.
Figure 5-12. Schematics and Board Highlight of USB Mini-B Connector
Hardware
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 95
Hardware

5.1.6 CapSense Circuit

5.1.6.1 CapSense Slider
The BLE Pioneer Kit has a five-segment linear capacitive touch slider, which is connected to the PSoC 4 BLE/PRoC BLE Module pins (see Figure 5-13). The CMOD and CTANK capacitors are required for CapSense functionality and are provided on the modules (see Module Board on
page 103). A 2.2-nF capacitor is present on the CMOD pin, P4[0], for CapSense operation. BLE
Pioneer Kit also supports CapSense designs that enable wa terproofing. T he connection of the shield to the pin or to ground is made by resistors R12 and R13, respectively. By default, R13 is mounted on the BLE Pioneer Baseboard, which connects the sh ield to ground. Popu late R12 and remove R1 3 when evaluating waterproofing designs, which will connect the shield to the designated pin, P1[6].
Figure 5-13. Schematics and Board Highlight of CapSense Slider and Shield Setting
5.1.6.2 Proximity Header
The BLE Pioneer Baseboard contains a header (J14) for CapSense proximity wire connection (see
Figure 5-14).
96 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Figure 5-14. Schematics and Board Highlight of Proximity Header
Proximity Header
P0_2
P0_0
P0_1
P0_3
P2_0
VDD
J14
1x1 RECP
SS
1
MOSI
2
MISO
3
SCK
4
GND
5
VCC
6
0603
R19 ZERO
Status LED
P5LP3_1
0805
R11
820 ohm
0805
LED2
Status LED Green
2 1
VADJ
NO LOAD
R2
560 ohm
TP1 RED
0805
LED1
Power LED
2 1
Hardware

5.1.7 BLE Pioneer Baseboard LEDs

The BLE Pioneer Baseboard has three LE Ds. A green LED (LED2) indicates the status of the pro­grammer. An amber LED (LED1) indicates the status of power supplied to the board. The BLE Pio­neer Kit also has a general-purpose tricolor LED (LED3) for user applications. These are connected to P2_6 (Red LED), P3_6 (Green LED) and P3_7 (Blue LED). Figure 5-15 and Figure 5-16 show the schematics of these LEDs.
Figure 5-15. Schematics of Status and Power LED
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 97
Hardware
P3_6
P3_7
P2_6
BLE_VDD
R30 1.5K
R28 2.2K R29 1.5K
RG
B
LED3
RGB LED
1
2 3
4
Figure 5-16. Schematics and Board Highlight of RGB LED
98 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C

5.1.8 Push Buttons

RESET USER SWITCH
P2_7/XRES
/XRES
0402
C25
0.1 uF
SW2
EVQ-PE105K
1 2
SW1
EVQ-PE105K
1 2
RESET (SW1)
User Button (SW2)
The BLE Pioneer Baseboard contains a reset push button and a user push button, as shown in
Figure 5-17. The reset button is connected to the XRES pin of BLE device and is used to reset it.
The user button is connected to P2[7] of the BLE device. Both the push buttons connect to ground on activation (active low).
Figure 5-17. Schematics and Board Highlight of Reset Button and User Push Button
Hardware
CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C 99
Hardware

5.1.9 Cypress Ferroelectric RAM (F-RAM)

The BLE Pioneer Baseboard contains an F-RAM de vice (FM24V10 -G) (see Figure 5-18) that can be accessed through I Mbit (128 KB) with an I
2
C lines P5[0] and P5[1] of the PSoC 4 BLE/PRoC BLE Module. The F-RAM is 1-
2
C speed up to 1 Mbps. The I2C slave address of the F-RAM device is seven bits wide, and the LSB two bits are configu rable through physical pins an d are hardwired to 00 on the board. By default, the address of the F-RAM device used on the BLE Pioneer Baseboard is 0x50. This address can be modified by changing the R32/R36 and R33/R37 pairs. The operating voltage range of the F-RAM is between 2 V and 3.6 V. To prevent the application of 5 V from the adjustable LDO regulator on the BLE Pioneer Baseboard, a MOSFET based protection cir cuit similar to the one used for the 3.3-V rail is connected between the output of the regulator and the VDD pin of the F­RAM. The protection circuit cuts off the power to the F-RAM when the output of the regulator is greater than 3.6 V.
Figure 5-18. Schematics and Board Highlight of F-RAM
100 CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *C
Loading...