JTAGICE won't program 16MHz AT90USB162 over debugWire

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

I had been using my JTAGICE Mk II with the STK526 (which has an AT90USB162 @ 8MHz on it) for development, and everything has worked fine. Then I switched to my own design where the '162 runs at 16MHz. Now I find that when I attempt to debug, the '162 is not fully programmed -- one or two blocks of 128 bytes are 0xFF instead of program code. The position of these unprogrammed blocks seems to be random and changes each time.

I get the same results on AVR Studio 4.13 SP1 and SP2. The AVR Dragon works fine (allowing my work to continue). The JTAGICE will program the '162 fine with ISP.

I tried setting the JTAGICE options to not reprogram the device when entering debug mode, after programming it successfully with ISP. However, instead of leaving the program intact the device was erased!

I'm thinking this is a problem with the JTAGICE firmware, but I would appreciate hearing if anyone else has any other insights, or has been able to make this work.

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

What is the length of the cable between the JTAGICE and the target, and is it longer than the cable between Dragon and target ? Ringing of the lines may be the problem.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

Thinking about your question got me to review the debugWire chapter of the data sheet. And what should I find:

"some releases of JTAG Ice mkII firmware may require a pull-up resistor with a value between 8
and 14 kOhms when operating at 5V."

So I added a 10k pullup resistor on the reset line on the interconnect PCB at the end of the JTAGICE flex cable, and that seems to have fixed the problem!

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

Great !

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips