Thread_sleep_for() not working on STM32F042

Hi,

I ported a project from STM32F407 to STM32F042 with mbed bare metal profile. Somehow thread_sleep_for() function doesn’t work no more. Once this function is called, system will stay in sleep mode until reset by watchdog.

Is this a known problem or I missed something? Mbed-OS version is 5.15

Thanks,
ZL