Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

AVR Dragon question

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Sat Feb 23, 2013 7:35 pm    Post subject: AVR Dragon question Reply with quote

Hello

I'm trying to get started with XMega chips and it's not going well. I'm using a new AVR Dragon programmer and a ATXMEGA256A3U with the PDI connections. The programmer will not recognize the micro until I connected my scope probe to the CLK line, then read/writes are possible. All power pins are bypassed with 0.1uF caps. I've tried pullups/pull downs on the clk, data lines, still does not work unless the scope probe is connected.

I think the problem is with the Dragon, so my question is: Has anyone had a success or problems using the Dragon with Xmega parts?

Dave
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Sun Feb 24, 2013 5:29 am    Post subject: Reply with quote

I would try a 1K resistor to ground as I think the probe is putting a load accross the line.

Regards Paul
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Sun Feb 24, 2013 6:16 pm    Post subject: Reply with quote

Paul,
Thanks for the input. I did try both pull up and pull down resistors (15K). The scope probe has 10M impedance so 1K seems a bit low to me.

I found this known issue for the JTAGICE3.
Quote:
PDI might not work at certain frequencies if there is much undershoot on the PDI clock signal. On some target board configurations the PDI clock has shown a fair amount of undershoot. This undershoot might result in the Atmel JTAGICE3 not being able to communicate with the target. To get around this problem the PDI clock frequency should be lowered. This can be done on the Interface settings tab in the programming dialog or on the Tool tab in the project Properties of a debug project. If a higher PDI clock frequency is required some kind of termination must be added to the PDI clock line. For example adding a small capacitor (in the order of 100 pF) on the target board between the PDI clock and Vcc has proven to be effective. Adding a series resistor is not effective unless it is added to the JTAGICE3 mainboard.


So I tried a 100pF cap to Vcc and that helped. I was curious so i tried the 100pF to GND and that worked better I think.
The crazy thing is that now it does not work when the probe is connected.

I would like to know what programmers others are using to program Xmega parts? What, if any, problems you have had. This problem does not give me a lot of confidence in the AVR Dragon. I'll buy another programmer if there is one that is more reliable. Please share your experience with me.

Thank you,
Dave
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Sun Feb 24, 2013 7:58 pm    Post subject: Reply with quote

Dave,
how much is the undershoot?
If it is more than 0.2 Volt, then a Germanium diode to ground might help to limit the negative going voltage.
The problem with the capacitor is, that it also deforms the rest of the signal.
The diode will just add a few pF.
Hubert
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Mon Feb 25, 2013 1:45 am    Post subject: Reply with quote

If its undershoot try a 180 ohm resistor in series with the line, this problem I came accross with the ENC28J60 and series resistors were the recomendation in the spec.

Regards Paul
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Mon Feb 25, 2013 4:25 am    Post subject: Reply with quote

One more thing I just thought of.
The scope pobe cable probably has a capacitance of 100 to 300 pF per meter depending on the type of coax cable.
Hubert

edit:
If you need to measure timing on a high frequency low impeadance signal, just twist a few turns of wire around the signal wire and scope that.
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Mon Feb 25, 2013 4:20 pm    Post subject: Reply with quote

Here is a pic of the clk and data lines. I suspect that there is a conflict in the data line during a change of input/output direction.

It is working now but that clk signal does not look good to me. I've ordered a programmer off ebay that is made here in Oregon so I should get it very soon. I'll let you know how that works out.

Dave
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Mon Feb 25, 2013 4:41 pm    Post subject: Reply with quote

This is from the AVR Dragon user guide.

Quote:
XMEGA PDI issues: XMEGA PDI mode on AVR Dragon does NOT work for the following XMEGA devices: A3/D3 - revisions B, C and E or A1 (up to revision K)


My parts are rev A or G. I'm not sure which, studio6 reads it as rev A and the makings on the back of the chip seem to indicate rev G.

Anyways the Dragon seems to have problems using PDI mode.
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Tue Feb 26, 2013 6:19 am    Post subject: Reply with quote

Paul, Hubert

I added a 120 ohm resister in series with the clk and it reduced the undershot by about 50%. It still needed the 100pF cap to gnd. but if my new programmer doesn't fix the problem I will continue to use a series resistor and add a germanium diode.

Thanks for your suggestions it is very appreciated.
Dave
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Tue Feb 26, 2013 12:34 pm    Post subject: Reply with quote

Great dave so microchip do know what they are talking about, try a 1K resistor and see what happens its not the resistance I am thinking about its the added inductance due to the spiral cut on the resistor being longer also a ferrite bead over one end of the resistor could also be tried.

Regards Paul
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Fri Mar 01, 2013 4:14 pm    Post subject: Reply with quote

Here are the results of tests using my new AVRISP MKII compatible programer.
1. The new programer also requires a cap to ground on the clk line. Without any cap it fails. (100pF).
2. The clk frequency is half that of the AVR Dragon but the clk wave form is much better on the new programer.
3. The new programer seems to read/write faster then the dragon. I didn't measure the actual time this is just my perception.
4. The new programer reads the rev no. of the Xmega a "G". Which matches the rev no on the back of the part. The dragon read this as A.

So for now I'll continue to use the new AVRISP MKII compatible.

I would still like to know what programers others are using for xmega parts. I guess I need to start a new thread to get that question answered.

Dave
Back to top
View user's profile
nil_orally

Bascom Member



Joined: 07 Jun 2010
Posts: 18

australia.gif
PostPosted: Sun Mar 03, 2013 4:56 am    Post subject: Reply with quote

Hi Dave,

I have 4 different boards with that we use about 30 a month of (it varies) with ATXMEGA32A4 on. We just use a AVRISP mkII. The boards do not need any components to allow programming.
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Sun Mar 03, 2013 1:08 pm    Post subject: Reply with quote

If you want a to use an AVRISP MKII you can't beat the original Atmel version, they are cheap (less that $50)
not worth the hassle of using a Chinese clone.

I also had issues using an AVR Dragon, at the end it failed so I sent it back for a refund and bought an AVRISP MKII.

_________________
Peter
Back to top
View user's profile
Dave

Bascom Member



Joined: 05 Feb 2005
Posts: 314
Location: OR

usa.gif
PostPosted: Sun Mar 03, 2013 4:30 pm    Post subject: Reply with quote

I should have done more research before buying the Dragon and bought a AVRISP MKII in the first place.

Oh well, live and learn.

Thanks guys,
Dave
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum