cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32L4 doesn't wakeup from shutdown

maryam magdy
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Mohamed Aymen HZAMI
ST Employee

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.

View solution in original post

6 REPLIES 6
Mohamed Aymen HZAMI
ST Employee

Hello Maryam,

Are you using the GPIOA_PIN_0 as wake-up pin ?

Best Regards,

Mohamed Aymen.

Geoffrey1
Associate III

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.

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

Mohamed Aymen HZAMI
ST Employee

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

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

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