Dragon and Xmega

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

I thought I'd start a thread to try and keep the 2 topics in 1 thread.

Since AVR Studio V4.18 the Dragon can program and debug the Xmegas. It is supposed to both program and debug in JTAG mode and PDI mode.

I have successfully done both program and debug with the Dragon and the Xplain board using a Xmega128A1 in JTAG mode.

Despite many attempts and my claims to the contrary, at times, due to senility, I have never been able to do anything with PDI and the Dragon with the above setup. No probems with PDI and JTAG Mk2.

I have tried without the, supposedly necessary, series resistors on Data and Clock lines. Tried with 100R, tried with 330R. Not good. I always get the error box "Failing to set emulator mode. Unable to continue"

The resistors in my case are mounted on a small adaptor board that sits on the outer 5 pins of the JTAG/PDI header. The board picks up the 4 wires from the 6 way ribbon cable (~150mm long) pin 1 goes to DATA, pin 2 goes to V3P3, pin 5 goes to RESET and pin 6 goes to ground.

There have been many reports of successful use of PDI with other Xmegas but I have never been successful.

I have even shorted out the RESET line of the USB chip just in case it would interfere with the Xmega.

Your experience and comments will help others to make a decision on whether they should get a Dragon if they want to use the Xmegas. :)

EDIT I should add that my Dragon is one of the early types.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

From the previous discussions on this topic I am beginning to wonder if the chips with a JTAG i/f have a non-working PDI whereas the chips without JTAG work.

We know the A4 users seem to get it working. The question is has anyone got PDI working on an A1 or A3 chip ?

For the record I am successfully using PDI from 2 very early Dragons on 16A4's.

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

XM128A1: no problem with AVRISP mkII (PDI) and Dragon (JTAG). Couldn't get the Dragon's PDI working at all. So your assumption about JTAG preventing PDI to operate on the same chip is wrong.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

Trevor_G wrote:
From the previous discussions on this topic I am beginning to wonder if the chips with a JTAG i/f have a non-working PDI whereas the chips without JTAG work.

We know the A4 users seem to get it working. The question is has anyone got PDI working on an A1 or A3 chip ?

For the record I am successfully using PDI from 2 very early Dragons on 16A4's.

thanks for the fact you said you can program 16A4s, we cannot get Dragon PDI to program 32A4s--tried 12 different situations of my target board. Last attempt also failed--we glued the 32A4 upside down on the board and soldered wires to: 4 3.3v pins, belly ground, and the two PDI wires. This eliminates any issues with my target board. same dragon programs 128A1s.

<p>Vern</p>

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

I've read several places that the Full Xplain Schematic is available...

I've done a very circular search through the Atmel site and have not found it yet... The AVR1907 Xplain Hardware Guide doesn't seem to include it, or link to the schematic, and the AVR Studio 4 on line link doesn't even include the Xplain board, (although the Butterfly, Raven, and others are included...).

Any guidance, or a link, would be appreciated...

JC

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

Quote:

Any guidance, or a link, would be appreciated...

https://www.avrfreaks.net/index.p...

(seems it is in AVR1907.ZIP, not AVR1907.PDF)

[if John considers this a thread hijack I can break off these last two posts into a separate thread]

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

Hi Cliff,

Thanks for the link / pointer, I've found it with your help! Even using Atmel's site search I wasn't able to locate it!

I asked here as I figured it was kind'a on topic for JS's thread... but you can obviously move it if you or JS feel that that is best.

JC

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

..for a small fee it can stay here.. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hi John,

If you PM me your bank account number I'll see to it that the appropriate transferal of funds takes place :)

JC

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

We know the A4 users seem to get it working. The question is has anyone got PDI working on an A1 or A3 chip ?

For the record I am successfully using PDI from 2 very early Dragons on 16A4's.

How? I've tried so many different ways to use PDI on dragons and my xmega32A4-MH (qfn). I ahve latgest sp2. Any tricks?

<p>Vern</p>

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

The only trick I have discovered is putting 300R resistors ( I don't think the value is critical) in the PDI data and clock leads. Solved my problems.

JS has tried this on the larger Xmegas without success so there is clearly another problem. Note that when I use a JTAGICE2 the resistors are not required.

When I was doing the experiments that resulted in fitting the resistors I found that it was usually neccesary to quit Studio and restart. It seems that some kinds of failure cause an internal lockup preventing the interface from working correctly.

My usual practice if things are not working is to connect via the programmer tool (leave the debugger until the programmer is working). Then:
1)HW Settings tab/Read see if the VTarget value is correct.
2)Main tab/read Signature check for the correct signature
3)Advanced tab - check that the production signature values have been read (i.e.not all FF's)

Running these tests usually localises the problem.

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

When I was doing the experiments that resulted in fitting the resistors I found that it was usually neccesary to quit Studio and restart. YES, and studio will quit automatically when attempting to PDI xmega32A4, humor attempt.My usual practice if things are not working is to connect via the programmer tool (leave the debugger until the programmer is working). Then:
1)HW Settings tab/Read see if the VTarget value is correct. YES, I do this, that it is fine.
2)Main tab/read Signature check for the correct signature--this always fails to read signature. We are going to solder an xmega without our 3.3v regulator and without anything, just 4 wires to dragon: VTG, 2 PDIs, and ground.3)Advanced tab - check that the production signature values have been read (i.e.not all FF's)

Running these tests usually localises the problem.

<p>Vern</p>

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

Look on the bright side if attemptimg to use PDI causes Studio to crash you are getting close :?

It means that Studio is attampting to use the PDI interface. If Studio does not get the response it expects it does what it does best :twisted:

It was what was happening to me before I fitted the resistors.

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

guys what pins of dragon should be connected to pdi data and clock lines?there is no evidence in help files.

I love Digital
and you who involved in it!

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

Your Studio is out of date - the help file in 4.18.700 has full details of PDI connections.

Note that according to the help the ONLY Xmega models that can be programmed/debugged with PDI are just the 16A4 and 32A4. Al the other can only be programmed/debugged with JTAG. So unless it's the 16A4/32A4 you are using you are wasting your time looking at PDI use with the Dragon.

(the JTAGICEmkII manual is not quite so clear - it's possible it can PDI more models than the Dragon)