Offline
Newbie
Karma: 0
Posts: 4
|
 |
« on: December 14, 2011, 01:32:48 am » |
I recently started prototyping a new system with a Mega 2560. This is my 4th arduino system, and my 1st one using a Mega.
I have a simple program that I have successfully loaded on the Mega (it toggles some digital pins and sends some serial messages). Something's changed, and now I can't upload new images to the board. When I try to upload, I get the following error messages:
------------------------------------------------------------------------------------------------ Binary sketch size: 4560 bytes (of a 258048 byte maximum) avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_command(): failed miserably to execute command 0x10 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.
avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer avrdude: stk500v2_command(): failed miserably to execute command 0x11 avrdude: stk500v2_disable(): failed to leave programming mode ------------------------------------------------------------------------------------------------
I'm trying to track down the source of the problem. Here's what I know:
1) The Green "on" light is on when the board is powered up. 2) The "L" light flashes when I power up the board (indicating that the bootloader is present). 3) The code that I loaded on the board still runs (I can see the digital pins toggling). 4) I have the arduino IDE pointing to the correct COM port and setup for the Mega board 5) I have tried two different PCs 6) I have disconnected all of the external circuits that were attached to the Mega
Does anyone have any debug ideas? I have a scope, so I can capture an image of the serial lines during upload if that would help.
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 108
Posts: 6607
|
 |
« Reply #1 on: December 14, 2011, 10:02:55 am » |
When you try to upload a sketch do the Receive and/or Transmit lights on the Arduino blink? If not you may not be getting serial communication. Try a loopback test (connect D0 to D1 and see if stuff you type in Serial Monitor comes back as it should).
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #2 on: December 14, 2011, 10:14:40 pm » |
The RX light flashes once when I try to upload or send a message for loop-back testing. When I have a jumper between TX0 and RX0 and send a message through the serial monitor, I don't see any loop-back results and I don't see the TX light flash.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #3 on: December 18, 2011, 12:29:29 am » |
I figured out what's causing the problem. The TX signal isn't making it to the ATMEGA8U2-MU that translates serial to USB. The TX pin on the ATMEGA2560-16AU is working, and signals from that pin make it all the way to the ATMEGA2560-16AU side of the RN4A resistor next to the ATMEGA8U2-MU, but the signal doesn't make it to the ATMEGA8U2-MU side of the resistor. It looks like the ATMEGA8U2-MU is messing up the signal.
Anyone else had problems with the ATMEGA8U2-MU?
|
|
|
|
|
Logged
|
|
|
|
|
Washington
Offline
God Member
Karma: 22
Posts: 720
Firefox & Arduino rocks
|
 |
« Reply #4 on: December 18, 2011, 04:28:24 pm » |
Either the resistor is bad (unlikely), the 8U2 is bad (very bad) or the firmware is corrupt.
|
|
|
|
|
Logged
|
Avoid throwing electronics out as you or someone else might need them for parts or use. Solid state rectifiers are the only REAL rectifiers. Resistors for LEDS!
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #5 on: December 23, 2011, 03:34:06 pm » |
I'm having the exact same problem. I wrote and updated code for a day, then moved the arduino to another computer, and I get the same errors. The original code still executes, I just can't upload new code to the board. Is there a way to reinstall the firmware?
|
|
|
|
« Last Edit: December 23, 2011, 03:38:15 pm by massivesound »
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 108
Posts: 6607
|
 |
« Reply #6 on: December 23, 2011, 10:04:38 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #7 on: December 24, 2011, 10:27:35 am » |
I fixed the problem I was having by getting the newest build of the Arduino software and reinstalling the driver from the Arduino folder.
|
|
|
|
|
Logged
|
|
|
|
|
Virginia, USA
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #8 on: December 25, 2011, 09:46:20 pm » |
I have the same issue with the Mega2560R3 board.
I have WinXP SP3 on a ThinkPad T-40. I have tried on a different machine with the same errors.
I tried the 'press the reset button' just after hitting the upload. Four tries and Blink finally uploaded.
Blink is running, but I wanted t play and changed the timing pause statements, but have not been able to upload.
I have tried the other ISP with no result.
My Com port shows Arduino Mega 2560 R3 (COM6) and the driver is usbser.sys Microsoft Corp 5.1.2600.5512(xpsp.080413-2108)
USB\VID_2341&PID_0042\64934333135351418100
I have selected the correct board and compost, and have used the AVRISP mkII
The RX light blinks once in a while.
Thoughts to help me get this running?
Ideas
|
|
|
|
|
Logged
|
...and dinosaurs roamed the earth.....
|
|
|
|
Virginia, USA
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #9 on: December 25, 2011, 10:29:43 pm » |
Also, the loop-back test worked fine.
|
|
|
|
|
Logged
|
...and dinosaurs roamed the earth.....
|
|
|
|
Virginia, USA
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #10 on: December 26, 2011, 08:19:37 am » |
I have continued to troubleshoot, using any information from the forums.
It appears that I can upload more reliably if I press the reset just as soon as I can after the Binary Sketch Size message appears.
This seems kludgey, but at least I can upload.
I see posts about auto reset, etc. should (in a perfect world) this be working with an auto reset?
Thanks
|
|
|
|
|
Logged
|
...and dinosaurs roamed the earth.....
|
|
|
|
Virginia, USA
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #11 on: December 26, 2011, 02:25:31 pm » |
HMM, it gets weirder and weirder.
I down loaded arduino-0023, made no changes to the port or hardware or preferences file and it works perfectly.
So, I renamed the avr directory in ...\arduino-1.0\hardware\tools and then copied the avr directory from ...\arduino-0023\hardware\tools directory into the ...\arduino-1.0\hardware\tools directory, and it works fine.
Conclusion, the issue is with the new version of avrdude.
|
|
|
|
|
Logged
|
...and dinosaurs roamed the earth.....
|
|
|
|
Los Angeles, CA
Offline
Newbie
Karma: 0
Posts: 15
|
 |
« Reply #12 on: December 31, 2011, 07:05:57 am » |
The timeout error is a known issue.
Google it.
Anyone have a verified and working fix? I've had my Arduino for about 4 hours and just got hit with this (and I'm not using any !!! in my code, which was allegedly the cause of the issue). This has been going on for months now and I gotta be honest - I'm pretty frustrated that the (presumably bootloader) issue still seems to be unfixed.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #13 on: January 16, 2012, 09:47:33 pm » |
Thanks for the help. I have been struggling with this same problem and it seems many have as well. I downloaded the arduino 0023 software and I got the same results as you, so I copied and renamed as you suggested and the problem is fixed. So far so good.
|
|
|
|
|
Logged
|
|
|
|
|
Oregon
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #14 on: January 16, 2012, 11:27:46 pm » |
I was having this problem too. Luckily I hadn't erased my old 0022 program. Going back to that fixed the problem. I really ought to remember: "Never update a program that works!"
|
|
|
|
|
Logged
|
|
|
|
|
|