Thank you for your reply!
I tried to erase it by writing the DMD-AP control register, but it didn't seem to work;
The operation is recorded as follows:
SEGGER J-Link Commander V6.98e (Compiled Mar 29 2021 14:19:55)
DLL version V6.98e, compiled Mar 29 2021 14:18:39
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled Feb 2 2021 16:34:10
Hardware version: V9.20
S/N: -1
License(s): RDI, GDB, FlashDL, FlashBP, JFlash
VTref=3.327V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: S32K148 (ALLOW SECURITY)
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "S32K148 (ALLOW SECURITY)" selected.
Connecting to target via SWD
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while unsecuring device. Erase never stops.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while unsecuring device. Erase never stops.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
****** Error: Could not find core in Coresight setup
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while unsecuring device. Erase never stops.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
InitTarget() start
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Timeout while unsecuring device. Erase never stops.
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
****** Error: Could not find core in Coresight setup
Cannot connect to target.
J-Link>writedp 2 1000000
Writing DP register 2 = 0x01000000 (0 write repetitions needed)
J-Link>writeap 1 1
Writing AP register 1 = 0x00000001 (0 write repetitions needed)
J-Link>readap 1
Reading AP register 1 = 0x00000001 (0 read repetitions needed)
J-Link>readap 0
Reading AP register 0 = 0x00000074 (0 read repetitions needed)
J-Link>writedp 2 10000f0
Writing DP register 2 = 0x010000F0 (0 write repetitions needed)
J-Link>readap 3
Reading AP register 3 = 0x001C0000 (0 read repetitions needed)
J-Link>
My EVB board is connected normally, reset is not grounded, jlink attempt to unlock will fail, but the command can be executed normally, but actually did not erase successfully, the board still cannot be used normally;
How do I enable mass erase next? Or through a backdoor and what is the back door interface?
thanks!