I have searched related answers and tried various workarounds and hacks and have not had any success.
This is not my first rodeo with bare AVR chips on breadboards or hand-soldered prototypes -- I've gotten several working in the past.
I'm using Atmel Studio 7 version 7.0.1645, just updated yesterday, with an Atmel ICE debugger, also updated yesterday. I'm running on Windows 7 Professional. In the "Tool Information" I have:
Atmel-ICE
Debug host 127.0.0.1
Debug port 58662
Serial number J41800068181
Connection com.atmel.avrdbg.connection.cmsis-dap
Features 1
Firmware Version 1.27
Hardware Version 0
I have the interface set to ISP, ISP clock at 125k kHz. It seems to be communicating OK with the debugger since I can read the target voltage.
Hardware setup: the TQFP -32 version of the ATmega8U2 is on a breakout board from Adafruit, plugged into a breadboard. I'm using the squid cable to connect to pins on the breadboard. I have only 6 pins hooked up as per the Atmel ICE user manual. Per my reading this works out to:
- Squid cable plugged into "AVR" (not "SAM") socket on Atmel ICE.
- Squid cable pin 1 to SCK (pin 15 on chip)
- Squid cable pin 9 to MOSI (pin 16 on chip)
- Squid cable pin 3 to MISO (pin 17 on chip)
- Squid cable pin 4 to VCC (pin 4 on chip)
- Squid cable pin 2 to GND (pin 3 on chip)
- Squid cable pin 6 to RESET (pin 24 on chip)
VCC and GND are hooked up to a power supply set to 5.0V and the "read voltage" command gets back 5.0V.
I have tried it both with and without a 10K pullup resistor from RESET to the +5V, and it doesn't work either way.
I've tried it with and without a 1uF cap between the VCC and GND pins on the chip as well, no difference.
Trying to read the device signature, I get "Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool).
I have a second chip on a breakout board and, thinking maybe I fried the first one accidentally, have swapped in the second chip, with exactly the same results.
Now, it so happens that I _also_ have a Dragon. Hooking up the dragon instead of the ICE, I can use a little adapter board to attach the squid cable to the ISP pins. If I do that, the tool information shows:
AVR Dragon
Debug host 127.0.0.1
Debug port 58662
Serial number 00A200065956
Connection com.atmel.avrdbg.connection.mchp
Master Firmware Version 7.27
Slave Firmware Version 7.27
Hardware Version 17
With that setup, I can't read the target voltage. When I try to set the interface selection to ISP and hit "apply," I get "Failed to get interface clock value. Does the target have power?" And trying to read the target voltage seems to produce a random value.
Just for kicks I pulled out an old breadboard for a completely different project, that used to work just fine. That one uses an ATiny461A. It is still all wired up on the breadboard with a squid cable ready to hook up to the Atmel ICE. I hooked up power and plugged the squid cable into the ICE debugger and I get the exact same results. I can read the voltage just fine, but it won't talk to the chip.
I swapped in the Dragon and I get exactly the same results as above (can't read voltage, can't read device signature).
This leads me to believe that it is more likely a problem with the toolchain, debugger firmware, driver, etc. than my new breadboard.
Any suggestions as to what else to try, to figure out what has gone wrong with my toolchain?
Thanks.