AVR Dragon PDI programming

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

Hi!

I'm having problems programming an ATXMEGA256A3U through PDI with an AVR Dragon. After much reading and debugging I found that my problem is with the VCC pin on PDI of Dragon. Sometimes I get the correct tension 3.3V but other I get values around 4V, which won't let me programm my xmega. Is there a way to force 3.3V on the AVR Dragon without breaking everything? Or is there any other solution I can use?

I can only program through PDI, the JTAG pins on the xmega are not available.

Last Edited: Mon. Mar 2, 2020 - 07:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you got a proper external 3.3V power supply?

 

Then connect the 3x2 PDI header on your target Xmega pcb to the 3x2 SPI header on the Dragon with a 6-way ribbon cable.

 

David.

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

I am connecting the 3x2 PDI header on my target board to the 3x2 SPI header on the Dragon, but I'm sometimes getting connection issues and when I'm debbugging the connections fails. What I read on the Dragon datasheet is that when working with an external board, you must not connect de VCC pin on PDI header on the board with that on the Dragon. But when I do this I get the tension problem.

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

facasas wrote:

I am connecting the 3x2 PDI header on my target board to the 3x2 SPI header on the Dragon, but I'm sometimes getting connection issues and when I'm debbugging the connections fails.

That is correct connection.   If you get intermittent errors,  replace the 6-way ribbon cable.   You have a bad wire.

 

facasas wrote:

What I read on the Dragon datasheet is that when working with an external board, you must not connect de VCC pin on PDI header on the board with that on the Dragon. But when I do this I get the tension problem.

You should only connect  3x2 PDI header on target board to the 3x2 SPI.   The Dragon reads the voltage from pin#2 in the 3x2.   The Dragon gets the same GND via pin#6 of the 3x2.

I have used Dragon PDI with Xmega128A4U.   I use ATMEL-ICE now.  

But I am sure the Dragon still works ok.     I can try on Xmega128A1, 32A4U, 128A4U if you think there is a problem.

 

David.

Last Edited: Tue. Mar 3, 2020 - 02:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I already tried with different cables and they have the same problem, that's why I'm thinking the issue is with Dragon.

 

Quoting AVR Dragon datasheet:

Note:
AVR Dragon must sense the target voltage on pin 2 on the PDI header in order to set up the levelconverters.
When using off-board targets there should be no connection between the VCC header and pin 2 of the PDI header.

This is what confuses me....  I understand that if provided with an external board with VCC, then Dragon should sense this VCC on pin 2 and make an inside conversion in order to level the VCC on Dragon's PDI to that provided by the external board. However, then it says that if using off-board targets (which I understand is like my external customize pcb with an XMEGA) then VCC pins should not be connected.

 

Anyhow, I've tried both and neither seem to be working.

Can it be maybe that the Dragon is not working correctly on setting-up this level converters?

 

Last Edited: Tue. Mar 3, 2020 - 02:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

facasas wrote:
Note:
AVR Dragon must sense the target voltage on pin 2 on the PDI header in order to set up the levelconverters.
When using off-board targets there should be no connection between the VCC header and pin 2 of the PDI header.

 

Most (sensible) people will be using the Dragon to debug/program an external target pcb.

Some (hobbyist) people will put a bare target AVR in a ZIF that they have soldered to the Dragon pcb.

 

The ZIF enthusiasts will be powering the target AVR from the Dragon.   AS7.0 works for JTAG chips.

AS7.0 does not work for debugWIRE chips.

 

I think that the poorly worded Dragon doc is saying:   Do not connect Dragon VCC power header pin to external power supply.    There will be a fight.

 

There is no problem with connecting the VCC-sense pin on the SPI header to external power (or Dragon power).    It is a "read" pin. 

 

I have never understood the ZIF brigade.   But I owned a STK500 before I bought my Dragon.

Any realistic project involves external electronics.   So you might just as well have an externally powered target pcb.

 

Having said that,   I am a great believer in a single USB cable boards: XPRO, XMINI, CURIOSITY.   i.e. debugger, Serial CDC, target chip with external headers.

 

David.