S32K116下载例程失败

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K116下载例程失败

406 Views
weiLiu6316542
Contributor I

SEGGER J-Link GDB Server V7.20 Command Line Version

JLinkARM.dll V7.20 (DLL compiled Apr 28 2021 17:34:08)

Command line: -if swd -device S32K116 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: S32K116
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Dec 8 2023 20:16:22
Hardware: V9.70
S/N: 602718055
Feature(s): GDB, RDI, FlashBP, FlashDL, JFlash
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x00000000 (Data = 0xFFFF)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Received monitor command: regs
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Security extension regs:
MSP_S = 00000000, MSPLIM_S = 00000000
PSP_S = 00000000, PSPLIM_S = 00000000
MSP_NS = FFFFFFFC, MSPLIM_NS = 00000000
PSP_NS = FFFFFFFC, PSPLIM_NS = 00000000
CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00
CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00

Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Received monitor command: speed auto
Select auto target interface speed (2000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Received monitor command: SWO DisableTarget 0xFFFFFFFF
SWO disabled successfully.
Received monitor command: SWO EnableTarget 0 0 0x1 0
ERROR: Failed to restore original RAM content after CPU clock frequency detection!

Failed to enable SWO. Could not measure target CPU frequency.
Read 4 bytes @ address 0xFFFFFFFE (Data = 0x00000000)
Read 2 bytes @ address 0xFFFFFFFE (Data = 0x0000)
Downloading 192 bytes @ address 0x00000000 - Verified OK
Downloading 16 bytes @ address 0x00000400 - Verified OK
Downloading 3620 bytes @ address 0x00000410 - Verified OK
Downloading 264 bytes @ address 0x00001234 - Verified OK
ERROR: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
Cannot read register 16 (XPSR) while CPU is running
Cannot read register 20 (CFBP) while CPU is running
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 3 (R3) while CPU is running
Cannot read register 4 (R4) while CPU is running
Cannot read register 5 (R5) while CPU is running
Cannot read register 6 (R6) while CPU is running
Cannot read register 7 (R7) while CPU is running
Cannot read register 8 (R8) while CPU is running
Cannot read register 9 (R9) while CPU is running
Cannot read register 10 (R10) while CPU is running
Cannot read register 11 (R11) while CPU is running
Cannot read register 12 (R12) while CPU is running
Cannot read register 14 (R14) while CPU is running
Cannot read register 15 (R15) while CPU is running
Cannot read register 17 (MSP) while CPU is running
Cannot read register 18 (PSP) wh
Writing register (PC = 0x 410)
Read 4 bytes @ address 0x00000410 (Data = 0x00000000)
WARNING: Failed to read memory @ address 0x00000410
Read 2 bytes @ address 0x000010BA (Data = 0x0000)
WARNING: Failed to read memory @ address 0x000010D0
Read 2 bytes @ address 0x000010B8 (Data = 0x0000)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Read 2 bytes @ address 0x000010B8 (Data = 0xFFFF)
Received monitor command: regs
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Security extension regs:
MSP_S = 00000000, MSPLIM_S = 00000000
PSP_S = 00000000, PSPLIM_S = 00000000
MSP_NS = FFFFFFFC, MSPLIM_NS = 00000000
PSP_NS = FFFFFFFC, PSPLIM_NS = 00000000
CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00
CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00

Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Setting breakpoint @ address 0x000010B8, Size = 2, BPHandle = 0x0001
Starting target CPU...
Debugger requested to halt target...
Reading all registers
ERROR: Cannot read register 0 (R0) while CPU is running
ERROR: Cannot read register 1 (R1) while CPU is running
ERROR: Cannot read register 2 (R2) while CPU is running
ERROR: Cannot read register 3 (R3) while CPU is running
ERROR: Cannot read register 4 (R4) while CPU is running
ERROR: Cannot read register 5 (R5) while CPU is running
ERROR: Cannot read register 6 (R6) while CPU is running
ERROR: Cannot read register 7 (R7) while CPU is running
ERROR: Cannot read register 8 (R8) while CPU is running
ERROR: Cannot read register 9 (R9) while CPU is running
ERROR: Cannot read register 10 (R10) while CPU is running
ERROR: Cannot read register 11 (R11) while CPU is running
ERROR: Cannot read register 12 (R12) while CPU is running
ERROR: Cannot read register 13 (R13) while CPU is running
ERROR: Cannot read register 14 (R14) while CPU is running
ERROR: Cannot read register 15 (R15) while CPU is running
ERROR: Cannot read register 16 (XPSR) while CPU is running
ERROR: Cannot read register 17 (MSP) while CPU is running
ERROR: Cannot read register 18 (PSP) while CPU is running
ERROR: Cannot read register 24 (PRIMASK) while CPU is running
ERROR: Cannot read register 25 (BASEPRI) while CPU is running
ERROR: Cannot read register 26 (FAULTMASK) while CPU is running
ERROR: Cannot read register 27 (CONTROL) while CPU is running
Read 4 bytes @ address 0xDEADBEEE (Data = 0x00000000)
Read 4 bytes @ address 0xDEADBEEF (Data = 0x00000000)
Removing breakpoint @ address 0x000010B8, Size = 2
Starting target CPU...

0 Kudos
Reply
1 Reply

328 Views
IsaulO
NXP Employee
NXP Employee

Hi @weiLiu6316542 ,

It seems that there is an error during CPU frequency detection, for successful CPU clock frequency measurements, some requirements have to be fulfilled:
    • The clock frequency measurement must be supported by the DLL
    • There must be not watchdog running while clock frequency measurement
    • If the core has a DWT CYCCNT (cycle counter of the Data Watchpoint and Trace Unit) it must be kept enabled at any time.
A deviation of described requirements can cause unknown behavior and failing of flash programming.

Additionally, this problem has been discussed in other posts. Check them it might be useful for you
Unable to debug using ‘S32 Design Studio for Arm’ and Segger J-Link Classic Base - NXP Community 
S32K116 - NXP Community


BR,
IsaulO.

0 Kudos
Reply