I haven’t found any official example combining FreeRTOS and VLPS.
From what I see, the wake-up issue is likely caused by SysTick still running.
Try disabling SysTick right before calling POWER_SYS_SetMode() to enter VLPS.
Keep in mind:
In VLPS, the SysTick timer is disabled because the core clock is gated.
However, if you have a debugger connected, the MCU does not enter true VLPS; instead, it goes into an emulated STOP mode.
danielmartynek_0-1762786752586.png
Additionally, the FreeRTOS port.c already provides a weak implementation of vPortSuppressTicksAndSleep().
It stops SysTick during idle.
Calculates reload values for the next tick.
Executes __WFI().
Calls two hooks: configPRE_SLEEP_PROCESSING() configPOST_SLEEP_PROCESSING()
This is a weak implementation, it can be overwritten by your own implementation.
Regards,
Daniel