Skip to main content
s m
Associate III
September 4, 2018
Solved

STM32L4R9 strange behavior when awaking from shutdownMode

  • September 4, 2018
  • 1 reply
  • 688 views

Hello,

I enter the shutdown mode with the following code statement

HAL_PWR_EnableWakeUpPin( PWR_WAKEUP_PIN1_LOW );
HAL_PWR_DisableWakeUpPin( PWR_WAKEUP_PIN2 );
HAL_PWR_DisableWakeUpPin( PWR_WAKEUP_PIN3 );
HAL_PWR_DisableWakeUpPin( PWR_WAKEUP_PIN4 );
HAL_PWR_DisableWakeUpPin( PWR_WAKEUP_PIN5 );
 
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF1);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF3);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF4);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF5);
HAL_PWREx_DisableInternalWakeUpLine();
 
HAL_PWREx_EnterSHUTDOWNMode( );

If I wake up the system with PWR_WAKEUP_PIN1, I set the GPIO15 from PORTH to high.

I initialized the PORT and GPIO (CubeMX generates the code).

The result is that the system is hanging. If I reset the GPIO to low before entering the shutdown mode, everything is working fine.

Am I missing something? Maybe someone can explain me if I doing something wrong.

Is there any bug know that happens when using shutdownMode on STM32L4+ series?

Thanks.

This topic has been closed for replies.
Best answer by s m

Ok the problem is resolved.

I used inside the interrupt the RTOS message queue and after the reset it was not initialized.

Sometimes it worked, sometimes not, funny.

Sorry for that!

1 reply

s m
s mAuthorBest answer
Associate III
September 7, 2018

Ok the problem is resolved.

I used inside the interrupt the RTOS message queue and after the reset it was not initialized.

Sometimes it worked, sometimes not, funny.

Sorry for that!