STM32WBA Bluetooth® LE – Power Consumption applications

Revision as of 10:12, 22 February 2024 by Registered User (→‎Advertising Power measurement)


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 products[1] offering users fully flexible applications for power measurement purposes.

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.

Both applications are available under STM32CubeWBA firmware package [2]

Bluetooth® LE Power Profile & STM32WBA
STM32WBA P2P Profile


The following figure describes the Application Service structure:

Data Throughput is exported as a Service​

  • POWER_TX UUID characteristic:​

Transfer preconfigured data from Client to Server for power consumption measurement​

  • POWER_RX UUID characteristic:​

Transfer preconfigured data from Server to Client for power consumption measurement

Bluetooth® LE Power Service Structure
BLE Power Service Structure


Combining the ability to run multiple application scenarios and measure power consumption, the STM32WBA Power Consumption tool offers an overview of software/hardware configurations and recommendations to test and achieve the best power consumption.

STM32CubeMonitor-Power & STM32WBA Power Consumption measurement.
STM32WBA Power Consumption


2. STM32WBA BLE Power application requirements

2.1. STM32WBA Software and Hardware board requirement

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.
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[3]. 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.

For more details on how to build an STM32WBA Bluetooth® Low Energy project you can refer to STM32WBA_Build_BLE_Project

2.2. Power Measurement Setup : Software Requirements

In order to measure the NUCLEO-WBA5xx Power consumption the STM32CubeMonitor-Power [4] will be used. for more details you can refer to the STM32CubeMonitor-Power User Manual [5]

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 [6] or the STLINK-V3PWR [7]. For the following topic the focus will be on the STLINK-V3PWR.

Power Consumption Hardware Boards
Power Consumption Hardware Boards


Power measurement setup overview:

Power Consumption Setup


  • Connect the STlink-V3PWR GND to the STM32WBA5xx GND.
  • Remove STM32WBA5xx Jumper JP2
  • Connect the STLINK-V3PWR OUT to the STM32WBA5xx JP2 pin 2:
Power Consumption : NUCLEO-WBA5xx Connection


3. BLE Power Consumption application presentation

3.1. BLE Power Consumption application setup overview

In order to avoid extra power consumption, the application have 2 phases:

  • A Setup phase : not in low power, all buttons are active for configuration
  • A Power measurement phase : enter in low power, 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

The following chapter describes 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(*)
General Parameters Application default configuration Application defines variables Comments
Tx Power Value (0x19) -0.3 dBM #define CFG_TX_POWER (0x19) /
Low power mode Standby mode #define CFG_LPM_STDBY_SUPPORTED (1)

#define CFG_LPM_STOP_SUPPORTED (0)

#define CFG_LPM_SLEEP_SUPPORTED (0)
The application offer 3 low power modes, only one low power mode must be selected
Core Voltage selection SMPS is selected #define CFG_CORE_SUPPLY(PWR_SMPS_SUPPLY) for STM32WBA55 SMPS or LDO power supply can be selected
Setup Time 10 seconds #define Setup_Time 10000 Time before the application disable all the GPIOs for reduced power consumption(**)
  • (*) Defines are available in app_conf.h
  • (**) GPIOs configured in analog mode to avoid Schmitt trigger's extra power consumption. For more detail you can refer to STM32 microcontroller GPIO hardware settings and low-power consumption Application Note [8]

3.2.2. Advertising Power measurement

After reset, the BLE Power Peripheral start advertising. The following table summarize the application's possible configuration during advertising/not connected state.

BLE Peripheral Advertising configuration(*)
Advertising Configuration Default configuration Application defines variables Comments
Advertising Type

(Pressing B3)
After reset the application start advertising in ADV_IND Pressing button B3 switch to ADV_NONCONN_IND / /
Advertising Interval

(Pressing B2)
After reset the advertising period is 80ms Pressing button B2 to switch to Low Power Advertising interval 1280 ms #define ADV_INTERVAL_MIN (0x0080)

