cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WBA52 Standby Mode Example

Jtron.11
Senior

Hello all,

Anyone successfully implemented the Standby Mode for STM32WBA52/55?  I am struggling going thru the examples and I wouldn't be able to enter the standby mode level.  My board still consume about 70mA when I enter the standby mode.  From the datasheet, it should be under 1uA with SRAM.

Thank you.

17 REPLIES 17
grohmano
ST Employee

Hello @Jtron.11,

yes, I tried your example code STM32WBA52_PWR_STANDBY_RTC.zip and measured 2,5 uA when using CubeIDE

 

Speaking of the SMPS, the HAL_PWREx_ConfigSupply function has to possible arguments, in your case, you want to use PWR_LDO_SUPPLY

/**
  * @brief  Configure the system Power Supply.
  * @param  SupplySource : Specifies the Power Supply source.
  *                        This parameter can be one of the following values :
  *                        @arg PWR_LDO_SUPPLY  : The LDO regulator supplies the Vcore Power Domains.
  *                        @arg PWR_SMPS_SUPPLY : The SMPS regulator supplies the Vcore Power Domains.
  * @retval HAL status.
  */
HAL_StatusTypeDef HAL_PWREx_ConfigSupply(uint32_t SupplySource)

 

The migrating itself is not described in any AN, but I have never met some major issues. The most important thing you need to pay more attention is that some peripherals may be on different pins of the MCU

Hi @grohmano ,

Can you please help to confirm in  your set up how do you provide power to your MCU and how did you measure the current either from external PS or using the onboard PS, which method "Current measurement with an ammeter" or "Current measurement with an external power supply" from UM3103 document?

2. My example STM32WBA52_PWR_STANDBY_RTC is ported from WBA v 1.8.0 and CubeMX V6.16 for my board, and when I try to buy the NUCLEO-WBA52CG, I saw the note this board is only supported by CubeWBA version up to v1.1.0 and CubeMX v6.9.2.

You don't see any problem for your board when you ran my example code?

Hi @grohmano ,

Good new that I found this example  from github

\stm32cubewba-v1-8-0\STM32Cube_FW_WBA_V1.8.0\Projects\NUCLEO-WBA55CG\Applications\Sequencer\Sequencer_gpio_toggle_lowpower

 

This version will be able to bring my board down to 25uA.

Do you know if there is any example similar like this version that will use the RTC to wake up the system and enter the standby mode instead of using STOPMode?

void UTIL_SEQ_Idle( void )
{
  HAL_SuspendTick();
  HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
  /* restore the system clock, when exits stop mode */
  HAL_ResumeTick();
  SystemClock_Config();
}

 

Hi @grohmano ,

I am still couldn't make the board going down to 2.5uA as your test.  I already order couple Nucleo-WBA52CG to try next week to test against my own custom PCBA.

Is it possible you can help me to create a very basic sequencer and timer to enter standby and wake up that you can use your Nucleo-WBA52CG to verify during standby mode it can go down ot 2.xuA?

I am actually stuck don't know what to do next for WBA52 implementation.

 

grohmano
ST Employee

Hello @Jtron.11,

so, from the beginning:

1) I use X-NUCLEO-LPM01A and STM32CubeMonitor-Power for the consumption measurement. You can also use STLINK-V3PWR or any other measuring method. The results should be the same.

2) Yes, even CubeWBA 1.8. works on WBA52CG and on the KG version will certainly work too. 

3) With the Sequencer_gpio_toggle_lowpower example, there is a problem that LPTIM does not work in standby mode, but you can modify it to RTC as the wakeup source. For that you can use the STANDBY_RTC example (modified project attached with measured consumption)

 

However, the very basic sequencer examples are not able to show you the best the sequencer can do. For using the sequencer optimally, I would recommend you some example application from the CubeWBA projects. Choose the one that fits best your intended functionality and build it on top of that. With that you can achieve the lowest power consumption and the least effort. If you could share your intended functionality, I would be able to recommend you some example project and give you few advice on how to progress further.

 

Best Regards

Hi @grohmano ,

My final goal is an BLE Heart Rate application that will be able to enter standby mode and wake up to send data through BLE every minute.

The first priority is still standby mode implementation.

I have been using BLE Heart Rate and twist here and there but I couldn't make the standby mode working at all starting from BLE Heart Rate example.

I have been trying to play with the #define from the example but the application will never enter standby mode.

Please advice which examples should I have started.

Hi @grohmano ,

May I ask if you have any chance to help me with ble heartrate with standby enable example for Nucleo-STM32WBA52CG board?  I am still struggle to implement the example from WBA1.1.1 to run on Nucleo-STM32WBA52CG.  After rebuild the ble and download to nucleo board, there was nothing happening.  I am still trouble shooting it.

Please help.

Hi @grohmano ,

I successfully have the Heartrate application from WBA1.1.1 to run on my STM32WBA52CG eval board.  I understood about the fast adv and lpm adv, but I couldn't find a way to make the board to enter the standby mode.  Can you please help just give me a pointer how can I enter and exit the standby mode from the example code?