2017-04-10 12:56 AM
Hello,
I have a board with the STM32L476RET6, the shutdown mode worked a time and now it resets just after the STM32 enters in shutdown mode. I tried the same program with another same board and the problem does not appear.
I thought it was a problem with an interrupt but even if I disable all interrupts, the problem persists. I also disabled RTC clock.
__disable_irq();
__disable_fault_irq(); HAL_PWREx_EnterSHUTDOWNMode();Thank you for your help,
Best Regards,
Jonathan
2019-06-27 06:45 PM
Hi guys,
try clearing the flags right before entering shutdown.
// Your wakeup setup here
// ...
// Clear flasg
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
// Enter shutdown
HAL_PWREx_EnterSHUTDOWNMode();
I notice that the flags can be asserted after we setting up the wakeup pin. It can immediately wakeup the CPU if you haven't clear them right before entering shutdown.