# XMega not responding PDI/avrdude

I am trying to get started with xmega and have a ATxmega32A4U on a breakout board with 4 100nF caps for decoupling and a Zeptoprog programmer connected to the 2 PDI pins, ground and Vcc

I'm not getting the expected response when using avrdude (avrdude version 6.1 with -v and -F flags)

avrdude: stk500v2_command(): error in CMD_XPROG: Failed
avrdude: stk600_xprog_program_enable(): XPRG_CMD_ENTER_PROGMODE failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x4003ef
avrdude: Expected signature for ATxmega32A4U is 1E 95 41


The last byte of the device signature varies randomly and the first two don't change. It makes no difference to the avrdude output whether the PDI is connected or not.

Without the xmega connected to the PDI pins I get the following trace (yellow is PDI data, blue is PDI clock/reset)

With the xmega connected to the PDI pins I get the following, which shows a second data sequence which I assume is a response, since it's not there otherwise.

There appears to be some good data, but also two small spikes. This is the second spike zoomed in:

Are these spikes causing the error (and if so, what are causing the spikes), or is there something else I can try?

• Glad you resolved your issue. I'm thinking of buying a Zeptoprog for programming xMega micros. What are your thoughts on it? Did it eventually work to PDI program your xMega? – user73557 Apr 30 '15 at 16:50