Hi Rehab,
I found out that there's nice example in SDK which shows how to switch between RUN, HSRUN and low power modes. I guess it could help you:
c:\NXP\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.2\examples\S32K142\driver_examples\system\power_mode_switch\
Regards,
Lukas