can not exit from inline function with HSM.

 can module inline  in can.h file.

with HSM disabled and with CAN module inline enabled : Can_SetControllerMode(0,CAN_T_START)  will executed and exit correctly.

with HSM enabled and with CAN module inline disabled: Can_SetControllerMode(0,CAN_T_START)  will executed and exit correctly.

with HSM enabled and with CAN module inline enabled: Can_SetControllerMode(0,CAN_T_START)  will not exit.

can anyone tell me what could be the cause of the issue?