1. BLE Power Consumption Profile
The BLE Power Consumption Profile is a Generic Attribute Profile (GATT) based low-energy profile defined by STMicroelectronics with proprietary UUIDs. Provided in Both applications BLE_Power_Peripheral and BLE_Power_Central on STM32WBA hardware boards it offer users a fully flexible applications for power measurement purpose.
- The BLE Power Peripheral
-
- In Advertising state : Used to measure power consumption with different possible configurations (Advertising type, Advertising interval,…)
- In Connected state : Used to measure power consumption in connected Idle or with data transfer.
- The BLE Power Central
-
- In Connected state : Used to measure power consumption in connected Idle or with data transfer.
Bluetooth® LE Power Profile & STM32WBA |
---|
Combining the ability to run multiple application scenarios and measuring its power consumption, the STM32WBA Power Consumption offer an overview of the software/Hardware configurations and recommendations to test and reach the best power consumption that we will discover through the following guide.
STM32CubeMonitor-Power & STM32WBA Power Consumption measurement. |
---|
2. STM32WBA BLE Power application requirements
2.1. STM32WBA Hardware board
In order to measure the STM32WBA power consumption the NUCLEO-WBA5xx board is the best candidate to run this setup due to its PCB optimization, reduced components and low cost.
- Depending on the targeted power consumption purpose one or two NUCLEO-WBA5xx hardware boards are required.
NUCLEO-WBA5xx Hardware Board. |
---|
- Measuring the BLE Power peripheral in Advertising state, only one Hardware board is required
- Measuring the BLE Power peripheral in Connected state, only one Hardware board is required if connected to smartphone via ST BLE toolbox. Or a second Hardware board is optional to connect to BLE Power Central.
- Measuring the BLE Power Central in Connected state ,two Hardware boards are required. One for the Central and another one for the Peripheral.
2.2. Power Measurement Setup : Software Requirements
In order to measure the NUCLEO-WBA5xx Power consumption we will use the ,STM32CubeMonitor-Power (create link to STM32CubeMonPwr) For more details on how to use it please refer to the User Manual UM2202(create link)
2.3. Power Measurement Setup : Hardware Requirements
For the Power measurement, STM32CubeMonitor-Power require to connect on one of the following Hardware boards the X-NUCLEO-LPM01A, the STLINK-V3PWR or the energy meter of the STM32L562E-DK Discovery. For the following topic we will focus on the STLINK-V3PWR.
Power Consumption Hardware Boards |
---|
Power Measurement setup overview:
Power Consumption Setup |
---|
Connect the Stlink-V3PWR GND to the STM32WBA5xx GND. Remove STM32WBA5xx JP2 and Connect the STLINK-V3PWR OUT to the STM32WBA5xx JP2 pin 2:
Power Consumption : NUCLEO-WBA5xx Connection |
---|
3. BLE POWER Application presentation
3.1. BLE POWER Application setup overview
The BLE Power Application is dedicated for Power consumption measurements. In order to avoid extra power consumption, the application have 2 phases:
- A Setup phase : application not in low power phase dedicated for configuration , all buttons are active for configuration
- A Power Measurement phase : application enter low power phase , all GPIOs are disabled
Application Trace is by default disabled to avoid extra power consumption.
BLE Power Application Overview |
---|
Note:
- During Setup Time, STM32WBA5xx STlink must be powered in order to use buttons.
- By default setup time is 10seconds duration, but it can be modified in app_conf.h "Setup_Time " define variable.
3.2. BLE Peripheral Power Overview
In the following chapter we will discover the application features and possible configurations. The application offers a default configuration. In order to align with user's application, listed defines in the following chapter can be modified depending on the needs.
3.2.1. Application general parameters
The following table defines the application general parameters.
BLE Peripheral Power General Parameters(1) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
(1) defines are available in app_conf.h
(2) GPIOs configured in analog mode to avoid Schmitt trigger's extra power consumption.
3.2.2. Advertising Power measurement
After Reset the BLE Power Peripheral start Advertising data packets. The following table summarize the application's possible configuration during advertising/not connected state.
BLE Peripheral Advertising configuration(1) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
(1)variables default values can be modified under app_conf.h.
(2) 8 bytes combine 5 bytes for the name and 3 bytes for the flags.
Advertising Power Consumption |
---|
Recommendations: Increasing the Advertising interval reduces the power consumption for a better battery life.
Zooming into the run mode activity shows the following graph: Note that Low Power mode state here is Standby.
Connectable Advertising power consumption in running phase (Exit from Standby) |
---|
Application configuration impact on power consumption and recommendation: Depending on the application requirement we can change some parameters for power consumption simulation. Here an example of:
- Low power mode : Stop mode
- Advertising Type : ADV_NONCONN_IND
Non-Connectable Advertising power consumption in running phase (Exit from Stop) |
---|
Notes :
- Depending on the application requirement stop mode have a higher power consumption during application low power mode phase than Standby but a faster wakeup.
- Lower advertising packet size reduce the ADV TX channels power consumption.
- During ADV_NONCONN_IND ADV RX channels are OFF.
3.2.3. Connected mode Power measurement
Connection to the Peripheral can be either be made using the BLE Toolbox mobile app or the BLE Power Central via a second STM32 Hardware board.In this chapter we will focus on BLE Toolbox mobile app connection.
Open your ST BLE ToolBox and start scanning for the application "PWR". Once scanned, press CONNECT to establish connection with the BLE Power Peripheral.
BLE ToolBox connection to PWR Peripheral |
---|
Idle Connection
When connection is established by default the PHY selected is 1M, Empty LE packet are sent from the Central to maintain the connection.
The delay between Empty LE packet is defined by connection interval.
Default Idle connection configuration | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Just like the Advertising interval, the connection interval have impact on the application power consumption. The following Figure shows the impact on power consumption by pressing B3 switching the connection interval from 50ms to 200ms.
Switching Connection Interval |
---|
Data transfer Connection
In order to Enable Data transfer , Notification must be enabled in the BLE Toolbox application.
Once done Pressing button 1 to toggle data transfer each 1s.
Enabling Data transfer |
---|
3.3. BLE Central Power Overview
In the following chapter we will discover the application features and possible configurations. The application offers a default configuration. In order to align with user's application, listed defines in the following chapter can be modified depending on the needs.
3.3.1. Application general parameters
The following table defines the application general parameters.
BLE Peripheral Power General Parameters(1) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
(1)variables default values can be modified under app_conf.h
Idle Connection
By default after reset the application initiate connection to the Peripheral. It is important, in the Power Central Project to define the address of the Peripheral device #define CFG_PERIPH_BD_ADDRESS
Peripheral BD Address |
---|
After reset, the BLE Power Central automatically connects to the BLE Power Peripheral.
Once connection is established empty packets are exchanged each 50ms.
The following Table summarize the possible configurations of the BLE Power Central application:
BLE Peripheral Power General Parameters(1) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
4. References