Hi @Anitha7
There are almost no differences when HSE is / isn't used.
Which RTD is used? Why I’m asking:
The S32K3 reference says:
"Before configuring HSE_CLK, you must wait for the SBAF to enter WFI by reading core status register of HSE CPU (PRTN0_CORE2_STAT)."
So, it’s necessary to wait for WFI bit before running clock initialization when HSE is installed. This is not implemented in older RTD drivers, corresponding code was added in RTD version 5.0.0 and higher. If you use older version, it’s necessary to add waiting loop for WFI bit before clock initialization. Maybe this is the root cause.
Have you tried to attach your debugger (I mean hot-sync without reset) after the fail to see what happened?
Regards,
Lukas