ET-AVR-STAMP mega128 / JTAG ICEMKII

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

I bought this little board here for 20 bucks
I have an ATMEL AVR JTAG ICEMKII

http://www.futurlec.com/ET-AVR_S...

First , has anyone used these boards? with the JTAG interface?

Please correct anything I have wrong here before I connect it up.

Picture shows layout of JTAG ICE 10 pin connector, On the right is the 10 pin connector I will make. My understanding is I power the ET-AVR-STAMP with a regulated 5V supply and I power up the JTAG ICE with its 9V supply. What I don't know is what pin 7 VSupply and nTRST and nSRST are for on the JTAG ICE. SHould I just leave them unconnected as I show in the diagram?

Do I understand correctly that the JTAG ICE will be able to download programs using AVR studio, set fuses, and step thru code that will execute on the attached mega128 chip.

Are there fuses I can set that will make the board not respond that I would have to use something other than the JTAG ICE interface to reset? (like the ISP programming setting a fuse wrong and having to use high voltage programming) what i am asking, is the jtag ICE similar to high voltage programming?

Attachment(s): 

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

The JTAG ICEMKII uses the RESET line to place the MCU into program mode. If the RESET disable flag is set so as to disable the reset pin further programming with the MKII is also disabled.

Although I use a USB connection to the MKII I have found that my laptop doesn't supply enough power to reliably program. The programmer would be starved for power and result in having one or more configuration fuses being randomly set/changed. MCU clock setting would change from INT RC to an EXT OSC, since I didn't have an external clock the MCU would be dead in the water. I would have to use an STK500 to reset fuses and recover the MCU. The fix for this problem is to use a 500ma 12vdc wall wart to supply power to the MKII.

Finally when using DEBUG mode in SUDIO4 the DWEN fuse gets set. This is OK as long as you properly exit out of debug mode which resets DWEN. If an abnormal STUDIO4 program termination occurs the DWEN doesn't get cleared and results in getting locked out. Other than using the stk500 to clear DWEN you can try using the following DOS command. I've placed this in a BAT file on my desktop for easy access just change the MCU to the type you are using...

cd C:\Program Files\Atmel\AVR Tools\JTAGICEmkII
jtagiceii.exe -d ATtiny24 -W

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

Thanks for the reply, I think I will avoid the potential troubles you point out and just use the ISP10PIN on the stk500 board, I just tried it and it works great. I am thinking I should sell the jtagMKII I have because I really don't see I need it after all the simulator is all I need to debug code anyway. Sometimes I just buy stuff that's expensive because it's expensive so I think it will benifit me but then it just sits there not helping me.

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

Fortunately, the ATmega128 doesn't have a RSTDISBL fuse, so it is not possible to lock out that JTAG interface that way.

(As well, I believe that the on-chip JTAG module is accessable all the time even without twiddling the RESET pin. There is the ability to assert the RESET pin to temporarily re-activate the JTAG port if it was shut off at run time by software but the JTAGEN fuse is still turned on.)

As a JTAG device (rather than debugWire), there is no DWEN fuse on an ATmega128 to fiddle with, and thus it cannot interfere with either JTAG or ISP-mode programming.

Finally, it isn't supposed to be possible to lock out JTAG programming by accidentally picking an incorrect clock setting. This is because the on-chip JTAG module is supposedly clocked independently from the rest of the peripheral systems, directly from the TCK pin.

All in all, for those chips that support it, JTAG is a much more robust interface than ISP for programming, and than debugWire for on-chip debug.