SWO/SWV on LPC-Link2 with CMSIS-DAP?

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

SWO/SWV on LPC-Link2 with CMSIS-DAP?

2,534 Views
bryan4
Contributor I

We have an LPC55S69 on an LPCXpresso556S9, and we are trying to use the built-in LPC-Link2 (an LPC4322) as a debugger.

Running the CMSIS-DAP firmware (v5.361) on the LPC-Link2, the probe reports that it has no SWO/SWV capabilities; rltool output:

> probestatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.361
Serial Number = JSAQCQIQ
VID:PID = 1FC9:0090
Path = /dev/hidraw2

IsOpen = TRUE
WireInitialized = TRUE
WireProtocol = SWD
CoresConfigured = TRUE
PacketSize = 1024
Reference Count = 1
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP

TAP = 0
Core = 0
CoreReferenceCount = 1
HighestPriority = 0
APID = 84770001
APIndex = 00
DPID = 6ba02477
CorePartNo = M33

AddrInc = 1024

Probe Reference Count = 1

However, we know that this is not the case: when running (for example) the lpcxpresso55s69_hello_world_swo via the MCUXpresso IDE (version 11.1.1_3241), we are able to get DWT data (and can see from a logic analyzer that there is DWT data on the SWO pin on the SWD header) -- and we know that the LPC55S69 can successfully generate TPIU-framed ITM data as well by using an external debugger via the SWD header.

Our questions: it appears that MCUXpresso is going through an interface other than CMSIS-DAP to enable SWO trace on the LPC-Link2; is this interface documented so we can use it through other CMSIS-DAP based tooling? Alternatively, is there LPC-Link2 firmware that correctly reflects its SWV capabilities via CMSIS-DAP?

With our thanks in advance for any help you can provide!

Labels (2)
5 Replies

2,245 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Bryan,

Hope you are doing well.

From my understanding to your question. You would like to use the onboard LPC4322 and enable the SWO Trace capabilities for the LPC55S69 EVK board, is this correct?

Eanbling the following windows?

pastedImage_1.png

If so, please let me know so that I can guide you through the process.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos

2,245 Views
bryan4
Contributor I

Sabina,

Thank you for your reply! No, that's not our question; we know that we can enable SWO via the IDE -- we need to be able to enable SWO outside of the IDE for purposes of development, debugging, CI/CD and so on. Normally, CMSIS-DAP would be the vector for this, but the firmware (incorrectly) reports that it has no SWO capabilities via CMSIS-DAP. So we are really asking for documentation around the interface that we know exists (that is, the interface used via the IDE) or LPC-Link2 firmware that correctly reflects (and allows for operation of) its SWO capabilities via CMSIS-DAP.

Thanks again for your reply, and in advance for any help you can offer!

0 Kudos

2,245 Views
robertboys
Contributor IV

Hello

CMSIS-DAP is an open source product of Arm.

CMSIS_5/CMSIS/DAP/Firmware at develop · ARM-software/CMSIS_5 · GitHub 

It has Apache 2.0 license and source code is available.  It uses USB HID for implementation simplicity.

The first version of CMSIS-DAP (v0.01) did not incorporate SWO support.

There was no v 1.0.

V 1.1.0 was the first to incorporate SWO.

The current version V2.0 fully incorporates it.

NXP did not use V 2.0 in their LPCLINKV2 implementation (AFAIK - because it will not work with Keil uVision)

The GitHub link above references an LPCLINK example that might (I have not tried it) work on a LPCLINKV2 board if you can program the on-board processor.  (If someone gets this working with SWO and uVision I would like to know about this).

One other clue:  I was recently working on a LPC55S69 Cortex-M33 board with a ULINKplus and I was not able to get SWO working. I did have signal at the SWO pin but it was degraded (slow rising and falling edges).  It turns out the SWO speed was 96 MHz which is very fast.  I found a register TRACECLKDIV that I can easily use to lower the SWO speed to a more sane frequency.  48 MHz works great but for slower debuggers you might have to lower it more.

Bob Boys

Arm/Keil

2,245 Views
converse
Senior Contributor V

I think MCUXpresso is accessing the Coresight registers directly to configure SWO.

0 Kudos

2,244 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Bryan,

Hope you are doing well.

I've not worked with this outside of the IDE. Could you please describe what other platform you are using so that I may check. In addition, please check the following posts that may provide assistance. 

LPC-Link2 fails to enumerate with CMSIS-DAP firmware 

or the reference guide for further details.

MCUXpresso IDE SWO Trace 

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos