Welcome! Log In Create A New Profile

Advanced

Programming error - first mismatch at byte 0xf800

Posted by blob 
Programming error - first mismatch at byte 0xf800
October 07, 2011 10:58PM
Hi!

Please someone help me! I'm having big problems programming the Sanguino bootloader. My setup is:

atmega664p
DAPA programming, through ISP header on the complete Sanuinololu 1.3a board. (as per the instructions on the wiki page [reprap.org] )

Programs fuses first - success.

Then I try programming the bootloader and I get:

C:\arduino-0022\hardware\tools\avr\bin>avrdude -p atmega644p -C c:\arduino-0022\
hardware\tools\avr\etc\avrdude.conf -c dapa -P lpt1 -U flash:w:\arduino-0022\har
dware\Sanguino\bootloaders\atmega644p\ATmegaBOOT_644P.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e960a
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 "\arduino-0022\hardware\Sanguino\bootloaders\atmega6
44p\ATmegaBOOT_644P.hex"
avrdude: input file \arduino-0022\hardware\Sanguino\bootloaders\atmega644p\ATmeg
aBOOT_644P.hex auto detected as Intel Hex
avrdude: writing flash (65382 bytes):

Writing | ################################################## | 100% 314.06s

avrdude: 65382 bytes of flash written
avrdude: verifying flash memory against \arduino-0022\hardware\Sanguino\bootload
ers\atmega644p\ATmegaBOOT_644P.hex:
avrdude: load data flash data from input file \arduino-0022\hardware\Sanguino\bo
otloaders\atmega644p\ATmegaBOOT_644P.hex:
avrdude: input file \arduino-0022\hardware\Sanguino\bootloaders\atmega644p\ATmeg
aBOOT_644P.hex auto detected as Intel Hex
avrdude: input file \arduino-0022\hardware\Sanguino\bootloaders\atmega644p\ATmeg
aBOOT_644P.hex contains 65382 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 285.74s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0xf800
         0x0c != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: hfuse changed! Was dc, and is now ff
Would you like this fuse to be changed back? [y/n]

If I select Y now, it just hangs. Any ideas, things I can look into? I assume the connection in general is good, since it programs the fuses without problem.
Re: Programming error - first mismatch at byte 0xf800
October 07, 2011 11:11PM
One idea I have is regarding the crystal. I am using a 16MHz resonator as per the instructions. However, when I plug the recommended fuse settings into an AVR calculator i.e. -U lfuse:w:0xFF:m -U hfuse:w:0xDC:m -U efuse:w:0xFD:m it says that the setting is for a 8mhz external oscillator. Is this an issue, or is perhaps the fuse calculator mistaken? Cheers!
Re: Programming error - first mismatch at byte 0xf800
October 08, 2011 02:12PM
Just a quick suggestion, but did you write the unlock bit successfully?
Re: Programming error - first mismatch at byte 0xf800
October 10, 2011 08:48AM
Write unlock bit before and lock it after. Like your front door (unless you are canadian, I hear they leave them open)
Re: Programming error - first mismatch at byte 0xf800
October 12, 2011 03:55AM
Finally worked it out! Thanks for the suggestions but it seems to be unrelated to the lock bit.

The problem was that I use Win7 x64, so was programming it from within a VM. Turns out my computer was too slow to run avrdude. When I booted into Ubuntu on a flashdrive it worked perfectly!
Re: Programming error - first mismatch at byte 0xf800
October 12, 2011 08:30AM
Pretty sure it always runs in a VM, regardless of OS.
Re: Programming error - first mismatch at byte 0xf800
October 12, 2011 01:51PM
Didn't for me, but I think it's more overall computer speed related.
Re: Programming error - first mismatch at byte 0xf800
October 12, 2011 02:11PM
My bad, I was thinking it was written in Java for some reason.
Sorry, only registered users may post in this forum.

Click here to login