cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32WB custom BLE example issue with low power

AHame
Associate III

Hi,

I'm trying to get the STM32WB custom BLE example working in low power mode with no success.

Running the stock example from the latest version (1.15.0) with no modifications except the following in the app.conf:

#define CFG_LPM_SUPPORTED  1

#define CFG_DEBUGGER_SUPPORTED  0

#define CFG_DEBUG_BLE_TRACE   0

#define CFG_DEBUG_APP_TRACE   0

The application works but for some reason the CortexM4 never stays in stop2 mode, it skips right over the __WFI in the sequencer Idle function. I can confirm it doesn't stay in stop2 because I added a toggling IO to see when CM4 is sleeping and it is always togglling.

From my understanding once the BLE stack is started, CPU1 should be able to stay in stop2 mode ( not toggling the IO) while CPU2 is still advertising, right?

Or maybe my understanding is wrong and CPU2 does indeed need to wakeup CPU1 on every advertising packet? Which would be contradictory to what is explained in this tutorial video on measuring power consumption (Video 14 on the stm32wb series tutorial)

So if someone from ST could clarify I would greatly appreciate. It is a bit hard to figure out what is truly happening behind the scene since CPU2 is a "black box"

Going further:

I know that stop2 is a system state that can only be acheived when the CPU1, CPU2 and RF are in CSTOP. But what does that really means for the CM4 (CPU1) In clear terms? Does it mean that the CPU1 will get woken up by CPU2 on every RF activity via the IPCC channel interrupts?

I am asking because, digging deeper I can see that there are always interrupts pending on the IPCC channels

Can anyone confirm that the custom example is working in low power mode?

P.S: I know the heart rate example is the reference low power example but for my application I need custom characteristics.

Thanks!

3 REPLIES 3
AHame
Associate III

The tutorial video in question mentionned above that confuses my understanding:

https://www.youtube.com/watch?v=7IVs-nuoXj8

AHame
Associate III

If you guys have a chance, I would really like to get clarification on my above question on how to get low power working with custom services based on the custom example.

@Remi QUINTIN​ 

@Remy ISSALYS​ 

@Christophe Arnal​ 

Remy ISSALYS
ST Employee

Hello,

Starting from BLE_Custom project available in STM32CubeWB package v1.15.0, to allow the application to perform stop2 you should change the following define like that:

#define CFG_LPM_SUPPORTED  1
#define CFG_DEBUGGER_SUPPORTED  0
#define CFG_DEBUG_BLE_TRACE   0
#define CFG_DEBUG_APP_TRACE   0

And turn off the green led in app_entry.c file by remove the following line:

BSP_LED_On(LED_GREEN);

And unplug jumpers present on JP5 in order to reach best current measurements. With these modifications, you should reach 3uA between each advertising packet.

CPU2 doesn't need to wakeup CPU1 on every advertising packet, when CPU2 advertises CPU1 stays in stop2 mode.

Best Regards