lpcware

Problem connecting via JTAG

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by guillep2k on Fri Jun 26 11:38:37 MST 2015
Hi. I'd would like some help. I've bought a J-Link Edu JTAG emulator and I am not able to connect to my board unless there's no firmware in it.

My project

The board features an LPC2387.
I've connected JTAG lines nTRST, TDI, TMS, TCK and TDO to the J-Link module, plus RESET.
My supply is 3.4V and I've connected it to VTref.
I've added a 100K pull-down on the TCK line.
All other JTAG lines have internal pull-ups on the MCU as per documentation.
My board's reset circuit has a 22nF capacitor to GND and a 47K pull-up.

My module is a SEGGER J-Link EDU V9.30, SN 269302119. Firmware is 2015 May 22 17:20.

What does work

I can connect to my MCU using this setting if and only if no valid firmware signature is written on the flash. Then the connection from the J‑Flash program succeeds. JTAG chain is scanned and detected:

From J-Flash:
Connecting ...
- Connecting via USB to J-Link device 0
- Target interface speed: 1334 kHz (Auto)
- VTarget = 3.427V
- Initializing CPU core (Init sequence) ...
    - Initialized successfully
- Target interface speed: 400 kHz (Auto)
- CPU clock frequency: 4024 kHz (Auto detected)
- J-Link found 1 JTAG device. Core ID: 0x4F1F0F0F (ARM7)
- Connected successfully

From J-Link Commander:
SEGGER J-Link Commander V5.00d ('?' for help)
Compiled Jun 17 2015 22:33:52
DLL version V5.00d, compiled Jun 17 2015 22:33:29
Firmware: J-Link V9 compiled May 22 2015 17:20:50
Hardware: V9.30
S/N: 269302119
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
VTarget = 3.432V
Info: TotalIRLen = 4, IRPrint = 0x01
Found 1 JTAG device, Total IRLen = 4:
#0 Id: 0x4F1F0F0F, IRLen: 04, IRPrint: 0x1, ARM7TDMI-S Core
Found ARM with core Id 0x4F1F0F0F (ARM7)
ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters
Target interface speed: 100 kHz
J-Link>


What does not work

None of this works with valid firmware loaded on the board:

From J-Link Commander:
SEGGER J-Link Commander V5.00d ('?' for help)
Compiled Jun 17 2015 22:33:52
DLL version V5.00d, compiled Jun 17 2015 22:33:29
Firmware: J-Link V9 compiled May 22 2015 17:20:50
Hardware: V9.30
S/N: 269302119
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
VTarget = 3.438V
Info: TotalIRLen = 4, IRPrint = 0x01
Info: TotalIRLen = 4, IRPrint = 0x01
No devices found on JTAG chain. Trying to find device on SWD.
No device found on SWD.
Trying to find device on FINE interface.
No device found on FINE interface.
Did not find any core.
Failed to identify target. Trying again with slow (4 kHz) speed.
No devices found on JTAG chain. Trying to find device on SWD.
No device found on SWD.
Trying to find device on FINE interface.
No device found on FINE interface.
Did not find any core.
No device found at all. Selecting JTAG as default target interface.


Checks I've made and what I've found

I've checked I've not disabled the JTAG interface unintentionally by reading back the flash Code Read Protection (CRP) address (0x000001FC) and making sure it doesn't contain any of the defined values (I make it so it has 0xa5a5a5a5, but also tested with 0xffffffff). So, JTAG should be available on the MCU in all cases.

Strangely, I do not see the reset or TRST lines go low when I attempt to connect using JTAG (although reset does go low when other connections are attempted by J-Link Commander; SWD or FINE I suppose).

ISP access via UART0 works fine (that's what I use to upload firmware/check flash, etc.).

Any help would be appreciated.

Outcomes