Skip to main content
maryam magdy
Associate III
February 13, 2019
Solved

Stm32L4 doesn't wakeup from shutdown

  • February 13, 2019
  • 6 replies
  • 2186 views

I'm using mbed coding on stm32L432kc nucleo board. I'm copying the code from the stm32 cube code examples to put my MCU in shutdown [https://github.com/Rayling35/STM32Cube_FW_L4_V1.12.0/blob/master/Projects/NUCLEO-L432KC/Examples/PWR/PWR_SHUTDOWN/Src/main.c]

The code compiles fine. I just added an LED blink inside the while (1) loop after the shutdown command to see if the MCU has wakeup up but it never blinks.

Any idea what I'm doing wrong?

This topic has been closed for replies.
Best answer by Mohamed Aymen HZAMI

Hello Maryam,

It works properly on my side.

Wake-up from shutdown mode using external RESET or WKUP pin generate a system RESET, in this case the while(1) loop will never be reached.

You can Blink LED before going into shutdown mode. After each wake-up, you can see that the LED is blinking properly.

Best Regards,

Mohamed Aymen.

6 replies

Mohamed Aymen HZAMI
ST Employee
February 13, 2019

Hello Maryam,

Are you using the GPIOA_PIN_0 as wake-up pin ?

Best Regards,

Mohamed Aymen.

maryam magdy
Associate III
February 13, 2019

Hi, Yes I connect pin A0 to 3.3v to trigger the wakeup

Geoffrey1
Associate III
February 13, 2019

Perhaps you should read how shutdown and standby work. They never return to the point of "hibernation", rather exit from these modes triggers a reset.

Mohamed Aymen HZAMI
ST Employee
February 13, 2019

Hello Maryam,

It works properly on my side.

Wake-up from shutdown mode using external RESET or WKUP pin generate a system RESET, in this case the while(1) loop will never be reached.

You can Blink LED before going into shutdown mode. After each wake-up, you can see that the LED is blinking properly.

Best Regards,

Mohamed Aymen.

MHein
Associate II
April 4, 2019

Do this Wakeup Pins accept Pull Down Only (Wakeup with HIGH Level) or can it be configured to Wakeup with a LOW Level as well?

Geoffrey1
Associate III
April 4, 2019

Look at the reference manager PWR_CR registers. The answer is either.