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

not very good photo of circuit on bench

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)

trace, no PDI connection

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.

trace, with xmega connected

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

trace, second spike

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

  • \$\begingroup\$ 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? \$\endgroup\$
    – user73557
    Apr 30 '15 at 16:50

Curiosity killed the cat.

I tried with a different programmer (Olimex AVR-ISP-MK2) and got similar result. I then tried probing the supply voltage instead, and the response changed. Removing the scope probes and the xmega responded fine. I haven't retried with the original programmer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.