JTAGICE with Xmega

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

I have been unable to connect my JTAGICE mkII to a custom Xmega32A4 board but my Dragon works fine. The errors messages with the JTAGICE are:

Failed setting JTAG clock parameter
Failed to load debugee: ...\test.d90
The project debugger file 'Test' could not be written

My JTAGICE is marked "A09-0041" and App Note AVR1000 states:

Please note that your JTAGICE mkII should have a serial number that starts with "B0" or be marked with "A09-0041" for PDI to work.

All references to this from Google searches mention only the "B0" s/n and have no mention of the "A09" s/n so that is suspect. The JTAGICE still works fine with Atmega/Attiny boards. Any solutions?

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

Hi, According to Studio4's tool user guide, A09xx version does support PDI. I am curious if the firmware of it is the latest one. You may run the update process via. Studio.

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

Yes, I have run the latest update.

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

You may remove the capacitor at Reset/PDI pin to see what happens. Since Dragon works, I don't think that that is an issue, but just in case.

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

Are you changing the selection from JTAG to PDI when trying to connect? Do you have a schematic you can show us?

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

Yes, trying to connect as PDI (not JTAG). Nothing on the PDI_CLK/RESET- pin except 10K pullup, PDI connector and Xmega32A4 pin 35.

Has anyone successfully used a JTAGICE with A09-0041 s/n on Xmega? Has anyone tried and been unsuccessful?

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

Mine is also A09-0041/07 and it works fine in PDI and JTAG mode. Can you post schematic?

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

Glad to know at least one A09 works.

Under NDA so cannot release schematic. But the only pins of interest are PDI_CLK/RESET- (pin 35) and PDI_D (pin 34). As mentioned before, PDI_CLK goes to 10K pullup, programming connector and MCU. PDI_D goes to programming connector and MCU. There are no other connections to these pins.

The group that started this project was using a JTAGICE (not sure if mkII/mkIII or its s/n) so the project file was already set for PDI mode.

When I get a break I will try again and verify that the ICE firmware is upgraded. The Dragon is working and the project is hot so no time to test. Not sure if there is any good reason to abandon the Dragon for the ICE except it's just one less tool to clutter my bench.

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

One other note. I am using Studio 4.18/716.

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

Yeah those are the right connections. I think the only options are that there's a faulty connection somewhere on your board or the mkii firmware isn't upgraded.

Does the mkii work in jtag mode?

I have PDI_D on pin 1 and PDI_Clk on pin 5 of the programming header.

If you use a scope to view the PDI_Clk pin, you should be able to see the mkii pull the line low several times whenever you try to program/debug with it.

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

I've never used JTAG, so I ought to stay out of this. That said, isn't there a JTAG enable fuse? Is it set correctly?

JC

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

There is a JTAG enable, not a fuse just a register bit, but it is enabled by default on pins B4-B7.

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

GordonFreeman wrote:
not a fuse just a register bit

JTAGEN is the lsb of FUSEBYTE4. Also JTAG interface can be disabled from software by setting JTAGD in MCUCR.

Ozhan KD
Knowledge is POWER

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

And the take home message being that Aero1 ought to make sure that the JTAG is ENabled, or it will never work.

JC

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

electronic.designer wrote:
GordonFreeman wrote:
not a fuse just a register bit

JTAGEN is the lsb of FUSEBYTE4. Also JTAG interface can be disabled from software by setting JTAGD in MCUCR.

Oops! I was just thinking of MCUCR.