Avrdude: stk500v2_getsync(): timeout communicating with programmer (Again)

Hello everyone, I have an Arduino Mega on which I'm unable to upload my program using my new computer and the new Arduino IDE 2.0.1.

My Mega is around 12ish years old and I'm able to upload program using my old computer and "Arduino Alpha 0022".

I've went through a lot of forums over the last few weeks but never found anything that could solved my issue.

Here is the error message I get when I'm trying to upload (Which seems to be very common)

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
Failed uploading: uploading error: exit status 1

Program is the "Basic" FastLED example (But I've tried other very simple programs that works on my old computer without any luck. It compiles without any errors.

#include <FastLED.h>

#define LED_PIN     7
#define NUM_LEDS    20

CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
  
  leds[0] = CRGB(255, 0, 0);
  FastLED.show();
  delay(500);  
}
  • When I'm getting the "Board info" I get
    BN : Arduino Mega or Mega 2560,
    VID : 0x2341,
    PID: 0x0010
  • Since it's working on another computer, I assumed the Arduino is good, the cable is good and my power supply is good as well.
  • I've done the "Loopback test" and it worked.
  • I'm using an USB 2.0 hub to make sure it's not a USB 3 issue. (But I've tried without the hub as well)
  • I've tried to update the driver, and Windows is telling me I have the latest version BUT it's written "USB Serial Port (COM8) instead of Arduino Mega... I assumed it could work since it's what it's written on my old computer as well.
  • I have another Arduino Mega that I bought at the same time that has the exact same behavior.

Could my Arduinos be too old?
Any help would be welcome

Thanks!

The IDE uses the stk500v2 protocol for the upload. This is for the Mega2560 and the Mega ADK but not for the Mega. The Mega uses the same upload protocol as the UNO. In the new IDE you have to select the correct processor (ATmega1280) to change to protocol for your Mega.

1 Like

Thank you so much. It works.

Does not.

But that doesn’t mean that selecting “mega 1280” in the menu won’t fix the problem…

My boards.txt says:

uno.upload.protocol=arduino

and

mega.menu.cpu.atmega1280.upload.protocol=arduino

What does you's say? I know that they use different speeds but the protocol is the same.

Heh. It looks like we're both wrong.
the Mega1280 seems to run the "old" ATmegaBOOT that was used on Uno-sized boards BEFORE Uno (Duemilanova, Diecimilla, etc)
boards.txt:mega.menu.cpu.atmega1280.bootloader.file=atmega/ATmegaBOOT_168_atmega1280.hex
The actual Uno has run Optiboot since it started shipping.
Optiboot and ATmegaBoot actually run the same "protocol" (stk500v1, approximately: -c arduino these days); Optiboot just does it in 1/4 of the program space.

That's the bootloader, not the protocol.

Correct, that's the UNO's bootloader.

So I was right.

No, I don't think so. You confirmed above that I was right, the UNO and the Mega1280 uses the same protocol for upload.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.