4
Firmware initialization and configuration
This section describes the available function APIs for application development based on Mesh network over
Bluetooth Low Energy devices.
The Mesh over BLE library manages the following features:
•
Creates the Mesh network between nodes
•
Handles the unicast, broadcast addressing
•
Manages the relay feature: all the packets whose destination address is for another node are re-transmitted
•
Communication with devices for advanced features, such as provisioning and proxy service
•
Handles the platform specific communication
The user application handles the following
•
Initialization of the Mesh stack
•
User callbacks required for the application
•
Application handling
The following sections describe the requirements for initialization and configuration of the firmware.
4.1
BlueNRG cold start configuration
Concerning the
BlueNRG-1
and
BlueNRG-2
devices, certain parameters must be defined on BLE device
controller registers during the device initialization phase, after the device powers on:
•
High speed crystal configuration: 32 or 16 MHz
•
Low speed crystal source: external 32 kHz oscillator or internal RO
•
SMPS: on or off (if on: 4.7 μH or 10 μH SMPS inductor)
The
BlueNRG-1
,
BlueNRG-2
controllers are configured in the project C/C++ Preprocessor settings.
For example:
•
for IAR, go to Project → Options → C/C++ Compiler → Preprocessor → Defined Symbols
•
For Keil, go to Project → Options → C/C++ → Preprocessor Symbols → Define
The following symbols are used in the project: USER_DEFINED_PLATFORM=STEVAL_IDB007V1:
•
HS_SPEED_XTAL=HS_SPEED_XTAL_16MHZ
•
LS_SOURCE=LS_SOURCE_EXTERNAL_32KHZ
•
SMPS_INDUCTOR=SMPS_INDUCTOR_10 uH.
These can be changed to suit your hardware design.
RELATED LINKS
1.3 STEVAL-IDB008V1 or STEVAL-IDB008V2 BlueNRG2 board setup on page 2
1.4 STEVAL-IDB007V1 BlueNRG1 board setup on page 3
4.2
Setting the transmit power of a node
You can define the transmit power of a node by initializing a callback to the Mesh library. It runs in the following
manner:
{
Appli_BleStackInitCb,
Appli_BleSetTxPowerCb,
Appli_BleGattConnectionCompleteCb,
Appli_BleGattDisconnectionCompleteCb,
Appli_BleUnprovisionedIdentifyCb,
UM2295
Firmware initialization and configuration
UM2295
-
Rev 1
page 14/35