Hello,
NCF_S0 = 0x5 indicates that both FCCU NCF[0] (lockstep/core fault) and NCF[2] (ECC fault) are active. On S32K3 devices, these fault flags are retained after an FCCU functional reset so that software can identify the root cause. The FCCU fault status cannot be cleared while the originating error condition is still present. Therefore, the issue is likely not in eMcem_Fccu_ClearFault(), but that a lockstep fault and an ECC fault are still being reported by the underlying hardware.
Please check the corresponding FCCU, RCCU/DCMROD, and ERM status registers to identify the exact source. Since the issue occurs after attaching TRACE32, also verify that FCCU Debug Mode is enabled and compare behavior when the debugger is connected from reset.
Best regards,
Peter