CSR102x Starter Development Kit Bluetooth Low Energy Single Mode SoC Alan Hay, Applications Engineer Qualcomm Technologies International, Ltd.
Kit overview Focus for today s workshop CSR1025 SoC Bluetooth low energy Starter Development Kit DK-CSR1025-10285-1A 1 What s in the box 2 Hands-on with the Starter Development Kit 3 Hands-on with the Starter Development Kit
Kit Contents Starter Board with Radio Module USB Cable Flat Programming Cable Prototyping Jumper Cables
Board Details Starter Development Kit Board Overview Powered from USB or Coin Cell Simple UI (Button and LED) Breakout pins (J9, J12) available for reduced development time Can be configured as a programmer for external CSR102x boards using External Debug Connector plus the flat programming connector
Board Details 4 9 1 Mini-USB Connector 7 PIO Breakout J9 2 Power Select 8 PIO Breakout J12 3 7 3 4 CR2032 coin cell holder Flat Cable Connector 9 10 Simple UI Radio Module 2 6 10 5 USB-SPI Debug IC 11 Power Isolation Jumpers 1 5 8 6 SPI Interface Isolation 11
CSR1025 Radio Module 1 Printed F Antenna 2 Crystal Oscillator 4 3 Power Supply 1 2 4 CSR1025 SoC 5 Opt. External Flash 3 5
Power Options and Current Measurement Jumper selectable between USB (3V3 nominal) and CR2032 coin cell. Replacing jumper with an ammeter inline allows accurate measurement of full system current. To achieve an accurate SLEEP current measurement it is usually necessary to remove the SPI jumpers, as Debug SPI activity can interfere with SLEEP states.
Highlights Full Software Development Kit (SDK) Includes access to all tools Includes all example profiles and applications PIO headers to allow connection of sensors, daughter boards, and rapid prototyping On-board SPI-Debug and programmer Option of battery or USB power Competitive price point of USD $99
Hands-On with the Starter Development Kit Bluetooth Low Energy Single Mode SoC
Hands On step by step All attendees should have already downloaded and installed the SDK, along with the Health and Fitness package. The following guide will demonstrate how to compile and program an application for the Starter Development Kit. Compile and Download an example application Connect to Host Using Simple UI
Connecting Hardware Remove the Target board from the anti-static packaging Connect the smaller connector of the mini-usb cable to the Target board USB port Connect the other end of the mini-usb cable to a free USB port on the development PC The device drivers necessary to connect to the target board are installed with the SDK and drivers should load automatically when connected to the PC
Customising software Some customisation of the project is required Prevents multiple boards being programmed with same Bluetooth Address Ensures any board specific settings are preserved Enables you to identify which board is yours
Bluetooth Address Sticker on base of Starter Development Kit S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377
Bluetooth Address HTF FILE
Bluetooth Address S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377 Label Format BDA: 002 : 5B : 03F377 HTF file format bdaddr = (0x F377, 0x 5B 03, 0x 02 )
Bluetooth Address S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377 Label Format BDA: 002 : 5B : 03F377 HTF file format bdaddr = (0x F377, 0x 5B 03, 0x 02 )
Bluetooth Address S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377 Label Format BDA: 002 : 5B : 03F377 HTF file format bdaddr = (0x F377, 0x 5B 03, 0x 02 )
Bluetooth Address S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377 Label Format BDA: 002 : 5B : 03F377 HTF file format bdaddr = (0x F377, 0x 5B 03, 0x 02 )
Bluetooth Address S/N: 397113 Xtal Trim PPM : 14 0002-5B-03F377 Label Format BDA: 002 : 5B : 03F377 HTF file format bdaddr = (0x F377, 0x 5B 03, 0x 02 )
Hands On step by step hr_sensor.htf ############################## subsystem=ble device=smem store=0x000f # Remove the store id from the smem that is added by the SDK. app_store_id = # Bluetooth device address bdaddr = {0xF377, 0x5B03, 0x02} # Sleep mode sleep_mode = sleep_mode_deep # Battery Threshold battery_threshold = 2100
Hands On step by step DO NOT SKIP THIS STEP otherwise your system may have the same address as someone else in the workshop and may not work properly!
Hands On step by step /* Macro for the device name */ #define DEVICE_NAME "CSR HR Sensor" Change this to any unique string For example Your name plus the board Serial Number. /* Macro for the device name */ #define DEVICE_NAME HR Sensor 368433" DO NOT SKIP THIS STEP otherwise your system may have the same address as someone else in the workshop and may not work properly!
Project Settings Verify Project Settings Build Type = Release Erase NVM = Yes Erase MTP = No CS Key File = hr_sensor.htf Create OTA Update Files = Yes
Compile Application No further customisation should be necessary. We are now ready to program the board Compile the Heart Rate Project Download the Heart Rate project to the hardware
Compile Application Click on Build in the menu bar. Select Build Active Project or press F7 short-cut key. This builds all the files included in the Active project from the current Workspace into an application image for the target board. The build is incremental, minimum set of builds are performed to reflect changes to source files and configurations. The target board should remain connected during compilation.
Build and Program Project Window Message Area If any errors occur they will be displayed here
Download Application to Hardware Select Run from the Debug menu or press the F5 short-cut key. At this point the Heart Rate application will be running on the hardware. It will stop advertising after a couple of minutes The button can be connected up to PIO11 with a jumper cable to re-enable adverts (this can also be achieved by power cycling the board via the mini USB cable) For more details on the heart rate application see the Heart Rate Sensor Application Note in the project source directory.
CSR8510 Bluetooth Dongle In order to connect to the development kit you need a suitable host. The Profile Demonstrator software is supplied as part of the SDK. This requires a compatible Bluetooth dongle to communicate with the peripheral device. The CSR8510 dongle is available to perform this function. The drivers for this dongle are supplied with the SDK. Q
Profile Demonstrator Plug in Dongle and allow it to enumerate Run CSR µenergy Profile Demonstrator Click on Discover Devices
Profile Demonstrator Locate your device name on the list Select Connect to Device
End to End Data exchange
Connecting the UI Utilising the Button and LED The Heart Rate Sensor application includes a basic UI by default PIO 11 = Button (Wake / Clear Pairing) PIO 15 = Buzzer/LED status indicator Use the test cables supplied with the kit to connect these together as shown. Press Button to wake the HR sensor Press and Hold button for 5s to clear pairing LED flashes when pairing is cleared
OTA (Over The Air) Update Upgrading software over the air Lets make a simple change to the software - make the UI pulse when a new value is transmitted. SoundBuzzer(buzzer_beep_short); (In our case we have connected the LED to the UI indicator pin). In main_app.c, find hrmeastimerhandler (used to periodically send an update to the host) Add the SoundBuzzer call just before SendHRMeasurement();
Compile Application Rebuild the Heart Rate Project. This time DO NOT program the board.
OTA (Over The Air) Update Run the Over The Air Update software Requires the CSR8510 Dongle Open the software from the Start Menu Or run the EXE from the demo directory in the install path Ensure that you have cleared any existing pairing from your HR sensor board (press the button for 5 sec and observe the LED flash).
OTA (Over The Air) Update Configure update Click Select Image File and browse to the output directory of the heart rate project C:\CSR_uEnergy_SDK-3.0.3\apps\ hr_sensor\depend_release_csr102x_a05 Select the Binary file (.bin) hr_sensor.app.1.bin
OTA (Over The Air) Update Scan for Target Device Scan for your board (Make sure you are upgrading your own board) Select the your board ID from the list of devices Click the UPGRADE Button Battery Voltage Threshold Scanning Window Upgrade Button Status Window
OTA (Over The Air) Update Update in progress When the update is in progress, the software will attempt to connect to the OTA service on the board. If the protocol confirms that the receiving unit is compatible with the binary file to transmit, then the upgrade process will begin. When in progress the %completion in the status window plus a progress bar will indicate progress. This update happens in the background the normal operation is not affected When complete, the system re-boots into the new image.
Reconnect Profile Demonstrator Reconnect to the board from Profile Demonstrator You must clear pairing on your board (press and hold the button for 5 seconds) Once connected, if the application update has been successful you should now see the LED flash every Connection Interval whilst the board is connected to the Profile Demonstrator software.
Further Information What to do next There are many more profiles available all of which can be used with the Starter Development Kit
Qualcomm Developer Network Downloads available https://developer.qualcomm.com/hardware/csr102x/csr102x-product-family Overview of chipsets and development kits available. Training slides including: Introduction to Bluetooth Low Energy Product Line Overview Hardware Overview Introduction to CSRmesh OTAU Overview SDK Overview
thank you!
Activation Code On the side of the Development Kit box, there will be a sticker, on which can be found: Serial Number and most importantly Activation Code
Activation Code The activation code (located on the packaging of the development kit) allows you to download new software and updates to the SDK Register on: https://developer.qualcomm.com/ csr102x-activation and use activation code to receive access to the Qualcomm Bluetooth Low Energy SDK
Install SDK This example shall utilise the Heart Rate example application, which is part of the Health and Fitness application package. Therefore in order to proceed both of the following must be installed uenergy SDK v3.0.3 (or later) CSR uenergy SDK Health and Fitness Package 3.0.2.9 (or later) These can be downloaded from https://developer.qualcomm.com/hardware/csr102x/tools/activation-codes It is recommended that all default options be accepted.