cancel
Showing results for 
Search instead for 
Did you mean: 

Shutdown Mode Enter and Exit in stm32u083rc using WAKEUP PIN

Sumukha
Associate

I am not able to enter into the shutdown mode, i am using the below code 

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_RTC_Init();
  MX_USART2_UART_Init();
 __HAL_RCC_PWR_CLK_ENABLE();
    HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_HIGH);
    HAL_PWREx_EnablePullUpPullDownConfig();
    HAL_PWREx_EnableGPIOPullDown(PWR_GPIO_A, PWR_GPIO_BIT_0); 
    HAL_SuspendTick();
    HAL_PWR_EnterSHUTDOWNMode();  

  while (1)
  { 
  }
}   
with this what is happening is it behaving like an infinite loop it is going  into shutdown mode and instantly waking up and again going back to shutdown, after checking the power it is 350uA, which is not the power which we will get in shutdown mode, so I wanted to know what is wrong and also how to properly enter and exit from shutdown mode. also what should be the configuration of the wakeup pin in the cubemx.
1 REPLY 1
Sarra.S
ST Employee

Hello @Sumukha

You can refer to the provided example under STM32CubeU0Projects/NUCLEO-U083RC/Examples/PWR/PWR_ModeSelection that shows how to configure the system to measure the current consumption in different low-power modes, including shutdown mode

Fore reference, this question is related to this post: Shutdown Mode in stm32u083rc - 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.