2025-11-26 2:34 PM
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.
Solved! Go to Solution.
2025-12-03 8:15 AM
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
2025-11-27 4:18 AM
Hello @Jtron.11,
that is really weird. Can you give me your code or something, so I can look at it?
Else, you can find some useful on Wiki:
Getting_started_with_PWR
STM32CubeWBA_Low_Power_Management
If you have any further questions, please do not hesitate to ask
Best Regards
2025-11-27 5:58 PM
Hello grohmano,
I started with RTC working go to sleep and wake up blink LED, the power consumption still 66mA after enter standby.
I back track and start the basic project, by just blink LED at power up, set up the clocks, and went to standby right after; pure simple to make sure my board is actually in Standby mode to see if I can achive 1uA but it still take 55mA. Before I went deep sleep, I make sure there is no Interrupt pending, if there is I will clear it.
Here is the code snippet
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ICACHE_Init();
/* USER CODE BEGIN 2 */
/** Blink the LED **/
for (int i=0; i<20; i++)
{
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_4);
HAL_Delay(200);
}
LL_PWR_ClearFlag_STOP();
LL_PWR_ClearFlag_SB();
/* As default User push-button (SW1) state is high level, need to clear all wake up Flag again */
LL_PWR_ClearFlag_WU();
for (int i = 0; i < (sizeof(NVIC->ISPR) / sizeof(NVIC->ISPR[0])); i++) {
if (NVIC->ISPR[i] != 0) {
any_interrupt_pending = NVIC->ISPR[i];
break;
}
}
if (any_interrupt_pending) {
// At least one interrupt is pending
// You may want to clear them all, or handle them individually
HAL_NVIC_ClearPendingIRQ(any_interrupt_pending);
}
/* Finally enter the standby mode */
HAL_PWR_EnterSTANDBYMode();I also attached the whole project.
2025-11-30 12:28 AM
Hi grohmano,
I went over the PWR link you refer. I understood more about the standby mode. Unfortunately, I followed the example from the link and my board is still not be able to go lower than the nA as the expectation.
2025-12-01 3:36 AM
Hello @Jtron.11,
I have built your project and flash to the STM32WBA52. Before entering standby mode, I have measured current consumption 6 mA and 2 uA after entering.
Maybe you have some issues with the board as I also tried to measure the current when the ST-Link is not turned off and the consumption was about 2 mA.
I am also confused about the intended purpose. You mentioned you wanted to go to standby, wakeup and blink the LED. Instead of that, you blink the LED 10 times and then you fall asleep and nothing else happens.
If your intention was the first option, I would recommend you using sequencer and timer with interrupt.
If you have any further questions, please do not hesitate to ask
Best Regards
2025-12-01 6:55 AM
Hi @grohmano ,
Thank you for your helps to confirm my code. The intention was having the firmware to enter and wake up, but I couldn't confirm the level of the power consumption so I remove everything just enter the standby right away, nothing else fancy to see what exactly the base line; hence I sent you the power up, blink led then go back to standby only.
Whenever I measure, I always remove the ST-Link debugger to prevent another power consumption item.
I have another project attached here. Can you please help me to run on your board? I am successfully implemented the RTC to wake up the system every ~33s and stay on for 5s. It is exactly the example for STM32WBA55.
The weird thing is when the system is awake for 5s, the measure is ~20mA and when the system is in standby the system consumed about ~50mA.
2025-12-01 10:15 AM
Hi @grohmano
Can you please help to confirm your STM32WBA52 set up?
Are you using eval board? If it is can you please share the model so I can purchase?
What is the voltage and current setting of your test power supply?
thank you so much for your helps. I am trying to create my board exactly like yours. I even remove all other components on my board and MCU still took up to 14mA with the same code I provided in the zip file.
2025-12-02 1:41 PM
Hello @grohmano ,
Can you please share with me your STM32WBA52 set up so I can test my code again?
I tested all the possibilities and I couldn't get the standby mode close to the document information hence I reached out to you guys. I need to answer the team for the result since I believe in the document and suggested the team to use the STM32WBA52 and I would like to commit with my selection.
2025-12-03 4:42 AM
Hello @Jtron.11,
I have successfully flashed your code and measured the same consumption as before. I am using the Nucleo-STM32WBA52CG board, which is not recommended for new design, but I do not have any other WBA52 to use.
I assume that you have some custom board. Do you measure power consumption of the whole board or only micro? When measuring the whole board, it is possible that some parts are active, e.g. LDO, external memory, etc.
If you want Nucleo board for development and testing, you can use Nucleo STM32WBA55 without SMPS and then port it to your board, it should work same. However, SMPS is generally better in terms of power consumption, so if you want ultra-low power project, the WBA55 should be better (but slightly more expensive) option for you
2025-12-03 7:26 AM
Hi @grohmano ,
Thank you for your confirmation, I will get the Nucleo-STM32WBA52CG board for my testing confirmation. I understand the NRND, but since we are having a size and pricing restriction due to a very high volume once the product is going to mass production and once the product is successfully implement and the STM32WBA52KG is still active so I want to move forward with WBA52KG.
May I confirm with you that you actually test my example code STM32WBA52_PWR_STANDBY_RTC.zip with Nucleo-STM32WBA52CG board and you found at the standby time you see the power consumption is 2uA?
When I measure on my own board, it is only MCU itself.
Since you mentioned porting without SMPS, can you please help me to point me to the app note or any example to port the BLE code from WBA55 to WBA52?
In the BLE example for WBA55, I stuck at this configured SMPS_SUPPLY since WBA52 doesn't have one.
I have 32KHz for LSE and 32MHz for HSE on my board.
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_SMPS_SUPPLY);
/** Configure the main internal regulator output voltage
*/
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE2) != HAL_OK)
{
Error_Handler();
}