# Error while burning bootloader on atmega2560 16AU

**URL:** <https://forum.arduino.cc/t/error-while-burning-bootloader-on-atmega2560-16au/934434>\
**Category:** Uploading\
**Created:** [December 10, 2021, 6:59pm UTC](https://forum.arduino.cc/t/error-while-burning-bootloader-on-atmega2560-16au/934434 "2021-12-10T18:59:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcusbarnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/marcusbarnet/32/213986_2.png) [@marcusbarnet](https://forum.arduino.cc/u/marcusbarnet)\
**Post date:** [December 10, 2021, 6:59pm UTC](https://forum.arduino.cc/t/error-while-burning-bootloader-on-atmega2560-16au/934434/1 "2021-12-10T18:59:38Z")

</div>

Hi to all,

I used to burn atmega328p without problems in the past, however, now, I can't correctly burn the bootloader into my atmega2560 16AU.  
I'm using a 16mhz resonator and my circuit is this one:

 ![atmega2560-circuit](https://europe1.discourse-cdn.com/arduino/original/4X/7/c/d/7cd24f5ce9c830b9216dc67133f9e7cff5334d20.png)

I performed these connections between my Arduino mega2560 board and the atmega on the circuit:

50 - CIPO - \> 50 - CIPO  
51 - COPI -\> 51- COPI  
52 - SCK -\> 52 - SCK  
53 - SS -\> RESET PIN  
5 VCC - \> 5 VCC  
GND to GND

following this tutorial: [https://support.arduino.cc/hc/en-us/articles/360012048060-How-to-burn-the-bootloader-between-two-Arduino-Mega](https://support.arduino.cc/hc/en-us/articles/360012048060-How-to-burn-the-bootloader-between-two-Arduino-Mega)

Then I uploaded the ArduinoISP to the atmega2560 board and then I changed the programmer from AVRISP mkII to Arduino as ISP and tried to burn the bootloader with this result:

```cpp
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_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x8d
         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
         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.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

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.

Error while burning bootloader.

```

If I try to use the ArduinoISP modified by Adafruit : [Adafruit\_Learning\_System\_Guides/ArduinoISP.ino at main · adafruit/Adafruit\_Learning\_System\_Guides · GitHub](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ArduinoISP/ArduinoISP/ArduinoISP.ino), then it seems to work better and I get this other result (however, i'm not using Pin9 to force the atmega to work at 8 mhz):

```cpp
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_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0a
         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
         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.01s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xD8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD8:
avrdude: load data hfuse data from input file 0xD8:
avrdude: input file 0xD8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done. Thank you.

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 -Uflash:w:C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:i -Ulock:w:0x0F: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_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0b
         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
         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.01s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex"
avrdude: writing flash (261406 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

```

It seems to be able to communicate with the chip, but then it fails.

What I'm doing wrong? I hope you can help me!  
I also have an arduino UNO board, so I can use it to burn the bootloader if it is easier with it!

I attached the arduinoISP made by Adafruit described as "_This is a fork of Adafruit's ArduinoISP which is a fork of Arduino's ArduinoISP which adds an 8 MHZ 'crystal' output on pin #9 so you don't need an extra oscillator/crystal. Can also rescue some bricked chips with bad oscillator fuses_"  
[arduinoISP-8.ino](https://forum.arduino.cc/uploads/short-url/5VwEvShFq0W3skxWLN8DspJwEe.ino) (17.1 KB)

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [December 11, 2021, 4:33am UTC](https://forum.arduino.cc/t/error-while-burning-bootloader-on-atmega2560-16au/934434/2 "2021-12-11T04:33:09Z")

</div>

Based on [Burn firmware on atmega 16u2 as USB for atmega2560](https://forum.arduino.cc/t/burn-firmware-on-atmega-16u2-as-usb-for-atmega2560/934459), I guess that this one is solved?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 9, 2022, 4:33am UTC](https://forum.arduino.cc/t/error-while-burning-bootloader-on-atmega2560-16au/934434/3 "2022-06-09T04:33:53Z")

</div>

Closed on June 9, 2022, 4:33am UTC

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