S32K148 MCU use J-LINK to brush flash by mistake, then use J-LINK link to get the following error, JLINK unsecured is useless, how to solve it?
Connecting ...
- Connecting via USB to probe/ programmer device 0
- Probe/ Programmer firmware: J-Link V9 compiled Dec 13 2022 11:14:50
- Probe/ Programmer S/N: 25994751
- Device "S32K148 " selected.
- Target interface speed: 50 kHz (Fixed)
- VTarget = 3.301V
- ConfigTargetSettings() start
- ConfigTargetSettings() end - Took 305us
- InitTarget() start
- SWD selected. Executing JTAG - > SWD switching sequence.
- 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 - Took 2.17s
- Found SW-DP with ID 0x2BA01477
- DPv0 detected
- CoreSight SoC-400 or earlier
- 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, ADDR: 0x00000000)
- AP[1]: JTAG-AP (IDR: 0x001C0000, ADDR: 0x01000000)
- 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
- Attach to CPU failed. Executing connect under reset.
Hi@dongkuili
First of all, there is no guarantee that it will be recovered, because the encrypted segment you wrote the wrong persistence value to may not support mass erase erasure.
You can read the document 6. S32K1xx series MCU chip lockup (lockup) phenomenon
Thanks for the reply.
I read the linked documents and the chip manual carefully, and I still can't recover by mass erase after several attempts. I want to use S32FlashTool_v2.3.4, but it doesn't support S32K148, is there any S32FlashTool that supports S32K148?
Hi@dongkuili
It has nothing to do with what software you are using, follow what the article says and go straight to testing the waveform of the RESET pin to determine if it might be recovered, if not then don't waste your time.