HI
I am having an issue with the S32k116. The problem is the RESET signal because it is NOT stable it is having oscillation on the pin ( see the picture ).
The design is pretty simple it is just a copy-paste from the EVAL board + additional IO and serial interfaces. On reset pin is just C and pull up. After applying the power I can see just this on the RESET pin.
For debugging, I have S32DS and IAR-JLINK ( SEGGER ). I use SWD interface. When I connect RST signal from this debugging interface i have RED LED flashing on the debugger.
Does anyone have any idea what this means? Any help is much appreciated.
Br zorz
解決済! 解決策の投稿を見る。
Hi
The answer to the last problem was an OLD j-link version.
With J-link version 12 all is ok now
Br zorz
HI
Update .. maybe it helps someone
1. reset signal is OK to be like that if the uC is "empty"
2. after the update of the j-link driver to the latest one, the debugger now can "partially" connect to the uC
The current issue is
*********************
Connecting to target via SWD
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
InitTarget() end - Took 173ms
Found SW-DP with ID 0x0BC11477
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: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xF0002000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
Connect fallback: Reset via Reset pin & Connect.
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
InitTarget() end - Took 175ms
Found SW-DP with ID 0x0BC11477
DPv0 detected
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xF0002000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
****** Error: Failed to initialize CPU module in firmware because probe is low on memory (heap).
*************************************************************
Is it possible that j-link V8.0 is NOT compatible with the S32K1xx ?
Br zorz
Hi zorz,
Yes. If there is no code programmed (a blank part), then the processor will periodically reset due to core lockups.(Excerpted from AN12130) After programmed, it will not reset anymore.
Latest J-Link Software may fix some bugs.
Please confirm:
All VDD pins are powered by 3.3V
All VSS pins are connected to Ground
Refer to 4.2 JTAG and TRACE interface of AN5426
TCLK/SWD_CLK external Pull-Down 10k-47k
TDI external Pull-Up 10k-47k
TDO external Pull-Up 10k-47k
TMS/SWD_DIO external Pull-Up 10k-47k
RESET external Pull-Up 10k-47k
I'm not sure the OEM IAR-JLINK (SEGGER) you mentioned is able to connect S32K1, have you tried updating its firmware?
If you have S32K116EVB on hand, please try to connect this OEM IAR-JLINK (SEGGER) to the SWD interface on S32K116EVB and have a test.(Is it possible to connect the S32K116 that is working normally on the S32K116EVB board?)
If not able to connect to the chip, please check the values of MDM-AP status and control registers by refer to: https://community.nxp.com/t5/S32K/Unbricking-S32K146/m-p/937227
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
HI Robin
I can confirm that the HW is the way you described. We are using 10k pull-ups. The VDD is 3.4V and VSS is to GND.
After the update of the JLINK and using J-link commander I am able to go this far:
*******************************************
SEGGER J-Link Commander V7.92h (Compiled Oct 4 2023 16:23:14)
DLL version V7.92h, compiled Oct 4 2023 16:21:28
Connecting to J-Link via USB...O.K.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
J-Link uptime (since boot): N/A (Not supported by this model)
S/N: 158004146
OEM: IAR
VTref=0.000V
Type "connect" to establish a target connection, '?' for help
J-Link>ts
Target connection not established yet but required for command.
Please specify device / core. <Default>: S32K116
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 "S32K116" selected.
Connecting to target via SWD
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
InitTarget() end - Took 173ms
Found SW-DP with ID 0x0BC11477
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: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xF0002000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
Connect fallback: Reset via Reset pin & Connect.
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
InitTarget() end - Took 175ms
Found SW-DP with ID 0x0BC11477
DPv0 detected
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xF0002000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
****** Error: Failed to initialize CPU module in firmware because probe is low on memory (heap).
*************************************************************
Do you have any idea what is causing
Failed to initialize CPU module in firmware because probe is low on memory (heap).
Br zorz
HI
From all of the reading done .. I believe the problem is that the FLASH is empty and this is ok how the uC behaves.
The issue now I have that I can not connect to the uC with S32DS and J-LINK to program something into it.
This is what I have when I try to connect.
SEGGER J-Link GDB Server V6.42a Command Line Version
JLinkARM.dll V6.42a (DLL compiled Feb 1 2019 18:00:08)
Command line: -if swd -device S32K116 -endian little -speed auto -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: auto
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware: V8.00
S/N: 158004146
OEM: IAR
Checking target voltage...
Target voltage: 3.36 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
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
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
ERROR: Failed to measure CPU clock frequency: second loop count is less than first one! (0<=13418)
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 15952 bytes @ address 0x00000410 - Verified OK
Downloading 15856 bytes @ address 0x00004260 - Verified OK
Downloading 1036 bytes @ address 0x00008050 - Verified OK
Downloading 8 bytes @ address 0x0000845C - Verified OK
Downloading 1008 bytes @ address 0x00008464 - Verified OK
WARNING: CPU could not be halted
ERROR: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
Can not read register 16 (XPSR) while CPU is running
Can not read register 20 (CFBP) while CPU is running
Can not read register 0 (R0) while CPU is running
Can not read register 1 (R1) while CPU is running
Can not read register 2 (R2) while CPU is running
Can not read register 3 (R3) while CPU is running
Can not read register 4 (R4) while CPU is running
Can not read register 5 (R5) while CPU is running
Can not read register 6 (R6) while CPU is running
Can not read register 7 (R7) while CPU is running
Can not read register 8 (R8) while CPU is running
Can not read register 9 (R9) while CPU is running
Can not read register 10 (R10) while CPU is running
Can not read register 11 (R11) while CPU is running
Can not read register 12 (R12) while CPU is running
Can not read register 14 (R14) while CPU is running
Can not read register 15 (R15) while CPU is running
Can not read register 17 (MSP) while CPU is running
Can not read r
Writing register (PC = 0x 410)
Read 4 bytes @ address 0x00000410 (Data = 0x00000000)
Read 2 bytes @ address 0x00000410 (Data = 0x0000)
Read 2 bytes @ address 0x00007AF4 (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 0x00007AF4 (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
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Setting breakpoint @ address 0x00007AF4, Size = 2, BPHandle = 0x0001
Starting target CPU...
ERROR: Can not read register 15 (R15) while CPU is running
Reading all registers
ERROR: Can not read register 0 (R0) while CPU is running
ERROR: Can not read register 1 (R1) while CPU is running
ERROR: Can not read register 2 (R2) while CPU is running
ERROR: Can not read register 3 (R3) while CPU is running
ERROR: Can not read register 4 (R4) while CPU is running
ERROR: Can not read register 5 (R5) while CPU is running
ERROR: Can not read register 6 (R6) while CPU is running
ERROR: Can not read register 7 (R7) while CPU is running
ERROR: Can not read register 8 (R8) while CPU is running
ERROR: Can not read register 9 (R9) while CPU is running
ERROR: Can not read register 10 (R10) while CPU is running
ERROR: Can not read register 11 (R11) while CPU is running
ERROR: Can not read register 12 (R12) while CPU is running
ERROR: Can not read register 13 (R13) while CPU is running
ERROR: Can not read register 14 (R14) while CPU is running
ERROR: Can not read register 15 (R15) while CPU is running
ERROR: Can not read register 16 (XPSR) while CPU is running
ERROR: Can not read register 17 (MSP) while CPU is running
ERROR: Can not read register 18 (PSP) while CPU is running
ERROR: Can not read register 24 (PRIMASK) while CPU is running
ERROR: Can not read register 25 (BASEPRI) while CPU is running
ERROR: Can not read register 26 (FAULTMASK) while CPU is running
ERROR: Can not 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 0x00007AF4, Size = 2
Read 4 bytes @ address 0xDEADBEEE (Data = 0x00000000)
Read 2 bytes @ address 0xDEADBEEE (Data = 0x0000)
Br zorz
Hi
The answer to the last problem was an OLD j-link version.
With J-link version 12 all is ok now
Br zorz