Skip to main content
Associate II
April 24, 2025
Question

stm32g030 stanby mode current problem

  • April 24, 2025
  • 4 replies
  • 634 views

Hello everyone,

I have a problem with the STM32G030.

My microcontroller is drawing 1.5 mA of current in standby mode. I really can't figure out why. When I put it into stop mode, it draws 25 uA, which is fine, but I can't understand why it's drawing so much more in standby mode. Can you help me?

 

4 replies

ST Employee
April 24, 2025

Hello @Garslanbay

I don't think you're entering standby mode, can you share your code? 

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 II
April 24, 2025

When I loaded the same code onto my STM32F072 Discovery board, I measured a current of 2 uA.This is enough for me.i will upload code later.i dont have it now.the code is in my computer.

Associate II
April 24, 2025
 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 */
 /* USER CODE BEGIN 2 */

 /* Enable Power Control clock */
 __HAL_RCC_PWR_CLK_ENABLE();

 /* Check if the system was resumed from Standby mode */ 
 if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)
 {
 /* Clear Standby flag */
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);

 /* Check and Clear the Wakeup flag */
 if (__HAL_PWR_GET_FLAG(PWR_FLAG_WUF2) != RESET)
 {
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
 }
 }

 /* Insert 5 seconds delay */
 HAL_Delay(5000);

 /* The Following Wakeup sequence is highly recommended prior to Standby mode entry
 - Enable wakeup
 - Clear wake up pin flag depending in edge detection & pin level.
 - Enter the Standby mode.
 */
//Here is my nNRF24L01 and LIS2DW12TR codes.i also deactivate those code then i check again result is same.
 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2_LOW);

 /* Clear all related wakeup flags*/
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);

 /* Enter the Standby mode */
 HAL_PWR_EnterSTANDBYMode();
Associate II
April 24, 2025

Are there any units I need to deactivate before entering Standby mode?

ST Employee
May 6, 2025

Hello again @Garslanbay

I'm suspecting a current draw from the pins connected to external components, what do you mean by "I am unable to set these pins as pull-up or pull-down."? 

Also for a reference, you can check this article: Tips for using STM32 low-power modes

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.