AnsweredAssumed Answered

Putting STM32F437xG into Standby mode more than once

Question asked by Rob Meades on Nov 22, 2017
Latest reply on Nov 22, 2017 by Rob Meades

I have some code which puts my STM32F437xG into Standby and wakes it up on RTC.  In my test code this works fine: I can go into Standby for, say, 10 seconds (enabling just the battery-backed RAM, flash is off), return at reset, go back into Standby, wake up 10 seconds later, and repeat ad infinitum.


I have now integrated this code into my main application and I find that I can go into Standby successfully but, once I have returned from Standby, I can no longer go back into Standby successfully again; something is waking me up immediately, returning at the reset vector, rather than waiting for the RTC alarm I have set to wake up.


I have checked that, when I attempt to go back into Standby, no interrupts other than RTC are enabled, the PWR_CR_CWUF flag is cleared and the previous RTC alarm has been reset with:



RTC->WPR = 0xCA;
RTC->WPR = 0x53;
RTC->WPR = 0xFF;


What else could be causing the MCU to wake up again immediately?  How can I find out what's causing the wake-up?  FYI, battery backed SRAM is being maintained correctly and none of the RCC flags (RCC_FLAG_PORRST, RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_PINRST, RCC_FLAG_LPWRRST) are set on return from reset.