Pinout and debugger configuration for reliable SWD on LPC810?

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

Pinout and debugger configuration for reliable SWD on LPC810?

1,069 Views
pej
Contributor I

I want to explore the micro trace buffer on the 8-pin DIP LPC810 using the Keil uVision5 toolchain and a ULINK2 debugger. I've looked at the schematic for the LPC800 mini kit and also looked at other LPC810-based schematics by Leon Heller and Jim Eli in order to establish the correct wiring of the LPC's debug pins to the SWD connector.

I have 3 wires connected from the LPC810 to the SWD connector: nRESET, SWCLK and SWDIO. I also have a common ground between them.

I created a simple program to re-enable the SWD and RESET pins via the switch matrix:

LPC_SWM->PINENABLE0 = 0xffffffb3;

I succesfully programmed the resultant .hex file using FlashMagic and was then able to get the Keil toolchain past the flash uploader stage and into debug mode. However, I don't appear to be able to set breakpoints, inspect memory or single-step.

Can anyone share their successful LPC810 SWD debug setup or does everyone use FlashMagic :smileyhappy: ?

Labels (1)
0 Kudos
1 Reply

717 Views
pej
Contributor I

Jim shared his code so I now have:

SYSCON_SYSAHBCLKCTRL |= (1<<7); // bit 7 for Switch Matrix (SWM) clock

LPC_SWM->PINENABLE0 = 0xffffffb3UL;

And the wiring that I have on my breadboard looks like

breadboard-connection.jpg

The above configuration works for Keil uVision 5.21a and a ULINK2 with the latest firmware 

0 Kudos