Hi Support team,
Setup environment:
Using s32k144 MCU with JTAG and Jflash tool.
Able to connect with the MCU. connections are fine. having two device. In one everything is working.
Before erasing we unsecure the device and performed mass erase. see the attached snip.
in second device consider below behavior:
flash operation:
Erase/read chip or sector -> working only when after connecting with MCU immediately erase,
program and verifying -> not working (If we fire only program command, pop for success is coming, when read the chip everything is FF only. not flashing)
please go through the logs attached here. showcases the connect, erase, program and verify and read back operation logs.
Suspect list:
As whole chip is erased, flash configuration is 0xFF(so the device is unsecure), interrupt/vector table address are 0xff, text segment or code flash is 0xff.

I have tried to write the configuration registers manually using jlink commander CLI interface, using memory write and read commands as shown below. values of flash configuration registers are taken from .s (startup file)
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF /* 8 bytes backdoor comparison key */
.long 0xFFFFFFFF /* */
.long 0xFFFFFFFF /* 4 bytes program flash protection bytes */
.long 0xFFFF7FFE /* FDPROT:FEPROT:FOPT:FSEC(0xFE = unsecured) */
.text
.thumb

MDM-AP status register value: 0x0001003B. Please interpret the value and help me to understand if the device can be fixed.
Please provide your inputs to find the root cause of the issue and fix the device.
@Jiri @ZhangJennie @BlackNight @Robin_Shen @VaneB @mariuslucianand @jingpan @jay_heng
@danielmartynek @Alexis_A
Attached Jflash error snips below and Jlash tool logs.

Performed unlocking sequence:




