Skip to main content
Visitor II
June 15, 2026
Question

STM32F4 - HAL_Delay() not working correctly after waking from Stop mode

  • June 15, 2026
  • 3 replies
  • 85 views

Hi everyone,

I'm working on a project using the STM32F4 series with STM32CubeIDE. After the MCU wakes up from Stop mode, HAL_Delay() seems to get stuck and the program doesn't proceed as expected.

I've already re-initialized SysTick after wake-up, but the issue still persists. Has anyone run into this before? Would appreciate any pointers on what might be missing in the clock/SysTick reconfiguration after Stop mode exit.

Thanks in advance!

3 replies

ST Technical Moderator
June 15, 2026

Hello ​@sugah 
Did you call SystemClock_Config to configure the clock again after waking up from Stop mode?
Entering Stop mode halts the core, so after waking up, reconfiguring the system clock by calling the SystemClock_Config function is needed.
BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
ST Technical Moderator
June 15, 2026

Hello ​@sugah 

Did you clear the PWR_FLAG_WU flag after wakeup?

Please refer to the example below:

STM32CubeF4/Projects/STM32469I-Discovery/Examples/PWR/PWR_STOP at master · STMicroelectronics/STM32CubeF4

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
ST Employee
June 19, 2026

Hello ​@sugah,

You might find this ST Wiki page very helpful for your issue: Getting started with PWR 

It covers the full Stop mode entry/exit flow with code examples, including the HAL_SuspendTick / HAL_ResumeTick pattern and what needs to be done after wake-up to get the system clock and SysTick running correctly again.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Dor_RH