cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with JTAG

anm
Associate II
Posted on May 14, 2009 at 09:12

Problems with JTAG

39 REPLIES 39
jj
Associate II
Posted on May 17, 2011 at 13:10

Need more info to best assist:

a) JLink sounds like IAR/Segger - if new that should work. However to be sure have you another board with which to confirm the JLink is ok?

b) Is it possible that you have ''re-purposed'' the JTAG pins prior to using your JLink? (likely by some ''non-Jtag'' means)

c) Always advise that you build ''several'' proto boards - enables you to confirm that problem persists across multiple boards as opposed to a bad connection on a single/first board. Recheck continuity between every JTAG pin - especially @ the micro pins themselves.

anm
Associate II
Posted on May 17, 2011 at 13:10

Hi!

I made a pcb with a STM32F103CB and JTAG Pins. Now I tried to program it via JTAG, but I get the following error:

Could not find supported CPU Core on JTAG Chain

Bad JTAG Communication: Wirte to IR: Expected 0x1 got 0x7 (TAP Command : 2) @Off 0x5.

The JLINK Device says, that the operating voltage is OK and the power consumption is ok. What could that be?

I also checked the wiring on my board (VDD,VCC,JTAG-links are correct).

I don't know what to do next :(

Greets from Austria

Andi

anm
Associate II
Posted on May 17, 2011 at 13:10

Thanks for your answer.

Quote:

On 01-05-2009 at 16:14, Anonymous wrote:

Need more info to best assist:

a) JLink sounds like IAR/Segger - if new that should work. However to be sure have you another board with which to confirm the JLink is ok?

Its an IAR Jlink (the yellow one). I have a development board, so the JTAG is working properly.

Quote:

b) Is it possible that you have ''re-purposed'' the JTAG pins prior to using your JLink? (likely by some ''non-Jtag'' means)

I haven't changed the configuration of the controller now. I just soldered my PCB, plugged the JTAG in and tried to program it - unsuccessfully...

Quote:

c) Always advise that you build ''several'' proto boards - enables you to confirm that problem persists across multiple boards as opposed to a bad connection on a single/first board. Recheck continuity between every JTAG pin - especially @ the micro pins themselves.

I only have got one board. I think I do not understand your text exactly...

I checked the configuration twice - but I can't find an error...

A College of mine said, that I should change the settings to ''device 0'' oder ''device 1'' at the options in IAR Kickstart. What does he mean? Device 0 oder 1 should be written on the JTAG - but where I can find the options?

Thanks and sorry for my bad english 😉

jj
Associate II
Posted on May 17, 2011 at 13:10

Thank you - find your English fine.

As you can successfully ''JTAG connect'' to a development board I suspect that you have either a broken, or crossed connection between your ''custom'' board's JTAG connector and the JTAG pins @ the STM32. Be sure to probe between the JTAG connector (which accepts the JLINK) and the physical pins of the STM32.

Also - I believe that it's safest for you to add pull-up resistors on each of the JTAG pins. (Suggest that you copy what has been done on your working development board - as regards JTAG pins & connections)

Last - wonder if you have a Reset problem @ the STM32? Again check that your custom board agrees with your development board.

If all of the above does not restore JTAG I suggest that you build a 2nd pcb - and install a fresh STM32 - to eliminate a ''single board'' issue.

Good luck.

rael
Associate II
Posted on May 17, 2011 at 13:10

If the MCU's not being held in reset, and if your JTAG wiring is correct, then perhaps you have some unconnected VSS and VDD pins on the chip ? Some people assume that there are low resistance connections internally, but you need to connect each pin externally.

anm
Associate II
Posted on May 17, 2011 at 13:10

Quote:

On 02-05-2009 at 14:47, Anonymous wrote:

Thank you - find your English fine.

As you can successfully ''JTAG connect'' to a development board I suspect that you have either a broken, or crossed connection between your ''custom'' board's JTAG connector and the JTAG pins @ the STM32. Be sure to probe between the JTAG connector (which accepts the JLINK) and the physical pins of the STM32.

So, I checked it again, I took a small cable to get the pins of the stm32 - so the connection should be correct. The other side, I took the connector of the JLINK (inclusive cabling).

Quote:

Also - I believe that it's safest for you to add pull-up resistors on each of the JTAG pins. (Suggest that you copy what has been done on your working development board - as regards JTAG pins & connections)

I have done that already. Here is the schematics:

http://testaccount.ywh-server.info/schematics.pdf

Quote:

Last - wonder if you have a Reset problem @ the STM32? Again check that your custom board agrees with your development board.

I'm going to test this on monday - then I have time to check it.

Quote:

If all of the above does not restore JTAG I suggest that you build a 2nd pcb - and install a fresh STM32 - to eliminate a ''single board'' issue.

I changed the STM32 already, because of an other issue. A second pcb will come in about one to two weeks - then I could test it there.

Quote:

Good luck.

Thanks! And many thanks for your help - I wish you a nice sunday.

EDIT:

My PDF-Printer has some problems with straigt lines, so the connections to the pins are really there...

[ This message was edited by: anm on 02-05-2009 16:39 ]

anm
Associate II
Posted on May 17, 2011 at 13:10

Hi!

I will check if the controller is hold in reset - tomorrow. The VDD and VCC Pins are all externally connected...

Thanks.

Andi

anm
Associate II
Posted on May 17, 2011 at 13:10

Hi!

All pins have VCC/VDD correctly, the JTAG Pins are connected correctly and the controller is not hold in reset (NRST is high).

What else could that be?

thanks

jj
Associate II
Posted on May 17, 2011 at 13:10

As you have at least one, working development board suggest that you scope probe & capature the waveforms @ each STM32 JTAG pin as the JTAG connection is first established. Then repeat the procedure with your custom board. It should be that ''some'' JTAG data runs - for some period - even on your failing, custom board.

Insure that the JTAG signal transitions clearly qualify as ''hi'' and ''lo.'' Look especially at the JTAG clock signal. Also - couldn't hurt for you to ''s l o w'' your JTAG data rate - which you should be able to do w/in IAR and/or one of the Segger applications.

You do have an identical HF crystal on your custom board? Can you borrow

the xtal from working dev. board - just in case?

My firm's not encountered this issue - across hundreds of STM32 (and brand X) similar devices. After trying this why not email Segger - describing all of the things we've suggested.

Appreciate hearing ''how'' you finally correct/solve this...