STM32F103 How enter StopMode when using RTX operating system

I use RTX operating system, STM32F103, I want to enter StopMode. I use library function
"PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);" , but the program jump to

HardFault_Handler\ PROC EXPORT HardFault_Handler [WEAK] B . ENDP

and not enter StopMode. But it can work without RTX. How can I do. Somebody can help? Thanks!

More questions in this forum