Hi, @jiri_kral @ErichStyger @danielmartynek @BlackNight
I am working on a project which the security is needed for with S32K148 board. I activated secure boot by using csec_boot_protection_s32k148 example project before many times. Then, unsecure for any other jobs. Thus, there was no problem.
However, after a while, I tried to activate the secure booting again by using the same example project (csec_boot_protection_s32k148) but in the eraseKeys() -> CSEC_DRV_InitRNG() -> CSEC_WaitCommandCompletion() the program crashes and watchdog occurs. All my trials, the program fails in that function which is attached to this question. I solve this problem by enabling the 'Emergency Kinetis Device Recovery by Full Chip Erase' option from the IDE->Debugger tab. After this, the eraseKeys() is stepped over succesfully.
As a result, I want to that what was the problem before deleting the full chip. Is there any workaround to avoid this problem? I am using some batch scripts to flash and run code to board with GDB server and console, so I want to erase full chip from the GDB terminal but I cannot? Any idea?
Thanks.

