cancel
Showing results for 
Search instead for 
Did you mean: 

Problem connecting with JTAG debugger

fuentes
Associate II
Posted on March 13, 2012 at 23:52

Hello,  I am having trouble connecting my j link debugger to a custom board that has an stm32f103rbt.  The error that I get is the following:

Could not measure total IR len. TDO is constant high.

Here is my hardware setup:

IAR J-Link ks H/W V5.20

20 pin connector - Signal Name - stm32 IO pin - pullup/down

3 - TRST - PB4 - pull up

5 - TDI - PA15 - pull up

7 - TMS - PA13 - pull up

9 - TCLK - PA14 - pull up

11 - RTCK - None - pull down

13 - TDO - PB3 - pull up

15 - RESET - NRST - pull up

I have verified using a scope that TDI and TCK oscillate, TDO, TRST and RESET all stay high when trying to connect.  Any help would be appreciated.

#jtag #stm32
8 REPLIES 8
Posted on March 14, 2012 at 03:14

Looks reasonable. Perhaps you should check some more mundane things like solder shorts and all the supply pins, as nothing seems to be running.

Make sure pins 1 & 2 connect to your 3.0-3.3V supply

Pins 17 & 19 as no connects.

Even pins 2 thru 20 connect to a common ground.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
fuentes
Associate II
Posted on March 14, 2012 at 04:16

Hi clive, Thanks for getting back to me.

I have already checked for shorts.  According to the manual for the j-link debugger, pin 19 is a 5V supply and pin 1 is a VCC sense.  I connect the 5V source to my voltage regulator and the output of the regulator is connected to pin 1.  The debugger correctly reads the board voltage.  

Pin 2 is a N/C but it is connected to VCC.  

Even pins 4-20 are shorted together.  Pin 17 is pulled down to ground.

I remember reading somewhere where they mentioned that only j-links v5.4 and above can debug Cortex M3's, but I haven't been able to confirm that with any sort of documentation.

Any other ideas would be appreciated

rosarium
Associate II
Posted on March 14, 2012 at 07:22

which JTAG debugger you are using?? J-Link??

Is it working ok with other boards???

fuentes
Associate II
Posted on March 14, 2012 at 14:17

I have a Segger J-Link KS.  It came as part of a kickstart kit for an ARM7 and works correctly with that board.

emalund
Associate III
Posted on March 14, 2012 at 15:02

often overlooked in cases like this

reset

oscillator running

Erik

Posted on March 14, 2012 at 16:15

I have a Segger J-Link KS. It came as part of a kickstart kit for an ARM7 and works correctly with that board.

I remember reading somewhere where they mentioned that only j-links v5.4 and above can debug Cortex M3's, but I haven't been able to confirm that with any sort of documentation. I have a similar J-Link KS that came with the STR912 eval board, circa 2 It does pop up a dialog that says the pod's firmware doesn't have Cortex M3 smarts, but that is handled on the PC side, if somewhat slower. Here I used a 20-pin header wire wrapped to the test points on my board. I might be able to fish out some older J-Link's if I rummage through my collection. Historically I've been using U-Link ME's on this particular board.

C:\PROGRA~1\SEGGER\JLinkARM_V434d>jlink
SEGGER J-Link Commander V4.34d ('?' for help)
Compiled Sep 13 2011 17:28:52
DLL version V4.34d, compiled Sep 13 2011 17:28:37
Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5
Hardware: V5.30
S/N: 10007xxx
OEM: IARKS
VTarget = 2.814V
Info: TotalIRLen = 9, IRPrint = 0x0011
Info: Found Cortex-M3 r1p1, Little endian.
Info: TPIU fitted.
Info: ETM fitted.
Info: FPUnit: 6 code (BP) slots and 2 literal slots
Found 2 JTAG devices, Total IRLen = 9:
#0 Id: 0x3BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
#1 Id: 0x06414041, IRLen: 05, IRPrint: 0x1, STM32 Boundary Scan
Cortex-M3 identified.
JTAG speed: 100 kHz
J-Link>

Here's a SAM-ICE branded V5.20, won't debug it due to the ATMEL lockout, but jlink.exe does detect it.

C:\PROGRA~1\SEGGER\JLinkARM_V442c>jlink
SEGGER J-Link Commander V4.42c ('?' for help)
Compiled Feb 29 2012 09:15:43
DLL version V4.42c, compiled Feb 29 2012 09:15:24
Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5
Hardware: V5.20
S/N: 20002xxx
OEM: SAM-ICE
Feature(s): RDI
VTarget = 2.808V
Info: TotalIRLen = 9, IRPrint = 0x0011
Info: Found Cortex-M3 r1p1, Little endian.
Info: TPIU fitted.
Info: ETM fitted.
Info: FPUnit: 6 code (BP) slots and 2 literal slots
Found 2 JTAG devices, Total IRLen = 9:
#0 Id: 0x3BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
#1 Id: 0x06414041, IRLen: 05, IRPrint: 0x1, STM32 Boundary Scan
Cortex-M3 identified.
JTAG speed: 100 kHz
J-Link>

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
fuentes
Associate II
Posted on March 15, 2012 at 13:16

Hmm...Well that's good to know.  I was considering buying a newer debugger, but I'm not entirely sure anymore that it's going to solve my problem.  I might poke around in the Segger forums for more information.  Thanks for your time!

simonlee0311
Associate II
Posted on March 16, 2012 at 12:24

Dear Erick:

I don't know your situation which is or not simulate with me.

If you use MDK with JTAG, you can try my solution.

In option for target page, choose utilities, select settings.

In Debug setting page, you will found Port setting.

Change it to SW, and press OK, then try to download your program again.

If it can work correctly, than do it again change port back to JTAG.

Hope this can solve your problem