AnsweredAssumed Answered

LinkServer behaviour on uninitialized flash part

Question asked by Satish Acharya on Mar 31, 2019
Latest reply on Apr 9, 2019 by Satish Acharya

Hello,

I have a Kinetis K60 part with uninitialized flash on a custom board and I’m trying to debug for the first time. I have gone through all the discussions in NXP forum and nothing seems to answer my question below.

 

Temporarily, I’m using a FREEDOM K64 board as a debugger for my custom board. (I plan to switch to LPC_LINK2 soon. BTW, I get same error message even with LPC_LINK2. So, the debugger is not the issue.) When I try to debug a simple basic project using SWD, the debugger exits with error “Unable to configure core for probe index 1. Wire not connected.”. Redlink Server log has following:

 

[Started server]

[Connected on port 3025]

redlink> ProbeList

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = FALSE

WireInitialized = FALSE

WireProtocol = JTAG

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> ProbeList

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = FALSE

WireInitialized = FALSE

WireProtocol = JTAG

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> ProbeIsOpen 1

FALSE

redlink> ProbeOpenByIndex 1

Probe Handle 1 Open

redlink> WireIsConnected 1

FALSE

redlink> WireSwdConnect 1

Wire Ack Fault - target connected?

redlink> CoresConfigured 1

FALSE

redlink> CoreConfig 1

Wire not connected

[Closed]

 

[Connected on port 3025]

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = TRUE

WireInitialized = FALSE

WireProtocol = SWD

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> quit

[Closed]

 

The log shows the debugger is unable to find K60 core on SWD and this explains the error.

 

However, interestingly, when I keep reset button on FREEDOM board pressed (so that it resets my custom board and keeps K60 under reset) and try to debug my custom board (of course, I don’t expect it to work but this is an experiment), the debugger is able to detect the core and goes way beyond this point. Here’s the Redlink log with reset pin of FREEDOM board asserted:

 

[Started server]

[Connected on port 3025]

redlink> ProbeList

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = FALSE

WireInitialized = FALSE

WireProtocol = JTAG

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> ProbeList

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = FALSE

WireInitialized = FALSE

WireProtocol = JTAG

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> ProbeIsOpen 1

FALSE

redlink> ProbeOpenByIndex 1

Probe Handle 1 Open

redlink> WireIsConnected 1

FALSE

redlink> WireSwdConnect 1

DpID = 2BA01477

redlink> CoresConfigured 1

TRUE

redlink> ProbeStatus

Index = 1

Manufacturer = ARM

Description = DAPLink CMSIS-DAP

VID:PID = 0D28:0204

IsOpen = FALSE

WireInitialized = FALSE

WireProtocol = JTAG

CoresConfigured = FALSE

PacketSize = 64

Reference Count = 0

HasSWV = FALSE

HasETM = FALSE

HasJTAG = TRUE

HasSWD = TRUE

Probe Type = CMSIS-DAP

Probe Reference Count = 0

redlink> quit

[Closed]

 

The debugger gets DpID and talks to core. As expected, I see saw tooth waveform on reset pin due to WD timer going off. The fact that the debugger is able to talk to core shows electrical issues on SWD pins are ruled out. (I did insert impedance matching/pull-up/pull-down/etc resistors/cap on SWD pins but didn't help.)

 

Question is why the debugger is unable to talk to core when K60 is NOT under reset? Is it because, core is busy executing/faulting the FF’s from uninitialied flash? If true, why is the debugger not halting the core before attempting to connect? I cannot even do mass erase of the device since SWD is unable to communicate to core.

 

Any suggestions?

 

Appreciate your help,

 

Satish

Outcomes