#define ADV_INTERVAL_MAX(0x0080)

#define ADV_LP_INTERVAL_MIN(0x0800)

#define ADV_LP_INTERVAL_MAX(0x0800)
Time between each Advertising packet Time(s) = ADV_INTERVAL x 0.625
Advertising data The Advertising PDU size is 20 Bytes #define ADV_Size 20 Advertising PDU can be up to 31 byte and a minimum of 8 bytes for the application use case(**)
  • (*) Variables default values can be modified under app_conf.h.
  • (**) 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:

Connectable Advertising power consumption in running phase (Exit from Standby)


Notes:

  • By default the application is in VOS range 2 after exiting low power state, it is mandatory to switch to VOS range 1 before starting radio activity.

for more detail you can refer to the dedicated product Reference Manual [9]

  • For more detail on Low power management you can refer to STM32WBA Low power Management
  • Depending on the application requirement, some parameters can be modified for power consumption simulation.

Here is 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 :

  • By default the application is in VOS range 2 after exiting low power state, it is mandatory to switch to VOS range 1 before starting radio activity.

for more detail you can refer to the dedicated product Reference Manual.

  • For more detail on Low power management you can refer to STM32WBA Low power Management
  • 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 made using the BLE Toolbox mobile app or the BLE Power Central via a second STM32 hardware board. In this chapter the focus will be on ST BLE toolbox[3] 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
General Parameters Application default configuration Application defines variables Comments
Data transfer

(Pressing B1)
When connection is established data transfer is off. Pressing button B1 Toggle 20bytes Data transfers each Notification packet interval = 1000ms From Peripheral to Central #define NOTIFY_TX_INT_MS 1000 //Notification packet interval

#define USER_PAYLOAD_LENGTH 20 // packet size 20 bytes
Data packet transfer can be up to 244 bytes
LE PHY

(Pressing B2)
Default selected PHY after connection is 1M Pressing button B2 toggle PHY to 2M / /
Connection interval

(Pressing B3)
Default connection interval is 50ms. Pressing button B3 toggle connection interval to 200ms #define CONN_INT_REQ 50

#define CONN_INT_LP_REQ 200
Switching connection interval is an L2CAP connection update request

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.
  • After enabling notification, pressing button 1 to toggle data transfer each 1 second.
Enabling Data transfer


3.3. BLE Central Power Overview

The following chapter will focus on 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(*)
General Parameters Application default configuration Application defines variables Comments
Tx Power Value (0x19) -0.3 dBM #define CFG_TX_POWER (0x19) /
Low power mode Standby mode #define CFG_LPM_STDBY_SUPPORTED (1)

#define CFG_LPM_STOP_SUPPORTED (0)

#define CFG_LPM_SLEEP_SUPPORTED (0)
The application offer 3 low power modes, only one low power mode must be selected
Core Voltage selection SMPS is selected #define CFG_CORE_SUPPLY(PWR_SMPS_SUPPLY) for STM32WBA55 SMPS or LDO power supply can be selected
Setup Time 10 seconds #define Setup_Time 10000 Time before the application disable all the GPIOs for reduced power consumption(**)
  • (*) Defines are available in app_conf.h
  • (**) GPIOs configured in analog mode to avoid Schmitt trigger's extra power consumption. For more detail you can refer to STM32 microcontroller GPIO hardware settings and low-power consumption Application Note [8]

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(*)
General Parameters Application default configuration Application defines variables Comments
Data transfer

(Pressing B1)
When connection is established data transfer is off. Pressing button B1 Toggle 244bytes Data transfers each Write Data interval = 1000ms From Central to Peripheral #define WRITE_TX_INT_MS 1000 //Write data interval

#define USER_PAYLOAD_LENGTH 244
Data packet transfer can be up to 244 bytes
Connection interval

(Pressing B3)
Default connection interval is 50ms. Pressing button B3 toggle connection interval to 200ms #define CONN_INT 50

#define CONN_INT_LP 200
/

(*) defines are available in app_conf.h

4. References