csr102x starter development kit - bluetooth world 2017 · bluetooth® low energy single mode soc...
TRANSCRIPT
Bluetooth® Low Energy Single Mode SoC
Alan Hay, Applications Engineer Qualcomm Technologies International, Ltd.
CSR102x Starter Development Kit
CSR1025 SoC
Bluetooth low energy
Starter Development Kit
DK-CSR1025-10285-1A
CSR102x Starter Development Kit
Kit overview
Focus for today’s workshop
1 What’s in the box
2 Hands-on with the Starter Development Kit
3 Hands-on with the Starter Development Kit
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
Kit Contents
Starter Board with Radio Module
USB Cable
Flat Programming Cable
Prototyping Jumper Cables
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
Board Details
Mini-USB Connector
Power Select
CR2032 coin cell holder
Flat Cable Connector
USB-SPI Debug IC
SPI Interface Isolation
1
2
3
4
PIO Breakout J9
PIO Breakout J12
Simple UI
Radio Module
Power Isolation Jumpers
7
8
9
10
11 5
6
1
2
3
4
5
6
7
8
9
10
11
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
CSR1025 Radio Module
Printed F Antenna
Crystal Oscillator
Power Supply
CSR1025 SoC
Opt. External Flash
1
2
3
4
5
1 2
3
4
5
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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.
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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”
CSR102x is a product of Qualcomm Technologies, International, Ltd.
Bluetooth Address
Sticker on base of Starter Development Kit
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
Bluetooth Address – HTF FILE
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
Bluetooth Address
Label Format
HTF file format
BDA:
bdaddr = (0x (0x F377 , 0x 5B , 03 0x 02
002 : 5B : 03F377
)
CSR102x is a product of Qualcomm Technologies, International, Ltd.
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
Bluetooth Address
Label Format
HTF file format
BDA:
bdaddr = (0x (0x F377 , 0x 5B , 03 0x 02
002 : 5B : 03F377
)
CSR102x is a product of Qualcomm Technologies, International, Ltd.
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
Bluetooth Address
Label Format
HTF file format
BDA:
bdaddr = (0x (0x F377 , 0x 5B , 03 0x 02
002 : 5B : 03F377
)
CSR102x is a product of Qualcomm Technologies, International, Ltd.
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
Bluetooth Address
Label Format
HTF file format
BDA:
bdaddr = (0x (0x F377 , 0x 5B , 03 0x 02
002 : 5B : 03F377
)
CSR102x is a product of Qualcomm Technologies, International, Ltd.
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
Bluetooth Address
Label Format
HTF file format
BDA:
bdaddr = (0x (0x F377 , 0x 5B , 03 0x 02
002 : 5B : 03F377
)
CSR102x is a product of Qualcomm Technologies, International, Ltd.
S/N: 397113
Xtal Trim PPM : 14
0002-5B-03F377
CSR102x Starter Development Kit
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
…
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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!
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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!
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
CSR102x Starter Development Kit
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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.
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
Build and Program
Project Window
Message Area
If any errors occur they will be displayed here
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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.
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
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.
CSR102x is a product of Qualcomm Technologies, International, Ltd.
Q
CSR102x Starter Development Kit
Profile Demonstrator
CSR102x is a product of Qualcomm Technologies, International, Ltd.
Plug in Dongle and allow it to enumerate
Run CSR µEnergy Profile Demonstrator
Click on Discover Devices
CSR102x Starter Development Kit
Profile Demonstrator
CSR102x is a product of Qualcomm Technologies, International, Ltd.
Locate your device
name on the list
Select
Connect to Device
CSR102x Starter Development Kit
End to End Data exchange
CSR102x is a product of Qualcomm Technologies, International, Ltd.
Connecting the UI
Utilising the Button and LED
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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();
CSR102x is a product of Qualcomm Technologies, International, Ltd.
CSR102x Starter Development Kit
Compile Application
Rebuild the Heart Rate Project.
This time DO NOT program the board.
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
Battery Voltage
Threshold
Scanning
Window
Upgrade
Button
Status
Window
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
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.
CSR102x Starter Development Kit
Reconnect Profile Demonstrator
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
CSR102x Starter Development Kit
Activation Code
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
CSR102x Starter Development Kit
Activation Code
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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
CSR102x Starter Development Kit
Install SDK
CSR102x is a product of Qualcomm Technologies, International, Ltd.
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.