Dragon and Xmega32E5 Difficulties [Solved!]

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

Dragon and Xmega32E5 Difficulties:

 

First, thank you to Jim (East Coast Jim) for the Dragon!

 

Running Studio 6.2xxx, and the Dragon works great programming an Arduino Nano board's M328P using ISP.

 

Switched to a board with an Xmega32E5, PDI Programming, and nothing but difficulties.

My AVR ISP mkII programs the Xmega fine, so I know the board isn't an issue.

 

The Dragon will read the PCB's voltage, and will read the Signature, but then I get a "Can't enter programming mode" error, or it might appear to program the chip, but then it fails to verify the chip, (and the program isn't running, so I don't think it was really programmed).

 

I used several short cables, which all work with the Mega, but none of which worked with the Xmega.

 

I know the current Dragon manual says:

PDI does not work for Xmega A3/D3- Rev B,C, & E, or A1 up to Rev. K.

 

As the XmegaE5 is the newest Xmega of the lineup, one would expect the hardware PDI interface module on the chip to have the bugs worked out of it.

 

Studio didn't ask me to upgrade the Dragon's firmware, (I think Jim nicely already did this before sending me the Dragon). 

  

So, anyone else using the Dragon in PDI mode with the Xmega E5 series successfully?

 

Thanks,

 

JC

 

Edit: Typo

Last Edited: Sun. May 21, 2017 - 11:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't have a dragon, so I can't test anything myself.

But I've never had any issues with PDI even on quite long cables using the ICE.

Are you absolutely sure your PDI lines are "free"? Are there no pull-ups or capacitors anywhere? A pull-up on reset once ruined my day.

-Patrick

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

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

Hi Patrick,

 

No pull up or pull down or serial resistors.

No caps.

There is a push button switch on the reset line, with very short traces.

 

The uC has clean power and by-pass caps.

I thought this would "just work".

No such luck.

 

JC

 

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

DocJC wrote:
The Dragon will read the PCB's voltage, and will read the Signature, but then I get a "Can't enter programming mode" error, or it might appear to program the chip, but then it fails to verify the chip, (and the program isn't running, so I don't think it was really programmed).
Could try the Dragon on a self-powered USB hub then try additional series termination (probably start at 50 ohms increasing to approx 200 ohms) on PDI data and/or clock.

There's at least several threads here on AVR Dragon PDI issues; IIRC, some of these were solved by series termination and a few by a shorter target cable.

From Atmel Studio 7.0.1417 readme :

Note: The AVR Dragon should be connected through a powered USB hub. This because the power supply on the Dragon can be too weak if the motherboard does not provided enough power. If the Dragon times out or freezes, then the hub might be of to low quality.

A USB timeout is a fault but a failure is USB power brown out for then the latent defect in the AVR Dragon's power supply occurs resulting in one becoming an AVR Dragon slayer.

"The Original Dragon Slayer!" - microcarl

 


Atmel

AVR Dragon
Atmel AVR Dragon Requirements

I/O Pins

http://www.atmel.com/webdoc/avrdragon/avrdragon.section.qrc_qsd_lc.html

...

Note

The Atmel AVR Dragon requires a USB port that can deliver up to 500mA. (self-powered USB hub)

 

"Dare to be naïve." - Buckminster Fuller

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

We'll give it a try.

 

I did recall a few Dragon / PDI Threads, but my site search and Google Foo didn't land me on any pertinent Threads.

 

Thanks,

 

JC

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

Wow, Thank you, pawi777, and gchapman!

 

Using a powered USB hub didn't make a difference.

 

But inserting 220 ohm resistors, in series, in both the PDI Clock and Data lines did!

 

It now works reliably!

 

Thanks!

 

JC

 

 

 

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

Glad to hear ... and nice target board!

What's the PDI clock frequency?

 

"Dare to be naïve." - Buckminster Fuller

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

Using an AVR Dragon and an XMEGA32E5 Xplained, I get the following:

 

 

I am certain these two devices worked together in the past.

 

 

EDIT: a little late replying...  I guess I need to figure out why my Dragon and 32E5 don't like each other...

 

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

Last Edited: Sun. May 21, 2017 - 11:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The target board is the top half of this project's PCB.

The top half has the Xmega, Nokia GLCD, regulator, a couple of LEDs and PB switches, and the all important Reset switch.

It is a stand alone Xmega testbed, without the analog half of the prior project attached to it.

Some day I'll learn how to cut the PCB's in half better...

 

Unfortunately I put the Dragon and the PCB back in the basement, to move on to another weekend task, before the upcoming week.

Otherwise I'd check on the "PDI Clock Frequency", but off the top of my head, I don't recall there having been a setting for that in PDI mode.

(There was a clock frequency "slider bar" when I tested the Dragon using ISP on a Mega328P)

 

Greg Muth, perhaps you could also try inserting a couple of 100 - 200 ohm resistors in the Data and Clock lines and see if it helps out with your setup!

I saw several different error messages while working with my setup, before I added the serial resistors.

 

JC

 

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

OK, one more update!

 

Studio 6.2xxx with my Dragon, in PDI mode, did not have any options for setting the clock speed.

It popped up a dialog box that said there were no user configurable parameters.

 

Next, as the photo shows, my Dragon PDI programmed my Xmega32E5 Xplained without difficulty.

This worked with both a "normal" cable, and with my cable with the in-line 220 ohm resistors for the Clock and Data signals.

 

JC