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
Loading...
+ 125 hidden pages