I am trying to flash my AVR ATXMega32E5 with Atmel-ICE thanks to SPI.

The problem is that from AVR Studio Device Programming it can read the Target Voltage but not the Device Signature.

What it could be the reason? What is the SPI clock needed?
I tried with 100 kHz, 150 KHz, 1 MHz and 2 MHz but it is still not working.

Thank you in advance for your time and help!


3 Answers 3


1: Everything up to programming is working, including the voltage read-out, that means you're good on drivers and USB connection and all those other things. It also means you most likely put in the connector for the ISP (SPI bus for "In System Programming") the right way. Because if you hadn't, it wouldn't read the voltage, since that requires all those things to work. That is, reading the target voltage correctly requires:

  • The GND pin to be connected correctly
  • The VCC (ISP) or VTG (JTAG) pin to be connected correctly
  • The USB communication to be working
  • All programmer drivers to be present

Being able to compile your program would indicate you also have all the required definitions, although if you can select the processor from the drop-down in the programming menu, that also means the core-system has at least found your device definitions. And also, even if you choose a completely different processor, that wouldn't even block you from reading the ID checksum from an atmel using Atmel Studio 5 or later.

2: The most common causes for not being able to program a device (some may apply to your device, some may not, but this list should help you bug-check many designs):

  • The Reset pin can't be toggled by the programmer: Either the Reset pin is not connected to the ISP or JTAG connector, or it may be connected to something that drains or sources too much current.
  • One of the data or clock lines cannot be used to communicate: Either they are broken (in the cable, on the board, or bad connection in a connector), or they can also be connected to something else that's too strong for the chip or the programmer.
  • Wrong device supply voltage for programming: 99 out of a 100 cases if this is a problem it will still tell you the signature, but some smaller Atmels require their highest supply voltage to be able to program through one or more specific busses. This is probably not your problem right now, but it's good to keep in mind for when you can read a signature, but can't seem to program. In those cases look for "Minimum Programming Voltage" or similar in DC electrical specs.
  • The ISP/JTAG clock speed of your programmer is too high for the device: It should never be more than 1/4th of the uC's speed, but can be as low as your programmer supports for the selected device. One thing to test with reading the signature is if it does work at the lowest possible speed (100's of Hz), if it suddenly does, the programmer speed may be the problem. All processors come out of the box set up with a clocking scheme by default and the datasheet will tell you about that. For Tiny/Mega/XMega it usually is an internal oscillator and dividers set so that it runs at 1MHz (means 250kHz ISP or less), but that's not true for all of them.
  • Your target uC may have been configured to run on an external clock source or crystal which is missing or broken, meaning your core is no longer running. In that case ISP will certainly not be usable to recover it in most "smaller"/"cheaper" processors without applying that external clock source/crystal. Some controllers may have options for programming in another way that does not depend on the internal core clock (such as some of the parallel programmable ones, but again not all).

So you see, it's not a very easy or clear-cut answer to give on such incredibly little information.

  • \$\begingroup\$ Dear Asmyldof, Thank you for your detailed answer! Actually I have checked the connections between the ISP and the microcontroller and they seems to be fine. One more detail form my setup is that the programmer Atmel-ICE that has two leds open: one red in the middle ande one green on the side. The third led is indeed switched off...could mean something? Thanks again \$\endgroup\$
    – Francesca
    Mar 11, 2016 at 10:22
  • \$\begingroup\$ @Francesca if you look at page 25 of atmel.com/images/atmel-42330-atmel-ice_userguide.pdf you can see that those LEDs actually only describe what you already specified. You'll have to check all the possible causes. \$\endgroup\$
    – Asmyldof
    Mar 12, 2016 at 12:46

Usually you want to set the programming clock to 1/4th the speed that the AVR is running at. What more likely is the issue is that you may not have the packages installed for the ATXMEGA devices. Check the package manager and update everything to see if that is the issue. Otherwise it may be the drivers for the ICE programmer I would assume.


The target voltage is a property of the JTAG (it's basically an analog input pin on the JTAG's processor which reads the VREF or VTG pin). If you cannot read the device signature, that means that your processor does not respond at all.

So if you though that some part of your connection is working, you are most likely wrong. Check your debug connections with the datasheet. Is your processor in/out of reset, are the remaining signals connected correctly?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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