Skip to main content
Associate III
May 12, 2025
Solved

STM32G491 low power mode

  • May 12, 2025
  • 4 replies
  • 730 views

 

Hi,
I'm currently working with the STM32G491 MCU to implement low power functionality. I plan to enter Stop mode when a specific condition is met. I've written a function to handle entering low power mode.

However, I'm noticing that the current consumption only drops slightly—from 53 mA to 51 mA—after entering Stop mode.
Here is the code I wrote for low power mode.

void enter_low_power_mode(void)
{
 HAL_UART_DeInit(&huart1);
 HAL_SPI_DeInit(&hspi1);
 HAL_I2C_DeInit(&hi2c3);
 __HAL_RCC_TIM1_CLK_DISABLE();
 __HAL_RCC_USART1_CLK_DISABLE();
 __HAL_RCC_SPI1_CLK_DISABLE();
 __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_MSI);
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 __HAL_RCC_PWR_CLK_ENABLE();

 HAL_SuspendTick();
 HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

 SystemClock_Config();
 __HAL_RCC_I2C3_CLK_ENABLE();
 __HAL_RCC_LPTIM1_CLK_ENABLE();
 __HAL_RCC_LPUART1_CLK_ENABLE();
 __HAL_RCC_SPI1_CLK_ENABLE();
 HAL_ResumeTick();

 MX_USART1_UART_Init();
 MX_SPI1_Init();
 __HAL_UART_CLEAR_FLAG(&huart1, UART_FLAG_TC);

}
Best answer by TDK

> from 53 mA to 51 mA

This is a very high current consumption for the CPU. Probably there are other components on the board drawing power. Are you able to share a schematic? If not, what other components are present?

4 replies

Technical Moderator
May 12, 2025

Hello @abhijith_raj 

Have you configured all GPIO ports to operate in analog mode to minimize power consumption?

Please see the example below for reference.

STM32CubeG4/Projects/NUCLEO-G431KB/Examples/PWR/PWR_STOP0_RTC/Src/main.c at master · STMicroelectronics/STM32CubeG4 · GitHub 

"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.Saket_Om"
Associate III
May 12, 2025

Hi @Saket_Om 

I tried configuring the GPIOs to analog mode, but the power consumption remains the same.

As an experiment, I erased the MCU and powered it up to measure the current — it shows 25 mA. The hardware team suspects there might be a current leak.

Given that, shouldn't my current low-power mode also show around 25 mA at most?

Technical Moderator
May 12, 2025

@abhijith_raj 

The current consumption in STOP1 mode is described in the table below: 

Saket_Om_0-1747048602501.png

 

"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.Saket_Om"
ST Employee
May 12, 2025

Hello @abhijith_raj

You can also check this article: Tips for using STM32 low-power modes - STMicroelectronics Community 

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.
Associate III
May 12, 2025

Hi @Sarra.S 
By referring this article I implemented the low power mode.

Andrew Neil
Super User
May 12, 2025

@abhijith_raj wrote:

current consumption only drops slightly—from 53 mA to 51 mA—after entering Stop mode.

Are you sure that is due to the MCU itself?

Have you disconnected any debugger, and performed a power-cycle ?

Are there other things on your board?

Please post your schematics - see: How to write your question to maximize your chances to find a solution.

Achieving low power is very much about the entire system - including hardware - not just  the software...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
TDKAnswer
Super User
May 12, 2025

> from 53 mA to 51 mA

This is a very high current consumption for the CPU. Probably there are other components on the board drawing power. Are you able to share a schematic? If not, what other components are present?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate III
May 13, 2025

Hi @TDK ,
The issue originated from the board hardware. One GPIO (used as SPI CS) was being driven HIGH continuously, and it had an external pull-up resistor. Due to a short circuit or similar fault, this caused some peripherals to power on. Removing the pull-up resolved the problem.