Stephen Monn

Kinetis KV10 SWD Rest Pin Always Low

Discussion created by Stephen Monn on May 26, 2016
Latest reply on Jun 3, 2016 by Stephen Monn


I am trying to program a fresh KV10 mcu, but can't get things to work. I'm programming the chip on my own PCB using the KV10 Freedom Dev Board. I made sure to cut the trace and isolate the clock pin on the SWD connection so I think it's good to program. One thing I noticed was that the reset pin was being pulled low internally, despite a 10k pull up resistor. I added a 47uF cap to the power rail to ensure correct POR and the mcu became responsive to programming, but the reset pin is still pulled low. Now when I try to flash and debug the mcu in KDS I can see in the console that it connects, but it fails to read values and begin debugging.

 

What could be causing this?

 

Here is the console output:

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

 

 

JLinkARM.dll V5.10n (DLL compiled Feb 19 2016 18:39:11)

 

 

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

Target interface:              SWD

Target interface speed:        30kHz

Target endian:                 little

 

 

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link OpenSDA 2 compiled Oct 13 2015 12:10:56

Hardware: V1.00

S/N: 621000000

Checking target voltage...

Target voltage: 3.30 V

Listening on TCP/IP port 2331

Connecting to target...WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.

Connected to target

Waiting for GDB connection...Connected to 127.0.0.1

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 0x00000000 (Data = 0xFFFFFFFF)

Target interface speed set to 30 kHz

Resetting target

Halting target CPU...

...Target halted (PC = 0xFFFFFFFE)

R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF

R4 = FFFFFFFF, R5 = 01BFF327, R6 = FBB7F77F, R7 = 07DFFF1E

R8 = FF8DDDBF, R9 = 007D81D9, R10= 03FE1F78, R11= 07FB7F5C

R12= FFFE9B15, R13= 00000BB8, MSP= 7FFFFFFC, PSP= 00000BB8

R14(LR) = 3FFFFFFC, R15(PC) = FFFFFFFE

XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000

CFBP 1FFFF6B0, CONTROL 1F000000, FAULTMASK FF0000, BASEPRI F600, PRIMASK B0

Reading all registers

Select auto target interface speed (1429 kHz)

Flash breakpoints enabled

Semi-hosting enabled (Handle on BKPT)

Wrong client mask. Semihosting I/O not changed.

Downloading 192 bytes @ address 0x00000000 - Verified OK

Downloading 16 bytes @ address 0x00000400 - Verified OK

Downloading 668 bytes @ address 0x00000410 - Verified OK

Downloading 8 bytes @ address 0x000006AC - Verified OK

Downloading 4 bytes @ address 0x000006B4 - Verified OK

Downloading 4 bytes @ address 0x000006B8 - Verified OK

Downloading 100 bytes @ address 0x000006BC - Verified OK

WARNING: CPU could not be halted

ERROR: Failed to measure CPU clock frequency

Failed to halt CPU for clock frequency detection!

 

 

Writing register (PC = 0x000004e8)

WARNING: Failed to read memory @ address 0x000004E8

Read 2 bytes @ address 0x0000059C (Data = 0xFFFF)

Read 2 bytes @ address 0x0000059C (Data = 0xFFFF)

WARNING: CPU did not halt after reset.

WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.

WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.

WARNING: CPU could not be halted

Resetting target

Halting target CPU...

WARNING: CPU could not be halted

Read 2 bytes @ address 0x0000059C (Data = 0xFFFF)

WARNING: Failed to read memory @ address 0x0000059C

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 20 (CFBP) while CPU is running

ERROR: Can not read register 23 (IPSR) while CPU is running

ERROR: Can not read register 22 (EPSR) while CPU is running

ERROR: Can not read register 21 (APSR) while CPU is running

ERROR: Can not read register 16 (XPSR) while CPU is running

ERROR: Can not read register 15 (R15) while CPU is running

ERROR: Can not read register 14 (R14) while CPU is running

ERROR: Can not read register 18 (PSP) while CPU is running

ERROR: Can not read register 17 (MSP) while CPU is running

ERROR: Can not read register 13 (R13) while CPU is running

ERROR: Can not read register 12 (R12) while CPU is running

ERROR: Can not read register 11 (R11) while CPU is running

ERROR: Can not read register 10 (R10) while CPU is running

ERROR: Can not read register 9 (R9) while CPU is running

ERROR: Can not read register 8 (R8) while CPU is running

ERROR: Can not read register 7 (R7) while CPU is running

ERROR: Can not read register 6 (R6) while CPU is running

ERROR: Can not read register 5 (R5) while CPU is running

ERROR: Can not read register 4 (R4) while CPU is running

ERROR: Can not read register 3 (R3) while CPU is running

ERROR: Can not read register 2 (R2) while CPU is running

ERROR: Can not read register 1 (R1) while CPU is running

ERROR: Can not read register 0 (R0) while CPU is running

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

R14(LR) = 00000000, R15(PC) = 00000000

XPSR 00000000, APSR 00000000, EPSR 00000000, IPSR 00000000

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

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 0x00000000 (Data = 0xFFFFFFFF)

Setting breakpoint @ address 0x0000059C, 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

Removing breakpoint @ address 0x0000059C, Size = 2

WARNING: Failed to read memory @ address 0x00000000

GDB closed TCP/IP connection

Outcomes