0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« on: March 09, 2011, 11:05:44 am » |
Hi! I've made a board with an atmega2560. I'm trying to upload the bootloader with another arduino used as ISP and I get this error: avrdude: verification error, first mismatch at byte 0x3e000 0x0d != 0xff avrdude: verification error; content mismatch but the led on pin 13 digital blinks. So, I tried to upload a sketch and it works only the first time!  If I try twice it fails with a timeout error. Can somebody help me? Thank you very much!
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6367
|
 |
« Reply #1 on: March 09, 2011, 11:41:55 am » |
After you load ArduinoISP, are you disabling auto-reset? If the host Arduino resets then the bootloader will be in control, not the ArduinoISP sketch. One easy way is to hook a 1 to 2 microfarad capacitor between Reset (+) and Ground (-) on the host Arduino after you upload ArduinoISP.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6367
|
 |
« Reply #3 on: March 09, 2011, 12:43:17 pm » |
Yes, the resistor should work.
I'm not entirely clear on the problem... Did you burn a bootloader without error?
You can use the ArduinoISP to upload sketches but I think you need the bootloader to turn control over to the sketch on startup. If the error was with burning the bootloader you should get that fixed first.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« Reply #4 on: March 09, 2011, 01:30:25 pm » |
No...that's the first problem...when I burn it I get the error in my first post. I have also tried to upload a sketch via usb (with ft232) and it succeeded, but if I try to upload it again it fails. I made few tests and I I can upload a sketch only ones after the bootloader, but I think it is a bootloader-related problem because of that error...
Thank You
|
|
|
|
|
Logged
|
|
|
|
|
Scotland
Offline
God Member
Karma: 3
Posts: 513
Have you had your Arduino fix today?
|
 |
« Reply #5 on: March 09, 2011, 01:54:10 pm » |
Sounds like a lock issue - after uploading the bootloader, the lock but should be set to 0x0F - maybe an issue with the boards.txt file. Can you post its contents here and we'll havea look at it.
Drew.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« Reply #6 on: March 09, 2011, 03:37:31 pm » |
I was thinking about a lock, too. But I haven't edited the original board.txt... This is the mega2560 section: mega2560.name=Arduino Mega 2560
mega2560.upload.protocol=stk500v2 mega2560.upload.maximum_size=258048 mega2560.upload.speed=115200
mega2560.bootloader.low_fuses=0xFF mega2560.bootloader.high_fuses=0xD8 mega2560.bootloader.extended_fuses=0xFD mega2560.bootloader.path=stk500v2 mega2560.bootloader.file=stk500boot_v2_mega2560.hex mega2560.bootloader.unlock_bits=0x3F mega2560.bootloader.lock_bits=0x0F
mega2560.build.mcu=atmega2560 mega2560.build.f_cpu=16000000L mega2560.build.core=arduino Thank You
|
|
|
|
|
Logged
|
|
|
|
|
Scotland
Offline
God Member
Karma: 3
Posts: 513
Have you had your Arduino fix today?
|
 |
« Reply #7 on: March 09, 2011, 04:13:44 pm » |
Looks OK ! - Does the sketch you are trying to upload contain !!! in it? - That is the debug switch code to access the extended menu on the 2560 bootloader.
Drew
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10148
|
 |
« Reply #8 on: March 09, 2011, 04:16:45 pm » |
How long are the wires between Arduino ISP and the target (atmega2560)?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« Reply #9 on: March 09, 2011, 04:41:00 pm » |
No "!!!"...I just tried with the blink example... The wires are long about 70cm...mmh..is it too much?
Thank You
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10148
|
 |
« Reply #10 on: March 09, 2011, 04:50:15 pm » |
The wires are long about 70cm...mmh..is it too much? I've never used anything longer than about 20cm so I can't say for certain if 70cm is or is not a problem. I can say that 20cm has been a good choice for me. At this point, you nothing to lose... Try shorter wires. Carefully check all connections.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« Reply #11 on: March 09, 2011, 05:29:10 pm » |
Less than 10cm, but nothing change 
|
|
|
|
|
Logged
|
|
|
|
|
Scotland
Offline
God Member
Karma: 3
Posts: 513
Have you had your Arduino fix today?
|
 |
« Reply #12 on: March 09, 2011, 05:34:10 pm » |
what operating system and version of ide are you using?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 22
Arduino rocks
|
 |
« Reply #13 on: March 09, 2011, 05:54:56 pm » |
Mac Os X 10.6.6 and arduino IDE 0022... I also tried with 0020 with the same result...
Should I try on windows?
Thank you
|
|
|
|
|
Logged
|
|
|
|
|
Scotland
Offline
God Member
Karma: 3
Posts: 513
Have you had your Arduino fix today?
|
 |
« Reply #14 on: March 09, 2011, 06:10:49 pm » |
There has been issues with the drivers on mac, try this :
1) Go to System Preferences -> Network 2) If it asks you to add the Arduino (modem device), say cancel 3) Remove the Arduino device from the list if its there 4) Try uploading a sketch!
I only have windows xp - so can't comment if this realy works.
Drew
|
|
|
|
|
Logged
|
|
|
|
|
|