avrdude: verification error; content mismatch

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I bought an Arduino Uno to program my AVR chips. I'm facing an error though from avrdude when trying to flash on a simple blink program. Running on Yosemite with standard avr-gcc etc tools installed. The output from the programming is below. Any ideas? If you need more info just ask. The chip is an Atmega1284P-PU.

 

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.00s

 

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: erasing chip

avrdude: reading input file "Builds/main.hex"

avrdude: input file Builds/main.hex auto detected as Intel Hex

avrdude: writing flash (198 bytes):

 

Writing | ################################################## | 100% 0.03s

 

avrdude: 198 bytes of flash written

avrdude: verifying flash memory against Builds/main.hex:

avrdude: load data flash data from input file Builds/main.hex:

avrdude: input file Builds/main.hex auto detected as Intel Hex

avrdude: input file Builds/main.hex contains 198 bytes

avrdude: reading on-chip flash data:

 

Reading | ################################################## | 100% 0.03s

 

avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0080

         0x10 != 0x0c

avrdude: verification error; content mismatch

 

avrdude done.  Thank you.

 

Last Edited: Mon. Mar 9, 2015 - 06:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please post the actual command line that you issued.

 

There are many ArduinoISP tutorials that have coloured diagrams to show the wiring.

Please post a photo of your wiring.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the wiring, the idea is take the SPI stuff from pins 6,7,8 over to pins 11,12,13 on the Arduino, connect up the resets, ground and the 5V supply.

 

The code was built in Xcode, but here is the command that is run to flash it on.

/usr/local/bin/avrdude -p atmega1284p -P /dev/cu.usbmodem1451 -c arduino -U flash:w:Builds/main.hex

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Shirley,   your ArduinoISP sketch needs:

/usr/local/bin/avrdude -p atmega1284p -P /dev/cu.usbmodem1451 -b 19200 -c stk500v1 -U flash:w:Builds/main.hex

And your ATmega1284 should have 100nF capacitors and AVCC,  AGND connected.

 

Google "ArduinoISP".

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have googled it, my circuit looks the same. The only cap I have lying around is a 470nF, which I put from AVCC to GND (no AGND). Do you think that the wiring is the problem?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The ATmega1284P datasheet has got a chapter on ISP programming.   This shows the necessary wiring.   i.e.  AVCC and VCC must have power.

470nF is fine.

 

The point of my reply was that your avrdude command is wrong.

You are talking to the UNO bootloader.    You should be talking to the ArduinoISP sketch that is running on the UNO.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh right, thanks. Yes that makes more sense. Luckily no damage appears to have been done to the boot loader on the Uno. It turns out that in avrdude.conf it says "stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one", which I guess means I'm out of luck with the chip I bought. Thanks for you help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Arduino releases tend to use fairly 'old' components.    e.g. a very old avrdude.

 

OTOH,   you may have simply got a very old avrdude that your shell found first.

 

Just typing:

avrdude -v

should show you which version you are using.

 

Quite honestly,   any old version of avrdude should understand the ArduinoISP sketch.

However,   the very old avrdude.conf will not know about a ATmega1284P because it is only been available for about 4 years.

 

I suggest that you check your Arduino version too.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I connected AVCC, AGND to GND, and the problem with the verification error disappeared.

 

Thanks!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danroxi wrote:

I connected AVCC, AGND to GND, and the problem with the verification error disappeared.

 

Thanks!!

Thanks for reviving a 5 year old post were the OP has disappeared since......

Keep in mind that AVCC should be connected to VCC and not to ground as it is the analog supply voltage, check the datasheet..........

Next time do not forget to add decoupling capacitors that might also do the trick.