The latest version for S32K344 is 0.2.55.0, so I recommend to use this one. Version 0.2.1.0 is quite outdated.
“The firmware flashing was successful” – which installation method did you use? Could you check if bit 0 in HSE GPR register at address 0x4039_C028 is set?
If it hangs in WaitForHSEFWInitToFinish(), the firmware is either not installed or it was not possible to start the firmware due to some fatal error in HSE.
Please share value of HSE GPR register at 0x4039_C028 and also FSR and GSR register in MU_0 module.
Where to download HSE firmware - go to S32K3 Standard Software:
https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K3-STDSW-D
Select: Automotive SW - S32K3 - HSE Firmware
Select firmware version:
0.2.55.0 K3xx Std SR-RTM HSE FW release
Service Release for K3x2,K3x4 Std HSE FW
Regards,
Lukas