stm32/powerctrl: Enable EIWUP to ensure RTC wakes device from standby.

pull/1/head
Damien George 2019-04-18 17:15:11 +10:00
parent 11657f2f20
commit 8402c26cfa
1 changed files with 6 additions and 0 deletions

View File

@ -390,6 +390,12 @@ void powerctrl_enter_standby_mode(void) {
// enable previously-enabled RTC interrupts
RTC->CR |= save_irq_bits;
#if defined(STM32F7)
// Enable the internal (eg RTC) wakeup sources
// See Errata 2.2.2 "Wakeup from Standby mode when the back-up SRAM regulator is enabled"
PWR->CSR1 |= PWR_CSR1_EIWUP;
#endif
// enter standby mode
HAL_PWR_EnterSTANDBYMode();
// we never return; MCU is reset on exit from standby