Mega2560: timeout communicating with programmer

I just had the same problem. When I looked in the boards.txt file, I noticed that the baud rate for my board was 115200. I set it to 250000 and that resolved the issue.

hola a todos.

tenia el mismo problema lo único que tuve que hacer fue cambiar del puerto COM3 A COM4 arduino mega

Hi all,
I guess this has more than one root cause. I found one of them, and here it is.
I had exactly the same; failure to upload because of difficulty communicating with the processor.
In my case, I was writing code for two different Arduino boards for different projects. When I tried to upload a program into one of them, the Uno, I forgot that the Arduino computer software was still expecting a Mega 2560 board. So in Tools, I had to change the board from one to the other.
I dont know if that helps anyone, but it fixed my problem.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer


If you still waiting for the solution i found it
Arduino just drawing more power from the USB & computer stoping the USB to draw more
Here the solution
Go to control panel > hardware & sound > power options > edit plan settings go to advanced power settings select USB settings and disable it now it upload
I just saved my old and new Arduino mega

I solved the problem completely。 1.change boards.txt to 2.use USBasp to burn boot program. 3.use USB cable to connect mega2560,now you can do what you want.

EDIT: After writing this post I was browsing around and looked again at the specification page of the Mega 2560, and stumbled upon this paragraph:

"The ATmega2560 on the Mega 2560 comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (reference, C header files)."

:o :o

This seems to be the root of most of the problems that people are experiencing. Newer versions of Arduino are distributed with a new programmer that uses STK500v2, which obviously fails when it tries to talk to an Arduino Mega that expects to “speak” STK500, NOT STK500v2.

I found many discussions of this problem while searching for a solution. I hope this can be of potential help to someone. I have included the hex file of an older bootloader version for the Arduino 2560 Mega that works on OSX.

I ran into a variation of this problem with an old Mega2560 board. I have two elderly Apple Laptops, a 15" MBpro (10.5.8, Arduino Alpha 0017) and a 13"MbPro (10.7.5, Arduino 1.0.6).

The board worked with the older Laptop, but had timeout issues with the newer machine. I was able to fix the issue by copying the older bootloader from the 15" MBPro, and placing it in the bootloaders/atmega folder of the installation on the 13" machine.

After this edited the “boards.txt” file entry of the Mega 2560 to match that on the older machine:

///// Mega 2560 or Mega ADK




In practice, only four lines need to be changed to make it work, the others are indentical in the later version

mega2560.upload.protocol=stk500 // this seems to be a precursor of the stk500v2 that causes the timeouts

mega2560.upload.speed=57600 // Upload speed is 50% slower than with stk500v2

mega2560.bootloader.path=atmega // I placed the hex file in the same folder that it was in the older version just in case, but I don’t think it matters.

mega2560.bootloader.file=ATmegaBOOT168_mega2560.hex //obviously you have to change the name of the bootloader :smiley:

To make this work on your Arduino installation in OSX, you have to download the bootloader attached to this post. It was renamed to “ATmegaBOOT_168_mega2560.txt” because the upload of .hex files is prohibited. Rename the file to ATmegaBOOT_168_mega2560.hex, copy it to the appropriate folder inside the Arduino package (ctrl-click on the Arduino App and choose “show package content” ). Edit the 2560/Mega section of the boards.txt file as described above. Launch Arduino. It should work now.

ATmegaBOOT_168_mega2560.txt (6.9 KB)

I had this problem and found that somehow the IDE thought my Uno was a Mega. Changed it back and started working again. So check the board type as well as COM port.

Try using USB2.0 or a USB hub. That 's how I solved this issue!! Hope this will help

Hi Bob,

May I ask you for some advice please.
George W5JDX gave me this forum.
Ihave a Mega2560+WiFi R3 ATmega 2560+ESP8266.
When I compile my program no errors detectd, but if I upload it I get the following errors
avrdude: stk500V2_ReceiveMessage(): time out
avrdude: stk500v2_getsync(): timeout communicating with programmer. An error occurred while uploading the sketch.

I think I have a problem with the comms, but have no idea.

Can you help me please.

73’s de Eb, ZL4RM/PA0JAG

hello so there is multiple reasons but how i fixed it was in tools you need to check if youve got the right board, processor or amount of com pins because i had the same problem but i did all this then it sent!