Atmel AVR JTAG ICE 3 won't debug via JTAG but can program via ISP

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi together! (First of all, I'm german, so please excuse me, if I use some 'strange' words, that don't fit properly. But I think you'll understand, what i mean ;) )

Before I come to the problem, here are the conditions:
- STK500 Board

- JTAG ICE 3 Debugger (newest firmware)

- Windows 8.1

- Atmel Studio 6.2, just reinstalled to make sure, it's the latest version, also tried Atmel Studio 5.1

- Atmega32 (but the problem occurred with every other controller I tried: ATtiny2313, ATmega8515 and a few other Atmega32s)

Fuses:
OCDEN []
JTAGEN[X]
SPIEN[X]
CKOPT[]
EESAVE[]
SUT_CKSEL[Int Osc 8Mhz]

(already tried different fuse-settings concerning OCDEN and JTAGEN, none of them worked)

 

So here we go:

The problem is, that I can only use the ISP-Programming-Mode, no matter what frequencies I've set in the JTAG-Interface, nor which fuses I've set. I can set, reset the fuses and burn program via the ISP-Interface with no problems at all, but when I it comes to debugging my code (this is why I bought a debugger! ;) ), I get the following error-message: 

"Failed to launch program. Error: No JTAG devices detected. Debugger 
command Activate physical failed"

 

I searched extensivly in all available threads in the internet concerning this topic, but I didn't find any other answers than "It works for me, you're doing something wrong!" "Got the same problem! Anybody got the solution?"  and almost all of the threads were older than 2 years.

Most of the threads indicate a problem with Atmel Studio 6 and 6.1 and state, that the problem will be solved in version 6.1 or, in some rare entries, it'll be solved in version 6.2.

I still have the problem, and use version 6.2 and the newest firmare...

 

I hope you can help me...

Greetings from Germany!

 

This topic has a solution.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was about to double-check a few things against the data sheets before answering, but Atmels web site is down so...

- Is the physical connections for JTAG different from the ones for ISP on the mega32?

- Does the tiny have OCD capabilities at all? (If it ha, it is very likely debugWire, not JTAG, and again possibly a different wire-up).

- Does the mega8515 at all have OCD capabilities?

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the ATmega32 the JTAG interface is not on the same pins as the ISP interface.

 

ATmega8515 does not support on-chip debugging at all. The only thing you will be able to do with your JTAGICE3 and the mega8515 is programming.

 

ATtiny2313 does support debugWire (not JTAG) debugging.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, this is what a friend of mine just told me a second ago on the telephone cheeky

But thanks for the fast help!
Especially concerning the ATtiny! >> I'll keep that in mind for later!

 

Furthermore he told me, that the STK500 does not come with a JTAG-Interface, so I have to use some kind of adapter like this one:
http://www.ecrostech.com/AtmelAv...

 

Maybe some background info, how this misconception could occurr:
I study electrial engineering and I had some lectures and practical examples at my university with a STK500 and a JTAG MkII and prepared boards. I never paid much attention to the little soldered thing, attached to the board. So I always presumed, that the board is capable of JTAG anyway, without any attachments.

Now I've asked google, concerning STK500 and the JTAG-Interface and he was correct! (Of course he was, he always was and is and will be correct...)

 

Now I think it's very very likely that it was this kind of adapter. It's already almost a year ago, since i made the last exercise with this board at the university.

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What you need is only the passive adapter top right on the page you link to. Or you could just use some wires with connectors at the ends so that they make good contact. Such "strap wires" can be bought at most electronic hobbyist shops and will possibly come in handy for other things eventually. They come with all gender combinations possible M/M, M/F and F/F. Here's one example of a kit with all combos: http://www.ebay.com/itm/3pcs-fem...

 

I'm sure they can be found at e.g. EBAY from some Chinese seller charging zero shipping - the drawback being that it often takes some weeks before they end up in your mail.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Tue. Sep 9, 2014 - 07:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks! Yes, I just bought a bunch of male-female-Jumper-wiresand read the Atmega32-Datasheet and... IT WORKED!enlightened

Okay, I have to give away the Port C but... well, I guess there are no advantages without any drawbacks in the world ;)

Anyway: I got the problem solved and I think about purchasing a dedicated adapter, so I don't have to work with even more wires (hell, at my current circuit I've used up almost 80 jumper wires on a small breadboard and my STK500...).

Thankyou very much for your fast help! Both thumbs up!yesyes