Thanks for your help. I now have a different error message, which is progress!
First attempt, which follows the workflow in the other post:
- Run jlink.exe
- r0
- erase
Result: same error
Type "connect" to establish a target connection, '?' for help
J-Link>r0
J-Link>erase
Target connection not established yet but required for command.
Please specify device / core. <Default>: S32K344
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>j
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "S32K344" selected.
Connecting to target via JTAG
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 76us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 13.5ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 13us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 13.5ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 13us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 13.0ms
Cannot connect to target.
Second attempt: connect first
- Run jlink.exe
- connect
- r0
- erase
Result: error about missing RAMcode
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: S32K344
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>j
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "S32K344" selected.
Connecting to target via JTAG
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 101us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 17.1ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 156us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 15.1ms
Cannot connect to target.
J-Link>r0
J-Link>erase
Target connection not established yet but required for command.
Device "S32K344" selected.
Connecting to target via JTAG
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 12us
InitTarget() start
SDA_AP detected
Checking if debug access is already enabled...
Debug access is not enabled yet. Performing enable debug access sequence...
Debug access enabled
Checking if HSE firmware is installed...
HSE firmware detected (SWAP disabled)
Lock step mode enabled
InitTarget() end - Took 91.1ms
TotalIRLen = 8, IRPrint = 0x0001
JTAG chain detection found 1 devices:
#0 Id: 0x0996001D, IRLen: 04, JTAG-DP
Found 1 device in JTAG chain, IRPost/DRPost != 0. Reset IRPost/DRPost to 0.
DPv0 detected
AP map detection skipped. Manually configured AP map found.
AP[0]: MEM-AP (IDR: Not set)
AP[1]: APB-AP (IDR: Not set)
AP[2]: MEM-AP (IDR: Not set)
AP[3]: MEM-AP (IDR: Not set)
AP[4]: AHB-AP (IDR: Not set)
AP[5]: AHB-AP (IDR: Not set)
AP[6]: MEM-AP (IDR: Not set)
AP[7]: MEM-AP (IDR: Not set)
AP[4]: Skipped ROMBASE read. CoreBaseAddr manually set by user
AP[4]: Core found
CPUID register: 0x411FC272. Implementer code: 0x41 (ARM)
Cache: No cache
Found Cortex-M7 r1p2, Big endian.
FPUnit: 8 code (BP) slots and 0 literal slots
ROM table scan skipped. CoreBaseAddr manually set by user: 0x40250400
SetupTarget() start
Initializing ECC RAM...
RAMCodeAddr: 0x20000000
RAMInitAddr: 0x20000010
RAMInitSize: 0x00007FF0
InitPattern: 0xDEADBEEF
CPU could not be halted
Timeout while initializing ECC RAM
CPU could not be halted
Initializing ECC RAM...
RAMCodeAddr: 0x20000000
RAMInitAddr: 0x20400000
RAMInitSize: 0x00004000
InitPattern: 0xDEADBEEF
CPU could not be halted
Timeout while initializing ECC RAM
CPU could not be halted
SetupTarget() end - Took 1.14s
****** Error: Cannot read register 0 (R0) while CPU is running
Cannot read register 1 (R1) while CPU is running
Cannot read register 2 (R2) while CPU is running
Cannot read register 15 (R15) while CPU is running
Memory zones:
Zone: "Default" Description: Default access mode
Cortex-M7 identified.
No address range specified, 'Erase Chip' will be executed
'erase': Performing implicit reset & halt of MCU.
ResetTarget() start
-- Identifying target device...
-- JTAG selected. Identifying JTAG Chain...
TotalIRLen = 8, IRPrint = 0x0001
JTAG chain detection found 1 devices:
#0 Id: 0x0996001D, IRLen: 04, JTAG-DP
Found 1 device in JTAG chain, IRPost/DRPost != 0. Reset IRPost/DRPost to 0.
-- JTAG Chain Identified. Connecting to DAP TAP...
-- Successfully connected to selected DAP TAP.
SDA_AP detected
Checking if core is already enabled...
Core already enabled
ResetTarget() end - Took 156ms
Erasing device...
****** Error: No matching RAMCode found
Failed to prepare for programming.
Failed to download RAMCode!
ERROR: Erase returned with error code -1.
The reset seems to be working, I just still can't talk to the uC.