How to program qn9080-dk with external J-Link Debugger

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

How to program qn9080-dk with external J-Link Debugger

3,806 Views
danieldelatorre
Contributor IV

I’m currently writing code for QN908X dev kit and I’m having issues programming my dev kit using my j-link plus debugger via SWD.  In the QN908x DK User’s Guide it states that the 9-pin debug connector is for programming “off-board” targets which tells me this is simply for programming other arm cortex chips.  When I looked at the schematic section of the same user’s guide I also noticed that the debug connector’s IO lines run directly to the LPC MCU (ISP programmer) instead of the QN9080 chip which makes sense because the LPC is acting as the ISP. 

 

So my questions are:
1. is my understanding correct that the debug connector is simply for programming other chips – this seems odd to me because I typically see a jumper option to disable the ISP and use the external debug connected.


2. If my understanding is correct, is there a recommended approach for using an external J-Link debugger?  I'm currently looking into hacking up my dev board (going to start cutting traces) but before I do I wanted to see if perhaps I'm missing something.

 

3. Is there a pdf for just the schematic, the schematic drawings in the User's Guide are not the best quality.  In some cases I can't read part numbers, and if I zoom in too much the image gets very pix-elated. 

 

BTW, I can program the board just fine using the ISP along with properly configuring my IDE’s CMSIS DAP settings.  Although I need to verify that we can use an external swd interface for validating our new hardware.

Tags (3)
8 Replies

2,253 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Daniel,

To answer your questions:

1 & 2: You can use the same P1 connector with an external probe to program the QN9080, however, you need to isolate the LPC from these lines, as it interferes with the external debugger if powered on. The easiest way to do this is by powering the QN9080DK board via the J1 connector, this way only the QN9080 gets powered and the LPC remains off.

3. I will request internally to see if they can upload the .pdf schematics of the QN9080DK to the website. I will keep you updated.

Regards,

Gerardo

2,253 Views
danieldelatorre
Contributor IV

Gerardo, 

Thanks for the reply, what you recommended is the first thing I tried... It doesn't work.  Just to be clear I connected my micro USB to J1 and then connected my jlink plus to the p1 connector.  Both my USB cable and my Jlink-plus work well.  I currently use my jlink-plus on 3 other projects and it works fine.  You mentioned that I need to isolate myself from the LPC, I thought the same.  From looking at the schematic it doesn't appear that isolating my self is as simple as not powering the LPC... The JTAG/SWD lines that are on the P1 connector don't appear to run directly to the QN9080 chip which is another reason why I can't simply use the P1 connector.  I also tried what you recommended with another qn9080 dev kit ( i have 2 ) and no dice, have you tried your recommendation?  

BTW, I have also asked the same question to Hy Mai a field rep for NXP and he is also having problems using an external J-Link debugger. 

0 Kudos

2,253 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hi Daniel,

I was able to program the QN9080 with an external J-Link and powering the board through J1 with both MCUXpresso v10.0.2 and IAR 8.11. Here is a picture of my setup:

pastedImage_1.jpg

What is the version of your QN9080DK? 

The QN_PA23_TMS_SWDIO signal from the QN9080 module is connected directly to P1 pin 2 (IF_TMS_SWDIO) and QN_PA22_TCK_SWDCLK signal from the QN9080 module is connected by U3 (double-throw analog switch) to P1 pin 4 (IF_TCK_SWCLK). Can you verify we have the same jumper connections from the picture above?

Regards.

2,253 Views
danieltruong
Contributor IV

Hi Geraldo,

I'm also having problem with using Segger J-Link debug probe and MCUXpresso IDE to debug the QN908x DK board. I see the picture and thread you posted above, it looks like you were able to "program" the board successfully. Were you using the QN9080 Programmaning tool just to program it, or were you actually using MCUXpresso IDE to conduct a debug session via J-Link probe? If it is the latter, I'm very interested in learning how you set it up. I have all the jumper setting just like yours. I also connect the power to J1 and dubug probe to P1 (I had to remove pin 7 of the connector to fit the Segger J-Link probe). I followed the instruction in section 4.4 of the Quick Start User Guide:

https://www.nxp.com/docs/en/nxp/user-guides/UM11097.pdf 

to change the debug mode to J-Link. I also get latest version of JLink driver.

Despite all that, it still fails on me.

The attached picture shows my hardware setup.

JLINK_QN908x.jpg

The following shows my Debug Config menu in MCUXpresso IDE:

Capture6.PNG

The following shows the result:

Capture9.PNG

Would appreciate your review and pointing out anything that I might have missed.

Thanks,

Daniel Truong

0 Kudos

2,253 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Daniel,

With this setup I could use MCUXpresso IDE to conduct a debug session via J-Link probe. I find strange in your debug Configuration window that the JLink interface and Device was not detected correctly. See below my window, where the JLink interface displays the S/N of my JLink probe and the Device is "QN9080C".

pastedImage_3.png

Did you create the debug configuration manually? If so, please delete this debug configuration and instead use the Debug "project_name" option from the Quickstart Panel

pastedImage_4.png

This button will start a debug probe discovery and create the debug configuration accordingly. 

pastedImage_6.png

Let me know if this solves the issue.

Regards,

Gerardo

2,253 Views
danieltruong
Contributor IV

Hi Gerardo,

I think I made a mistake not to delete all configurations. I only deleted the one I manually created, leaving still the one in the "C/C++ (NXP Semiconductors MCU Application" menu. That's why I got the error message. Now after I deleted all configurations and started over by pressing "Debug <project name>" button, it can discover the J-link probe now.

With great pleasure, I'm informing that I solved my problem, mostly thanks to your advice in this post.

Thanks so much and have a great day!

-Daniel

2,253 Views
danieltruong
Contributor IV

Gerardo,

Yes, I did create it manually. I followed your advice and deleted it. Now I'm using the button "Debug_<project name>"  in the Quickstart panel. Unfortunately, I got no luck with the following response:

Capture9.PNG

It couldn't detect the J-Link probe. What kind of probe are you using? I wonder I got the wrong probe (J-Link base) as in the above picture.

-Daniel

0 Kudos

2,253 Views
danieldelatorre
Contributor IV

Thanks! My issue was with JP16, I didn't have a jumper there so it was expecting a batter!