Hi@Pranathi06
This is based on experience, and your situation is quite similar: the CSEc hardware encryption module was enabled, preventing mass erase of the CSEc encryption key, which caused the problem.
Although the chip has deadlocked, and the MCU can no longer download programs or debug, as long as the chip's power supply is normal, you can still use a J-LINK debugger to connect to the CoreSight DAP debug access interface of the S32K1xx series MCU ARM Cortex M4F/M0+ via the SWD/JTAG debug interface to read the MDM-AP status register.
Therefore, you can determine the root cause of the chip deadlock based on the read MDM-AP status register value.
If you need me to help you pinpoint the cause of the deadlock, you can try using J-LINK to read the MDM-AP status register.