ATMega32A: JTAG vs. debugWire

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

I'm starting a new design with the ATMega32A.  The chip supports both debugWire and JTAG, and I'm wondering what the benefits and disadvantages of each are.  I'll be using Atmel ICE.  I realize debugWire doesn't strictly support programming, but the interface can also be used for that, so I can program and debug with either approach.  Thanks for any thoughts.

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

No it doesnt. DebugWire is for AVR with 28 pins or less. On 40 pins or more its JTAG. So you dont get a choice here. Mega32 is JTAG if you want OCD.

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

Huh. I’m not at my PC at the moment, but I thought the data sheet showed a debugWire block on it. Guess I was looking at another one. Well, that simplifies things. Thanks.

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

SO here is the real question:  Why does a chip like the MEGA2560 have a OCDEN fuse at all?  Isn't that just asking for trouble?

Last Edited: Wed. May 5, 2021 - 03:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

The datasheet suggests it is about power consumption I believe. If you turn OCD off it reduces power.

 

(your post to this particular thread is curious - there's no previous mention of OCDEN or Mega2560 ?)

 

EDIT: from 2560 datasheet...

 

Also:

Last Edited: Wed. May 5, 2021 - 03:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
your post to this particular thread is curious

Also 3 years (almost to the day)  late

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

Many reasons... If OCDEN is on, then the BREAK instruction actually breaks, and it changes how sleep and clocks power down so the power consumption goes up. 

:: Morten

 

(yes, I work for Microchip, 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.