Mega2560 board upload fails

I am having the same problem with IDE 1.8.19 /15. It started giving upload errors, and finally permanently upload fails. Board is Mega2560. Board and port have been verified many times.

  • Three other Mega2560 boards two out of the box and one a CH340 show exactly the same problem. Avrdude fails Stk500. Sync failure or timeout failure.
  • Arduino IDE 2.0 has no issues and uploads sketches.
  • Serial communication works in IDE 1.8.19 and I can send and receive via Serial Monitor.
  • Same problem (programmer not responding, not in sync) trying to upload to an Uno.

Could this be a baud rate problem? This issue began when the sketch was going awry due to bugs in the code. But this is only on one Mega board. The other three Mega2560 boards never ran the code. So it can't be bootloader. Maybe Avrdude detected an issue with the board while it was running the problem code, and changed something permanently in conf, or in the Windows port setup (which driver has been re-installed).

  • re-installed IDE 1.8.19 and 15.
  • rebooted PC Windows 7,
  • re-installed USB drivers,
  • reset port to default in Device Manager, it reads 9600, 8, None, 1, None
  • changed USB cables (both the USB-B and the micro-USB).
  • Nothing connected to the board pins on any of the 4 boards.
  • The loopback test is successful.
C:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -V -patmega1280 -carduino -PCOM22 -b57600 -D -Uflash:w:C:\Users\Taler\AppData\Local\Temp\arduino_build_371376/Blink.ino.hex:i avrdude: Version 6.3-20190619
System wide configuration file is "C:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
         Using Port                    : COM20
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0c
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x8c
...
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x73
avrdude done.  Thank you
An error occurred while uploading the sketch
1 Like