failing to burn bootloader on Arduino Mega 2560 with an Arduino Nano as ISP

Hey everyone,

I recently found my Arduino 2560 Mega, I bought 2 years ago. As I tried to load some programs on it the upload failed (avrdude: stk500v2_ReceiveMessage(): timeout). After successfully doing the back-loop-test, I thought it was a bootloader problem and therefore tried burning the bootloader with another Arduino I have.

I followed the instructions from the Arduino site step by step and got the following error message:

Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -carduino -PCOM9 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20171130
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port                    : COM9
        Using Programmer              : arduino
        Overriding Baud Rate          : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
        AVR Part                      : ATmega2560
        Chip Erase delay              : 9000 us
        PAGEL                        : PD7
        BS2                          : PA0
        RESET disposition            : dedicated
        RETRY pulse                  : SCK
        serial program mode          : yes
        parallel program mode        : yes
        Timeout                      : 200
        StabDelay                    : 100
        CmdexeDelay                  : 25
        SyncLoops                    : 32
        ByteDelay                    : 0
        PollIndex                    : 3
        PollValue                    : 0x53
        Memory Detail                :

Block Poll              Page                      Polled
          Memory Type Mode Delay Size  Indx Paged  Size  Size #Pages MinW  MaxW  ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          eeprom        65    10    8    0 no      4096    8      0  9000  9000 0x00 0x00
          flash        65    10  256    0 yes    262144  256  1024  4500  4500 0x00 0x00
          lfuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          hfuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          efuse          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          lock          0    0    0    0 no          1    0      0  9000  9000 0x00 0x00
          calibration    0    0    0    0 no          1    0      0    0    0 0x00 0x00
          signature      0    0    0    0 no          3    0      0    0    0 0x00 0x00

Programmer Type : Arduino
        Description    : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
        Hardware Version: 4744608
        Firmware Version: 0.4611299
        Topcard        : STK502
        Vtarget        : 1.8 V
        Varef          : 0.0 V
        Oscillator      : Off
        SCK period      : 0.1 us

Error while burning bootloader.
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
        Double check connections and try again, or use -F to override
        this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

Arduino programming board: Arduino Nano
Arduino Target board: Arduino Mega 2560

I doublechecked and redid the wires a couple of times. I also tried to use diffrent pins on the mega instead of the ICSP ones (and of course did the necessary changes in the software for that) but I still got the same error message every time.

Im thankful fo any help.

OS: Windows 10 20H2
Arduino IDE: 1.8.6

Two fixes.

The Nano needs a 10µF electrolytic capacitor connected to RESET and GND with the positive (long leg) connected to RESET. The capacitor has to be placed after the programmer board has been loaded with the ISP sketch.

Use a newer Arduino IDE like 1.8.13.

Thank you for the help @kprims,

I switched to the lates version of Arduino (1.8.13) , and added the capacitor as you described (sorry, I should have read that during my research). The new error message is:

Arduino: 1.8.13 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m 



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"



         Using Port                    : COM7

         Using Programmer              : stk500v1

         Overriding Baud Rate          : 19200

         AVR Part                      : ATmega2560

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :



                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00

           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00



         Programmer Type : STK500

         Description     : Atmel STK500 Version 1.x firmware

         Hardware Version: 2

         Firmware Version: 1.18

         Topcard         : Unknown

         Vtarget         : 0.0 V

         Varef           : 0.0 V

         Oscillator      : Off

         SCK period      : 0.1 us



avrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.02s



avrdude: Device signature = 0x000000 (retrying)



Reading | ################################################## | 100% 0.02s



avrdude: Device signature = 0x000000 (retrying)



Error while burning bootloader.

Reading | ################################################## | 100% 0.02s



avrdude: Device signature = 0x000000

avrdude: Yikes!  Invalid device signature.

         Double check connections and try again, or use -F to override

         this check.





avrdude done.  Thank you.

I read in another forum that this means a wiring problem, however I let my friend check the connections and we both can't find any mistake.

EDIT: The Arduino Mega has another set of ICSP pins for ATmega8u2 and ATmega16u2. Once I connected the nano to those, I got an error message (obviously), but in the error message it detected the right signature.

avrdude: Device signature = 0x1e9489 (probably m16u2)

avrdude: Expected signature for ATmega2560 is 1E 98 01
         Double check chip, or use -F to override this check.

Does that mean, the rest of my setup is correct?

EDIT: END

Any other ideas, why the process fails?

Thank you in advanced for help!

You shouldn't need the capacitor when using the newer Arduino IDE.
One thing to check is the Reset lead from Pin 10 of the Nano to Reset of the Atmega2560.
If your wiring is correct, you may have a dead board.
Make sure the ArduinoISP sketch is using the default settings.

Indeed, the capacitor isn't needed anymore (thanks).
The sketch is defenetly on default.
I tried switching out the wire from 10 to Reset, same error. Since my Nano is soldered by myself, I thought I might have broken Pin 10 while soldering, I changed the wire to Pin 3 and changed it in the code too. Same error. Seems like a dead board :'(.

Would override the check with -F danger my Nano? (Since I got nothing to loose on the Mega why not try it)

Still thanks for the help!

It is a waste of time to try the -F option, but would not hurt the Nano.

Ok, guess I'll just give up the board. I don't know ho long they usually live, but 2 years seem a little short to me.

Thank you for the help and Bye! (-:

I've been having an UNO for 3 years! Running perfectly normal! Looking at this 2 years is nothing in an Arduino's life...

I had problems burning an Uno R3 from my Mega 2560, too would fail with 0x0 device signature. For me, the approach that worked was not modifying the code in any way and only using the header and GPIO10.

I'm getting the same error as originally posted trying to recover a Nano using another Nano. Also tried with an Uno as the programmer but predictably got the same result.
Also can't get any sence out of the serial monitor what ever baud rate I try only squares.
Any ideas? Seems to be something out of sink from the research I've done but no obvious solutions.