[K32W061] Issue with debugging using DAP-Link debugger

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

[K32W061] Issue with debugging using DAP-Link debugger

Jump to solution
2,433 Views
Mateusz_K
Contributor II

Hello, I was trying to debug K32W061 MCU using on-board CMSIS-DAP debugger from MIMXRT1170-EV. I have tried to debug one of the example projects from the SDK for MCUXpressso for K32W061 (led_blinky). I connected correctly vcc, gnd, swd_clk, swd_dio, reset pins. Issue seems to be with the flash memory driver. do you have any syggestions?

Using:

  • On-board DAP-Link debugger from MIMXRT1170-EV
  • MCUXpresso IDE v11.5.0_7232
  • K32W061 MCU

IDE Console output:

MCUXpresso IDE RedlinkMulti Driver v11.5 (Dec 16 2021 12:38:31 - crt_emu_cm_redlink build 2)
Found part description in XML file K32W061_internal.xml
( 5) Remote configuration complete
Reconnected to existing LinkServer process.
============= SCRIPT: QN9090Connect.scp =============
QN9090 flash connect script
APID = 0x24770011
Done
============= END SCRIPT ============================
Probe Firmware: CMSIS-DAP (ARM)
Serial Number: 02440000082e53da00000000000000000000000097969905
VID:PID: 0D28:0204
USB Path: \\?\hid#vid_0d28&pid_0204&mi_03#9&3a57ae47&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type = CoreSight DP (DAP DP ID 2BA01477) over SWD TAP 0
processor type = Cortex-M4 (CPU ID 00000C24) on DAP AP 0
number of h/w breakpoints = 6
number of flash patches = 2
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 2BA01477. CpuID: 00000C24. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FF000: CID B105100D PID 04000BB4C4 ROM (type 0x1)
ROM 1 E000E000: CID B105E00D PID 04000BB000 Gen SCS (type 0x0)
ROM 1 E0001000: CID B105E00D PID 04003BB002 Gen DWT (type 0x0)
ROM 1 E0002000: CID B105E00D PID 04002BB003 Gen FPB (type 0x0)
ROM 1 E0000000: CID B105E00D PID 04003BB001 Gen ITM (type 0x0)
ROM 1 E0040000: CID B105900D PID 04000BB9A1 CSt TPIU type 0x11 Trace Sink - TPIU
CM4 Rev. 4.0 CPCR2 SCSIZ: 0KB CCSIZ: 0KB
NXP: K32W061
DAP stride is 4096 bytes (1024 words)
Inspected v.2 On-chip Flash Memory QN9090_640K.cfx
Image 'QN9090_Internal Flash Dec 16 2021 12:43:58'
Opening flash driver QN9090_640K.cfx
Sending VECTRESET to run flash driver
AFTER driver startup timeout (302 5ms retries)
Driver Addresses
Start: 04000000
Entry: 0400009D
End: 04000828
Stack: 04001028
Mailbox:04003C28
Driver Register State
R0: 00000005
R1: 040007B0
R2: 00000000
R3: 80000000
R4: 40009000
R5: 04000588
R6: 00000000
R7: 00000000
R8: 00000000
R9: 00000000
R10: 00000000
R11: 00000000
R12: 00000000
SP: 04000FF8
LR: 04000459
PC: 0400045C
xPSR: 81000000
MSP: 04000FF8
PSP: 04001028
CFBP: 00000001 (CONTROL=0x0, FAULTMASK=0x0, BASEPRI=0x0, PRIMASK=0x1)
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
chip initialization failed - Ef(34): Timed-out initializing flash.
failed to initialize flash driver QN9090_640K.cfx

0 Kudos
Reply
1 Solution
2,299 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Could you please confirm that you have Python 3.7+ and pycryptodome module installed in your system? Please, make sure that Python is added to the PATH.

You can find more information on how to setup the toolchain and build a demo application using MCUXpresso in the Getting Started with MCUXpresso SDK for K32W061. Instructions on how to install Python and add it to the PATH can be found in Chapter 3: Set up toolchain, Section 3.3: Install Python3.

Regards,
Eduardo.

View solution in original post

0 Kudos
Reply
5 Replies
2,267 Views
Mateusz_K
Contributor II

Thank you for your help. I was able to debug example using Jlink in MCUXpresso. Instructions also mentions how to import example project in IAR Workbench. However I cannot find the .eww wile in the given path. After downloading SDK for k32w061, there is only one python script in the mentioned path. 

Mateusz_K_0-1688982878564.png

when I searched in the MCUXpresso instalation path there where no such folder as boards. 

 

0 Kudos
Reply
2,258 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

If you are working with IAR, you will need to download the SDK for IAR Embedded Workbench for ARM from the MCUXpresso SDK Builder

EduardoZamora_0-1689011625039.png

Regards,
Eduardo.

0 Kudos
Reply
2,333 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @Mateusz_K

Hope you are doing well.

Just to confirm, have you been able to flash/debug the K32W061 before? Is it possible for you to use another external debugger to see if your hardware and software are both working properly?

Please, consider that you may need to cut the traces/connections between the on-board debugger and the MIMXRT1170 to try to avoid any signal mixing.

Regards,
Eduardo.

0 Kudos
Reply
2,314 Views
Mateusz_K
Contributor II

Sorry fot the hold up. I was not able to debug K32W061 before. I was able to confirm that the hardware and software (my software, other than the MCUXpresso test project) is working properly. I have tried using Jlink instead as a debug probe, however I was not able  to do it. This time processor seems to be stuck in some kind of boot loop in ROM memory region. I was trying to debug "flash_demo" test project from SDK.  

Mateusz_K_0-1688730279223.png

 

0 Kudos
Reply
2,300 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Could you please confirm that you have Python 3.7+ and pycryptodome module installed in your system? Please, make sure that Python is added to the PATH.

You can find more information on how to setup the toolchain and build a demo application using MCUXpresso in the Getting Started with MCUXpresso SDK for K32W061. Instructions on how to install Python and add it to the PATH can be found in Chapter 3: Set up toolchain, Section 3.3: Install Python3.

Regards,
Eduardo.

0 Kudos
Reply