Device Signature mismatch for atmega32U4

Hello Community,

I am trying to upload my program to atmega32U4 via ISP header,

using Arduino IDE by selecting Arduino LEONARDO board

but it shows device signature mismatch

I tested my ISP programmer with the actual Arduino LEONARDO and it worked.
I am using Arduino NANO as an ISP programmer

how to solve this?

Hi @ruchiatavr. In order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to post the full output from the upload when in verbose mode.

Please do this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Uncheck the checkbox next to Show verbose output during: compilation
  3. Check the checkbox next to Show verbose output during: upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. After the upload fails, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button. This copies the full output to the clipboard.
  7. Open a forum reply here by clicking the Reply button.
  8. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  9. Press Ctrl+V. This will paste the error output from the upload into the code block.
  10. Move the cursor outside of the code tags before you add any additional text to your reply.
  11. Click the Reply button to post the output.

@in0

Arduino: 1.8.15 (Linux), Board: "Arduino Leonardo"

Warning: Board arduino:avr:atmegasa16 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGASA16
Sketch uses 15260 bytes (53%) of program storage space. Maximum is 28672 bytes.
Global variables use 590 bytes (23%) of dynamic memory, leaving 1970 bytes for local variables. Maximum is 2560 bytes.
/home/rucha/Downloads/arduino-1.8.15/hardware/tools/avr/bin/avrdude -C/home/rucha/Downloads/arduino-1.8.15/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -P/dev/ttyUSB0 -b19200 -Uflash:w:/tmp/arduino_build_503885/TrackPoint.ino.hex:i 

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 "/home/rucha/Downloads/arduino-1.8.15/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/rucha/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32U4
         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    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  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)

An error occurred while uploading the sketch
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.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This specific signature error is usually caused by a problem in the hardware, or in the connections between the programmer board.

So I think more information about the hardware will be useful to the helpers here on the forum. You can provide a schematic and picture of the hardware. Is this a PCB you created yourself, or a product you purchased?

One possible cause is no system clock on the target system. Once someone uploads an Arduino bootloader to an ATmega chip it sets the chip to use an external crystal (or ceramic resonator) for the system clock. If no crystal/resonator is connected then the system clock won't start and serial programming won't work. A workaround is to inject a clock signal into the XTL1 pin. Adafruit made a variation of the ArduinoISP sketch that used a timer to generate an 8MHz clock signal.

1 Like