0

I have been getting the error

avrdude: verification error, first mismatch at byte 0x036c
0xb8 != 0xf8
avrdude: verification error; content mismatch
avrdude done.  Thank you.

When trying to upload the example blink sketch to an Arduino mega 2560.

I did some googling and found that the common recommendation to solve this is to flash the bootloader.

Which does fix the issue for the first upload after flashing, but the issue reappears after one upload. But every time I flash the bootloader I do get one successful upload following that with no errors.

The mismatch is always at 0x036c every time.

2
  • Did you see this answer? Jul 20, 2022 at 15:09
  • I did see that and flashed a new bootloader, the voltage of the board seems stable 4.9V and I think the usb driver or cable are unlikely because I was able to try an identical Arduino that does not have the errors which means maybe its be a hardware issue with this specific board?
    – Banjoof
    Jul 21, 2022 at 4:26

1 Answer 1

1

The verification is there to check two possible error situations: Transmission error while uploading or faulty flash memory. Apparently, the error can also happen for a bunch of other reasons (see the linked answer), but these two cases should still be considered. Since another Arduino works with the same cable, it's unlikely a communication error and hence, based on all we know, I am assuming your Arduino is bad.

You might be lucky that for some reason (the fault is in some piece of code that's not actually used) the program works despite the error, but it's likely that sooner or later you'll get very strange crashes or otherwise undefined behavior.

2
  • Yeah its probably just a bad arduino. I just found it weird that the verification seemed to work fine after flashing the bootloader but then went back to failing.
    – Banjoof
    Jul 23, 2022 at 5:58
  • Maybe something is different the first time internally. Or the bootloader itself already doesn't work correctly.
    – PMF
    Jul 23, 2022 at 15:25

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.