cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB BLE Advertising High Consumption

MichalPesko
Associate III

Hello, i am trying to reproduce this demonstration https://www.youtube.com/watch?v=7IVs-nuoXj8&t=439s on a custom WB55 board (WB55CGU6). In the video, the advertising consumes about 10 mA. In my case, it is close to 20 mA. Snímka obrazovky 2024-09-01 174150.png

 

 

 

I though changing the CFG_TX_POWER would help, but it does not change the consumption. How to actually set the TX power of the BLE transceiver? Getting the consumption down to 10 mA would really help.

 

#define CFG_TX_POWER                      (0x19) /* 0dBm */

#define CFG_BLE_MIN_TX_POWER            (0)

#define CFG_BLE_MAX_TX_POWER            (0)

 

There are 3 parameters in app_conf.h, which are a bit confusing and I wonder how they differ.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
EPASZ.1
ST Employee

Using CFG_TX_POWER to adjust the output power should go without issue. But the most straightforward way is to use the aci_hal_set_tx_power_level(1, CFG_TX_POWER); function with a different second parameter. Here I switch between two levels in the p2p_server example.

You can search for the above function in the code generated for your project to verify that it is actually called with the correct CFG_TX_POWER parameter.

EPASZ1_0-1725435840118.png

As for the difference between your consumption and what is achievable on a Nucleo - this is as STTwo-32 has said. It can depend on HW and the best way is to run you project on a Nucleo to verify this.

View solution in original post

5 REPLIES 5
STTwo-32
ST Employee

Hello @MichalPesko 

What i see is Normal since you are not using the same design. You may have to ensure that your design is not impacting the power consumption. You may have to test this on the Nucleo board to have almost the same values

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks, but is there any info how to actually set the TX power level? In CubeMX, one can set the CFG_TX_POWER macro desired level, but the other two macros remain 0. Are they not relevant? It is quite confusing.

CFG_BLE_MIN_TX_POWER and CFG_BLE_MAX_TX_POWER are the parameters that set the Minimum and Maximum transmit power in dBm supported by the Controller. The CFG_TX_POWER is the parameter that set the TX Power of the node. So, the TX Power is set on CubeMX Throw CFG_TX_POWER under BLE Configuration tab:

STTwo32_0-1725278910527.png

Best Regards.
STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

EPASZ.1
ST Employee

Using CFG_TX_POWER to adjust the output power should go without issue. But the most straightforward way is to use the aci_hal_set_tx_power_level(1, CFG_TX_POWER); function with a different second parameter. Here I switch between two levels in the p2p_server example.

You can search for the above function in the code generated for your project to verify that it is actually called with the correct CFG_TX_POWER parameter.

EPASZ1_0-1725435840118.png

As for the difference between your consumption and what is achievable on a Nucleo - this is as STTwo-32 has said. It can depend on HW and the best way is to run you project on a Nucleo to verify this.

Thanks, that´s a really helpful example you provided.