ATmega324P with AVRDUDE

From Mmoss.org

Jump to: navigation, search

If you try to read or program an Atmel ATmega324P using AVRDUDE you'll probably get an error something line the following:

 $ avrdude /dev/ttyS0 -p m324p -c avrisp -U hfuse:r:test.txt:h<br/>
 avrdude: stk500_program_enable(): no device
 avrdude: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.<br/>
 avrdude done. Thank you 

You can fix this error simply by uncommenting a line in your avrdude.conf file. First, find the ATmega324P section of your avrdude.conf file. The first few lines should look something line this:

 part
     id               = "m324p";
     desc             = "ATMEGA324P";
     has_jtag         = yes;
 #   stk500_devcode   = 0x82; # no STK500v1 support
 #   avr910_devcode   = 0x?;  # try the ATmega16 one:^
     avr910_devcode   = 0x74;
     signature        = 0x1e 0x95 0x08;
     pagel            = 0xd7;
     bs2              = 0xa0;
     chip_erase_delay = 9000;

Simply uncomment the "stk500_devcode" line by removing the leading #. So far, I've had no problem programming and verifying ATmega324p parts using these settings.

Personal tools