0

I'm new to Arduino; and I'm trying to upload a simple sketch to a new Arduino Nano

I tried a few sketches (blink / helloworld / empty one); and changing the USB PORT. Windows find the correct serial port (but it's a CH340 USB-Serial; I think that's some Chinese clone). I tried a few USB ports.

When I upload the sketch, it seems to upload. But a verification error appears:

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x00ea
         0x8c != 0x8d
avrdude: verification error; content mismatch

This is the command line

D:\Arduino\hardware\tools\avr/bin/avrdude -CD:\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b57600 -D -Uflash:w:C:\Users\corti\AppData\Local\Temp\build462236accad2415310c5b24cce7ccca0.tmp/Blink.ino.hex:i 

This is the full verbose log of the flashing:

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "D:\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         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: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: reading input file "C:\Users\corti\AppData\Local\Temp\build462236accad2415310c5b24cce7ccca0.tmp/Blink.ino.hex"
avrdude: writing flash (1066 bytes):

Writing | ################################################## | 100% 0.32s

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

Reading | ################################################## | 100% 0.24s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x00ea
         0x8c != 0x8d
avrdude: verification error; content mismatch
6
  • Run through some of the suggestions here and see what happens. – Nick Gammon Apr 6 '16 at 6:09
  • (but it's a CH340 USB-Serial; I think that's some chinese clone) Good luck with that then. Those CH340s aren't the most reliable chips around. – Majenko Apr 6 '16 at 9:56
  • Have you tried just uploading blink through the IDE? – Code Gorilla Apr 6 '16 at 12:33
  • Yes, I tried any kind of sketch. I also tried to reflash the bootloader (and went just fine). When I write something with serial monitor, leds blinks /but no answer/ – AndreaCi Apr 7 '16 at 7:53
  • 1
    @Lipsyor with no drivers you can't even get to that point – AndreaCi May 9 '16 at 8:02
-1

I have seen this once before when one of my mates was having troubles programming a ATMega328P on a custom board. It turned out to be his physical serial port. We later confirmed it with a scope - indeed the first packet wasn't what it was meant to be sending. So we switched to a USB-to-Serial dongle that I had and the problem was resolved.

In your case, I highly suspect that it is the CH340 to blame here.

Try programming the Adruino with the AVRISPmkII or another USB-to-TTL converter.

Edit: Alternatively you could program your microcontroller using a genuine Arduino Uno board (such as a friends) and then place it back onto your board.

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.