Rip The Band-aid Off (JTAG disconnect 2560)

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

OK, this is gonna hurt because I think I already know the answer. . .

 

When using JTAG on an ATMEGA2560, if you program all of Port-F (JTAG port) pins to all inputs, does it brick your programming interface?  I am getting a "No JTAG devices detected" error.  Is there any way to recover, or am I just hosed?  Flame suit on; let me have it. . .

Last Edited: Thu. Oct 5, 2017 - 09:13 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You either have JTAG disabled by the JTAG fuse (use SPI to re-enable) or some running code inside the chip is turning off JTAG in which case if you have the reset line going to the JTAG header it can still be used.

 

You can't damage the JTAG interface with programming the pins.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

If the JTAGEN fuse is enabled,   the JTAG pins ignore your DDR or PORT writes.    JTAG will work just fine.

 

If you want to use the JTAG pins for GPIO,  you can disable with JTD bit.   DDR, PORT will work like regular GPIO.

 

Note that Arduino disables JTAGEN fuse.

 

David.

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

Thank you gentlemen; I was afraid setting Port-F DDR to 0x00 might have inadvertently disabled the JTAG interface.  Good to know the JTAG pins ignore this when the JTAGEN fuse is set. 

 

Now I have to figure out why I suddenly can't upload modified code to the AVR.  When I compile and hit the programming button it acts like it is uploading, however, the changes do not appear to be there when the AVR runs the code.  Time to look at my last code modification more carefully.

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

Probably wrong hex/elf selected in the programming dialog

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

Probably wrong hex/elf selected in the programming dialog

Not sure what was going on.  I rebooted and started fresh with a new instance of Studio-7 and re-checked all my settings.  Everything seems to be working Ok now.  Thanks for all the help everyone.