Hi @liTian_one
The device is in recovery mode. This mode is entered when: IVT is not present or corrupted or there are more than 8 consecutive functional/destructive resets or when secure boot fails.
In case of JTAG recovery mode, the device just hangs in endless loop in RAM, so user can take appropriate actions and the device is not bricked.
Based on your description, it’s caused by failing secure boot.
You can follow demo code from:
https://www.nxp.com/webapp/Download?colCode=S32K3_HSE_DemoExamples
Example:
c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Secure_Boot\S32K344_Basic_SecureBoot\
We also provide Secure Boot application note including demo projects. It can be downloaded from:
https://www.nxp.com/products/S32K3
Application note can be found here:
Documentation -> Secure Files -> Secure Boot Application note v0.1.1.0 (AN744511)
Associated demo project can be downloaded here:
Design Resources -> Software -> Secure Files -> SecureBootAppNoteDemo (SW745310)
Common problem is wrong alignment of your application. Please take a look at this section from the application note:

Regards,
Lukas