Offline
Newbie
Karma: 0
Posts: 1
|
 |
« on: December 04, 2012, 06:29:53 am » |
Dear all as a arduino user for a few year i haven't encounter much unsovable problems until now. I am using a uno as a arduinoisp to burn the bootloader on a pcb with a ATMEGA2560 on it. Afther a while , afther a lot of activity on the rx-tx leds , i recieve a error message: AVRDUDE : verification error , first mismatch at byte 0x1e000 0xff !=0x0d AVRDUDE : verification error , content mismatch. I am using 0022 and tryed it with 1.01 Has anybody any experiance with this error ? Thanks .
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6364
|
 |
« Reply #1 on: December 04, 2012, 11:55:12 am » |
0x1e000 is the first byte of the bootloader.  I think the problem is the the STK500 V1 protocol implemented by the ArduinoISP sketch isn't capable if writing to the ATmega2560 because of the memory size. I'm fairly sure you need an ISP capable of STK500 V2. I suspect that back when they created the V1 protocol they were thinking "Nobody will ever need more than 32k of FLASH.". I recommend buying a USBasp from eBay for less than $5. They take a while to ship from Hong Kong so order early.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #2 on: December 04, 2012, 02:44:10 pm » |
I wrote a sketch to burn bootloaders: http://www.gammon.com.au/forum/?id=11635This includes the Mega2560 which did indeed need extra code to handle the higher addresses.
|
|
|
|
|
Logged
|
|
|
|
|
Kansas City, MO
Offline
Jr. Member
Karma: 0
Posts: 62
|
 |
« Reply #3 on: December 12, 2012, 10:13:38 am » |
Nick, I'm trying to use your 2560 bootloader procedure and file from the link you provided. When the bootloader sketch executes, it prints out the expected signature, processor and flash size for the MEGA2560, but there are a couple differences.
LFuse = 0x62 HFuse = 0x99 EFuse = 0xFF LockByte = 0x00 Clock calibration = 0x86 Bootloader address = 0x3E000 Bootloader length = 7434 bytes Type 'V' to verify, or 'G' to program the chip..
When I type G it tries to program but everything comes back with verification errors because all the expected results are read as 0xFF instead of what they should be.
These are new 2560 chips on a custom board. These are not from an off the shelf Arduino MEGA. Any assistance you can provide would be greatly appreciated.
|
|
|
|
|
Logged
|
|
|
|
|
Kansas City, MO
Offline
Jr. Member
Karma: 0
Posts: 62
|
 |
« Reply #4 on: December 12, 2012, 02:15:41 pm » |
I'm not sure why, but I built a parallel programmer to try and program the bootloader that way. It didn't completely work, but whatever it did do cleared the path for the Nick's code to work now. The fuses were correct after tryng with the parallel method. I was able to program the bootloader successfully after trying to do it parrallel first and then with Nick's sketch.
|
|
|
|
|
Logged
|
|
|
|
|
Kansas City, MO
Offline
Jr. Member
Karma: 0
Posts: 62
|
 |
« Reply #5 on: December 12, 2012, 03:17:49 pm » |
Blinky is now working!! All 100 pins are broke out on this one. Caps for crystal are on the back.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #6 on: December 12, 2012, 03:18:30 pm » |
How about the original arduino mega1280 board, is that included in your suite of chips supported? Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Kansas City, MO
Offline
Jr. Member
Karma: 0
Posts: 62
|
 |
« Reply #7 on: December 12, 2012, 03:20:27 pm » |
Lefty, I do see a 1280.h file as part of Nicks program.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #8 on: December 12, 2012, 03:22:19 pm » |
Lefty, I do see a 1280.h file as part of Nicks program.
Thanks, I was too lazy to download it and see. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #10 on: December 12, 2012, 03:30:47 pm » |
I'm not sure why, but I built a parallel programmer to try and program the bootloader that way. It didn't completely work, but whatever it did do cleared the path for the Nick's code to work now.
Occasionally I get verification errors. I am suspecting that (the absence of) decoupling caps or long cable runs might be to blame. Once it works, it usually works reliably. Anyway, glad you got it going.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #11 on: December 12, 2012, 04:17:51 pm » |
Dear all as a arduino user for a few year i haven't encounter much unsovable problems until now. I am using a uno as a arduinoisp to burn the bootloader on a pcb with a ATMEGA2560 on it. Afther a while , afther a lot of activity on the rx-tx leds , i recieve a error message: AVRDUDE : verification error , first mismatch at byte 0x1e000 0xff !=0x0d AVRDUDE : verification error , content mismatch. I am using 0022 and tryed it with 1.01 Has anybody any experiance with this error ? Thanks .
That happens with an "Arduino as ISP" setup. Don't know why... but the bootloader is burned correctly anyway. I took my Mega2560 R3 and burned the bootloader with an AVRISPMKII (a real Atmel MKII, not a clone), then read it back into a .HEX file. Then I burned it again with a Sparkfun AVRISP shield and the ArduinoISP code running in an Uno R3 board. I got the "0xff != 0x0d" error as expected. Then I read the bootloader back out with my MKII and compared the .HEX files. They were identical. Moral of the story... ignore that error message.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #12 on: December 12, 2012, 04:19:02 pm » |
Blinky is now working!! All 100 pins are broke out on this one. Caps for crystal are on the back.
That's an awesome board? Where to get one?
|
|
|
|
|
Logged
|
|
|
|
|
Kansas City, MO
Offline
Jr. Member
Karma: 0
Posts: 62
|
 |
« Reply #13 on: December 12, 2012, 05:12:47 pm » |
I designed it myself. It does have the crystal and caps but you still have to provide an external power source. I wanted to design the board so that it could be plugged in to a interface board of whatever form factor I need and become the "heart" of any system while still maintaining the Arduino software and IDE interface. I put female headers in this one because I'll use it for bench top / breadboard wiring. Once I use it in actual hardware it will have male headers on the bottom and the interface board will have the female compliment and standoffs to secure it. Gives me a Mega in a "Virtual DIP" IC for easy replacement.
Thanks for the vote of confidence!!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #14 on: December 12, 2012, 05:39:37 pm » |
I designed it myself. It does have the crystal and caps but you still have to provide an external power source. I wanted to design the board so that it could be plugged in to a interface board of whatever form factor I need and become the "heart" of any system while still maintaining the Arduino software and IDE interface. I put female headers in this one because I'll use it for bench top / breadboard wiring. Once I use it in actual hardware it will have male headers on the bottom and the interface board will have the female compliment and standoffs to secure it. Gives me a Mega in a "Virtual DIP" IC for easy replacement.
Thanks for the vote of confidence!!
Well, if you have a run of boards of have any extras, I would love to buy one. I'd like one without headers though.... if they're not assembled yet.
|
|
|
|
|
Logged
|
|
|
|
|
|