0

One solution to: "avrdude: initialization failed, rc=-1"
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

One solution to: "avrdude: initialization failed, rc=-1"

by extremis on Fri Oct 09, 2009 2:29 pm

This took me a while to figure out, but I hope it helps others. When using avrdude to burn the atmega168v, you may encounter an error like:

Code: Select all | TOGGLE FULL SIZE
$ avrdude -c usbtiny -p atmega168

avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


After much reading, I determined I needed to 'guess' at the -B (bitclock) values. So, I modified the Makefile in the firmware download, and I was able to perform all portions of the 'make full.' I'm still trying to determine the actual significance of these values, but this works for me consistently (YMMV.)

Code: Select all | TOGGLE FULL SIZE
full: $(TARGET).hex $(TARGET).eep
   $(AVRDUDE) $(AVRDUDE_FLAGS) -B 25 -u -U lfuse:w:0xE2:m -u -U hfuse:w:0xc6:m
   $(AVRDUDE) $(AVRDUDE_FLAGS) -B 25 -U flash:w:$<
   $(AVRDUDE) $(AVRDUDE_FLAGS) -B 35 -U eeprom:w:iveep.hex


burn-fuse:
   $(AVRDUDE) $(AVRDUDE_FLAGS) -B 25 -u -U lfuse:w:0xE2:m -u -U hfuse:w:0xc6:m

reset:
   $(AVRDUDE) $(AVRDUDE_FLAGS) -B 25
extremis
 
Posts: 25
Joined: Wed Oct 08, 2008 1:13 pm

Please be positive and constructive with your questions and comments.