Content originally posted in LPCWare by robert.palmer on Tue May 29 13:44:23 MST 2012
I did not design the board, but I do have the schematics.
- The board uses a 10pin connector (similar, but not the same as the LPCLink) for the debug connection.
- This is placed very close to the LPC1756 (less than 1 inch)
- The traces are routed directly to the chip without interference from other signal lines.
- I have shortened my cable to about 3". One end is the connector to mate with the board, the other end is bare wires soldered to the holes on the LPCLink at the END of the board (I removed the solder jumpers to isolate the 1769 target from the LPCLink portion - I have verified that I have NO shorts or solder bridges to the 1769 target board)
I WAS using TCK/TDI/TDO/TMS/GND/RESET, but after reading your message, I disconnected TDO/TDI so I'm left with SWDIO/SWDCLK/RESET/GND
I have manually added pull-ups/downs for all of the signals right at the connector on the custom target board.
P2.10 has a 10K pull-up attached to it, manually added by me on the custom target board.
At this point, I got the furthest I had ever gotten. This was the output:
LPCXpresso Debug Driver v4.0 (Mar 24 2012 17:40:00)
Looked for chip XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/LPC1756.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0 Poll delay: 0.
NXP: LPC1756 Part ID: 0x25011723
Connected: was_reset=true. was_stopped=false
v Registered license, download limit of 128K
Writing 98692 bytes to 0000 in Flash (assumed clock: 100.0MHz)
Verified-same page 0-7 with 32768 bytes in 2001msec
Verified-same page 8-15 with 32768 bytes in 2033msec
Verified-same page 16 with 32768 bytes in 2002msec
Verified-same page 17 with 388 bytes in 234msec
Flash write Done
nSRST assert (if available)
Executing in user flash.
Stopped: Halt
15: Target error from Register access: Em(12). System rejected access at location 0x0002FFFF - verify Population of memory and peripherals
15: Target error from Register access: Em(12). System rejected access at location 0xFFFFFFFC - verify Population of memory and peripherals
The code hung and when I hit the stop button, I got the last two error messages. I assumed the hang was because I had not yet modified the SystemInit() to use the InternalRC, it was still configured for the Main Oscillator and there is no xtal connected to the chip.
When I updated the code and ran again, it seemed like I was back to square one:
LPCXpresso Debug Driver v4.0 (Mar 24 2012 17:40:00)
Looked for chip XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/LPC1756.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/crt_directory.xml
02: Failed on connect: Em(01). Cannot find selected MEM-AP (check target power)
Emu(0): Conn&Reset. Was: None. DpID: 2BA01477. Info: T1S6RGRIA
In addition, the LPCLink is constantly failing to connect (I'm running under Parallels). I have to unplug/plug and uninstall/reinstall the drivers to get it to be detected again. I'd be fine doing this if I could get a consistent connection to the target board - it seems to work fine when I'm using the 1769 target board.
One thing I noted is that the code-red link listed earlier in this thread says that SWCLK should be pulled LOW with a 10k. However, the link you listed about the SWD connection says that SWCLK should idle high. Bottom line, I tried the pull-up configured both ways, with no additional success.
I'm at a complete loss