Bootloading issues

Hello everyone, I've got a clone of an uno from Elegoo, and I'm trying to burn its bootloader because when I try to upload sketches to it, it fails to sync. So, I'm using an Official Mega board to burn the bootloader and it fails and gives me this error:

"C:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega2560 -cstk500v1 -PCOM14 -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:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM14
         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 = 0xffffff (probably .avr8x_mega) (retrying)

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

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

avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

Any thoughts?
I've tried everything I could find and followed the instructions carefully, but it keeps failing.

Thanks for any help!
@rlsieben

Looks like you're trying to program the Mega, not the Uno. Did you forget to select the Uno after you programmed the Mega with the programmer sketch?


I've moved your topic to the more suitable "Uploading" category.

Have you put the 10uF capacitor between the RST and GND pins of the Arduino UNO?

I just tried changing the board to UNO, but I still get a similar error with only a few changes:

"C:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM14 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE: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:\Users\dcsie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM14
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 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)

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.

Failed chip erase: uploading error: exit status 1

I've got the sketch uploaded on the MEGA, is the screenshot of the "tools," menu correct?
Before I changed the board, it said it was MEGA.

As far as connecting a capacitor like @MaximoEsfuerzo suggested, I didn't do that because I didn't see anything on doing that in the docs, if that is something I have to do, I only have a polarized version of a 10uf capacitor. Which way should the capacitor go?

About half-way this page: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/. 10 uF seems fine

Other things that can be wrong

  1. Burn bootloader
    • COM14 needs to be the Mega, not the Uno.
    • Invalid signature might be due to wiring mistake.
    • Faulty 328P; can't be excluded.
  2. Your Uno problem
    • Serial-to-usb adapter on the Uno might be faulty. If the board does not use the CH340, you can run the loop back test.
1 Like

The 10µF electrolytic capacitor connected to RESET and GND of the programming board is needed only for the boards that have an interface between the microcontroller and the computer's USB, like Mega, UNO, Mini, Nano.

From https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/

Signature values 0x000000 or 0xffffff is an indicator that you have a connection issue. AVRDude returns these values in case target board doesn't answer.

How did you know it was a bootloader problem?
Did you check to see if the bootloader was working?

1 Like

I tried with the capacitor, but I got the first error from post 1.
I have my wiring like this:


Only the programmer is the MEGA and the Target is the UNO.
With or without the capacitor it refuses to work.

As for the @jim-p's question, I assumed it was a bootloader issue because every time I try to upload a sketch to the UNO it gets a "avrdude failed sync, trying again. Tries: 10 out of 10." or something along those lines.

I just did the loop back test:

And the UNO fails to echo commands.

In that case your first problem is that the 16U2 serial-to-usb converter that is malfunctioning.

Following up on jim-p's question
What happens when you press and release the reset button? You should get a few quick flashes of the L-LED. If not, your 328P is also malfunctioning.

I do get the L-Led to flash when the reset button is pressed.

In which case burning the boot loader is more than likely a futile exercise.

You can try to burn the firmware to the 16U2 either using your programmer Mega connected to the 6-pin header closest to the USB port or by using a tool called Atmel Flip.

Instructions (so maybe not complete) here: https://docs.arduino.cc/retired/hacking/software/DFUProgramming8U2/

Please show YOUR wirings rather than random image from the Net.
The wiring for Mega (as programmer) will be different from this picture.

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