PDI Enable Failed Error with Atmel ICE/XMEGA128A3

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

Hi,

 

First post here, but I need help figuring out an error I've been getting trying to read/program my AVR XMEGA 128A3. I'm using an Atmel ICE debugger to read (or program) the chip.

 

I've tried to use both Atmel Studio and the Atmel Command Line and both have yielded the same error: "PDI Enable Failed: Debugger command Activate physical failed. TCF error code 1."

 

I've triple checked all the connections and everything looks good.

 

Any help/insight at all would be greatly appreciated! Thanks!

 

EDIT: When I use the Device Programmer tool in Atmel Studio, I can read/program the chip if I select "Simulator" as my tool instead of "Atmel-ICE." This leads me to believe there's an issue with the ICE and not the XMEGA.

Last Edited: Mon. Jul 24, 2017 - 08:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

I've not used the Atmel Ice, but a comment or two anyways:

 

Your own PCB, or a commercial design?

 

Is the PCB powered?

(Not a dumb question, as some programmers supply power to the Target, others read the Target's operating voltage in order to match it)

 

JC

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

swoldier1010 wrote:
I can read/program the chip if I select "Simulator"
You can use the simulator with no hardware. It is just "programming" the simulated device. (At least that's the way it works for me with a different device.) YMMV

David (aka frog_jr)

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

Commercial PCB, and yes the PCB is powered via an external power supply (anywhere between 1.6 - 3.3V).

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

Again, I don't have and haven't use the Atmel Ice, but another thought or two:

 

Verify that you have the correct Ice leads connected to the correct PDI programming pins for the Xmega.

I'd start with trying to get a simple PDI programming interface up and running.

This requires V+, Gnd, PDI Clock, PDI Data.

 

One of the PDI pins serves double duty as the micro's Reset\ pin, also.

Make sure you do not have any caps on the Reset\ pin.

 

Make sure, if applicable, that the software is in PDI mode, not in JTag mode.

 

JC

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

Hi JC,

 

As far as I can tell, all the leads are properly connected (although I recently read the link below that now has me confused).

 

Also the software is set in PDI mode and there are no caps on the Reset pin.

 

Referenced link: http://www.idogendel.com/en/archives/468

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

In an ideal world your pcb would have a standard 3x2 PDI header. Preferably with a clearly marked pin #1.
You plug in your ribbon connector. And away you go.
.
If this is a new design, you will need to check that the 3x2 is correctly routed. i.e. you check connectivity between header and each Xmega pin.
If you have non-standard pinout, I suggest that you make a little adapter with some protoboard like in your link. Avoid jumper wires and squid cables. Use soldered adapters with standard connector.
.
Remember that the ribbon is very delicate. You need to check connectivity on this too.
The easiest way. Plug onto the 3x2 of an Arduino Uno. Check that you can read the Signature.
.
Your "problem" is exactly the same as anyone with a non-standard board. i.e. check connectivity of pcb traces, ribbon wires.
.
Once you have "connected", PDI works very well for debugging. The Xmega is an impressive chip.
.
Let us know how you get on.
.
David.

Last Edited: Tue. Jul 25, 2017 - 06:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David,

 

Thanks for the assistance!

 

All the connectivity is correct. As a matter of fact, this setup has been used successfully before, I have now just been handed it to test some external application software. Unfortunately, I don't have an Arduino Uno on hand to be able to test that.

 

I'll try to describe the setup and provide some images to illustrate the exact setup.

 

The Atmel ICE has a 10-pin ribbon cable coming from the AVR port. The 10-pin ribbon connector is connected to an adapter board that comes with the ICE kit. There is a 6-pin header that comes from the adapter board connected to the 10-pin ribbon cable. The 6-pin header is used for a PDI connection (using only 4 pins - VTG, GND, PDI_DATA and PDI_CLK) in conjunction with a custom-built connector that connects to the XMEGA.

 

 

 

Excuse my crude drawing skills.

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

It looks as if you are doing everything 100% wisely.    The Atmel Adapter is really horrible but it should work ok.

 

I would put my money on an intermittent fault in the ribbon.

 

David.

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

I would put my money on an intermittent fault in the ribbon.

That's what I'm assuming at the moment. Either that, or the XMEGA is dead.

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

UPDATE:

 

I tried again with a new chip, and everything is working now. I guess the original XMEGA was dead.

 

Thanks to all who helped!

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

I am glad to hear that you have it working.

 

Be sure to take a photo of the working setup so you can be sure to reproduce it in the (distant) future, if need be.

 

The only way to reversibly "brick" an Xmega that I am aware of is to set the Brown Out Detector to a higher voltage than the Vcc voltage.

If this is the case then the micro is held in continual reset mode.

 

The way around this is to hook the micro up to a variable voltage power supply and slowly increase Vcc, while occasionally pushing your micro's PCB's reset switch, and seeing it it comes to life.

Vmax is 3.6 V IIRC, but worth checking that before you do this.

When it comes to life, reset the BOD fuses to a more appropriate, (lower), voltage level.

 

Of course the other option is to toss the dead mirco in the trash and move on!

 

JC

 

 

 

Last Edited: Fri. Jul 28, 2017 - 02:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First time posting, so if I'm going about it wrong, set me straight!

 

I just received a 'brand new' (two actually) "XMEGA A1U Xplained Pro" Evaluation Kit(s). I am and have been using AtmelStudio-7 using the Atmel-ICE programmer (JTAG) to program all sorts of 'other' Atmel MCU's with no issues (well, there are always issues)...

 

Anyway, with this new kit I am supposedly able to simply connect a USB cable from my PC to the 'EDBG' USB port on the board and have programming and debugging via a built-in PDI interface. All I can do is read the voltage (3.3V) and that's it. If I go to Tools/Device Programming it pulls up the window with everything being correct, except that the only thing that seems to work is to read the voltage. I've altered the clock from 32Khz on up to 4Mhz (also have changed the clock rate under the 'tool properties'). The fuse settings have not been altered (by me) as I cannot program a darn thing! I've been all over the forums and google in general with no real help. Obviously, if anything is incorrectly connected or wired it's the way the kit came... I have tried both boards with the same results - Nothing will work except to read the voltage. Oh, and the LED's just love to blink away...

 

Any ideas out there?

WJM

Last Edited: Fri. Sep 15, 2017 - 10:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I'm 'replying' to my own post - wrong thing to do? Oh Well!

 

Just after posting my post, it occurred to me that maybe my AtmelStudio needed an update (it had been almost a year since I installed it). So, I go to Help/Check for updates and what happens? A nice little window appears (image attached) that states:

 

"Changed USB drivers. Fixes issues reported with the installer. Improved handling of device support, Fixed issues".

 

and when I do the update, I notice that it is installing a 'MPLAB Communications Library'.

 

Long story short - fixed the problem.

 

What I don't understand is why, when you can plug your USB cable into this board and AtmelStudio7 suddenly comes to life recognizing the MCU and the board itself, why it couldn't figure out that it needed to update itself... Would have saved my entire day!

 

Attachment(s): 

WJM