K02 with Segger Problems

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

K02 with Segger Problems

743 Views
anbui
Contributor II

The following is the output from the KDS.   We probe the reset pin on the K02 and found it high.  We also checked the XTAL and found no clock.  The debugger is waiting on the CPU.  We can do not enter the main breakpoint.

SEGGER J-Link GDB Server V5.10u Command Line Version

JLinkARM.dll V5.10u (DLL compiled Mar 17 2016 18:56:47)

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

Target interface:              SWD

Target interface speed:        1000kHz

Target endian:                 little

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link V9 compiled Mar 15 2016 18:03:32

Hardware: V9.30

S/N: 269307516

OEM: SEGGER-EDU

Feature(s): FlashBP, GDB

Checking target voltage...

Target voltage: 1.81 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 = 0x20002000)

Target interface speed set to 1000 kHz

Resetting target

Halting target CPU...

...Target halted (PC = 0x000004E8)

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= 20001FE0, MSP= 20001FE0, PSP= 00000000

R14(LR) = FFFFFFF9, R15(PC) = 000004E8

XPSR 01000002, APSR 00000000, EPSR 01000000, IPSR 00000002

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Select auto target interface speed (2000 kHz)

Flash breakpoints enabled

Semi-hosting enabled (Handle on BKPT)

Semihosting I/O set to TELNET Client

SWO disabled succesfully.

SWO enabled succesfully.

Downloading 1024 bytes @ address 0x00000000 - Verified OK

Downloading 16 bytes @ address 0x00000400 - Verified OK

Downloading 16144 bytes @ address 0x00000410 - Verified OK

Downloading 6768 bytes @ address 0x00004320 - Verified OK

Downloading 8 bytes @ address 0x00005D90 - Verified OK

Downloading 4 bytes @ address 0x00005D98 - Verified OK

Downloading 4 bytes @ address 0x00005D9C - Verified OK

Downloading 216 bytes @ address 0x00005DA0 - Verified OK

Comparing flash   [....................] Done.

Verifying flash   [....................] Done.

Writing register (PC = 0x000004d8)

Resetting target

Halting target CPU...

...Target halted (PC = 0x000004E8)

Read 4 bytes @ address 0x000004D8 (Data = 0xF000B672)

Read 2 bytes @ address 0x00000870 (Data = 0x4A8B)

Read 2 bytes @ address 0x00000870 (Data = 0x4A8B)

Read 2 bytes @ address 0x00000870 (Data = 0x4A8B)

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= 20001FE0, MSP= 20001FE0, PSP= 00000000

R14(LR) = FFFFFFF9, R15(PC) = 000004E8

XPSR 01000002, APSR 00000000, EPSR 01000000, IPSR 00000002

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Read 4 bytes @ address 0x000004E8 (Data = 0xBFFEF7FF)

Setting breakpoint @ address 0x00000870, Size = 2, BPHandle = 0x0001

Starting target CPU...

2 Replies

530 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi An Bui,

    Can you enter in the debug mode in KDS like the following picture? Or just can't enter main function?

68.jpg

  I check your Jlink information, I find the jlink target voltage is just 1.8V, did you use the 1.8V power not the 3.3V?

  Please use the JLINK Commander which you can find it from the Segger Jlink driver, can you find the core like the following picture?

69.jpg

    I also attached a project which can enter main function, you can test it on your side, whether you can enter in the debug mode with your board.

    About the XTAL wave, just when you enable the OSC module in the code, you can get it. If you use the internal IRC, the OSC is disabled, there will no wave in XTAL pin.

Wish it helps you!

If you still have question, please let me know!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

530 Views
anbui
Contributor II

Board configuration was borrowed from FRDM-K22F with the following changes:

#define CORE_CLOCK_FREQ 72000000U  // for CLOCK_RUN

#define CORE_CLOCK_FREQ 100000000U // for CLOCK_HSRUN

#define OSC0_XTAL_FREQ 16000000U // Used 16Mhz Oscillator instead of 8Mhz

I've included the files.

0 Kudos