S32KEVB146 CANN'T DEBUG

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

S32KEVB146 CANN'T DEBUG

1,184 Views
lz135135
Contributor I

HI:

I have a s32k146 evb board, according to release note, as below:

lz135135_0-1709020625818.png

I can power up the board just using usb connector when I set the J104,J107,J10 as default,but in fact if i just use the usb micro connector, only one led D2 is blink; then I connect 1 and 2 of j107,and powerd by 12V power source, I can debug from PEmicro as below:

lz135135_1-1709021447567.png

and the s32k146EVB is as below:

lz135135_2-1709021653333.png

is it normal?

I develop a software project use S32DS IDE, the software is as below:

lz135135_3-1709021987819.png

I can compile this project successfully, use above method, I can debug firstly, then I modify my software,compile it again,I cann't debug ,some errors occur:

lz135135_4-1709022479943.png

how to resolve it?

 

 

0 Kudos
40 Replies

747 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Iz135135

Could you please take a look the highlight part is filled or not.

Senlent_0-1709028096476.png

 

0 Kudos

733 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Iz135135

Just refer to the debug page settings in the routine. In most cases, it's because you didn't set it up correctly.

0 Kudos

730 Views
lz135135
Contributor I

now I debug the examples from S32DS IDE,donn't change anything,and I have import the examples again,and install the S32DS  IDE again , donn't debug normally!

lz135135_0-1709088491998.pnglz135135_1-1709088533635.pnglz135135_2-1709088570099.pnglz135135_3-1709088605672.png

 

 default configurations as above!

0 Kudos

734 Views
lz135135
Contributor I

I change the configurations as your map,but errors also occur:

lz135135_0-1709088040282.png

 

0 Kudos

727 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@lz135135

Check your EVB, this light should not be on all the time

This means that the MCU is always in reset state

Senlent_0-1709088544684.png

 

0 Kudos

699 Views
lz135135
Contributor I

besides,the s32k146EVB can work normally,it can run the software that I have programmed normally,but cann't debug now.

0 Kudos

694 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@lz135135

跳冒配置没有问题,调试器配置界面也没有问题。

D1的指示灯亮有问题,说明MCU在复位,所以我让你检查OpenSDA调试口的状态

如果你有J-LINK,可以尝试使用J-LINK来解锁一下再调试

0 Kudos

670 Views
lz135135
Contributor I

1.OPEN_SDA调试口怎么检查?是那几个口?

2.这边使用jlink连接,如下图:

lz135135_0-1709100157642.png

J107 1和2相连,j104 2和3相连,j104 2和3相连,使用 jlink解锁如下:

lz135135_1-1709100317300.png

 

 哪里有问题吗?

0 Kudos

666 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@lz135135

Jumper没问题,检查你SWD口连接是不是正常

下面是我测试的截图

Senlent_0-1709101946630.png

 

0 Kudos

543 Views
lz135135
Contributor I

lz135135_0-1709187104789.png

OPENSDA还是不行

lz135135_1-1709187212734.png

 

0 Kudos

541 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Iz135135

1.用J-LINK解锁后的现象是正确的

2.解锁完不用断电,此时MCU就应该是空的,断开J-LINK的链接,把USB接上,打开IDE里面的例程,用opensda进行调试下载

 

 

0 Kudos

537 Views
lz135135
Contributor I

hi:

1.解锁以后,opensda可以进行debug了,但是J10 必须是2和3相(即选择5V),如果选择3.3V. OPEN_SDA还是仍然无法debug,想确认这个3.3V和5V是控制什么的电压?

2.不管是选择3.3V还是5V,D1红灯一直亮着,分析了下原理图,J104,2和3相连,如下:

lz135135_0-1709195410932.png

 

当选择3.3V时,测量SDA_RST_TGTMCU_J_B电压为0.287V,U1的B1脚也是0.28V左右,D1灯亮

当选择5V时,SDA_RST_TGTMCU_J_B电压为2.587V,U1的B1脚也是2.58V左右,

SBC_RST_LS的电压也为2.58V左右(如下图),D1红灯亮,所以推测不是U1或U32导致,就是OPENSDA芯片导致,所以这边OPENSDA里面的芯片可以更新吗?

lz135135_1-1709196062617.png

 

0 Kudos

530 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@lz135135

1.芯片可以选择使用3.3V或者5V供电,用户自己选择

2.你可以把板子寄回去换新或者维修

https://www.nxp.com/support/sample-and-buy/buy-from-nxp/returns-and-warranty-information:WTBUY_DTD_R...

 

0 Kudos

528 Views
lz135135
Contributor I

维修和换新需要付费吗?另外这个是我同事的账号买的,我直接寄过去可以吗?维修时在哪里?

0 Kudos

525 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@lz135135

可以退货或者维修换新,应该不需要付费,地址应该是在国外,根据网站给的流程来。

我觉得完全没必要换,5V使用正常不一样用吗,这么搞太浪费时间了

0 Kudos

518 Views
lz135135
Contributor I

OPENSDA那颗芯片MK20DX128VFM5里面的程序有吗?可以更新吗?

0 Kudos

515 Views
Senlent
NXP TechSupport
NXP TechSupport

有程序,可以更新,在论坛你搜一搜OpenSDA更新相关的回答,

0 Kudos

546 Views
lz135135
Contributor I

解锁后,单插一个12V电源,不接JLINK和USB,D1灯亮

0 Kudos

549 Views
lz135135
Contributor I

Hi:这边使用jlink解锁成功了,如下:

lz135135_3-1709185344999.png

板子上JLINK连接成功没有执行“unlock Kinetis”命令时,板子D1红灯不亮,执行后,D1亮

