Advertisement

Quick Links

Getting Started With EZ-BLE™ PRoC™ Module
Related Application Notes: For a complete list of the application notes,
To get the latest version of this application note, or the associated project file, please visit
http://www.cypress.com/go/AN96841.
AN96841 introduces you to the EZ-BLE™ PRoC™ Module, a fully qualified and certified Bluetooth Low Energy (BLE)
module. The EZ-BLE PRoC Module is a complete BLE solution, integrating a BLE radio system, two crystals, chip
antenna and passive components required for BLE operation. This application note helps you explore the EZ-BLE PRoC
Module architecture and development tools and shows you how to create your first project using PSoC Creator™, the
development tool for the EZ-BLE PRoC Module. This application note also guides you to more resources to accelerate
in-depth learning about the Cypress BLE module solution.
Contents
Introduction ....................................................................... 2
More Information ............................................................... 2
EZ-BLE PRoC Module Overview ...................................... 3
PRoC BLE Silicon Features ......................................... 7
Host Recommended PCB Layout ................................. 7
Bluetooth Low Energy Overview ....................................... 8
Development Tools ......................................................... 12
PSoC Creator Software .............................................. 12
CySmart PC App ........................................................ 13
CySmart Mobile App .................................................. 14
Development Kits and Evaluation Boards ....................... 14
Learning Resources ........................................................ 21
EZ-BLE PRoC Module Datasheet .............................. 21
PRoC BLE Device Datasheet ..................................... 21
Learning PSoC Creator .............................................. 21
Application Notes ....................................................... 21
Design Guide .............................................................. 21
Technical Support ...................................................... 21
My First EZ-BLE PRoC Module Design ........................... 22
About the Design ........................................................ 22
Create the Design ...................................................... 23
Write the Application Code ......................................... 35
www.cypress.com
Associated Part Family: CYBLE-022001-00
Software Version: PSoC Creator™ 3.1 SP2 and higher
Program the Device .................................................... 43
Test Your Design ....................................................... 46
Summary ......................................................................... 51
Related Application Notes ............................................... 51
Appendix B: Cypress Terms of Art .................................. 53
Appendix C: Code Examples .......................................... 54
Worldwide Sales and Design Support ............................. 56
Document No.: 001-96841 Rev. **
Authors: David Solda
Associated Project: Refer to
AN96841
AN94020
click here.
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EZ-BLE PRoC AN9684 and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress EZ-BLE PRoC AN9684

  • Page 1: Table Of Contents

    Module architecture and development tools and shows you how to create your first project using PSoC Creator™, the development tool for the EZ-BLE PRoC Module. This application note also guides you to more resources to accelerate in-depth learning about the Cypress BLE module solution. Program the Device ............ 43 Contents My First EZ-BLE PRoC Module Design –...
  • Page 2: Introduction

    PRoC BLE forums. fitness equipment.  Cypress support: Still no luck? Visit our support If you are a first-time user of Cypress‘s PSoC or PRoC page and create a technical support case contact a local sales representative. If you are in...
  • Page 3: Ez-Ble Proc Module Overview

     PCB substrate: 10 mm × 10 mm × 0.5 mm  Cypress PRoC BLE chip (refer to PRoC BLE Silicon Features for information on the Cypress BLE chip)  Crystal oscillators  32.768 kHz watch crystal oscillator (WCO) ...
  • Page 4: Ez-Ble Proc Module Pinout And Functionality

    EZ-BLE PRoC Module. Figure 2. EZ-BLE PRoC Module Bottom View (Actual Unit - Seen Through Top) Pad 21 Pad 1 Figure 3. EZ-BLE PRoC Module Bottom View (Diagram - Seen Through Top) www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 5 Number Silicon Port Pin EXT_CLK/ UART I2C TCPWM CapSense ECO_OUT EXTPA_EN GPIO Ground Connection P4[1] MISO Sensor/C TANK P5[1] SCLK SCL Yes Sensor P5[0] SDA Yes Sensor VDDR Radio Power Supply 1.9V to 5.5V www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 6 GPIO.  Stop mode: This power mode retains the GPIO states. Wakeup is possible by using the external reset (XRES) pin on the module. The current consumption in this mode is only 60 nA. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 7: Proc Ble Silicon Features

    Each row of flash has a single protection bit; these bits are stored in a supervisory flash row. PRoC BLE Silicon Features The BLE device used on the EZ-BLE PRoC Module is the Cypress PRoC BLE. For additional details on this device, refer to the PRoC BLE device datasheet.
  • Page 8: Bluetooth Low Energy Overview

    L2CAP (connection-oriented channels) secure data exchange on top of these protocol channels.  Advertising, scanning, creating maintaining connections to establish a physical link  Establishing fast connections and low duty cycle advertising for low-power operation www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 9 Attribute Value Format Handle Permission notify a new value or a change in value. The client 0x2A00 Read Only, No does not send any response for a notification ―Cypress HRM‖ 0x0003 (UUID for Authentication, Example Device Name) No Encryption command.
  • Page 10 Profile: This specification defines how devices connect to each other to find and use services. It describes the type of application and general expected behavior of that device. Figure 10 shows an example of a Heart rate monitor Profile. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 11 (the Heart Rate Measurement Characteristic, the Body Sensor Location Characteristic, and the Heart Rate Control Point Characteristic) and the Device Information Service. At the link layer, heart rate measurement device is the slave and the smartphone is the master www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 12: Development Tools

    Getting Started With EZ-BLE™ PRoC™ Module Development Tools Cypress supports the EZ-BLE PRoC Module with high-quality software tools and development kits. They provide access to a suite of world-class Integrated Design Environments (IDEs). PSoC Creator is a single IDE to develop application code and then build, debug, and deploy an embedded design.
  • Page 13: Bluetooth Low Energy Component Software

    Figure 62. CySmart, along with a Cypress BLE dongle, acts as a master device. The tool supports the Bluetooth 4.1 specification and can connect to any Bluetooth 4.1 or 4.0 enabled BLE peripheral devices. Comprehensive test scenarios can be created by configuring the scan, connection and security parameters.
  • Page 14: Cysmart Mobile App

    The kit also contains a BLE USB dongle that acts as a BLE master and works with the CySmart application to provide a BLE master emulation platform on non BLEWindows systems. Cypress also provides an adapter board for the EZ-BLE PRoC Module to evaluate and develop with the Cypress module without the need to develop custom hardware.
  • Page 15 The EZ-BLE PRoC Module Evaluation board (CYBLE-022001-EVAL) is a simple evaluation board designed to fan out the EZ-BLE PRoC Module (CYBLE-022001-00) connections to headers compatible with the CY8CKIT-042-BLE Pioneer Kit. The CYBLE-022001-EVAL board is used to evaluate the Cypress EZ-BLE PRoC Module without your having to design custom hardware to mount the Cypress EZ-BLE PRoC Module.
  • Page 16 Getting Started With EZ-BLE™ PRoC™ Module The CYBLE-022001-EVAL board contains the following components:  Cypress EZ-BLE PRoC Module (CYBLE-022001-00) – soldered directly to the Evaluation Board  PCB substrate used for I/O fan out  Connection headers  capacitor (for use with Capacitive Sensing elements on the CY8CKIT-042-BLE kit) ...
  • Page 17 Figure 19. Figure 19. CYBLE-022001-EVAL Using CY8CKIT-002 MiniProg3  J5: A header that exposes P5[0] and P5[1], which can be used for I C communication (including high speed I C) to the EZ-BLE PRoC Module. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 18 CY8CKIT-042-BLE baseboard and provides the equivalent Port-Pin connection on the CYBLE-022001-EVAL board. Table 3. CYBLE-022001-EVAL Port-Pin Connections to CY8CKIT-042-BLE Baseboard CY8CKIT-042-BLE Baseboard Connection CY8CKIT-042-BLE Baseboard CYBLE-022001-EVAL Header Connection Port-Pin Connection Port-Pin P0_0 P0_1 P0_2 P0_3 P0_4 P0_5 VREF P1_0 P1_1 P1_2 www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 19 P4_1 P5_0 P5_0 P2_6 P3_4 P2_7 P3_5 P2_4 P0_5 P2_5 P0_4 P2_2 P1_7 P2_3 P1_6 P2_0 P2_1 P4_1 VDDR VDDR Note The port-pin list order is according on the CY8CKIT-042-BLE baseboard physical connection pinout. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 20 Connections above are labeled according to the CY8CKIT-042-BLE baseboard pinout. For the equivalent and available connections used with the CYBLE-022001-EVAL board, refer to Table 3. For additional information, refer to the CY8CKIT-042- product webpage. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 21: Learning Resources

    If you have any questions, our technical support team is happy to assist you. You can create a support request by visiting Cypress Technical Support If you are in the United States, you can talk to our technical support team by calling our toll-free number: +1-800-541-4736.
  • Page 22: My First Ez-Ble Proc Module Design

    This design uses GPIOs for three LEDs to indicate different states, a button switch for wake-up from Deep Sleep, and a BLE subsystem to enable the ‗Find Me‘ profile through the BLE protocol. The schematic for the design from PSoC Creator is shown in Figure 22. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 23: Create The Design

    After installation, a registration page for Keil license will be shown. This can be ignored for EZ-BLE PRoC Module. Start PSoC Creator, and choose File > New > Project, as Figure 23 shows. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 24 Figure 24. Naming the New Project and Device Selector Guide Location Once in the Device Selector Guide, scroll down and locate the CYBLE-022001-00 part number (Device Selector Guide location is shown in Figure 24). Figure 25. Device Selector Guide www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 25 Creating a new project generates a project folder with a baseline set of files. You can view these files in the Workspace Explorer window, as shown in Figure 27. Open the project schematic file TopDesign.cysch by double-clicking it. Figure 27. Opening Top Design Schematic www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 26 Disable SCB_1 and SCB_2 from the Serial Interfaces section (I2S_1 should already be disabled) Instead of disabling, deleting the unused Components is also possible. These components have an option of bringing back from Component Catalog if required. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 27 Figure 32 and can be left to default values  Limited advertisement mode with an advertising timeout of 30 seconds and fast advertisement interval of 20 to 30 ms as show in Figure 33 www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 28  GAP security set to least security configuration with no authentication or encryption as shown in Figure 37 Figure 31. Bluetooth Low Energy Component General Configuration Figure 32. Bluetooth Low Energy Component Profiles Configuration www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 29 Getting Started With EZ-BLE™ PRoC™ Module Figure 33. Bluetooth Low Energy Component GAP Advertisement Settings Figure 34. Bluetooth Low Energy Component GAP Advertisement Packet www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 30 Getting Started With EZ-BLE™ PRoC™ Module Figure 35. Bluetooth Low Energy Component GAP Scan Response Packet Figure 36. Bluetooth Low Energy Component GAP General Settings Figure 37. Bluetooth Low Energy Component GAP Security Settings www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 31 Figure 38. Renaming a Pin Component 13. Double-click on SW1 and change the name to Wakeup_SW. Configure the pin as interrupt as shown in Figure 39 Figure 40. Figure 39. Digital Input Pin Configuration www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 32 14. Drag and drop an ‗Interrupt‘ Component from the Component Catalog. Change the name to ‗Wakeup_Interrupt‘ and wire it to the Wakeup_SW pin‘s ―irq‖ output as Figure 41 Figure 42, Figure 43 show. Figure 41. Location of the Interrupt Component www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 33 Getting Started With EZ-BLE™ PRoC™ Module Figure 42. Renaming the Interrupt Component Figure 43 Wiring the Interrupt and Pin Component www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 34 16. Select Generate Application from the Build menu. Notice in the Workspace Explorer window that PSoC Creator automatically generates source code files for the Bluetooth Low Energy, Clock, and Digital Output/Input Pin Components, Figure 45 shows. Figure 45. Generated Source Files www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 35: Write The Application Code

    Figure 46. System Initialization Flowchart Reset Platform Initialization - BLE Init - Register Stack Event Handler BLE-Init Error Handling Success? Register IAS Event Handler Main Processing Thread www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 36 Bluetooth Energy link Update Bluetooth established with the peer device Energy link state on the LEDs CYBLE_EVT_TIMEOUT Bluetooth Low Energy stack generic Configure the device in hibernate timeout event mode received advertisement timeout event www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 37 Getting Started With EZ-BLE™ PRoC™ Module Figure 48. Bluetooth Low Energy Stack Event Handler Flow Chart Stack ON or device Start Advertising disconnected? Device Retrieve Connection connected? Handle Advertising Go to Hibernate timeout? Return from stack event handler www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 38 /* Advertisement event timed out, go to low power * mode (Hibernate mode) and wait for an external * user event to wake up the device again */ Advertising_LED_Write(LED_OFF); Disconnect_LED_Write(LED_OFF); Alert_LED_Write(LED_OFF); Wakeup_SW_ClearInterrupt(); Wakeup_Interrupt_ClearPending(); Wakeup_Interrupt_Start(); CySysPmHibernate(); break; default: break; www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 39 BLE IAS events. Figure 50. Bluetooth Low Energy IAS Event Handler Flowchart Alert Level Updated Update the global variable alertLevel” “ Return from IAS Event Handler www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 40 The main loop firmware in your design must periodically service the BLE stack processing event and configure the BLESS block and the EZ-BLE PRoC Module system into the Low Power mode between connection intervals. Figure 52 Figure 53 show the main loop flowchart and firmware. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 41 /* Single API call to service all the BLE stack events. Must be * called at least once in a BLE connection interval */ CyBle_ProcessEvents(); if(CYBLE_STATE_CONNECTED == CyBle_GetState()) static uint8 blinkTimeout = BLINK_TIMEOUT; /* Update Alert LED status */ switch(alertLevel) case NO_ALERT: Alert_LED_Write(LED_OFF); break; www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 42 B u i l d i n g a n d G e n e r a t i n g H e x F i l e Compile and Build the project by choosing Build > Build My_First_Project as shown in Figure 54. Figure 54 Compiling the Project www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 43: Program The Device

    Figure 57. Programming the Device cable. For other kits, refer to the kit user guide. If you are developing on your own hardware, you need a hardware debugger, for example, a Cypress CY8CKIT- MiniProg3. Select the PSoC Creator menu item Debug > Select...
  • Page 44: My First Ez-Ble Proc Module Design - Shortcut

    OK. You will see that the part number associated with your project will change to display the CYBLE-022001-00 part number. Double-click My_First_Project.cydwr in the Workspace Explorer, as shown in Figure 60. Figure 60. Selecting My_First_Project.cydwr www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 45 CY8CKIT-042-BLE and CYBLE-022001-EVAL schematics. Build the application as shown in Figure 10. Program the CYBLE-022001-EVAL as shown in Figure 57. 11. Proceed to the next section to test your design. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 46: Test Your Design

    Launch the CySmart PC application by right-clicking on BLE Component > Launch CySmart in the project as shown in Figure 62; it should automatically detect the BLE USB dongle. If not, click the Refresh button in the Select BLE Dongle Target window. Click Connect as shown in Figure www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 47 Getting Started With EZ-BLE™ PRoC™ Module Figure 62. Launching CySmart Application. Figure 63. CySmart BLE Dongle Selection Select the Configure Master Settings menu item and restore the values to their default settings, as shown in Figure 64. www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 48 ‗Discovered devices‘ list. Click Stop Scan and then click Connect to establish a BLE connection between the CySmart tool and your device, as shown in Figure 65 . Figure 65. Connect with CySmart PC Application www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 49 Select the ‗Alert Level‘ characteristic and write a value of 0, 1, or 2 to Alert Level characteristic under the IAS as Figure 67 shows. Observe that the state of the LED on your device change based on your Alert Level characteristic configuration. Figure 67. Alert Notification www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 50 Select one of the ‗Alert Level‘ values in the ‗Find Me‘ profile screen and observe the state of the LED on your device change based on your selection. Figure 68 shows a step-by-step configuration screenshot of the CySmart mobile app. Figure 68. Testing with CySmart Mobile App www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 51: Summary

    Related Application Notes – Antenna Design Guide AN91445 ® – Getting Started with PRoC AN94020 ® – Getting Started with PSoC AN91267 4 BLE – PSoC® 4/PRoC™ BLE Crystal Oscillator AN95089 Selection and Tuning Techniques www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 52: Appendix A: Ez-Ble Proc Module Features

    Getting Started With EZ-BLE™ PRoC™ Module Appendix A: EZ-BLE PRoC Module Features Table 6 summarizes the features and capabilities of the EZ-BLE PRoC Module from Cypress. Table 6. EZ-BLE PRoC Module Features and Capabilities Device Family Features CYBLE-022001-00 BLE Subsystem BLE radio and link-layer hardware blocks with BLE 4.1- compatible protocol stack...
  • Page 53: Appendix B: Cypress Terms Of Art

    Getting Started With EZ-BLE™ PRoC™ Module Appendix B: Cypress Terms of Art This section lists the most commonly used terms that you might hear while working with Cypress‘s PSoC family of devices. ® ® – PSoC is a programmable, embedded design platform that includes a CPU, such as the 32-bit ARM...
  • Page 54: Appendix C: Code Examples

    This can speed up your design process by starting you off with a complete basic design. You can then adapt that design to your application. Figure 70. Code Example Projects with Sample Code www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 55 Getting Started With EZ-BLE™ PRoC™ Module Document History Document Title: AN96841 – Getting Started With EZ-BLE™ PRoC™ Module Document Number: 001-96841 Revision Orig. of Submission Date Description of Change Change 4715534 04/08/2015 New application note www.cypress.com Document No.: 001-96841 Rev. **...
  • Page 56: Worldwide Sales And Design Support

    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 Cypress integrated circuit as specified in the applicable agreement.

Table of Contents