Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: sirjaffar on Apr 27, 2013, 09:31 pm

Title: Arduino Mega 2560 program upload timeout()
Post by: sirjaffar on Apr 27, 2013, 09:31 pm
Hello everyone, I am facing following error while uploading any sketch to arduino mega2560. I tried to upload blink code but it is even not gets uploaded. I am using Arduino v1.0.4

I get he following error message:

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


Help needed. Thanks indeed
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: codlink on Apr 27, 2013, 09:59 pm
Are you printing "!!!" anywhere in your code?
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: sirjaffar on Apr 28, 2013, 09:48 am
Thanks for response.

No, I am not printing. I just want to upload simple BLINK example.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: sirjaffar on Apr 28, 2013, 09:51 am
The com-port is correctly selected. The board is correctly selected. The drivers are installed correctly. I cannot understand the problem. Is there any way to re-install the firmware??
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Siph06 on May 09, 2013, 01:28 am
I HAVE EXACTLY THE SAME PROBLEM !!

i've changer my COMx from 4 to 89, My board is correctly selected to "...2560 or Mega ADK", My driver has been installed manually because of W7 x64 isn't doing itself. i've installed the 1.0.4.

but impossible to send anything !!

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

is there anyone who fixed it ?
i have a project to finish in only 3 weeks and this dumb card isn't working...
i'm working all the night to try to fix it !
it's 1 h 30 in the morning, my life is badass :/

=> sirjaffar

why would you re-install your firmwire ?
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: sirjaffar on May 24, 2013, 08:48 am
I think that the firmware of atmega8u2 is not responding to the board, so there is no communication between computer and the mcu. Re-installing firmware will help in some way.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: gizmodigi on May 24, 2013, 04:02 pm
Do you get also the L led blinking? because that is happening to me also....very frustrating...
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Antonium on May 26, 2013, 12:56 am
Exacly same. HELP. Bootloader not burnning...
Title: Re: Arduino Mega 2560 program upload timeout() *fixed*
Post by: MichaelBot on Jun 02, 2013, 11:07 pm
Hi everybody,

I got exactly the same problem (mac & mega) and could fix it ! :)

Situation:
Upload to Mega 2560 fails in 19 of 20 times with timeout (two different boards)

Upload of the same sketch to Uno R3 works fine - so it is not a problem of drivers, cable, size, etc
(check this if you have a Uno! there might be other problems)

With some Google I could find the bootloader to be problem
http://www.desert-home.com/2013/02/still-wrapping-up-mega2560-bootloader.html

Now I took the Uno board and build a ISP cable to burn the Mega (5V type)
http://letsmakerobots.com/node/35649

Now loaded latest Arduino IDE (1.0.5)
Use Uno as Programmer to burn the Bootloader (on the mega 2560 ! not 16u2)
http://arduino.cc/en/Tutorial/ArduinoISP
(I got a verify error but it works)

Now everything works fine and upload works every time :)) over USB on the mega

It seems that the boards are delivered with a buggy bootloader since lots of people out there report the same problem for years!??

Hope this helps for you too
Michael

Title: Re: Arduino Mega 2560 program upload timeout()
Post by: retrolefty on Jun 03, 2013, 03:20 am
Quote
It seems that the boards are delivered with a buggy bootloader since lots of people out there report the same problem for years!??

Hope this helps for you too
Michael


A possible reason for the symptom you saw is that your sketch has either three consecutive !!! characters in some string constant or three consecutive data characters of the same digital value as a ! character in some data array? If so that triggers a useless function that the older mega bootloader code had built in to trigger a monitor mode where it then waited for monitor commands from the user that will never come of course. The newer mega bootloader in the current IDE fixes both this problem and also a problem with the bootloader not properly handling Watch Dog Timer interrupts.

Lefty
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: -dev on Jun 04, 2013, 04:40 pm

I think that the firmware of atmega8u2 is not responding to the board, so there is no communication between computer and the mcu. Re-installing firmware will help in some way.


