2017-02-07 8:10 PM
Hello, I have a question about Standby mode when it wakes up from standby with interrupt or anything which command will
executed
for the example/**** Start ****/
/* Check and handle if the system was resumed from Standby mode */
if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET) { /* Clear Standby flag */ __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
}
HAL_GPIO_Write(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
HAL_Delay(500);
HAL_GPIO_Write(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
/*Disable all used wakeup sources: Pin1(PA.0)*/
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
/*Clear all related wakeup flags*/
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
/*Re-enable all used wakeup sources: Pin1(PA.0)*/
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
/*Enter the Standby mode*/
HAL_PWR_EnterSTANDBYMode();
HAL_GPIO_Write(GPIOA, GPIO_PIN_6, GPIO_PIN_SET);
HAL_Delay(500);
HAL_GPIO_Write(GPIOA, GPIO_PIN_6, GPIO_PIN_RESET);�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
while(1) {
}
/**** End ****/�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Which PA5 or PA6 will be executed first after wake up.
2017-02-08 1:40 AM
Hello,
After standby, the processor will start executing your program from the beginning, like after a reset.
So in your case PA5 will toggle first.
I recommend reading page 162 of
.Best regards,
Max
2017-05-04 4:05 AM
Hi,
Is there a way to make the processor continue the program after a wakeup from standby, just like after a wakeup from STOP mode?Best,
Raphael2017-05-04 6:42 AM
No, it just resets, as all power to the core is removed.
2017-05-04 6:50 AM
Thanks so if I want my RTC tu run continuously after wakeup, i have to use stop instead of standby?
2017-05-04 6:55 AM
RTC is not part of core, so it's not reset unless power is removed.
JW
2017-05-04 7:24 AM
the problem is that when my board restarts, it executes the auto-generated MX_RTC_Init() function, which restart the RTC
:(
2017-05-04 7:28 AM
At some point you need to stop being reliant on robot tools to do the work, and understand how the part works, and code your own solution.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.