AnsweredAssumed Answered

STM32 Cube Stop mode example doesn't work

Question asked by Ashley Duncan on Mar 15, 2017
Latest reply on Mar 17, 2017 by Ashley Duncan

Hi,

 

I have a STM32L0538 discovery board.  I put the STM32Cube example code into it for Stop mode (no RTC) and it does not go into stop mode.  It exits stop mode immediately.  The only change I added was to toggle the LED before trying to go into stop mode.  When running it just toggles the LED continuously instead of staying in stop mode until the push button is pressed!

 

On a plus note, the Sleep Mode example works perfectly...

 

 

 

EDIT:  It seems the Systick interrupt wakes it out of stop mode.  If you add the following code to STM32Cude Stop Mode examples they work fine...

 

/* Enter Stop Mode */
HAL_SuspendTick();
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
HAL_ResumeTick();

Outcomes