Skip to main content
Associate II
September 1, 2024
Solved

STM32WB BLE Advertising High Consumption

  • September 1, 2024
  • 2 replies
  • 1700 views

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.

 

 

Best answer by EPASZ.1

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.

2 replies

STTwo-32
Technical Moderator
September 1, 2024

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 

Associate II
September 1, 2024

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.

STTwo-32
Technical Moderator
September 2, 2024

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

EPASZ.1
EPASZ.1Best answer
ST Employee
September 4, 2024

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.

Associate II
September 4, 2024

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