Connect atmega32 by jtag

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

I split the thread but forgot where it came from. JS  blush

 

 

Hello, did you manage to connect the atmega32 by jtag? I have my atmel ice and an atmega32, I had no problems programming the microcontroller by ISP, but I couldn't debug. At the moment I am trying to connect it by JTAG but this message appears to me. What would be the problem?

 

This topic has a solution.
Last Edited: Mon. Jul 27, 2020 - 10:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edward_yamunaque wrote:
I had no problems programming the microcontroller by ISP

That message sayes the connections are not made correctly, review and verify your jtag connections are correct.

If you can, post a picture of your setup, and your device fuse settings( is jtag enabled?).

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

I am a novice, how can I activate jtag without being acknowledged by the atmel ice? How do I activate fuses without the atmel ice recognizing my atmega32 by jtag? Thanks for replying.

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

First, check your connections. The fuse is active by default...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

First off.    Connect via ISP  (PB5-PB7 pins).    Read the fuses.    Make sure that JTAGEN fuse is active.

 

Then connect via JTAG (PC2-PC5 pins).    Select JTAG interface in AS7.0.   Read Signature,  fuses, ...

 

JTAG debugging should work seamlessly.

 

David.

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


Are the connections for JTAG ok ?, I will try to connect by ISP and enable JTAG

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

I strongly recommend that you use a proper development board with a 5x2 JTAG header.   Then your wiring will always be correct.

 

If you really want to use a breadboard,   make a 5x2 JTAG header from a scrap of protoboard and some male header strip.     Mark pin#1 with a spot of paint.

Buy some 100nF capacitors for the breadboard.

 

Random flying leads were invented by the Devil.    Avoid them like the Plague.

 

David.

 

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


Connect via ISP (PB5-PB7 pins).

I tried it by ISP and if you recognize it, the JTAGEN bit was disabled, now enable the JTAGEN bit now I reread the fuses and the JTAGEN bit is already enabled.

 

via JTAG (PC2-PC5 pins)

I did the JTAG test on the move with the connection seen above, but the problem is the same.

 

 

 

 

 

 

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

I would expect the mega32 to connect immediately via JTAG.

 

If it does not connect,  toggle the power to the mega32.   Try again.

 

Seriously.    Wiring several random wires correctly is fraught with problems.    Which is why I suggest spending 20 minutes making a breadboard adapter.

Yes,  random wires can work.    But not as reliable as a ready-made ribbon cable with a ready-made adapter.

 

David.

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

finally i tried the other cable from the atmel ice and it worked ..

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

Very good, please mark the thread as solved, Thanks!

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

unfortunately, he's a hijacker - not the OP - so can't mark the solution.

 

(yes, I've been caught on that one!)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have split the thread, maybe it can be marked as solved now??

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

JS  wrote:
I split the thread but forgot where it came from. blush

Here:  https://www.avrfreaks.net/forum/atmel-ice-debugging-atmega32 ?

 

 

@ edward_yamunaque :  so now you should be able to mark the solution - see Tip #5 in my signature, below:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Jul 20, 2020 - 11:01 PM