S32DS使用jlink进行debug,可以进到debug,但是显示错误,且无法单步执行:

lz135135_0-1709184971349.png

 

 

lz135135_1-1709185085080.png

debug console详细信息如下:

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 S32K146 -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: S32K146
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware: V9.20
Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
Checking target voltage...
Target voltage: 3.27 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)
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 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR 01000000, APSR 00000000, 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
Failed to enable SWO. Could not measure target CPU frequency.
Read 4 bytes @ address 0xFFFFFFFE (Data = 0x00000000)
Downloading 1024 bytes @ address 0x00000000 - Verified OK
Downloading 16 bytes @ address 0x00000400 - Verified OK
Downloading 572 bytes @ address 0x00000410 - 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 0x000005C6 (Data = 0x0000)
Read 2 bytes @ address 0x000005C6 (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 0x000005C6 (Data = 0xFFFF)
Read 2 bytes @ address 0x000005C6 (Data = 0xFFFF)
Read 2 bytes @ address 0x000005C6 (Data = 0xFFFF)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR 01000000, APSR 00000000, 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 0x000005C6, Size = 2, BPHandle = 0x0001
Starting target CPU...
Debugger requested to halt target...
WARNING: CPU could not be halted
Reading all registers
WARNING: CPU could not be halted
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
ERROR: Can not read register 32 (FPSCR) while CPU is running
ERROR: Can not read register 33 (FPS0) while CPU is running
ERROR: Can not read register 34 (FPS1) while CPU is running
ERROR: Can not read register 35 (FPS2) while CPU is running
ERROR: Can not read register 36 (FPS3) while CPU is running
ERROR: Can not read register 37 (FPS4) while CPU is running
ERROR: Can not read register 38 (FPS5) while CPU is running
ERROR: Can not read register 39 (FPS6) while CPU is running
ERROR: Can not read register 40 (FPS7) while CPU is running
ERROR: Can not read register 41 (FPS8) while CPU is running
ERROR: Can not read register 42 (FPS9) while CPU is running
ERROR: Can not read register 43 (FPS10) while CPU is running
ERROR: Can not read register 44 (FPS11) while CPU is running
ERROR: Can not read register 45 (FPS12) while CPU is running
ERROR: Can not read register 46 (FPS13) while CPU is running
ERROR: Can not read register 47 (FPS14) while CPU is running
ERROR: Can not read register 48 (FPS15) while CPU is running
ERROR: Can not read register 49 (FPS16) while CPU is running
ERROR: Can not read register 50 (FPS17) while CPU is running
ERROR: Can not read register 51 (FPS18) while CPU is running
ERROR: Can not read register 52 (FPS19) while CPU is running
ERROR: Can not read register 53 (FPS20) while CPU is running
ERROR: Can not read register 54 (FPS21) while CPU is running
ERROR: Can not read register 55 (FPS22) while CPU is running
ERROR: Can not read register 56 (FPS23) while CPU is running
ERROR: Can not read register 57 (FPS24) while CPU is running
ERROR: Can not read register 58 (FPS25) while CPU is running
ERROR: Can not read register 59 (FPS26) while CPU is running
ERROR: Can not read register 60 (FPS27) while CPU is running
ERROR: Can not read register 61 (FPS28) while CPU is running
ERROR: Can not read register 62 (FPS29) while CPU is running
ERROR: Can not read register 63 (FPS30) while CPU is running
ERROR: Can not read register 64 (FPS31) 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 19 (RAZ) while CPU is running
ERROR: Can not read register 20 (CFBP) while CPU is running
ERROR: Can not read register 21 (APSR) while CPU is running
ERROR: Can not read register 22 (EPSR) while CPU is running
ERROR: Can not read register 23 (IPSR) 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
ERROR: Can not read register 28 (BASEPRI_MAX) while CPU is running
ERROR: Can not read register 29 (IAPSR) while CPU is running
ERROR: Can not read register 30 (EAPSR) while CPU is running
ERROR: Can not read register 31 (IEPSR) while CPU is running
ERROR: Can not read register 32 (FPSCR) while CPU is running
ERROR: Can not read register 33 (FPS0) while CPU is running
ERROR: Can not read register 34 (FPS1) while CPU is running
ERROR: Can not read register 35 (FPS2) while CPU is running
ERROR: Can not read register 36 (FPS3) while CPU is running
ERROR: Can not read register 37 (FPS4) while CPU is running
ERROR: Can not read register 38 (FPS5) while CPU is running
ERROR: Can not read register 39 (FPS6) while CPU is running
ERROR: Can not read register 40 (FPS7) while CPU is running
ERROR: Can not read register 41 (FPS8) while CPU is running
ERROR: Can not read register 42 (FPS9) while CPU is running
ERROR: Can not read register 43 (FPS10) while CPU is running
ERROR: Can not read register 44 (FPS11) while CPU is running
ERROR: Can not read register 45 (FPS12) while CPU is running
ERROR: Can not read register 46 (FPS13) while CPU is running
Read 4 bytes @ address 0xDEADBEEE (Data = 0x00000000)
Read 4 bytes @ address 0xDEADBEEF (Data = 0x00000000)
Removing breakpoint @ address 0x000005C6, Size = 2
Read 4 bytes @ address 0xDEADBEEE (Data = 0x00000000)
Setting breakpoint @ address 0x000005C6, Size = 2, BPHandle = 0x0002
Starting target CPU...

lz135135_2-1709185200142.png

板子上D1红灯亮,jlink灯也变成红灯

0 Kudos

661 Views
lz135135
Contributor I

lz135135_0-1709104623394.png

我这边错误,确认下板子上面的灯显示正常吗?

0 Kudos