When RTC (STM32F1 specific only) was used as os tick source. If OS requested longer tickles time RTC alarm was set to some time in the future.
After WFI finished RTC periodic tick interrupt was not enabled. If then some task took more time and periodically checked time, time would never advance due to RTC tick interrupt being disabled.
Time would advance only in idle task.
Now normal tick is working all the time unless there is nothing to do and after WFI finishes tick is enabled again.
When RTC (STM32F1 specific only) was used as os tick source. If OS requested longer tickles time RTC alarm was set to some time in the future. After WFI finished RTC periodic tick interrupt was not enabled. If then some task took more time and periodically checked time, time would never advance due to RTC tick interrupt being disabled. Time would advance only in idle task. Now normal tick is working all the time unless there is nothing to do and after WFI finishes tick is enabled again.