Cannot flash MCU MKL02Z32CAF4R

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

Cannot flash MCU MKL02Z32CAF4R

207 Views
il_andil
Contributor I

Hi,

I'm trying to debug MKL02Z32CAF4R 20-pin package. I'm using the following setup:

1. A custom board with MKL02Z32CAF4R on it. Access to SWDIO and SWDCLK pins as well as RESET_b pin. The MCU is shipped new.

2. MCUExpresso IDE version v11.9.0 [Build 2144].

3. MCU-Link (base version) with Linkserver 1.4.85. MCU-LINK installer version 2.263 (I tried also the latest version 3.133, but the result is the same).

4. I'm debugging through SWD and I'm using jumper J6 on MCU-Link to connect to DIO, CLK and Reset. My board is powered externally though a power supply with 3.3V.  

5. I'm using the simplest code - main contains an infinite loop with a for-loop delay and a PRINTF.

6. linkserver configuration is the following in the IDE (using mass erase under GUI Flash tool tab and I also tried to use various reset scripts provided in the linkserver by default):

il_andil_0-1708671133660.png

7. I configured only two pins using the IDE (Vdd and Vss), but configuring also DIO and CLK led to the same result.

8. I connected the reset pin on the MCU-Linnk J6 to the reset pin (A4) on the MCU, and tried again, but the result is the same.

I already read through  this forum https://community.nxp.com/t5/MCUXpresso-General/LPC1758-Cannot-halt-processor/m-p/1368631 and this https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Regaining-debug-access-to-target-MCU/m-p/473923 but I don't think I can use ISP with this MCU (let me know if i'm wrong).

The result is that it is not possible to halt core. I don't understand what it means since I'm new to  programming at this level:

MCUXpresso IDE RedlinkMulti Driver v11.9 (Dec 11 2023 18:02:10 - crt_emu_cm_redlink build 2)

Found chip XML file in C:/Users/zzz/Documents/MCUXpressoIDE_11.9.0_2144/workspace/SimpleTest1/Release\MKL02Z32xxx4.xml

( 5) Remote configuration complete

Reconnected to existing LinkServer process.

============= SCRIPT: kinetisconnect.scp =============

Kinetis Connect Script

Connecting to Probe Index = 1

This probe = 1

This TAP = 0

This core = 0

DpID = 0BC11477

Assert NRESET

Reset pin state: 00

Power up Debug

MDM-AP APID: 0x001C0020

MDM-AP System Reset/Hold Reset/Debug Request

MDM-AP Control: 0x0000001C

MDM-AP Status (Flash Ready) : 0x00000032

Part is not secured

MDM-AP Control: 0x00000014

Release NRESET

Reset pin state: 01

MDM-AP Control (Debug Request): 0x00000004

MDM-AP Status: 0x00000032

MDM-AP Core Halt Failed

MDM-AP Control (Debug Request): 0x00000004

MDM-AP Status: 0x00000032

MDM-AP Core Halt Failed

MDM-AP Control (Debug Request): 0x00000004

MDM-AP Status: 0x00000032

MDM-AP Core Halt Failed

============= END SCRIPT =============================

Probe Firmware: MCU-LINK (r0FF) CMSIS-DAP V2.263 (NXP Semiconductors)

Serial Number: VWMFB1M11IXOD

VID:PID: 1FC9:0143

USB Path: \\?\hid#vid_1fc9&pid_0143&mi_00#7&190a6d17&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

Using memory from core 0 after searching for a good core

On debug connection - reset using system reset

Warning - processor did not halt - gave up waiting

Cannot halt processor

Request debug reset of DAP

Cannot halt processor

Request debug reset of DAP

( 40) No Halt

debug interface type = CoreSight DP (DAP DP ID 0BC11477) over SWD TAP 0

processor type = Cortex-M0+ (CPU ID 00000C60) on DAP AP 0

number of h/w breakpoints = 2

number of flash patches = 0

number of h/w watchpoints = 2

Probe(0): Connected&Reset. DpID: 0BC11477. CpuID: 00000C60. Info: <None>

Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.

Content of CoreSight Debug ROM(s):

RBASE F0002000: CID B105100D PID 000008E000 ROM (type 0x1)

ROM 1 F0000000: CID B105900D PID 04000BB932 CSt ARM MTB type 0x31 Trace Sink - Basic trace router

ROM 1 F0001000: CID B105900D PID 000008E000 CSt MTBDWT type 0x4 Debug Control - Other

ROM 1 E00FF000: CID B105100D PID 04000BB4C0 ROM (type 0x1)

ROM 4 E000E000: CID B105E00D PID 04000BB008 Gen SCS (type 0x0)

ROM 4 E0001000: CID B105E00D PID 04000BB00A Gen DWT (type 0x0)

ROM 4 E0002000: CID B105E00D PID 04000BB00B Gen FPB (type 0x0)

Cannot halt processor

Failed on chip setup: Ep(04). Cannot halt processor.

(C:\nxp\LinkServer_1.4.85\binaries\crt_emu_cm_redlink) Waiting for new GDB session to start...

Can you see if I'm doing anything wrong or if I can try something else?

Thanks in advance!

0 Kudos
1 Reply

175 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, this issue is the common "Cannot halt processor" Maybe you could recover the control with a mass erase on the target MCU.

Best regards,
Pavel

0 Kudos