K22 segger J-Link debug problem

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

K22 segger J-Link debug problem

Jump to solution
3,077 Views
jqwang
Contributor II

Hi,

I suddenly cannot start J-Link debug. I checked the J-link ok @FRDM-K22F board.

pastedImage_0.png

Log info:

SEGGER J-Link GDB Server V4.98d - Terminal output channel

Connection closed by the GDB server.

Exception condition detected on fd 0

Quit (expect signal SIGINT when the program is resumed)

Quit (expect signal SIGINT when the program is resumed)

Quit (expect signal SIGINT when the program is resumed)

Quit (expect signal SIGINT when the program is resumed)

error detected on stdin

SEGGER J-Link GDB Server V4.98d Command Line Version

JLinkARM.dll V4.98d (DLL compiled Apr 28 2015 13:58:23)

-----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: MK22FN512xxx12

Target interface: JTAG

Target interface speed: 30kHz

Target endian: little

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link V9 compiled Apr 21 2015 18:10:40

Hardware: V9.30

S/N: 59300951

Feature(s): GDB

Checking target voltage...

Target voltage: 3.40 V

Listening on TCP/IP port 2331

Connecting to target...ERROR: Could not connect to target.

Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...

Shutting down...

Could not connect to target.

Please check power, connection and settings.

please suggest how to solve this issue.

thanks,

JQ

Tags (1)
1 Solution
1,210 Views
BlackNight
NXP Employee
NXP Employee
0 Kudos
5 Replies
1,210 Views
BlackNight
NXP Employee
NXP Employee

What is the GDB log saying?

Altough the messages are different, it could be that you have breakpoints on non-existing location set (this is a know GDB problem). Try clearing all breakpoints/watchpoints (see Failed to Debug with GDB: Breakpoints or Expressions on non-existing Locations | MCU on Eclipse). I hope this helps.

0 Kudos
1,210 Views
BlackNight
NXP Employee
NXP Employee

another consideration:

are you using JTAG or SWD?

Your log shows

Target interface: JTAG

but the FRDM-K22F has SWD.

0 Kudos
1,210 Views
jqwang
Contributor II

Hi Erich,

thank you! My hardware is using jtag.

pastedImage_0.png

Is there a way to configure my debug port to SWD, although they're wired as JTAG.

THANKS,

JQ

0 Kudos
1,211 Views
BlackNight
NXP Employee
NXP Employee

pastedImage_0.png

0 Kudos
1,210 Views
jqwang
Contributor II

thank you!

we found the hardware wire connection is wrong. The J-link Reset pin should be connected to MCU chip reset signal  reset_b, instead of jtag-TRST.

One interest thing is why this worked for several days until it had problem (then cannot work anymore).

pastedImage_2.png