cancel
Showing results for 
Search instead for 
Did you mean: 

How to shorten wakeup time from STOP mode

EC.3
Associate III

Hello,

Is there any specific guidance regarding how to improve wakeup time from the various STOP modes? The U5 Reference Manual mentions that configuring STOPWUCK = 0 will use the MSIS up to 24 MHz, which would be faster than HSI16. I've used that already but am wondering if there is anything else.

I notice that when running inside the debugger STOP0 wakeup times improve by roughly 100-150us. I'm targeting 100us. Presumably that has something to do with how the DBGMCU is configured. So the MCU seems capable of waking up faster in this modified STOP0, although with lesser power savings. Still, power savings using STOP0 from within the debugger is substantially better than SLEEP outside of the debugger (meaning normal device operation). Are there other options to shorten the time, outside of DBGMCU configuration?

Thanks

10 REPLIES 10

Thanks @MikaelM 

I'm now measuring 31us for the button-to-post-__WFE() wakeup time using this code:

  • LL_PWR_SetPowerMode(LL_PWR_STOP0_MODE);
  • LL_LPM_EnableDeepSleep();
  • LL_GPIO_ResetOutputPin(GPIOA, LL_GPIO_PIN_5);
    __WFE();
    LL_GPIO_SetOutputPin(GPIOA, LL_GPIO_PIN_5);

While I originally mentioned wanting to improve wakeup time, in reality I want to improve the time to become operational. That consists of improving the transition time from STOP0 to RUN and the time it takes to execute SystemClock_Config(). I suspect the example has already shown how to improve SystemClock_Config(), but I'd still like to know if there's more I can squeeze out of either side.

You first pointed out chapter 5.3.7, which made me think of trying:

LL_PWR_EnableFastSoftStart();
LL_PWR_EnableFlashFastWakeUp();
LL_PWR_EnableSRAM4FastWakeUp();

I'm going to start experimenting with those again now that you've helped me to improve my method of measurement. The time from button-to-post-SystemClock_Config that I see is just under 200us. That might be sufficient, but I'd like to see if that can be better.