Hi @cychen88 ,
1.2.3: I checked the sample project in s32k14x_ CSEC_ MCAL4_ 0_ RTM_ 1_ 0_ 4, you're right that the example code is having trouble when load CSEC_KEY_18.
I compared the code with the newest code in RTD package of RTD SW32K1_RTD_4.4_1.0.1:
cuongnguyenphu_0-1658288908058.png
I removed a block code in function SampleAppUpdateKeyProtocolTest() in sample_app_mcal_csec_task.c then the sample project will works normally.
4.5 As I know, currently we hasn't provide computer software to calculate M1-M5.
6. Can you check this thread to recover your board:
https://community.nxp.com/t5/S32K/S32K148-Cannot-program-or-erase-flash/td-p/722040