Skip to main content
maryam magdy
Associate III
Feb 13, 2019 8:41 AM UTC
Solved

Stm32L4 doesn't wakeup from shutdown

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.
Mohamed Aymen HZAMI
ST Employee
Feb 13, 2019 2:45 PM UTC

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
Feb 13, 2019 10:37 AM UTC

Hello Maryam,

Are you using the GPIOA_PIN_0 as wake-up pin ?

Best Regards,

Mohamed Aymen.

maryam magdy
Associate III
Feb 13, 2019 12:50 PM UTC

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

Geoffrey1
Associate III
Feb 13, 2019 12:09 PM UTC

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
Feb 13, 2019 2:45 PM UTC

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
Apr 4, 2019 3:02 PM UTC

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
Apr 4, 2019 5:26 PM UTC

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