AnsweredAssumed Answered

STM32F437 exiting standby incorrectly

Question asked by Deamonata on Nov 2, 2015
Latest reply on Sep 11, 2017 by Ed_B
Hi there,

I'm currently having some issues with the STM32F437 package going into standby, whenever I send the instruction to go into standby the device goes to sleep but then almost immediately wakes back up again.

The code I'm using to send the device to standby is:
/*## Disable all wakeup sources #####################################*/
/* Disable Wake-up pin */
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
/* Disable RTC Alarm */
HAL_RTC_DeactivateAlarm(&hrtc, RTC_ALARM_A);
HAL_RTC_DeactivateAlarm(&hrtc, RTC_ALARM_B);
/*## Clear all related wakeup flags ######################################*/
/* Clear PWR wake up Flag */
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 
/* Clear the Alarm Flag */
__HAL_RTC_ALARM_CLEAR_FLAG(&hrtc, RTC_FLAG_ALRAF);
__HAL_RTC_ALARM_CLEAR_FLAG(&hrtc, RTC_FLAG_ALRBF);
 
/*## Re-enable all used wakeup sources ###################################*/
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);

HAL_PWR_EnterSTANDBYMode();

Am I missing anything here?

Outcomes