The BlueNRG-1 and BlueNRG-2 devices are low power Bluetooth Low Energy (BLE) systems-on-chip that are compliant with
the Bluetooth® specification and support master, slave and simultaneous master-and-slave roles. BlueNRG-2 also supports the
Bluetooth Low Energy data length extension feature.
The following BlueNRG-1, BlueNRG-2 kits are available:
(1)
1.BlueNRG-1 development platforms (order code: STEVAL-IDB007V1
2.BlueNRG-2 development platforms (order code: STEVAL-IDB008V1
IDB008V1M)
1. This board is no longer available for purchase
The development platforms feature hardware resources for a wide range of application scenarios: sensor data (accelerometer,
pressure and temperature sensor), remote control interfaces (buttons and LEDs) and debug message management through
USB virtual COM. Three power options are available (USB only, battery only and external power supply plus USB) for high
application development and testing flexibility.
STEVAL-IDB007V2)
,
(1)
, STEVAL-IDB008V2, STEVAL-IDB009V1, STEVAL-
RELATED LINKS
The document content is also valid for the BlueNRG-1 STEVAL-IDB007V1M evaluation platform based on the SPBTLE-1S module with 32
MHz HS crystal.
UM2071 - Rev 12 - June 2020
For further information contact your local STMicroelectronics sales office.
www.st.com
1Development platforms
UM2071
Development platforms
Figure 1. STEV
This item is no longer available for sale
Figure 2. STEV
based on BlueNRG-1 SoC
AL-IDB007V1 development platform
AL-IDB007V2 development platform
UM2071 - Rev 12
page 2/94
UM2071
Development platforms
based on BlueNRG-2 SoC
based on BlueNRG-2 SoC
Figure 3. STEV
AL-IDB008V1 development platform
Figure 4. STEVAL-IDB008V2 development platform
UM2071 - Rev 12
page 3/94
UM2071
Development platforms
Figure 5. STEV
based on BlueNRG-2 SoC in QFN48 package
AL-IDB009V1 development platform
Figure 6. STEVAL-IDB008V1M development platform
based on BlueNRG-M2SA module with embedded BlueNRG-2 SoC
UM2071 - Rev 12
page 4/94
2Getting started
2.1Kit contents
The STEVAL-IDB007Vx/STEVAL-IDB008Vx kits include respectively:
a
•
BlueNRG-132 (QFN32 package)/BlueNRG-232 (QFN32 package) development platform
a 2.4 GHz Bluetooth antenna
•
•a USB cable
The STEVAL-IDB009Vx kit includes:
•a BlueNRG-248 (QFN48 package) development platform
•a 2.4 GHz Bluetooth antenna
•a USB cable
The STEVAL-IDB008V1M kit includes:
•a BlueNRG-M2SA certified module based on the BlueNRG-2 Bluetooth low energy system-on-chip
•a USB cable
UM2071
Getting started
2.2System requirements
The BlueNRG-1, BlueNRG-2 Navigator and Radio Init Parameters Wizard PC applications require:
•
PC with Intel® or AMD® processor running Windows 7/10
•At least 128 MB of RAM
•USB ports
•At least 40 MB of available hard disk space
•Adobe Acrobat Reader 6.0 or later
2.3BlueNRG-1_2 development kit setup
The following BlueNRG-1, BlueNRG-2 DK software packages are available: BlueNRG-1_2 DK SW package for
BlueNRG-1, BlueNRG-2 BLE stack v2.x family (STSW
After downloading the selected software package (STSW
bluenrg1-dk.zip contents to a temporary directory, launch BlueNRG-1_2-DK-x.x.x-Setup.exe and follow the onscreen instructions.
Note:EWARM Compiler 8.40.1 or later, Keil MDK-ARM v5.27 or later and Atollic-True Studio v8.1.0 are required for
building the related BlueNRG1_2_DK_x.x.x demonstration applications.
HLPS25HB MEMS pressure sensor with embedded temperature
ILSM6DS3 3D digital accelerometer and 3D digital gyroscope
G
P
PWR LED
Three user LEDs
Back of the PCB Battery holder for two AAA batteries
J, LTwo rows of Arduino-compliant connectors
Integrated balun with matching network and harmonics filter (BALF-NRG-01D3 on STEV
S
AL-IDB008V1
STEV
and BALF-NRG-02D3 on STEVAL-IDB007V2/STEVAL-IDB008V2). Discrete matching
network on STEVAL-IDB009V1.
Q
STM32L151CBU6 48-pin microcontroller (USB to serial bridge for I/O channel to PC communication)
RST2378E level translator to adapt voltage level between STM32 and BlueNRG-1
16 MHz High Speed Crystal on STEVAL-IDB007Vx
T
32 MHz High Speed Crystal on STEVAL-IDB008Vx, STEVAL-IDB009Vx, STEV
IDB007V1M/8V1M
1.On STEVAL-IDB008V1M, region A contains the BlueNRG-M2SA module
On STEVAL-IDB007V1M, region A contains the SPBTLE-1S module
2. STM32 is not intended to be programmed by users
UM2071
BlueNRG-1, BlueNRG-2 SoC connections
AL-IDB007V1/
(2)
AL-IDB009Vx, STEVAL-
3.2BlueNRG-1, BlueNRG-2 SoC connections
The BlueNRG-132, BlueNRG-232 very low power Bluetooth low energy (BLE) single-mode system on chip
(Figure 7. STEVAL-IDB007Vx board components – region A /Figure 8. STEV
region A) have respectively 160 KB, 256 KB of Flash, 24 KB of RAM, a 32-bit core ARM Cortex-M0 processor and
several peripherals (ADC, 15 GPIOs, I²C, SPI, Timers, UART, WDG and RTC).
The BlueNRG-248 very low power Bluetooth low energy (BLE) single-mode system on chip has 256 KB of Flash,
24 KB of RAM, a 32-bit core ARM cortex-M0 processor and several peripherals (ADC, 26 GPIOs, I²C, SPI,
Timers, UART, WDG and RTC).
The microcontroller is connected to various components such as buttons, LEDs and sensors. The following table
describes the microcontroller pin functions.
Table 2. BlueNRG-1, BlueNRG-2 pins description with board functions
board components, Figure 9. STEVAL-IDB009V1 board components – region C)
•two AAA batteries (region F)
•an external DC power supply plus micro USB connector
The following table describes the power supply modes available on the STEVAL-IDB007V1, STEVAL-IDB008V1
boards and corresponding jumper settings.
STEVAL-IDB007Vx board components, Figure 8.
AL-IDB008Vx kits.
STEVAL-IDB008Vx board
UM2071 - Rev 12
Table 3. STEVAL-IDB007Vx, STEVAL-IDB008Vx, STEVAL-IDB009Vx kit platform power supply modes
Power supply modeJP1JP2Comment
1 - USBFitted: 1-2 Fitted: 2-3
USB supply through connector CN5 (Figure 7. STEV
components, Figure 8. STEV
Figure 9. STEVAL-IDB009V1 board components – region C)
AL-IDB008Vx board components,
AL-IDB007Vx board
page 10/94
Power supply modeJP1JP2Comment
2 - BatteryFitted: 2-3 Fitted: 1-2 The supply voltage must be provided through battery pins (region F).
3 - ComboFitted: 1-2 Optional
3.4Jumpers
The available jumpers are listed in the table below.
UM2071
Jumpers
USB supply through connector CN5 for STM32L1; JP2 pin 2 external power for
BlueNRG-1, BlueNRG-2
able 4. STEVAL-IDB007Vx, STEV
T
JumperDescription
JP1
JP2
JP3
JP4Fitted: to provide VBLUE to BlueNRG-1, BlueNRG-2. It can be used also for current measurement.
JP5
1-2: to provide power from USB (JP2: 2-3)
2-3: to provide power from battery holder (JP2: 1-2)
1-2: to provide power from battery holder (JP1: 2-3)
2-3: to provide power from USB (JP1: 1-2)
JP2 pin 2 to VDD to provide external power supply to BlueNRG-1, BlueNRG-2 (JP1: 1-2)
pin 1 and 2 UART RX and TX of MCU
pin 3 GND
Fitted: TEST pin to VBLUE
Not fitted: TEST pin to GND
AL-IDB008Vx, STEVAL-IDB009Vx kit platform jumpers
3.5Sensors
The following sensors are available on the platform:
An LPS25HB
1.
components, Figure 9. STEVAL-IDB009V1 board components – region H) is a piezoresistive absolute
pressure sensor which functions as a digital output barometer. The device comprises a sensing element and
an IC interface which communicates through I²C from the sensing element to the application.
2.An LSM6DS3 3D (region I) digital accelerometer and 3D digital gyroscope with embedded temperature
sensor which communicates via SPI interface. One line for interrupt is also connected.
Note:In battery operating mode, if R59, R60 and R62 resistors are mounted, you should remove them to make
microcontroller programming and debugging with an in-circuit debugger and programmer such as ST-LINK/V2.
Note:Only SWD mode is supported
STEV
AL-IDB007Vx board components, Figure 8.
STEVAL-IDB008Vx board
3.9LEDs
LEDs DL1 (yellow), DL2 (red), DL3 (blue) and DL4 (green, power LED) are available on the board
(Figure 7. STEVAL-IDB007Vx board components, Figure 8. STEVAL-IDB008Vx board components,
Figure 9. STEV
AL-IDB009V1 board components – regions G and P).
3.10STM32L151CBU6 microcontroller
The most important feature of the STM32L151CBU6 48-pin microcontroller (Figure 7. STEVAL-IDB007Vx board
regions Q) is the USB to serial bridge providing an I/O channel with the BlueNRG-1, BlueNRG-2 device.
The microcontroller is connected to the BlueNRG-1, BlueNRG-2 device through an ST2378E level translator
(region R).
Note:The STM32L microcontroller on the board is not intended to be programmed by users. ST provides a pre-
programmed firmware image for the sole purpose of interfacing BlueNRG-1, BlueNRG-2 to a USB host device
(e.g., a PC).
3.11Integrated balun with matching network and harmonics filter
BALF-NRG-01D3 and BALF-NRG-02D3 devices are ultra-miniature baluns which integrate matching network and
harmonics filter on STEV
AL-IDB009V1.
STEV
AL-IDB007Vx and STEVAL-IDB008Vx. Discrete matching network is available on
3.12Current measurements
To monitor the power consumption of the BlueNRG-1, BlueNRG-2 only, remove the jumper from JP4 and insert an
ammeter between pins 1 and 2 of the connector (when the power is ON, remove the USB connection).
Since power consumption of the BlueNRG-1, BlueNRG-2 are usually very low, an accurate instrument in the
range of few micro amps is recommended.
3.13Hardware setup
Connect an antenna to the SMA connector
1.
2.Configure the board to USB power supply mode as per Table 3. STEV
STEVAL-IDB009Vx kit platform power supply modes
3.Connect the board to a PC via USB cable (connector CN5)
4.Verify the power indication LED DL4 is on.
AL-IDB007Vx, STEVAL-IDB008Vx,
UM2071 - Rev 12
page 12/94
4BlueNRG-1, BlueNRG-2 Navigator
BlueNRG-1, BlueNRG-2 Navigator are user friendly GUI which lets you select and run demonstration applications
easily
, without requiring any extra hardware. With it, you can access the following DK software package
components:
BlueNRG-1, BlueNRG-2 Bluetooth low energy (BLE) demonstration applications
•
•
BlueNRG-1, BlueNRG-2 peripheral driver examples
•BlueNRG-1, BlueNRG-2 2.4 GHz radio proprietary examples
•BlueNRG-1, BlueNRG-2 development kits
•release notes
•license files
With BlueNRG-1, BlueNRG-2 DK Navigator, you can directly download and run the selected prebuilt application
binary image (BLE examples or peripheral driver example) on the BlueNRG-1, BlueNRG-2 platform without a
JTAG interface.
The interface gives demo descriptions and access to board configurations and source code if needed.
User can run the utility through the BlueNRG-1 and BlueNRG-2 Navigator icon under:
Note:BlueNRG-1 Navigator and BlueNRG-2 Navigator are two instances of the same application tailored for the
specific selected device, in order to select the related available resources. Next sections focus on BlueNRG-1
Navigator, but same concepts are also valid for BlueNRG-2 Navigator.
ou can navigate the menus for the reference/demo application you want to launch. For each application, the
Y
following information is provided:
•Application settings (if applicable)
•Application description
•Application hardware related information (e.g., LED signals, jumper configurations, etc.)
The following functions are also available for each application:
UM2071 - Rev 12
page 13/94
UM2071
BlueNRG-1 Navigator ‘Demonstration Applications’
•Flash: to automatically download and run the available prebuilt binary file to a BlueNRG-1 platform
connected to a PC USB port.
•Doc: to display application documentation (html format)
•Project: to open the project folder with application headers, source and project files.
The figure below shows you how to run the BLE Beacon demo application; the other demos function similarly
.
Figure 1
1. BLE Beacon application
When a BlueNRG-1 platform is connected to your PC USB port, you can press the “Flash & Run” tab on the
selected application window to download and run the available prebuilt application binary image on the
BlueNRG-1 platform.
Figure 12. BLE Beacon Flash programming
Selecting the “Doc” tab opens the relative html documentation.
UM2071 - Rev 12
page 14/94
Figure 13. BLE Beacon documentation
4.1.1BlueNRG-1 Navigator ‘Basic examples’
This page lists some basic sample applications for the BlueNRG-1 device to verify that BlueNRG-1 device is alive
as well as the device sleep and wakeup modes.
Figure 14. Basic examples
UM2071
BlueNRG-1 Navigator ‘Demonstration Applications’
4.1.2BlueNRG-1 Navigator ‘BLE demonstration and test applications’
This page lists all the available Bluetooth low energy (BLE) demonstration applications in the DK software
package. These applications provide usage examples of the BLE stack features for the BlueNRG-1 device.
UM2071 - Rev 12
page 15/94
BlueNRG-1 Navigator ‘Demonstration Applications’
Figure 15. BLE demonstration and test applications
This page lists the available BlueNRG-1 peripherals and corresponding test applications to work with certain
features specific to the selected BlueNRG-1 peripheral.
Figure 16. Peripherals driver examples
4.1.4BlueNRG-1 Navigator ‘2.4 GHz radio proprietary examples’
The Radio low level driver provides access to the BlueNRG-1 device radio to send and receive packets without
using the Bluetooth link layer
UM2071 - Rev 12
.
page 16/94
UM2071
BlueNRG-1 Navigator ‘Development Kits’
The 2.4 GHz radio proprietary examples built on top of the Radio low level driver can be used as reference
examples for building other applications which use the BlueNRG-1 Radio.
Figure 17. 2.4 GHz radio proprietary examples
4.2BlueNRG-1 Navigator ‘Development Kits’
This window displays the available BlueNRG-1 DK kit platforms and corresponding resources. When you hover
the mouse pointer on a specific item, the related component is highlighted on the board.
Figure 18. STEVAL-IDB007V2 kit components
4.2.1BlueNRG-1 Navigator ‘Release Notes’ and ‘License’
As their name suggests, these pages display the DK SW package Release Notes (html format) and the DK
software package license file, respectively.
UM2071 - Rev 12
page 17/94
5BlueNRG-X Radio Init Parameters Wizard
The BlueNRG-X Radio Parameters Wizard is a PC application which allows to define the proper values required
for the correct BlueNRG-1, BlueNRG-2 BLE radio initialization, based on the specific user application scenario. As
consequence of the user choices, a configuration header file (*_config.h) is generated: this file must be used on
the user demonstration application folder
Note:
The BlueNRG-X Radio Init Parameters W
BLUENRG1-DK) supporting BLE stack v2.x family.
5.1How to run
User can run this utility by clicking on the BlueNRG-X Radio Init Parameters Wizard icon under: Start → ST
BlueNRG -1_2 DK X.X.X
Figure 19. BlueNRG-X Radio Init Parameters Wizard
.
izard is provided only on BlueNRG-1_2 DK SW package (STSW-
UM2071
BlueNRG-X Radio Init Parameters Wizard
5.2Main user interface window
In the left section of the BlueNRG-X Radio Init Parameters Wizard Utility, user can select the following topics
allowing to define the specific radio initialization parameters based on the specific BLE application requirements:
General Configuration
1.
2.Radio Configuration
3.
Service Configuration
4.Connection Configuration
5.Security DataBase configuration
6.OTA configuration
7.Stack configuration
8.Overview
UM2071 - Rev 12
page 18/94
UM2071
Main user interface window
9.Output
Refer to the BlueNRG-X Radio Init Parameters Wizard documentation available within BlueNRG-1_2 DK SW
package for more details about each provided configuration section.
UM2071 - Rev 12
page 19/94
Programming with BlueNRG-1, BlueNRG-2 system on chip
6Programming with BlueNRG-1, BlueNRG-2 system on chip
UM2071
The BlueNRG-1, BlueNRG-2 Bluetooth low energy (BLE) stack is provided as a binary library
control BLE functionality
user is simply requested to link this binary library to his or her application and use the relevant APIs to access
BLE functions and complete the stack event callbacks to manage responses according to application
requirements.
A set of software driver APIs is also included for accessing the BlueNRG-1, BlueNRG-2 SoC peripherals and
resources (ADC, GPIO, I²C, MFTX, Micro, R
The development kit software includes sample code demonstrating how to configure BlueNRG-1, BlueNRG-2 and
use the device peripherals and BLE APIs and event callbacks. Documentation on the BLE APIs, callbacks, and
peripheral drivers are provided in separate documents.
. Some callbacks are also provided for user applications to handle BLE stack events. The
TC, SPI, SysTick, UART and WDG).
. A set of APIs to
6.1Software directory structure
The BlueNRG-1, BlueNRG-2 DK software packages files are organized in the following main directories:
•Application: containing BlueNRG-1, BlueNRG-2 Navigator and Radio Init Parameters Wizard PC
applications.
•Doc: with doxygen BLE APIs and events, BlueNRG-1, BlueNRG-2 peripheral drivers, BLE demo
applications, BlueNRG-1, BlueNRG-2 Peripheral examples, BlueNRG-1, BlueNRG-2 SDK and HAL driver
documentation, DK release notes and license file.
•Firmware: with prebuilt binary BLE and peripheral driver sample applications.
•Library
–Bluetooth LE: Bluetooth low energy stack binary library and all the definitions of stack APIs, stack and
events callbacks. BLE stack v2.1 or later configuration header and source files.
–cryptolib: AES library
–BLE_Application: BLE application framework files (BLE stack layers define values, OTA FW upgrade,
BLE utilities, master library).
–BlueNRG1_Periph_Driver: BlueNRG-1, BlueNRG-2 drivers for device peripherals (ADC, clock, DMA,
Flash, GPIO, I²C, timers, R
–CMSIS: BlueNRG-1 CMSIS files.
–SDK_Eval_BlueNRG1: SDK drivers providing an API interface to the BlueNRG-1, BlueNRG-2 platform
To advertise the specific selected manufacturer data, the BLE Beacon application can use the following GAP
APIs:
page 21/94
UM2071
BLE Beacon FreeRTOS example
/* Remove TX power level field from the advertising data: it is necessary to have
enough space for the beacon manufacturing data */
aci_gap_delete_ad_type(AD_TYPE_TX_POWER_LEVEL);
/* Define the beacon manufacturing payload */
uint8_t manuf_data[] = {26, AD_TYPE_MANUFACTURER_SPECIFIC_DATA, 0x30, 0x00,
//Company identifier code (Default is 0x0030 - STMicroelectronics) 0x02,// ID
0x15,//Length of the remaining payload
0xE2, 0x0A, 0x39, 0xF4, 0x73, 0xF5, 0x4B, 0xC4, //Location UUID
0xA1, 0x2F, 0x17, 0xD1, 0xAD, 0x07, 0xA9, 0x61,
0x00, 0x02, // Major number
0x00, 0x02, // Minor number
0xC8//2's complement of the Tx power (-56dB)};
};
/* Set the beacon manufacturing data on the advertising packet */ aci_gap_update_adv_data(27,
manuf_data);
Note:BLE Beacon with Flash Management demonstration application is also available. It allows to configure a Beacon
device as with the original Beacon demo application; it also shows how to properly handle Flash operations
(Erase and Write) and preserve the BLE radio activities. This is achieved by synchronizing Flash operations with
the scheduled BLE radio activities through the aci_hal_end_of_radio_activity_event() event callback timing
information.
7.2BLE Beacon FreeRTOS example
A specific new Beacon project (BLE_Beacon_FreeRTOS) shows how to use FreeR
TOS with ST BLE stack v2.x.
The example configures a BLE device in advertising mode (non-connectable mode) with specific manufacturing
data and the BTLE_StackTick() is called from a FreeRTOS task (BLETask).
A task randomly changes the Minor number in the advertising data every 500 ms, sending a message through
UART each time. Another task sends other messages through UART every 200 ms and generates a short pulse
on LED3 (visible with a logic analyzer or oscilloscope).
In this example, low priority has been assigned to the BLETask.
Assigning high priority to a BLETask can give better latency; if some tasks require a lot of CPU time, it is
recommended to assign them a lower priority than the BLETask to avoid BLE operations slowing down. Only for
tasks that perform very short sporadic operations before waiting for an event, it is still reasonable to choose a
priority higher than the BLETask.
UM2071 - Rev 12
page 22/94
8BLE chat demo application
The BLE chat demo (server and client roles) is supported on the BlueNRG-1, BlueNRG-2 development platforms
(STEV
AL-IDB007Vx, STEV
between two BLE devices, demonstrating point-to-point wireless communication using the BlueNRG-1 product.
This demo application exposes a single chat service with the following (20 byte max.) characteristic values:
•The TX characteristic, with which the client can enable notifications; when the server has data to be sent, it
sends notifications with the value of the TX characteristic.
•The RX characteristic, is a writable characteristic; when the client has data to be sent to the server, it writes
a value in this characteristic.
There are two device roles which can be selected through the specific project workspace:
•The Server that exposes the chat service (BLE peripheral device).
•The Client that uses the chat service (BLE central device).
The application requires two devices to be programmed with respective server and client roles. These must be
connected to a PC via USB with an open serial terminal for each device, with the following configurations:
AL-IDB008Vx, STEV
Table 6. Serial port configuration
UM2071
BLE chat demo application
AL-IDB009Vx). It implements simple two-way communication
ParameterValue
Baudrate115200 bit/s
Data bits8
Parity bitsNone
Stop bits1
The application listens for keys typed in one device terminal and sends them to the remote device when the return
key is pressed; the remote device then outputs the received RF messages to the serial port. Therefore, anything
typed in one terminal becomes visible in the other.
8.1Peripheral and central device setup
This section describes how two BLE chat devices (server-peripheral and client-central) interact with each other to
set up a point-to-point wireless chat.
BLE device must first be set up on both devices by sending a series of API commands to the processor.
8.1.1Initialization
The BLE stack must be correctly initialized before establishing a connection with another BLE device. This is
done with aci_gatt_init() and aci_gap_init()
Peripheral and central BLE roles must be specified in the aci_gap_init() command. See the BLE stack API
documentation for more information on these and following commands.
page 23/94
8.1.2Add service and characteristics
The chat service is added to the BLE chat server device via:
Where service_uuid is the private service 128-bit UUID allocated for the chat service (Primary service). The
command returns the service handle in chatServHandle. The TX characteristic is added using the following
command on the BLE Chat server device:
Where charUuidTX is the private characteristic 128-bit UUID allocated for the TX characteristic (notify property).
The characteristic handle is returned on the TXCharHandle variable.
The RX characteristic is added using the following command on the BLE Chat server device:
Where charUuidRX is the private characteristic 128-bit UUID allocated for the RX characteristic (write property).
The characteristic handle is returned on the RXCharHandle
See the BLE stack API documentation for more information on these and following commands.
UM2071
Peripheral and central device setup
variable.
8.1.3Enter connectable mode
The server device uses GAP API commands to enter the general discoverable mode:
Where bdaddr is the peer address of the client device.
Once the two devices are connected, you can set up corresponding serial terminals and type messages in either
of them. The typed characters are stored in two respective buffers and when the return key is pressed:
•on the BLE chat server device, the typed characters are sent to the BLE chat client device by notifying the
previously added TX characteristic (after notifications are enabled) with:
Where connection_handle is the handle returned upon connection as a parameter of the connection complete
event, rx_handle is the RX characteristic handle discovered by the client device.
Once these API commands have been sent, the values of the TX and RX characteristics are displayed on the
serial terminals.
page 24/94
Figure 20. BLE chat client
Figure 21. BLE chat server
UM2071
Peripheral and central device setup
UM2071 - Rev 12
page 25/94
BLE chat master and slave demo application
9BLE chat master and slave demo application
The BLE chat master and slave demo is supported on the BlueNRG-1, BlueNRG-2development platforms
(STEV
AL-IDB007Vx, STEV
communication using a single application which configures the chat client and server roles at runtime.
The new chat demo application configures a BLE device as central or peripheral using the API:
It then initiates a discovery procedure for another BLE device configured with the same chat master and slave
application image.
If such a device is found within a random interval, it starts a connection procedure and waits until a connection is
established. If the discovery procedure time expires without finding another chat master and slave device, the
device enters discovery mode and waits for another chat master and slave device to discover and connect to it.
When connection is established, the client and server roles are defined and the chat communication channel can
be used.
This demo application exposes a single chat service with the following (20 byte max.) characteristic values:
•
The TX characteristic, with which the client can enable notifications; when the server has data to be sent, it
sends notifications with the value of the TX characteristic.
•The RX characteristic, is a writable characteristic; when the client has data to be sent to the server, it writes
a value in this characteristic.
The application requires two devices to be programmed with the same application, with the server and client roles
defined at runtime. Connect the two devices to a PC via USB and open a serial terminal on both with the same
configuration as T
The application listens for keys typed in one device terminal and sends them to the remote device when the return
key is pressed; the remote device then outputs the received RF messages to the serial port. Therefore, anything
typed in one terminal becomes visible in the other.
able 6. Serial port configuration.
AL-IDB008Vx, STEV
AL-IDB009Vx). It demonstrates simple point-to-point wireless
UM2071
9.1BLE chat master and slave roles
This section describes how two BLE chat master and slave devices interact with each other in order to set up a
point-to-point wireless chat.
The BLE stack must first be set up on both devices by sending a series of API commands to the processor
chat master and slave client and server roles are defined at runtime.
9.1.1Initialization
The BLE stack must be correctly initialized before establishing a connection with another BLE device. This is
done with two commands:
The BLE peripheral and central roles are specified in the aci_gap_init() command. See the BLE API
documentation for more information on these and following commands.
9.1.2Add service and characteristics
Refer to Section 8.1.2 Add service and characteristics.
9.1.3Start discovery procedure
To find another BLE chat master and slave device in discovery mode, a discovery procedure must be started via:
9.1.5Connection with chat master and slave client device
In the above mentioned discovery and mode assignment procedures, the two chat master and slave applications
assume respective client and server roles at runtime. During this initial configuration phase, when a chat master
and slave device is placed in discoverable mode and it is found by the other chat master and slave device
performing a discovery procedure, a Bluetooth low energy connection is created and the device roles are defined.
The following GAP API command is used for connecting to the discovered device:
Where device_found_address_type is the address type of the discovered chat master and slave and
device_found_address is the peer address of the discovered chat master and slave device.
Once the two devices are connected, you can set up corresponding serial terminals and type messages in either
of them. The typed characters are stored in two respective buf
On the BLE chat master-and-slave server device, the typed characters are sent to the master-and-slave client
device by notifying the previously added TX characteristic (after notifications have been enabled). This is done
via:
On the master-and-slave client device, the typed characters are sent to the master-and-slave server device, by
writing the previously added RX characteristic. This is done via:
Where connection_handle is the handle returned upon connection as a parameter of the connection complete
event, rx_handle is the RX characteristic handle discovered by the client device.
Once these API commands have been sent, the values of the TX and RX characteristics are displayed on the
serial terminals.
UM2071 - Rev 12
page 27/94
10BLE remote control demo application
UM2071
BLE remote control demo application
The BLE remote control application is supported on the BlueNRG-1, BlueNRG-2
AL-IDB007Vx, STEV
(STEV
(like an actuator) using a BlueNRG-1, BlueNRG-2 device.
This application periodically broadcasts temperature values that can be read by any device. The data is
encapsulated in a manufacturer-specific AD type and the content (besides the manufacturer ID, i.e., 0x0030 for
STMicroelectronics) is as follows:
Byte 0Byte 1Byte2
App ID (0x05)Temperature value (little-endian)
The temperature value is given in tenths of degrees Celsius.
The device is also connectable and exposes a characteristic used to control LEDs DL1 and DL3 on the BLE kit
platform. The value of this characteristic is a bitmap of 1 byte. Each bit controls one of the LEDs:
•
bit 0 is the status of LED DL1
•bit 2 is the status of LED DL3.
A remote device can therefore connect and write this byte to change or read the status of these LEDs (1 for LED
ON, 0 for LED OFF).
The peripheral disconnects after a timeout (DISCONNECT_TIMEOUT) to prevent a central device remaining
connected to the device indefinitely.
Security is not enabled by default, but this can be changed with ENABLE_SECURITY (refer to file
BLE_RC_main.h). When security is enabled, the central device must be authenticated before reading or writing
the device characteristic.
To interact with a device configured as a BLE remote control, another BLE device (a BlueNRG-1, BlueNRG-2 or
any Bluetooth® Low Energy device) can be used to detect and view broadcast data.
To control one of the LEDs, the device has to connect to a BlueNRG-1 BLE remote control device and write in the
exposed control point characteristic. The Service UUID is ed0ef62e-9b0d-11e4-89d3-123b93f75cba. The control
point characteristic UUID is ed0efb1a-9b0d-11e4-89d3-123b93f75cba.
AL-IDB008Vx, STEVAL-IDB009Vx). It demonstrates how to control a remote device
Table 7. BLE remote advertising data
development platforms
10.1BLE remote control application setup
This section describes how to configure a BlueNRG-1
10.1.1Initialization
The BLE stack must be correctly initialized before establishing a connection with another Bluetooth LE device.
This is done with two commands:
Where controlPointUuid is the private characteristic 128-bit UUID allocated for BLE remote control
characteristic (ed0efb1a-9b0d-1
1e4-89d3-123b93f75cba) and controlPointHandle is the BLE remote control
characteristic handle.
If security is enabled, the characteristic properties must be set accordingly to enable authentication on
controlPointUuid characteristic read and write.
10.1.4Connection with a BLE Central device
When connected to a BLE central device (another BlueNRG-1,
device), the controlPointUuid characteristic is used to control the BLE remote control platform LED. Each
time a write operation is performed on controlPointUuid, the aci_gatt_attribute_modified_event()
callback is raised and the selected LEDs are turned on or of
BlueNRG-2 device or any Bluetooth® Low Energy
f.
UM2071 - Rev 12
page 29/94
11BLE sensor profile demo
UM2071
BLE sensor profile demo
The BLE sensor profile demo is supported on the BlueNRG-1, BlueNRG-2 development platforms (STEV
IDB007Vx, STEV
sensor profile.
This example is useful for building new profiles and applications that use the BlueNRG-1, BlueNRG-2 SoC. The
GATT profile is not compliant with any existing specifications as the purpose of this project is to simply
demonstrate how to implement a given profile.
This profile exposes the acceleration and environmental services.
Figure 22. BLE sensor demo GATT database shows the whole GATT database, including the GATT (0x1801) and
GAP (0x1800) services that are automatically added by the stack.
The acceleration service free fall characteristic cannot be read or written, but can be signaled. The application
sends notification of this characteristic (with a value of 0x01) if a free fall condition is detected by the MEMS
sensor (when the acceleration on the three axes is near zero for a certain amount of time). Notifications can be
enabled or disabled by writing the associated client characteristic configuration descriptor.
The other characteristic exposed by the service gives the current value of the acceleration measured by the
accelerometer in six bytes. Each byte pair contains the acceleration on one of the three axes. The values are
given in mg. This characteristic is readable and can be notified if notifications are enabled.
Another service is defined, which contains characteristics that expose data from some environmental sensors:
temperature and pressure. Each characteristic data type is described in a format descriptor. All of the
characteristics have read-only properties.
AL-IDB008Vx, STEV
AL-IDB009Vx). It implements a proprietary, Bluetooth low energy (BLE)
Figure 22. BLE sensor demo GATT database
AL-
11.1BlueNRG app for smartphones
An application is available for iOS™ and Android™ smartphones or tablets that also works with the BLE sensor
profile demo. This app enables notification of the acceleration characteristic and displays the value on screen.
Data from environmental sensors are also periodically read and displayed.
UM2071 - Rev 12
page 30/94
BLE sensor profile demo: connection with a central device
Figure 23. BlueNRG sensor app
UM2071
11.2BLE sensor profile demo: connection with a central device
This section describes how to interact with a central device, while the BLE stack is acting as a peripheral. The
central device may be another BlueNRG-1, BlueNRG-2 device acting as a BLE master, or any other Bluetooth
Low Energy device.
The BLE stack must first be set up by sending a series of BLE API commands to the processor.
11.2.1Initialization
The BLE stack must be correctly initialized before establishing a connection with another Bluetooth LE device.
This is done via:
See BLE stack API documentation for more information on these and following commands.
11.2.2Add service and characteristics
The BlueNRG-1 BLE stack has both server and client capabilities. A characteristic is an element in the server
database where data is exposed, while a service contains one or more characteristics. The acceleration service is
added with the following command:
The command returns the service handle on variable accServHandle. The free fall and acceleration
characteristics must now be added to this service thus:
The local_name parameter contains the name presented in advertising data, as per Bluetooth core specification
version, V
1.2.4Connection with central device
1
Once the BLE stack is placed in discoverable mode, it can be detected by a central device. The smartphone app
described in Section 11.1 BlueNRG app for smartphones is designed for interact with the sensor profile demos
(it also supports the BlueNRG-1 device).
Any Bluetooth Low Energy device like a smartphone can connect to the BLE sensor profile demo.
For example, the LightBlue application in Apple Store® connects iPhone® versions 4S/5 and above can connect
to the sensor profile device. When you use the LightBlue application, detected devices appear on the screen with
the BlueNRG name. By tapping on the box to connect to the device, a list of all the available services is shown on
the screen; tapping a service shows the characteristics for that service.
The acceleration characteristic can be notified using the following command:
ol. 3, Part C, Ch. 11.
UM2071
BLE sensor profile demo: connection with a central device
Where buff is a variable containing the three axes acceleration values.
Once this API command has been sent, the new value of the characteristic is displayed on the phone.
UM2071 - Rev 12
page 32/94
12BLE sensor profile central demo
The BLE sensor profile central demo is supported on the BlueNRG-1, BlueNRG-2 development platforms
(STEV
AL-IDB007Vx, STEV
Profile Central role which emulates the Sensor Demo applications available for smartphones (iOS and android).
This application configures a BlueNRG-1, BlueNRG-2 device as a Sensor device, Central role which is able to
find, connect and properly configure the free fall, acceleration and environment sensors characteristics provided
by a BLE development platform configured as a BLE Sensor device, Peripheral role (refer to Section 11 BLE
sensor profile demo).
This application uses a new set of APIs allowing to perform the following operations on a BlueNRG-1, BlueNRG-2
Master/Central device:
These APIs are provided through a binary library and they are fully documented on available doxygen
documentation within the DK SW package. The following master/central binary libraries are provided in Library
\BLE_Application\Profile_Central\library folder: libmaster_library_bluenrg1.a for IAR, Keil and Atollic toolchains on
STSW-BLUENRG1-DK SW package.
AL-IDB008Vx, STEV
AL-IDB009Vx). It implements a basic version of the BLE Sensor
UM2071
BLE sensor profile central demo
UM2071 - Rev 12
page 33/94
13BLE HID/HOGP demonstration application
The BLE HID/HOGP demonstration applications are supported by the BlueNRG-1, BlueNRG-2development
platforms (STEV
standard HID/HOGP Bluetooth low energy application profile. Keyboard and mouse demo examples are provided.
AL-IDB007Vx, STEV
13.1BLE HID/HOGP mouse demonstration application
The BLE HID mouse application implements a basic HID mouse with two buttons compliant with the standard
HID/HOGP BLE application profile.
The HID mouse device is named ‘STMouse’ in the central device list.
The mouse movements are provided by the 3D accelerometer and 3D gyroscope on the BLE development
platform.
•
The left button is the ‘PUSH1’ button.
•The right button is the ‘PUSH2’ button
If the HID mouse is not used for two minutes, it closes the connection and enters deep sleep mode. This idle
connection timeout can be changed from the application. To exit deep sleep mode, press the left PUSH1 button or
reset the platform.
AL-IDB008Vx, STEV
AL-IDB009Vx). It demonstrates a BLE device using the
The BLE HID keyboard application implements a basic HID keyboard compliant with the standard HID/HOGP
BLE application profile.
The HID mouse device is named ‘STKeyboard’ in the central device list.
T
o successfully complete the bonding and pairing procedure, insert the PIN: 123456.
o use the HID keyboard:
T
•
Connect the BLE development platform to a PC USB port
•Open a HyperTerminal window (115200, 8, N,1)
•Put the cursor focus on the HyperTerminal window
•The keys that are sent to the central device using the HID/HOGP BLE application profile are also shown on
the HyperTerminal window
If the HID keyboard is not used for two minutes, it closes the connection and enters deep sleep mode. This idle
connection timeout can be changed from the application. To exit deep sleep mode, press the left PUSH1 button or
reset the platform.
UM2071 - Rev 12
page 34/94
14BLE throughput demonstration application
The BLE throughput demonstration application provides some basic throughput demonstration applications to
provide some reference figures regarding the achievable Bluetooth low energy data rate using the BlueNRG-1,
BlueNRG-2 device.
The throughput application scenarios provided are:
1.
Unidirectional scenario: the server device sends characteristic notifications to a client device.
Bidirectional scenario: the server device sends characteristic notifications to a client device and client device
2.
sends write without response characteristics to the server device.
The throughput application exposes one service with two (20 byte max.) characteristic values:
•
The TX characteristic, with which the client can enable notifications; when the server has data to be sent, it
sends notifications with the value of the TX characteristic.
•The RX characteristic, is a writable characteristic; when the client has data to be sent to the server, it writes
a value in this characteristic.
The device roles which can be selected are:
1.Server, which exposes the service with the TX, RX characteristics (BLE peripheral device)
2.Client, which uses the service TX, RX characteristics (BLE central device).
Each device role has two instances for each throughput scenario (unidirectional, bidirectional).
The BLE throughput demonstration applications are supported by the BlueNRG-1, BlueNRG-2 development
platforms (STEVAL-IDB007Vx, STEVAL-IDB008Vx, STEVAL-IDB009Vx).
UM2071
BLE throughput demonstration application
14.1BLE unidirectional throughput scenario
The unidirectional throughput scenario lets you perform a unidirectional throughput test where a server device
sends notification to a client device.
T
o run this scenario:
•Program the client unidirectional application on one BLE platform and reset it. The platform is seen on the
PC as a virtual COM port.
Open the port in a serial terminal emulator (the required serial port baudrate is 921600)
•
•Program the server unidirectional application on a second BLE platform and reset it.
•The two platforms try to establish a connection; if successful, the slave continuously sends notifications of
TX characteristic (20 bytes) to the client.
•After every 500 packets, the measured application unidirectional throughput is displayed.
14.2BLE bidirectional throughput scenario
The bidirectional throughput scenario lets you perform a bidirectional throughput test where the server device
sends notifications to a client device and client device sends write without response characteristics to the server
device.
T
o run this scenario:
•Program the client bidirectional application on one BLE platform and reset it. The platform is seen on the PC
as a virtual COM port.
•
Open the related port in a serial terminal emulator (the required serial port baudrate is 921600)
•Program the server bidirectional application on a second BLE platform and reset it.
•Open the related port in a serial terminal emulator (the required serial port baudrate is 921600)
•The two platforms try to establish a connection; if successful, the slave device continuously sends
notifications of TX characteristic (20 bytes) to the client device and the client device continuously sends write
without responses of the RX characteristic (20 bytes) to the server device.
•After every 500 packets, the measured application bidirectional throughput is displayed.
UM2071 - Rev 12
page 35/94
UM2071
BLE bidirectional throughput scenario
Note:For BlueNRG-2, BLE stack v2.1 or later
extension up to 251 bytes) is provided. The application allows displaying the throughput data in a unidirectional
flow (the server sends notifications to the client) or a bidirectional flow (the server sends notifications to the client
and the client writes without response operations on the server). The server can perform an ATT_MTU
exchange operation to increase the A
TT_MTU size to 247 bytes. The user can also directly set the actual data
length value up to 247 bytes.
, a further BLE throughput demonstration application (with data length
UM2071 - Rev 12
page 36/94
BLE notification consumer demonstration application
The BLE ANCS demonstration application configures a BlueNRG-1, BlueNRG-2 device as a BLE notification
consumer
provider
After reset, the demo places the BLE device in advertising with device name "ANCSdemo" and sets the
BlueNRG-1 authentication requirements to enable bonding.
When the device is connected and bonded with a notification provider, the demo configures the BLE notification
consumer device to discover the service and the characteristics of the notification provider. When the setup phase
is complete, the BLE device is configured as a notification consumer able to receive the notifications sent from the
notification provider
The BLE notification consumer demonstration application is supported by the BlueNRG-1, BlueNRG-2
development platforms (STEVAL-IDB007Vx, STEVAL-IDB008Vx, STEVAL-IDB009Vx).
, which facilitates Bluetooth accessory access to the many notifications generated on a notification
.
.
UM2071
UM2071 - Rev 12
page 37/94
16BLE security demonstration applications
The BLE Security demonstration applications are supported by the BlueNRG-1, BlueNRG-2 development
platforms (STEV
respectively
AL-IDB007Vx, STEV
, two BLE devices as a Central and Peripheral, and setup a secure connection by performing a BLE
pairing procedure. Once paired the two devices are also bonded.
The following pairing key generation methods are showed:
•PassKey entry with random pin
•PassKey entry with fixed pin
•Just works
•Numeric Comparison (new paring method supported only from BlueNRG-1, BlueNRG-2 BLE stack v2.x)
For each pairing key generation method, a specific project security configuration is provided for both Central &
Peripheral device as shown in the following Table 8. BLE security demonstration applications security
configurations combinations. Each Central and Peripheral device must be loaded, respectively, with the
application image targeting the proper security configuration, to correctly demonstrate the associated BLE
security pairing functionality.
AL-IDB008Vx). They provide some basic examples about how to configure,
UM2071
BLE security demonstration applications
Table 8. BLE security demonstration applications security configurations combinations
On reset, after initialization, Peripheral device sets security IO capability and authentication requirements, in order
to address the selected pairing key generation method, in combinations with the related security settings of the
Central device.
After initialization phase, Peripheral device also defines a custom service with 2 proprietary characteristics (UUID
128 bits):
- RX characteristic with properties: read (CHAR_PROP_READ,GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RES
is received for this attribute).
Based on the selected security configuration, the RX characteristic is defined with proper security permission (link
must be "encrypted to read" on JustWorks method, link must be "encrypted to read and need authentication to
read" on all other methods).
The Peripheral device enters in discovery mode with local name SlaveSec_Ax (x= 0,1,2,3 depending on the
selected security configuration).
Peripheral device security
configuration
(application is notified when a read request of any type
UM2071 - Rev 12
Table 9. Peripheral device advertising local name parameter value
Peripheral device configurationAdvertising local namePairing method
Slave_JustWorksSlaveSec_A0Just works
Slave_PassKey_FixedSlaveSec_A1PassKey entry with fixed pin
Slave_PassKey_RandomSlaveSec_A2PassKey entry with random pin
Slave_NumericCompSlaveSec_A3Numeric Comparison
page 38/94
UM2071
Central device
When a Central device starts the discovery procedure and detects the Peripheral device, the two devices
connects.
After connection, Peripheral device starts a slave security request to the Central device
aci_gap_slave_security_req() and , as consequence, Central devices starts pairing procedure.
Based on the pairing key generation method, user could be asked to perform some actions (i.e. confirm the
numeric value if the numeric comparison configuration is selected, add the key
on Central hyper terminal, if the passkey entry with random pin configuration is selected).
After devices pairs and get bonded, Peripheral device displays the list of its bonded devices and configures its
white list in order to add the bonded Central device to its white list aci_gap_configure_whitelist() API.
Central devices starts the service discovery procedure to identify the Peripheral service and characteristics and,
then, enabling the TX characteristic notification.
Peripheral device starts TX characteristic notification to the Central device at periodic interval, and it provides the
RX characteristic value to the Central device each time it reads it.
When connected, if user presses the BLE platform button PUSH1, Peripheral device disconnects and enters
undirected connectable mode mode with advertising filter enabled (WHITE_LIST_FOR_ALL: Process scan and
connection requests only from devices in the white list). This implies that Peripheral device accepts connection
requests only from devices on its white list: Central device is still be able to connect to the Peripheral device; any
other device connection requests are not accepted from the Peripheral device.
TX and RX characteristics length is 20 bytes and related values are defined as follow: - TX characteristic value:
On reset, after initialization, Central device uses the Master_SecuritySet() API for setting the security IO
capability and authentication requirements in order to address the specific selected paring method, in
combinations with the related security settings of the Central device. Central device application is using the
Central/Master library APIs and callbacks for performing the Central device BLE operations (device discovery
connection, …).
Central device starts a device discovery procedure (Master_DeviceDiscovery() API, looking for the
associated Peripheral device SlaveSec_Ax
name parameter value).
When found, Central connects to the Peripheral device. In order to start the pairing, Central device is expecting
the Peripheral device to send a slave security request. Once the security request is received, Central device
starts the pairing procedure. Based on the pairing key generation method, user could be asked to perform some
actions (i.e. confirm the numeric value if the numeric comparison configuration is selected, add the key, displayed
on Peripheral device, on Central hyper terminal, if the passkey entry with random pin configuration is selected).
Once the pairing and bonding procedure has been completed, the Central device starts the service discovery
procedure in order to find the Peripheral TX & RX characteristics.
After Service Discovery, Central enables the TX characteristic notification. Then the Central device receives
periodically the TX characteristic notification value from Peripheral device and read the related RX characteristic
value from Peripheral device.
When connected, if user presses the BLE platform PUSH1 button, the Central device disconnects and reconnect
to the Peripheral device which enters in undirected connectable mode with advertising filter enabled. Once
connected to the Peripheral device, it enters again on the TX characteristic notification/RX characteristic read
cycle.
(x= 0,1,2,3 : refer to
,
Table 9. Peripheral device advertising local
UM2071 - Rev 12
page 39/94
UM2071
Central device
Note:When using a smarthphone as Central device, if this device uses a random resolvable address, the Periheral
device is not able to accept connection or scan requests coming from it, during the reconnection phase.
This is due to the fact that, when disconnecting, the Peripheral device enters the undirected connectable mode
with filtering enabled (WHITE_LIST_FOR_ALL: process scan and connection requests from the White List
devices only). As a consequence, it is able to accept the smarthphone scan or connection requests, only if the
Privacy Controller is enabled on the Peripheral device.
A possible simple alternative is to replace, on the Peripheral device, the WHITE_LIST_FOR_ALL advertising
filter policy with NO_WHITE_LIST_USE: the Peripheral device does not enable device filtering after
reconnection, and it is able to accept connection or scan requests coming from a smartphone by using
resolvable random addresses.
UM2071 - Rev 12
page 40/94
UM2071
BLE power consumption demo application
17BLE power consumption demo application
The BLE power consumption demo application allows putting the selected BLE device in discovery mode: you
can choose from a test menu which advertising interval to use (100 ms or 1000 ms). T
BlueNRG-2 current consumption, it is necessary to connect a DC power analyzer to the JP4 connector of the
AL-IDB007Vx, STEV
STEV
with another device configured as a master and measure the related power consumption.
The master role can be covered by another BlueNRG-1, BlueNRG-2 kit platform configured with the DTM FW
application (DTM_UART.hex) and running a specific script through the BlueNRG GUI or Script launcher PC
applications.
In the BLE_Power_Consumption demo application project folder, two scripts are provided to configure the master
device and create a connection with the BlueNRG-1, 2 kit platform under test.
The two scripts allow establishing a connection with 100 ms and 1000 ms as connection intervals, respectively.
The power consumption demo supports some test commands:
•f: the device is in discoverable mode with a fast interval of 100 ms
•s: the device is in discoverable mode with a slow interval of 1000 ms
•r: to reset the BlueNRG-1
•?: to display the help menu
Note:This demo application is available only on BlueNRG-1_2 DK SW package (STSW-BLUENRG1-DK) supporting
BLE stack v2.x family.
AL-IDB008Vx, STEVAL-IDB009Vx kit platforms. Then, you can set a connection up
o measure the BlueNRG-1,
UM2071 - Rev 12
page 41/94
BLE master and slave multiple connection demonstration application
18BLE master and slave multiple connection demonstration
application
This application provides a basic example of multiple connections scenario: a device configured as master and
slave which uses a specific formula to calculate the proper advertising, scanning and connection parameters for
handling, at same time, BLE connections with slave and master devices.
It is supported by the BlueNRG-1, BlueNRG-2 development platforms (STEV
STEV
AL-IDB009Vx).
18.1Application roles
The demonstration application defines two device roles:
1.Master_Slave device role
2.Master device role
The slave devices can be configured through the Slaves_Num_Slaves.py python script, provided in the
application src folder
package.
18.1.1Master_Slave device role
The Master_Slave device role allows testing a multiple connection scenario using the
GET_Master_Slave_device_connection_parameters() formula provided in the ble_utils.c file.
This role configures the Master_Slave device as Central and Peripheral with one service and one characteristic,
and it simultaneously advertises and scans to connect to up to Num_Slaves BLE Peripheral/Slave devices
Slave1, Slave2, ...
Master devices, respectively
The Num_Slaves depends on the max. number of supported multiple connections (8) and the Num_Masters [0-2]
of the selected Master devices, that is: Num_Slaves = 8 - Num_Masters.
The user must define the expected number of slaves and master devices, by setting the pre-processor options:
•MASTER_SLAVE_NUM_MASTERS
•MASTER_SLAVE_NUM_SLAVES
, and using the BlueNRG Script Launcher utility available in the STSW-BNRGUI software
(which have defined the same service and characteristic) and to up to Num_Masters Central/
.
AL-IDB007Vx,STEV
UM2071
AL-IDB008Vx,
The user can also set the requested minimal scan window and additional sleep time, respectively, through the
preprocessor options:
•MASTER_SLAVE_SCAN_WINDOW
•MASTER_SLAVE_SLEEP_TIME
Note:The default configuration is:
•Num_Masters = 1
•Num_Slaves = 6
•Slave_Scan_Window_Length = 20
•Slave_Sleep_time = 0
Once slaves and devices are connected, the BLE Master_Slave device receives characteristic notifications from
Num_Slaves devices and it also notifies characteristics (as Peripheral) to the Num_Masters BLE Master devices
(if any) which display the related received slave index value.
Num_Slaves devices notified characteristic value is: <slave_index><counter_value>, where
slave_index is one byte in the range [1 - Num_Slaves] and counter_value is a two-byte counter starting
from 0.
18.1.2Master role
The master device role simply configures a BlueNRG-1, BlueNRG-2 device as a Master device looking for the
Master_Slave device in advertising with the advertising name of advscan.
Once the Master device finds the advscan device, it establishes a connection to it and enables the characteristic
notification. Notifications from Num_Slaves devices are notified to the Master device through the Master_Slave
device.
This application provides a basic example of Bluetooth low energy controller privacy feature with BLE master and
slave devices. Controller Privacy requires 32 MHz high speed crystal on the selected platforms.
It is supported by the BlueNRG-2 development platforms (STEV
IDB009Vx).
AL-IDB007Vx, STEV
19.1Application scenario
The application scenario is based on two devices, master and slave, configured with aci_gap_init(privacy
flag = 0x02), which should perform the following macro steps:
1.Initially, master and slave devices have no info on their security database: the two devices should connect
and make a paring and bonding (fixed key: 123456).
2.
Once the bonding is completed, the slave calls the aci_gap_configure_white_list() API to add its
bonded device address to the controller's white list.
3.Both devices add their bonded device address and type to the list of resolvable addresses by using the API
aci_gap_add_devices_to_resolving_list().
4.The master device enables the slave characteristic notification. After the first connection and the pairing/
bonding phase, devices disconnect.
5.The slave enters undirected connectable mode (aci_gap_set_undirected_connectable() API) with
its own address type = resolvable address and white list = 0x03 as advertising filter policy.
6.The master device performs a direct connection to the detected slave device, which accepts the connection
since the master address is on its white list: the two devices reconnect and the slave starts a notification
cycle to the master.
Note:When the connection is established, if you press the BLE platform button PUSH1 on one of the two devices, it
disconnects and the slave enters the undirected connectable mode with filtering enabled
(WHITE_LIST_FOR_ALL). This implies that the slave device accepts connection requests only from devices on
its white list: the master device is still able to connect to the slave device; any other device connection request is
not accepted from the slave device.
AL-IDB008Vx, STEV
AL-
UM2071 - Rev 12
page 43/94
UM2071
BlueNRG-1, BlueNRG-2 peripheral driver examples
20BlueNRG-1, BlueNRG-2 peripheral driver examples
The BlueNRG-1, BlueNRG-2 peripheral driver examples applications are supported respectively by the
BlueNRG-1, BlueNRG-2 development platforms (STEV
The kit contains a set of examples demonstrating how to use the BlueNRG-1, BlueNRG-2 device peripheral
drivers ADC, GPIOs, I²C, RTC, SPI, Timers, UART and WDG.
Note:On all the following sub-sections, any reference to the BlueNRG-1 device and the related kit platform STEVAL-
IDB007Vx (with x=1, 2) is also valid for the BlueNRG-2 device and the related kit platform STEVAL-IDB008Vx
(with x=1, 2) and STEVAL-IDB009Vx (x =1).
AL-IDB007Vx, STEV
20.1ADC examples
ADC polling: conversion is managed through the polling of the status register. The systick timer is used to have a
delay of 100 ms between two samples. Each sample from ADC is printed through UART (USB-to-SERIAL must
be connected to the PC). The default input is the differential ADC1-ADC2.
ADC DMA: conversion is managed through the ADC DMA channel. The systick timer is used to have a delay of
100 ms between two samples. Each sample from ADC is printed through UART (USB-to-SERIAL must be
connected to the PC).
ADC PDM: this example shows a PDM stream processor from a MEMS microphone (MP34DT01-M) to UAR
The application also supports the MP34DT01-M MEMS microphone available on the X-NUCLEO-CCA02M1
evaluation board (refer to the related BlueNRG-1 DK software package ADC PDM doxygen documentation for
hardware connection setup).
You are requested to connect the BLE platform to a PC USB port and open PuTTY serial terminal [512000, 8-N-1N], which has to be configured to store the captured data in a log file.
After the data have been captured, the PC Audacity tool can be opened to import the streamed data, following
these steps:
•File/Import/Raw Data.
•Open the log data.
•Configure as follows:
–Encoding: Signed 16-bit PCM.
–Byte order: Little-endian.
–Channels: 1 Channel (Mono).
–Sample rate: 8000 (default, 16 kbps is supported by changing the firmware symbol FS in
ADC_PDM_main.c)
–Press the button Import.
•Play the audio.
Note:As the output data format is two-bytes (B1B2), the serial terminal might get, as first byte, half data (B2).
Therefore, this first byte must be removed from the log file.
AL-IDB008Vx, STEV
AL-IDB009Vx).
T.
20.2Flash example
Data storage:
demonstrates basic flash operations as erase, write and verification.
20.3GPIO examples
Input interrupt: demonstrates the use of GPIO input interrupts.
•The PUSH1 button (IO13) is configured to generate the interrupt event on both edges of the input signal.
LED DL1 is toggled ON if the level is high and OFF if low.
The PUSH2 button (IO5) is configured to generate the interrupt event on the rising edge of the input signal.
•
LED DL2 is toggled ON/OFF at each rising edge event.
IO toggle: demonstrates GPIO state changes by toggling LEDs DL1 and DL2 every 500 ms.
IO wakeup: demonstrates device wakeup from standby mode using the GPIO interrupt.
UM2071 - Rev 12
page 44/94
•The PUSH1 button (IO13) is configured to generate the interrupt event on both edges of the input signal.
LED DL2 is toggled, the system becomes active and LED DL1 is toggled by the systick interrupt service
routine every 500 ms.
Once the device is in standby
clocks are down and the system voltages are at their minimum values. Therefore, it is necessary to wake the
system up via the IO9 (SDW clock signal) wake-up event. In this case, any connection attempt from the debugger
wakes the system up.
20.4I²C examples
In all the following examples, I²C is configured in master mode and its clock frequency is set to 10 kHz.
Master polling: I²C communication is controlled by polling the I²C status register content. This example involves
a master board with Master_Polling firmware code and a slave board with Slave_Polling firmware.
The Master board has a small command line interface through UAR
PC), which you can use to read and change the LED status of the slave board. I²C is used to transfer information
and change the status of the LEDs on the slave board.
Slave polling: I²C communication is controlled by polling the I²C status register content. This also involves a
master and a slave board with respective Master_Polling and Slave_Polling firmware. The slave board receives
read and change requests for the LEDs via I²C.
Master sensor: I²C communication is controlled by polling of I²C status register content, interrupts or DMA (three
ferent configurations). In this example, the LPS25HB
dif
at 1 Hz. The BlueNRG-1 polls the sensor status register and prints available pressure and temperature data via
UART (USB-to-SERIAL must be connected to the PC).
UM2071
I²C examples
, you cannot open a connection with the debug tool or download new code as the
T (USB-to-SERIAL must be connected to the
environmental sensor is configured to provide output data
20.5Micro examples
Hello world: example for the basic ‘BlueNRG-1 Hello W
PC USB port and open a specific PC tool/program (like T
message is displayed.
Sleep test: this test provides an example for the following BlueNRG-1 sleep modes:
•SLEEPMODE_WAKETIMER places the BlueNRG-1 in deep sleep with the timer clock sources running. The
wakeup sources type any character on the keyboard, the PUSH1 button or the sleep timer are configured
with a timeout of 5 s.
•SLEEPMODE_NOTIMER places the BlueNRG-1 in deep sleep with the sleep timer clock sources turned off.
Only the wakeup sources and the PUSH1 button type any character on the keyboard.
The demo supports some user commands:
•s: SLEEPMODE_NOTIMER - wakes UART/PUSH1 on
•t: SLEEPMODE_WAKETIMER - wakes UART/timeout 5 s/PUSH1 on
The BlueNRG-1
platforms. It provides a basic example on how to use the available PKA driver APIs to perform a basic PKA
processing and check the results.
The Public Key Accelerator (PKA) is a dedicated hardware block used for computation of cryptographic public key
primitives related to ECC (Elliptic curve cryptography).
Note:This peripheral is used by the BlueNRG-1, BlueNRG-2 Bluetooth low energy stack during the security pairing
procedures, so the user application must not use it in the meantime.
PKA demonstration application is supported by the BlueNRG-1, BlueNRG-2 development
UM2071 - Rev 12
page 45/94
The PKA demonstration application performs the following steps:
1.
Starting from the PKA known point on the ellipse PKS_SetData() with
and from a random generated keyA, it performs a PKA process which generates a new point A on the
ellipse.
2.
The same process is repeated from a new generated random keyB, leading to a new point B on the ellipse.
3.A new PKA process starts using the keyA with the point B coordinates. This generates a new point C which
is still on the same ellipse.
20.72.4 GHz radio proprietary examples
The radio low level driver provides access to the BlueNRG-1, 2 device 2.4 GHz radio to send and receive packets
without using the Bluetooth link layer
The available 2.4 GHz radio proprietary examples are:
•AutomaticChMgm
channel.
•Beep, a TX only example where the device continuously sends a packet in three different channels.
•BeepMultiState, a TX only example with multi state functionality.
•Chat, point-to-point communication generating a two-way chat.
•ChatEncrypt, as the previous example, but with the encryption enabled.
•RemoteControl, a basic remote control scenario; by pressing the PUSH1 button on the device makes
toggle the LED1 on the receiver device.
•Sleep, demonstrates point-to-point communication with sleep management.
•Sniffer, a sniffer application in a selected channel and a defined NetworkID.
•SnifferMultiState, a sniffer application with multi state functionality.
•StarNetwork, a star network example where a Master asks for packets to the slaves of the network.
•TxRx, point-to-point communication with computation of packet error rate (PER).
•TxRxDoublePacket, point-to-point communication where a payload greater than 32 bytes is exchanged.
•Throughput TX, RX, throughput test example (unidirectional with one TX and one RX device, and
bidirectional with two TX devices and one RX device)
•OTA Client, Server, 2.4 GHz proprietary radio demonstration application showing the 2.4 GHz proprietary
radio Over-the-Air FW upgrade support functionality (Client and Server configurations)
, a TX only example where the ActionT
.
UM2071
2.4 GHz radio proprietary examples
PKA_DATA_PCX, PKA_DATA_PCY
ag INC_CHAN is used to automatically change the
20.8RNG examples
Terminal: shows how to use the RNG. It gets the RNG values and prints them on the terminal.
20.9RTC examples
Clock watch: implements both R
The R
TC timer generates the 500 ms interrupt interval. The LED DL1 state is toggled in the RTC interrupt handler
to signal proper RTC timer operation.
The RTC clockwatch is also enabled with the system time and date set to December 1st 2014, 23 h 59 m 31 s.
The RTC clockwatch match registers are then set to December 2nd 2014, 0 h 0 m 1 s. As soon as the RTC
clockwatch data register and match registers coincide (30 s after device power up), the RTC clockwatch match
interrupt is generated and LED DL2 is toggled to signal the event.
Time base: the RTC is configured in the periodic timer mode, the load register (RTC_TLR1) value is set and the
RTC is enabled. Whenever the RTC timer reaches the value 0x00, it generates an interrupt event and the timer
value is automatically reloaded from the RTC_TLR1 register, which is set to generate the interrupt every 1 s. The
LED DL1 is toggled at each interrupt event.
Time base pattern: periodic mode is used with a pattern configuration. The RTC is configured in the periodic
timer mode and register RTC_TLR1 is set to generate a 1 s interval, while RTC_TLR2 is set to generate a 100 ms
interval.
The RTC is then enabled and, whenever the RTC timer reaches the value 0x00, it generates an interrupt and the
timer value is automatically reloaded from register RTC_TLR1 or RTC_TLR2 register depending on the pattern
register setting.
TC timer and R
TC clockwatch.
UM2071 - Rev 12
page 46/94
The pattern is set to 0b11110010 and its size to 8 bits, so the RTC generates four intervals with the RTC_TLR1
value followed by two R
LED DL1 (IO6).
RTC virtual timer
virtual timer is used to wait for 30 seconds, then LED2 turns on and the application stops. Sleep mode is used. A
wakeup handled by the BLE stack is generated every 10.24 seconds.
20.10SPI examples
The following SPI application examples are available:
Master polling: involves a master board with the Master_Polling firmware code and a slave board with the
Slave_Polling firmware. The Master board has a small command line interface through UART (USB-to-SERIAL
must be connected to the PC), which you can use to read and change the LED status of the slave board via SPI.
The SPI is configured in master mode and the SPI clock set to 100 kHz. The data is transferred in the Motorola
format with an 8-bit data frame, with clock low when inactive (CPOL=0) and data valid on clock trailing edge
(CPHA = 1).
Slave polling: SPI communication is controlled by polling the SPI status register content. This also involves a
master and a slave board with respective Master_Polling and Slave_Polling firmware. The slave board receives
read and change requests for the LEDs via SPI.
The SPI is configured in slave mode and the SPI clock set to 100 kHz. The data is transferred in the Motorola
format with an 8-bit data frame, with clock low when inactive (CPOL=0) and data valid on clock trailing edge
(CPHA = 1).
Master sensor: SPI communication is controlled by polling of the SPI status register content, interrupts or DMA
(3 different configurations). SPI is used to communicate with the LSM6DS3 inertial sensor SPI interface.
Whenever the sensor generates an IRQ, the accelerometer and gyroscope output data are read and printed
through UAR
The SPI is configured in master mode and the SPI clock set to 100 kHz. The data is transferred in the Motorola
format with an 8-bit data frame, with clock low when inactive (CPOL=0) and data valid on clock trailing edge
(CPHA = 1).
Master DMA: SPI communication is controlled by DMA of the SPI status register content. It involves a master
board with the Master_Dma firmware code and a slave board with the Slave_Dma firmware. The Master board
has a small command line interface through UART (USB-to-SERIAL must be connected to the PC), which you
can use to read and change the LED status of the slave board via SPI.
The SPI is configured in master mode and the SPI clock set to 100 kHz. The data is transferred in the Motorola
format with an 8-bit data frame, with clock low when inactive (CPOL=0) and data valid on clock trailing edge
(CPHA = 1).
Slave DMA: SPI communication is controlled by DMA of the SPI status register content. It involves a master
board with the Master_Dma firmware code and a slave board with the Slave_Dma firmware. The slave board
receives read and change requests for the LEDs via SPI.
The SPI is configured in slave mode and the SPI clock set to 100 kHz. The data is transferred in the Motorola
format with an 8-bit data frame, with clock low when inactive (CPOL=0) and data valid on clock trailing edge
(CPHA = 1).
SPI 3 wires: demonstrates the SPI 3 wires communication for reading humidity and temperature data from the
HTS221 humidity sensor. In this example, the evaluation board for HTS221, STEVAL-MKI141V2, is used. The
SPI clock frequency is set to 100 kHz. The data is transferred in the Microwire format and the data frame size is 8
bits.
T (USB-to-SERIAL must be connected to the PC).
UM2071
SPI examples
TC_TLR2 value intervals. The pattern repeats itself and the R
: it shows how to emulate an RTC using the virtual timer (working on sleeping mode). The
TC interrupt routine toggles
20.11SysTick examples
Time base: the interrupt service routine toggles the user LEDs at approximately 0.5 s intervals.
20.12Timers examples
Mode 1: T
rate selected by the Timer/Counter 1 clock selector
alternately from the TnCRA (first reload) and TnCRB registers and count down begins from the loaded value.
UM2071 - Rev 12
imer/Counter 1 (TnCNT1) functions as the time base for the PWM timer and counts down at the clock
. When an underflow occurs, the timer register is reloaded
page 47/94
UM2071
Timers examples
Timer/Counter 2 can be used as a simple system timer, an external-event counter, or a pulse-accumulate counter.
Counter TnCNT2 counts down with the clock selected by the T
configured to generate an interrupt upon underflow
.
imer/Counter 2 clock selector
MFTX1 and MFTX2 use prescaled clock as Timer/Counter 1. The IO2 pin is configured as output, generating a
signal with 250 ms positive level and 500 ms negative level via MFTX1. The IO3 pin is configured as output,
generating a signal with 50 ms positive level and 100 ms negative level via MFTX2.
Timer/Counter 1 interrupts upon reload are enabled for MFTX1 and MFTX2; interrupt routines toggle LED DL1 for
MFTX1 and LED DL2 for MFTX2.
Mode 1a (pulse-train mode): the Timer/Counter 1 functions as PWM timer and Timer/Counter 2 is used as a pulse
counter that defines the number of pulses to be generated.
In this example, MFTX2 is configured to generate 30 pulses with positive level of 500 ms and negative level of
250 ms. MFTX2 uses prescaled clock as Timer/Counter 1. The IO3 pin is configured as output generating the
number of pulses configured.
Interrupts TnA and TnB are enabled and toggle GPIO 8 and 10, while Interrupt TnD is enabled and sets GPIO 7.
A software start trigger or external rising or falling edge start trigger can be selected. This example uses a
software trigger which is generated after system configuration.
Timer/Counter 1 interrupts on reload are enabled for MFTX1. Interrupt routines toggle LED DL1 for MFTX2.
Mode 2 (dual-input capture mode): Timer/Counter 1 counts down with the selected clock and TnA and TnB pins
function as capture inputs. Transitions received on the TnA and TnB pins trigger a transfer of timer content to the
TnCRA and TnCRB registers, respectively. Timer/Counter 2 counts down with selected clock and can generate an
interrupt on underflow.
In this example, MFTX1 is used. The CPU clock is selected as the clock signal for Timer/Counter 1 and a
Prescaled clock is used as the clock source for Timer/Counter 2.
Sensitivity to falling edge is selected for TnA and TnB inputs; counter preset to 0xFFFF is disabled for both inputs.
The IO2 pin is internally connected to TnA input (MFTX1) and the IO3 pin is internally connected to TnB input
(MFTX1).
Interrupts TnA and TnB are enabled and triggered by transitions on pins TnA and TnB, respectively. The interrupt
routine records the value of TnCRA or TnCRB and calculates the period of the input signal every second interrupt.
Interrupt TnC is enabled and is triggered on each underflow of Timer/Counter1; it increments the underflow
counter variables used to calculate the input signal period.
LED DL1 is toggled ON if a frequency of about 1 kHz is detected on IO2, and LED DL2 is toggled ON if a
frequency of about 10 kHz is detected on IO3.
Mode 3 (dual independent timer/counter): the timer/counter is configured to operate as a dual independent
system timer or dual external-event counter. Timer/Counter 1 can also generate a 50% duty cycle PWM signal on
the TnA pin, while the TnB pin can be used as an external-event input or pulse-accumulate input, and serve as
the clock source to either Timer/Counter 1 or Timer/Counter 2. Both counters can also be operated from the
prescaled system clock.
In this example MFTX1 is used. The CPU clock is selected as the clock signal for Timer/Counter 1, while Timer/
Counter 2 uses an external clock on TnB pin. Sensitivity to rising edge is selected for TnB input. Timer/Counter 1
is preset and reloaded to 5000, so the frequency of the output signal is 1 kHz. Timer/Counter 2 is preset and
reloaded to 5.
The IO3 pin is internally connected to TnA input (MFTX1), while the IO2 pin is configured as output and
configured as the PWM output from Timer/Counter 1.
The LED DL1 is toggled in the main program according to a variable which is changed in TnD interrupt routine.
Interrupt TnA and TnD are enabled and are triggered on the underflow of Timer/Counter1 and Timer/Counter2
respectively.
Mode 4 (input-capture plus timer): is a combination of mode 3 and mode 2, and makes it possible to operate
Timer/Counter 2 as a single input-capture timer, while Timer/Counter 1 can be used as a system timer as
described above.
In this example, MFTX1 is used. The CPU clock is selected as the input clock for Timer/Counter 1 and Timer/
Counter 2. Automatic preset is enabled for Timer/Counter 2.
The IO2 pin is internally connected to the TnB input (MFTX1), while the IO3 pin is configured as the output and
configured as the PWM output from Timer/Counter 1.
Interrupt TnA is enabled and triggered on the underflow of Timer/Counter1; it sets a new value in the TnCRA
register. Interrupt TnB in enabled and triggered when a transition on TnB input (input capture) is detected; it saves
the TnCRB value. Interrupt TnD in enabled and it triggered on the underflow of Timer/Counter2.
, and can be
UM2071 - Rev 12
page 48/94
UM2071
UART examples
MFT timers: this example shows how configure peripherals MFT1, MFT2 and SysT
interrupts at dif
Software PWM signals: this example shows how three independent PWM signals can be generated driving
GPIO pins inside MFT interrupt handlers.
ferent rate: MFT1 at 500 ms, MFT2 at 250 ms and SysT
20.13UART examples
DMA: IO8 and IO11 are configured as UART pins and DMA receive and transmit requests are enabled. Each byte
received from UAR
the PC).
Interrupt: IO8 and IO11 are configured as UART pins and receive and transmit interrupts are enabled. Each byte
received from UART is sent back through UART in an echo application (USB-to-SERIAL must be connected to
the PC).
Polling: IO8 and IO11 are configured as UART pins. Each byte received from UART is sent back through UART
in an echo application (USB-to-SERIAL must be connected to the PC).
RXTimeout: it demonstrates the UART RX FIFO level and RX timeout functionality. The demo prints the data
received if the RX timeout expires or if the data received are ≥ the RX FIFO threshold.
T is sent back through UART in an echo application (USB-to-SERIAL must be connected to
20.14WDG examples
Reset: demonstrates the watchdog functionality and using it to reboot the system when the watchdog interrupt is
not serviced during the watchdog period (interrupt status flag is not cleared).
The watchdog is configured to generate the interrupt with a 15 s interval, then it is enabled and monitors the state
of the PUSH1 button (IO13 pin). Any change on this pin triggers the watchdog counter to reload and restart the 15
s interval measurement.
If the IO13 pin state does not change during this interval, the watchdog generates an interrupt that is intentionally
not cleared and therefore remains pending; the watchdog interrupt service routine is therefore called continuously
and the system is stuck in the watchdog interrupt handler
The chip is reset as it can no longer execute user code. The second watchdog timeout triggers system reboot as
a new watchdog interrupt is generated while the previous interrupt is still pending. The application then starts
measuring the 15 s interval again.
The three user LEDs are toggled at increasing frequencies until the board is reset or PUSH1 button is pressed,
which restores the LEDs toggling frequency with the 15 s watchdog timer.
Wakeup
interrupt whenever the counter reaches zero. The counter is then reloaded with the content of the WDT_LR
register. If the interrupt status flag is not cleared and a new interrupt is generated, then the watchdog may
generate a system reset.
This example demonstrates the use of the watchdog to periodically wake the system from standby mode using
the watchdog interrupt. The watchdog is configured to generate the interrupt at 1 s intervals. The watchdog is
then enabled and the system is switched to the standby mode. As soon as the watchdog interrupt is generated,
the system wakes up, LED1 (IO6 pin) is toggled and the device returns to standby mode. The IO6 pin is therefore
toggled every 1 s.
: The watchdog timer is a 32-bit down counter that divides the clock input (32.768 kHz) and produces an
ick to generate three timer
ick at 1 second.
.
UM2071 - Rev 12
page 49/94
UM2071 - Rev 12
21Schematic diagrams
page 50/94
Schematic diagrams
UM2071
DIO0
DIO12
DIO1
DIO7
DIO5
DIO0
RESETN
DIO2
DIO3
DIO8
DIO4
RESETN
DIO6
DIO3
DIO2
DIO11
DIO8
DIO11
ADC1
ADC2
DIO13
DIO14
TEST1
VBLUE
VBLUE
R250_0402
R1
0_0402
R20_0402
CN1
NC
1
2
3
4
5
6
7
8
9
10
R6
0_0402
R80_0402
R7
0_0402
R22
0_0402
R18
0_0402
R110_0402
R90_0402
R24
0_0402
R4
0_0402
R20
0_0402
R3
0_0402
R13
0_0402
R12
0_0402
CN4
NC
1
2
3
4
5
6
R14
0_0402
R15
0_0402
R19
0_0402
R17
0_0402
CN3
NC
1
2
3
4
5
6
7
8
R10
0_0402
CN2
NC
1
2
3
4
5
6
7
8
R16
0_0402
R5
0_0402
R21
0_0402
R23
0_0402
UM2071 - Rev 12
21.1STEVAL-IDB007V1 schematic digrams
Figure 24. STEVAL-IDB007V1 Arduino connectors
page 51/94
Schematic diagrams
UM2071
ST Link: 3.0-3.6V, 5V tolerant
IAR J-Link: 1.2-3.6V, 5V tolerant
Male Connector
2x10 HDR straight
RS 473-8282
JTAG
JTMS-SWTDIO
JTCK-SWTCK
DIO0
DIO1
RESETN
GND
VBLUE
CN7
SWD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
1920
UM2071 - Rev 12
Figure 25. STEVAL-IDB007V1 JTAG
page 52/94
Schematic diagrams
UM2071
Solder a 10u_0805 between 1-2
or a 0R0_0805 between 1-3
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST
products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST
products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of
Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST
names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
. For additional information about ST trademarks, please refer to www