I had similar problems with R3, which uses a 16u2 instead.  Something here (http://arduino.cc/forum/index.php/topic,146049.15.html) might help.  Note how the 8u2 and the 2560 could have the correct firmware loaded, but if the clock fuse isn't properly set, they'll be running at incompatible baud rates.

Cheers,
/dev
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Ggenius on Apr 25, 2015, 05:24 pm
I have a similar problem in that uploading stalls but no error message comes up.  The device manager shows an "unknown device" in the USB ports section.  I try and install a driver from the C:\Program Files (x86)\Arduino 1.0.6\drivers\FTDI USB Drivers and Windows 64 gives me a "your device driver is up to date" msg.   Normally, my system would use COM3 for the port but COM3 douse not show up.  How do I get things working again? very frustrating.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: MustafaMta on Feb 17, 2017, 01:59 am
I've had the same problem and the solution is. Download XLoader and upload to your arduino.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: IlluSiunist on Mar 07, 2017, 05:53 pm
It happens to me when i try to upload a sketch and the pin rx0 is conected to somthing....

Hope this helps
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Farmanullah_Jan on Feb 08, 2018, 09:02 am
Arduino is a LUCKY theater, it has no strength in its soft threads to resolve issues as mentioned above by many.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: jumping-hotdog on Feb 22, 2018, 09:46 am
For me it helped to just unplug all IOs and upload the blinking programm with the built in LED. No idea why.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: AbdulrhmanNasser on Feb 23, 2018, 02:10 am
i have same proplem with mega 2560 r3 and i will try to burn bootloader but i have question what is diffrence between firmware and bootlader ??
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: CrossRoads on Feb 23, 2018, 02:14 am
The bootloader is an example of firmware that is loaded on the Mega.


Other examples are sketches that a user would upload. The software in a sketch is compiled and then uploaded into flash as firmware by the bootloader talking to the PC.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: AbdulrhmanNasser on Feb 23, 2018, 02:51 am
The bootloader is an example of firmware that is loaded on the Mega.


Other examples are sketches that a user would upload. The software in a sketch is compiled and then uploaded into flash as firmware by the bootloader talking to the PC.
thank you for this simple way to explain the difference but i have also a question when i burn a bootloader through icsp  it burned for the usb chip (atmel 16u2 ) or for the main chip of mega 2560 (atmel 16u)  beside that i have read that mega 2560 use stk500 protocol which involved in bootloader  what is relation between that protocol and the in arduino isp (bootloader to  burn )  it seems to me very far ??

Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Markal on Sep 29, 2018, 09:25 am
I know this is an old thread but in my search for a solution for the same problem, I eventually found a solution that no one else seemed to mention so thought I have to post it somewhere in a hope it will help others.

After 2 days of being unsuccessful with the Arduino Software and even with 'XLoader' trying all the recommended steps of reloading software, resetting the Rumba board etc, I had to start thinking outside of the box.

I was positive that I had the correct Board selected and the correct port. I had also loaded the correct USB RUMBA software.

After giving up with the Arduino program, consistently getting the  'Time out" message I then tried with the free program "XLoader" but even here the RUMBA board would sit with the RX flashing every 10 seconds or so and after a very long wait I found that the program had hung up. After rebooting the computer and the board, it got me thinking for other solutions that had not been posted yet.

The answer that worked for me was the following. (Sorry this is a Windows 7 solution but I am sure it will help with other OS's as well.)


Windows - Go to 'Start Menu'
Go to 'Device Manager'
Select the port that is your Arduino/Rumba board (in my case it was Com 8)
Right click on the port and select "Properties"
select the 'Port Settings' tab
change 'Flow Control' from none to "Hardware"


After making the change and reloading XLoader,  suddenly all the TX and RX lights on the RUMBA board lit up like November 5th. Oh Joy.

I then went back to the Arduino Program and tested this and it worked as well.

So it seems that the port is trying to do basic flow control hand shaking and this is why the Arduino software eventually times out giving the errors as posted by other contributors to this forum.

The clue that helped me reach this conclusion is that with the 'XLoader' program running, I noted that the RX led on the RUMBA would flash every 10 seconds or so which made me suspect that the board was waiting for something. I can vaguely remember things about 'Clear To Send' and 'Request To Send' from back when using old dial up modems to connect to the world.

I really hope this helps someone else. If it does, please post back here to let others know that it worked.
Title: Re: Arduino Mega 2560 program upload timeout()
Post by: Okezue on Jan 21, 2019, 11:13 pm
IDK