Hello,
When I written program into the board of chip S32K148(144pin),popup following message(attach file),could you please tell me how solve it,thank you very much!
Best Regards,
Liu
MCU锁住了,你可以尝试用unlock kinetis这个命令解锁,下面是一个完整的操作流程。
SEGGER J-Link Commander V7.56d (Compiled Oct 29 2021 14:02:52)
DLL version V7.56d, compiled Oct 29 2021 14:01:36
Connecting to J-Link via USB...O.K.
Firmware: J-Link OpenSDA compiled May 27 2019 10:59:53
Hardware version: V1.00
S/N: 621000000
VTref=3.300V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: S32K142
Type '?' for selection dialog
Device>S32K142
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>SWD
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>4000kHz
Device "S32K142" selected.
Connecting to target via SWD
InitTarget() start
InitTarget()
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPv0 detected
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]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
Initializing 28672 bytes work RAM @ 0x1FFFC000
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Cortex-M4 identified.
J-Link>unlock Kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...O.K.
J-Link>
如果这样解锁失败,那需要进一步分析原因了,如果是使用了backdoor且关闭了mass erase功能,那就恢复不了了。
S32K1xx系列MCU应用指南之芯片锁死(lockup)复位原因分析与恢复方法详解
https://mp.weixin.qq.com/s/Fb2L32l3v6oOJof3-2P7Rg
首先是不是可以确定芯片被锁住了,要是锁住了的话你看一下我给你发的文档,里面是关于锁死最全面的分析,
7. 1能否解锁恢复MCU的判断方法
当芯片锁死后,可以通过示波器观察S32K1xx系列MCU的RESET引脚波形判断是否可以恢复:
①RESET引脚一直为低电平
无法解密恢复MCU;
②RESET引脚输出周期性复位脉冲信号
a. 若复位信号周期为~118us,高电平时间为~660ns的方波信号
可以通过SWD/JTAG调试接口执行mass erase命令解密恢复MCU;
Tips:高电平时间为~660ns的方波信号是去掉RESET引脚的外部滤波电容时的测量结果,若外部连接有滤波电容,将影响RESET引脚输出的波形,将变成缓慢下降和上升的锯齿波信号,但周期依然在~118us。
b. 若复位信号周期不是~118us,大于200us,为500多us甚至更长
将无法通过SWD/JTAG调试接口执行mass erase命令解密恢复MCU。
我使用j-flash678,尝试连接板子,弹出protection bytes in flash at addr 0x400-0x40f这样的message,同时有如下信息
Application log started
- J-Flash V7.68 (J-Flash compiled Jul 14 2022 16:54:59)
- JLinkARM.dll V7.68 (DLL compiled Jul 14 2022 16:54:28)
Reading flash device list [C:\Program Files\SEGGER\JLink\ETC/JFlash/Flash.csv] ...
- List of flash devices read successfully (451 Devices)
Reading MCU device list ...
- List of MCU devices read successfully (9642 Devices)
Creating new project ...
- New project created successfully
Connecting ...
- Connecting via USB to probe/ programmer device 0
- Probe/ Programmer firmware: J-Link V9 compiled May 7 2021 16:26:12
- Device "S32K148 (ALLOW SECURITY)" selected.
- Target interface speed: 1000 kHz (Fixed)
- VTarget = 3.701V
- InitTarget() start
- Device will be unsecured now.
- Timeout while halting CPU.
- InitTarget() end
- Found SW-DP with ID 0x2BA01477
- DPIDR: 0x2BA01477
- 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)
- 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
- Device will be unsecured now.
- Timeout while halting CPU.
- InitTarget() end
- Found SW-DP with ID 0x2BA01477
- DPIDR: 0x2BA01477
- 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)
- 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
- ERROR: Failed to connect.
Could not establish a connection to target.
请问有什么建议吗?