Pages: [1]   Go Down
Author Topic: avrdude content mismatch: Linux, ATMEGA328  (Read 5248 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
0
Offline Offline
Newbie
*****
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Platform: Ubuntu Linux
IDE rev: 13 alpha
Arduino: Duemilanove with ATMEGA328

Error:
avrdude: verification error, first mismatch at byte 0x0006
        0x8d != 0x7d
avrdude: verification error; content mismatch

But there are two weird things:

1. It worked OK at first, through about a dozen downloads, then suddenly started exhibiting this problem.

2. A different board of the same revision is showing no problems when
uploaded from a Windows computer running rev 14. However, my board, shows the same problem on Windows.

Is it possible I've corrupted the boot loader?

There has been a long thread on the forums about an avrdude protocol
error, and I think I may have seen this occur a few times. In the
forums, there are many proposed explanations and fixes. Most assume
problems with the Windows port (not my problem), but some suggest manual reset before upload. This did not help me.

At first I suspected a problem with the Linux version 13 alpha, but now
I'm not so sure.

Suggestions?

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It sounds like there's flakey communication somewhere, not a fundamental problem in the setup.  Is the error message always exactly the same (i.e. the same byte number)?

I'm guessing there's a loose solder job somewhere on the board.  You should be able to get it replaced by the distributor that you bought it from.
Logged

Global Moderator
0
Offline Offline
Newbie
*****
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll check. Thanks for the tip.
Logged

Global Moderator
0
Offline Offline
Newbie
*****
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, it's been a long time but I finally bought and built a USBTinyISP. I've used it to try to reprogram the boot loader, and guess what: I get the same error:

avrdude: verification error, first mismatch at byte 0x0000
         0x3f != 0x0f
avrdude: verification error; content mismatch

It's always the same error: same address, same byte value.

I'm using the USBTinyISP to power the Arduino.

Any ideas?

Michael
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 572
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you 200% sure you've got the right chip selected in the Tools -> Board menu?

If you bought the ATmega328 separately remember the '328 is not the same as the '328P
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you bought the ATmega328 separately remember the '328 is not the same as the '328P

I've only seen 328P data sheet. Is there such a device as a '328?

Lefty
« Last Edit: June 25, 2009, 10:13:05 pm by retrolefty » Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 572
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah now that I think of it, not sure. I think maybe I was thinking of when you use avrdude from the command line, there is a difference and you need to select the part as '328P.

Still, check that the board you have selected is Arduino with 328, not just Duemilanove
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was having the same problem and it turned out to be a power issue. A switch from USB power to wall wart solved it. I had a similar problem when I first built my Arduino. I could program Atmega8s but it would fail on Atmeg168. I was using a 9v battery at the time.
Logged

Spokane, Washington
Offline Offline
God Member
*****
Karma: 1
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very interesting.

I haven't tried the power issue yet, but I have noticed I only get the error when I'm trying to use a (HUGE), well bitmap that was converted into a .h file, it uses PROGMEM.

avrdude: verification error, first mismatch at byte 0x0080
         0xff != 0x05
avrdude: verification error; content mismatch

Once I upload normally to the board.. using a different sketch with the LCD, it works fine.

And actually.. when I uploaded a sketch that included a different .h file, the bootloader locked up on me completely. (I was able to able to lock it up multiple times, just to make sure) I'm guessing it was some kind of memory error? I don't have much experience with PROGMEM, I have read up on the Playground and some random sites but not sure how to get it to work in my position.

I did just try with an external wall-wart, regulated at 11.49 ish volts, can supply 1.5 amps... without any luck, still get the error when I upload the first sketch. (Keep in mind, it does say it's done uploading, and the LCD initializes.. but it doesn't print the picture, which is error in the code I'm positive.


Just curious, did you try different sketches when you were testing? For example using just the Blink example? Just to rule out anything with memory leaks. (I know they say it's not very easy to lock up the Arduino like this.. but I just did, repeatedly lol, inexperience for the win!)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You must set the baud rate for the 328(p) chip with " -b 57600 " on the avrdude line
Logged

Pages: [1]   Go Up
Jump to: