0

I get the following error when I try to burn the arduino bootloader on an atmega328 mcu:

avrdude: verification error, first mismatch at byte 0x0000
         0xfd != 0x05

I am using an Arduino as ISP programmer. My computer runs Ubuntu 16.

This did not happen when I was using Ubuntu 14. I also tested it on another machine with Ubuntu 14 and this error does not appear. Seems to be something with Ubuntu 16. I installed Arduino IDE using the out of the box repo.

The avrdude command launched by the IDE is:

/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m 

Am I safe replacing the -Uefuse:w:0x05:m with -Uefuse:w:0xfd:m ?? If answer is yes how can I get the IDE to do this correctly?

Uploading a sketch works pretty well.

2
  • This is not a real answer. I have the same problem on Os X, but I can upload sketch via "upload using programmer", but this way I have no bootloader. Problem arises only when trying to install boot loader. I didn't have this problem some years ago on Linux Debian. I your problem is solved, please let us know.
    – Noury
    Commented Aug 6, 2016 at 14:15
  • There is no functional differences between an efuse setting of 0x05 and 0xfd, as only the three lowest bits actually exist. Your actual problem is elsewhere. Commented Aug 6, 2016 at 19:24

1 Answer 1

1

I had same problem and I think I have solved it.

In boards.txt file, I had:

##############################################################

diecimila.name=Arduino Duemilanove or Diecimila

diecimila.upload.tool=avrdude diecimila.upload.protocol=arduino

diecimila.bootloader.tool=avrdude diecimila.bootloader.low_fuses=0xFF
diecimila.bootloader.unlock_bits=0x3F
diecimila.bootloader.lock_bits=0x0F

diecimila.build.f_cpu=16000000L diecimila.build.board=AVR_DUEMILANOVE
diecimila.build.core=arduino diecimila.build.variant=standard

## Arduino Duemilanove or Diecimila w/ ATmega328
## --------------------------------------------- diecimila.menu.cpu.atmega328=ATmega328

diecimila.menu.cpu.atmega328.upload.maximum_size=30720
diecimila.menu.cpu.atmega328.upload.maximum_data_size=2048
diecimila.menu.cpu.atmega328.upload.speed=57600

diecimila.menu.cpu.atmega328.bootloader.high_fuses=0xDA
diecimila.menu.cpu.atmega328.bootloader.extended_fuses=0x05
 diecimila.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

diecimila.menu.cpu.atmega328.build.mcu=atmega328p

## Arduino Duemilanove or Diecimila w/ ATmega168
## --------------------------------------------- diecimila.menu.cpu.atmega168=ATmega168

diecimila.menu.cpu.atmega168.upload.maximum_size=14336
diecimila.menu.cpu.atmega168.upload.maximum_data_size=1024
diecimila.menu.cpu.atmega168.upload.speed=19200

diecimila.menu.cpu.atmega168.bootloader.high_fuses=0xdd
diecimila.menu.cpu.atmega168.bootloader.extended_fuses=0x00
 diecimila.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex

diecimila.menu.cpu.atmega168.build.mcu=atmega168

##############################################################

I have replaced the line containing:

diecimila.menu.cpu.atmega328.bootloader.extended_fuses=0x05

with:

diecimila.menu.cpu.atmega328.bootloader.extended_fuses=0xFD

Everything is ok now.

I can install boot loader on an ATMEGA328P (with an usbasp programmer), and I can install sketchs after that (via usb serial).

I don't know if it's the best way to solve the problem, but it works. Hope this will help you, if not already solved.

1
  • As there are only 3 bits in the extended fuses of an ATmega328p, 0x05 and 0xFD are actually the same value as far as the bits that exist. Different ways of handling the non-existent bits account for on the only difference, which is irrelevant. Commented Aug 6, 2016 at 19:24

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.