TinyCircuits

avrdude: verification error; content mismatch

avrdude: verification error; content mismatch
« on: April 22, 2018, 04:09:57 PM »
Hi,

I've been working with a TinyDuino on a very simple project. Things were going fine. Using Ardunio IDE 1.8.5, I was able to flash Blink.ino, then wrote a bit of code and flashed that several times as I developed it. One time, I flashed and it worked fine.  I made a tiny code change, flashed again, and it failed with:  avrdude: verification error; content mismatch.  I've tried probably about 100 times, since then, and still get the same error, no matter what I try to flash.  Other boards work fine (though I don't have another TinyDuino to try).

Nothing weird about the code and nothing to the hardware except a BLE TinyShield and a proto board that just gave me a push button, at this point.  I've removed all hardware except the TinyDuino (obviously) and the USB TinyShield, so as to eliminate any possible cause there.  I've also tried several different USB cables and ports.  So, that's not the problem.

The full output looks something like:
Code: [Select]
Arduino: 1.8.5 (Windows 7), Board: "Arduino Pro or Pro Mini, ATmega328P (3.3V, 8 MHz)"

Sketch uses 928 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduino -PCOM11 -b57600 -D -Uflash:w:C:\Users\Me\AppData\Local\Temp\arduino_build_474044/Blink.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM11
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         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
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 5.0
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Me\AppData\Local\Temp\arduino_build_474044/Blink.ino.hex"
avrdude: writing flash (928 bytes):

Writing | ################################################## | 100% 0.38s

avrdude: 928 bytes of flash written
avrdude: verifying flash memory against C:\Users\Me\AppData\Local\Temp\arduino_build_474044/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\Me\AppData\Local\Temp\arduino_build_474044/Blink.ino.hex:
avrdude: input file C:\Users\Me\AppData\Local\Temp\arduino_build_474044/Blink.ino.hex contains 928 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.43s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
         0x00 != 0x5c
avrdude: verification error; content mismatch

avrdude: verification error; content mismatch

avrdude done.  Thank you.
I haven't messed with any configurations or the bootloader in any way.  Curiously, the following appears intermittently at the very end of the output above: 
Code: [Select]
the selected serial port does not exist or your board is not connected

Yet ... the upload works just fine, but the verification fails.  Plus, I can open the serial monitor and send data and see the RX light blink on the USB TinyShield.  So, it sure seems like the serial port is fine.  And, like I said, this comes and goes, and only appears after, "avrdude done. Thank you."  No matter what, the program never runs on the device.

At this point, I suspect the board itself is damaged or defective, in some way, but am not sure if there is something I can do to rule this out (or confirm), short of just ordering another board.  Any advice?

Re: avrdude: verification error; content mismatch
« Reply #1 on: May 31, 2018, 04:40:35 AM »
I would like to know about the content that you have a source of knowledge that can guide me?