Errors while burning bootloader

Hi,

I had problems uploading sketches to my Arduino Nano 3.0 compatible board (got verification errors),
so I followed this tutorial: http://arduino.cc/en/Tutorial/ArduinoISP,
using my Arduino Diecimila as a programmer (I've done it before successfully),
and got this error:
avrdude: verification error, first mismatch at byte 0x7800
0x0c != 0xff
avrdude: verification error; content mismatch

Please see the attached verbose output.

BTW,
I'm using version 1.0.3 of the IDE on Ubuntu 12.10 32bit.

Any ideas?

arduino.log (311 KB)

This may or may not have any bearing on your problem, but I was unable to burn bootloaders from Ubuntu 10.04 recently. Everything looked OK but I had similar errors trying to burn and it trashed the chip. When I moved to a Centos 6 system everything started to work fine. Again, it most likely isn't the same problem, but if you have the ability to use a different OS, it's worth a try. Might save some time. Then again, it might waste some time. :wink:

Jim.

I gave it a try on Fedora 17 x86_64,
and got the same result:

  • Program loading on "Diecimila" works.
  • Using "Diecimila" to program "Nano" failed on verification stage ("verification error, first mismatch at byte 0x7800").

Thanks anyway.

BTW, before I tried to burn bootloader on "Nano",
it did give me the indication of a working bootloader (that blink after reset), But uploads failed on verification.
Now, it doesn't do that, and it fails on communication when I try to upload.

I know its not completely fried, but guess I've damaged it some how..

Which Nano clone do you have? I just flashed mine (LISA 2011) with no trouble other that Pin 1 on the ICSP is flipped 180 from where I though it would be. Another handy tool to see if you have things hooked up correctly is Nick's chip detector:

Same hook-up as the Arduino as ISP.

I bought this one: Nano V3.0 for Arduino (Works with Official Arduino Boards) - Free shipping - DealExtreme

I ran the chip detector (actually had to remove md5 code to reduce the size of the binary, in order to upload)
This is the output:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF
HFuse = DA
EFuse = FD
Lock byte = FF
Clock calibration = BA
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 2048 bytes starting at 7800

Bootloader:

7800: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7810: FF FF FF FF 7F FF FF FF FF FF FF FF FF FF FF FF
...

You are obviously hook-up correctly and your Atmega is talking. There are a few differences I see between your bootloader and mine:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F 
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF 
HFuse = DA 
EFuse = FD 
Lock byte = CF 
Clock calibration = A4 
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 2048 bytes starting at 7800

Also, you are missing code in your bootloader:

Bootloader:

7800: 0C 94 34 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7810: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7820: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7830: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C

Try Nick's Atmega Board Programmer and burn the UNO bootloader, then reload the Arduino as ISP to the Diecimila and try burning the Nano 328 again.

I had to remove stuff to reduce size:

  • Includes: bootloader_atmega2560_v2.h, bootloader_atmega1284, bootloader_atmega1280
  • signatures: everything except "Atmega328 family"

That's what I got:
Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0xFF
HFuse = 0xDA
EFuse = 0xFD
Lock byte = 0xFF
Clock calibration = 0xBA
Bootloader address = 0x7E00
Bootloader length = 512 bytes.
Type 'L' to use Lilypad (8 MHz) loader, or 'U' for Uno (16 MHz) loader ...
Using Uno Optiboot 16 MHz loader.
Type 'V' to verify, or 'G' to program the chip with the bootloader ...
Erasing chip ...
Writing bootloader ...
Committing page starting at 0x7E00
Committing page starting at 0x7E80
Committing page starting at 0x7F00
Committing page starting at 0x7F80
Written.
Verifying ...
Verification error at address 7E00. Got: 0xFF Expected: 0x11
Verification error at address 7E01. Got: 0xFF Expected: 0x24
Verification error at address 7E02. Got: 0xFF Expected: 0x84
Verification error at address 7E03. Got: 0xFF Expected: 0xB7
Verification error at address 7E04. Got: 0xFF Expected: 0x14
Verification error at address 7E05. Got: 0xFF Expected: 0xBE
...
Verification error at address 7E64. Got: 0xFF Expected: 0x61
Verification error at address 7E65. Got: 0xFF Expected: 0xF4
496 verification error(s).
First 100 shown.
Type 'C' when ready to continue with another chip ...

Any chance something is wrong with its Flash/EEPROM?

Any chance something is wrong with its Flash/EEPROM?

Let's see if the Nano will take a EEPROM clear sketch. Set up your Arduino ISP from the Arduino IDE and then select/upload via programmer Examples->EEPROM->eeprom_clear. Then try the Burn Bootloader from the IDE. It worked once for someone else, though I have no idea what the EEPROM does to stuff the SPIEN enable (without disabling the bit).

I can't upload the eeprom_clear sketch.

Output:
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
...
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
...
avrdude: AVR device initialized and ready to accept instructions
...
avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
...
avrdude: reading input file "/tmp/build5476814932130915731.tmp/eeprom_clear.cpp.hex"
avrdude: writing flash (790 bytes):
...
avrdude: 790 bytes of flash written
avrdude: verifying flash memory against /tmp/build5476814932130915731.tmp/eeprom_clear.cpp.hex:
avrdude: load data flash data from input file /tmp/build5476814932130915731.tmp/eeprom_clear.cpp.hex:
avrdude: input file /tmp/build5476814932130915731.tmp/eeprom_clear.cpp.hex contains 790 bytes
avrdude: reading on-chip flash data:
...
avrdude: Recv: . [10]
########avrdude: Send: U [55] . [80] . [01] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: t [74] . [00] . [16] F [46] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff]
avrdude: Recv: . [10]

| 100% 0.62s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0xff
avrdude: verification error; content mismatch
avrdude: Send: Q [51] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

Can you show a photo of your setup? It looks like the flash is not being updated at all.

Sure.

I can't see anything obviously wrong. Can you try shoving a 0.1 uF capacitor between 5V and Gnd on the breadboard, adjacent to where the red and black wires are plugged in? Just a bit more decoupling on the power.

I don't have one.

Thanks everyone.
I guess I'll just buy a new Arduino.
If you have other ideas, I would like to try them.

Arduino: 1.8.2 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch

Can someone help me with this error rectification? its urgent!!

I can't burn bootloader, doing everything correctly, connected correctly, nightmare

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): unknown response=0x12
Error while burning bootloader.