lpcware

Missing JTAG TAP interface on one of my two LPC Link 2 boards! (Long Post)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jul 15, 2018 by Zhengyang Qu
Content originally posted in LPCWare by fzfq3m on Thu Feb 13 18:45:16 MST 2014
Hi guys
I own two LPC Link 2 board and was trying to use one as debug adapter and the other as demo/target board, for two moths I've been trying to use either Openocd or Crossworks to connect in JTAG mode (CMSIS-DAP) both no luck so far... with Openocd it was a pain, the board sometimes refuses to connect and when it does then I'm unable to halt the processor, flash or just get info about the flash device... with rowley crossworks it always throws the error "Cannot set Debug Register"

Today while doing some test with help of rowley's support guys and I was able to detect that one of my board was having issues while being used as target board... to clarify:

I was using one LPC Link 2 as debug probe (let's call it DP board) and my second board as target (let's call it TD board); I've soldered a header on DP board (J6) and put a mark on TD board (painted NXP logo in blue) just to know which one is my debug probe and which one is my target... as per documentation available in the web I've been connecting the 10-pos IDC Ribbon Cable
from J7 on the DP board to J2 on the TD board.

My first try was to use Openocd with J-Link firmware but got some errors so I switched to CMSIS-DAP, I needed to compile a patched version of openocd (from it's gerrit code review server) because CMSIS-DAP support is still being tested... I got it working to some extent but to be honest I was fighting not only with the board but also with my lack of knowledge... I was never able to fully halt the processor (M0 was always refusing to halt) but sometimes I was able to even flash a blinky demo firmware to the board.

Since openocd gave me too many issues I tried Rowley Crossworks, but it only allowed me to connect using CMSIS-DAP in SWD mode... until for some reason I decided to try using an Olimex ARM-USB-OCD-H adapter with its AR-JATG 20-10 adapter... on both boards, and bingo! one of the board worked as expected!

Just to be sure I've downloaded LPCXpresso IDE and tried both boards confirming that one of them has issues! a JTAG TAP is missing!

please see the output of Openocd while using both board as target demo and olimex debug probe

The one that works (all three TAP found)
Open On-Chip Debugger 0.8.0-dev-00350-g6c74255 (2014-02-12-09:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
cortex_m reset_config vectreset
Info : clock speed 1000 kHz
Info : JTAG tap: lpc4370.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: lpc4370.m0sub tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0)
Info : JTAG tap: lpc4370.m0app tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0)
Info : lpc4370.m4: hardware has 6 breakpoints, 4 watchpoints
Info : lpc4370.m0sub: hardware has 2 breakpoints, 1 watchpoints
Info : lpc4370.m0app: hardware has 2 breakpoints, 1 watchpoints

The one that doesn't work (one M0 TAP missing)
Open On-Chip Debugger 0.8.0-dev-00350-g6c74255 (2014-02-12-09:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
cortex_m reset_config vectreset
Info : clock speed 1000 kHz
Info : JTAG tap: lpc4370.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: lpc4370.m0sub tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0)
Info : JTAG tap: lpc4370.m0app tap/device found: 0xffffffff (mfg: 0x7ff, part: 0xffff, ver: 0xf)
Warn : JTAG tap: lpc4370.m0app       UNEXPECTED: 0xffffffff (mfg: 0x7ff, part: 0xffff, ver: 0xf)
Error: JTAG tap: lpc4370.m0app  expected 1 of 1: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Error: lpc4370.m0app: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction

I also attached two images but this time using LPCXpresso, you can see that in one image only two TAP are reported

Now I'm not sure if the board came with this issue or if I the TAP interface was damaged/disabled while pplaying with openocd, but at this point I'm wondering if is there a way to save the board or if is lost
Thanks in advance and sorry for the long post!

Outcomes