0
\$\begingroup\$

I was trying to overwrite the AVR Fusebytes for AVR16A

sudo avrdude -p atmega16 -P usb -c usbasp -U lfuse:w:0xFF:m -U hfuse:w:0x99:m

before overwriting it was l:0xe1 h:0x99 after overwriting it gives an error .

avrdude: error: program enable: target doesn't answer.
1 avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

How do I recover from this mistake?

Edit: When I run with -F option 
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x88fbe8
avrdude: Expected signature for ATmega16 is 1E 94 03
avrdude done.  Thank you.
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You need to erase Flash. Erase by default will clear FLASH and lock bits.

check this blog, though it is meant for ATMega32, it will work for any ATMega controller

\$\endgroup\$
3
  • \$\begingroup\$ But it will not clear the Fuse Bits. \$\endgroup\$
    – InQusitive
    Feb 12, 2017 at 21:11
  • \$\begingroup\$ updated the answer with a link, hope it helps \$\endgroup\$
    – Raj
    Feb 13, 2017 at 4:06
  • \$\begingroup\$ Looks like exactly my problem. \$\endgroup\$
    – InQusitive
    Feb 13, 2017 at 6:51

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.