Skip to main content
Associate II
June 29, 2026
Solved

stm32u575 Low power consumption

  • June 29, 2026
  • 11 replies
  • 221 views

When using this microcontroller, after entering low-power mode via the HAL_PWREx_EnterSHUTDOWNMode() function, I found that there is a 0.9V voltage on VCAP. But the program indeed did not continue performing the reset operation.Do I need to turn off anything before entering this mode? I have used peripherals such as DMA (linked list in circular mode), SPI, USART, ADC, and GPIO.

The following is my function for entering low power mode.
 

static void DevLowerKeyInit(uint8_t *index) {
  (void)index;

  osDelay(200);
    
   vTaskSuspendAll();
  SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
    

  for (uint32_t i = 0; i < 16; i++) {
    NVIC->ICER[i] = 0xFFFFFFFF;
    NVIC->ICPR[i] = 0xFFFFFFFF;
  }        

    HAL_DBGMCU_DisableDBGStandbyMode();
    HAL_DBGMCU_DisableDBGStopMode();
    
    extern void MX_GPIO_ALL_ANALOG_Init(void);
    MX_GPIO_ALL_ANALOG_Init();
    

  __HAL_PWR_CLEAR_FLAG(PWR_WAKEUP_FLAG2);
  __HAL_PWR_CLEAR_FLAG(PWR_FLAG_STOPF);
  __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SBF);


  __DSB();
  __DSB();
  __DSB();

  HAL_PWREx_EnterSHUTDOWNMode();

  HAL_PWREx_DisablePullUpPullDownConfig();

  NVIC_SystemReset();

  SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk;

    
  xTaskResumeAll();

}



void MX_GPIO_ALL_ANALOG_Init(void) 
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* GPIO Ports Clock Enable */
  __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOB_CLK_ENABLE();
    __HAL_RCC_GPIOC_CLK_ENABLE();
    __HAL_RCC_GPIOD_CLK_ENABLE();
    __HAL_RCC_GPIOE_CLK_ENABLE();
    __HAL_RCC_GPIOH_CLK_ENABLE();

  GPIO_InitStruct.Pin = GPIO_PIN_ALL;
  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
    HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
    HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
    HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
}

 

Best answer by Gyessine

Hello @xukong 

Did you try one of the firmware examples to test the hardware, or at least use one as a reference for the project?

The following example supports shutdown mode on an STM32U575.

The example should at least help determine whether the issue is related to hardware or software.
BR
Gyessine

11 replies

xukongAuthor
Associate II
June 29, 2026

I am using srm32u575VGT6.

xukongAuthor
Associate II
June 29, 2026

After searching for several days, I finally found the cause.

ST Technical Moderator
June 29, 2026

Hello ​@xukong 
Can you share the root cause of the issue so that other ST community users who encounter the same issue can see it? This information can help many other developers.
BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
xukongAuthor
Associate II
June 29, 2026

In the end, I suspect it was caused by a pending interrupt in EXIT. By clearing the pending interrupt during low power, the voltage on VCAP indeed dropped from 0.9V to 0V, and the power consumption indeed decreased from about 400uA to below 1uA for the entire circuit. However, I am not clear for now why this phenomenon occurs.
 

mƎALLEm
ST Technical Moderator
June 29, 2026

Hello ​@xukong ,

Did you read the tips before posting?

This pop-up is showing-up when you start a thread:

Please kindly follow the community rules while posting: How to write your question to maximize your chances to find a solution

Thank you for your understanding

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
xukongAuthor
Associate II
June 29, 2026

Sorry, I didn't notice those things. I was in a real rush back then and spent days searching but couldn't find the problem.

xukongAuthor
Associate II
June 30, 2026

Now it has recurred with a small probability (discovered during on-site testing: after entering low power mode, the current sometimes fails to drop). Can you tell me which pending interrupts could affect the microcontroller entering shutdown mode? Or, is there a proven piece of code to recover from this?

ST Technical Moderator
June 30, 2026

Hello ​@xukong 

It is not easy to find the root cause from the information provided. Testing and debugging are required.

First, re-enable debugging in low-power mode bits to check whether the value of the LPMS bits in the PWR_CR1 register is equal to shutdown mode (11x).

Then, ensure that no peripheral causes an interrupt, even occasionally. The easiest way is to keep only one peripheral enabled at a time and check whether the issue still appears with one peripheral, with multiple peripherals, or disappears completely.

Before this test, test with no peripheral enabled to ensure that the issue does not come from a peripheral.
well, you can add this line of code just to make sure if not already implemented:

__disable_irq();

BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
xukongAuthor
Associate II
July 2, 2026

I've optimized the logout function under low power consumption and haven't found any issues so far.