[gelöst] Bootloader flaschen failed -> Device Signature = 0x000000

Hej Leute,

ich versuche aktuell vergebens den Arduino Bootloader auf meinen Atmega32U4 zu flashen und weiß so langsam nicht mehr weiter woran es liegen könnte. Eventuell habt ihr ja noch eine Idee.
Das Problem liegt darin, dass keine Device Signature ermittelt werden kann. Hier das gesamte Log:

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 "/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/philippmielke/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-14220
         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)

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: Hochladefehler: exit status 1

Da Der Chip schon auf meinem Board fest verlötet ist hier der Schaltplan:

Da ich etwas bedenken mit dem Quarz hatte, habe ich mir diesen ebenfalls mal mit einem Picoscope angeschaut. Als Tastkopf 1:10 gewählt, konnte aber keine Unterschiede zu dem Quarz auf dem Mega 2560 Board feststellen, weshalb ich diesen erstmal ausschließen würde.

Quarz auf dem Arduino Mega 2560:

Quarz auf meinem Board:

Verkabelung auch schon mehrfach überprüft.

Edit: Auf dem Bild sollte der Kondi natürlich an Masse angeschlossen sein mit seinem GND Pin. Funktioniert dennoch nicht...

Welche Pins verwendest Du auf dem Arduino MEGA 2560.

avrdude: Device signature = 0x000000 (retrying)

Beim Hochladen wird die Identifikationsnummer des Controllers ausgelesen. Der ATmega32U4 hat die Nummer 0x1E 95 87 Dies um sicherzustellen daß der Code für den richtigen Controller kompiliert wurde.

In Deinem Fall kann die Nummer nicht ausgelesen werden.

Möglichkeiten sind unter anderen:
ATmega32U4 defekt.
Schaltung falsch
Kabel falsch verdratet
Falsche Pins beim Mega verwendet.
Grüße Uwe

Danke erstmal für deine Rückmeldung.
Pins verwende ich folgende:
Atmega -> mein Board
D50 MISO -> ICSP 1
D51 MOSI -> ICSP 4
D52 SCLK -> ICSP 3

10uF zwischen Reset und GND.

Mir ist noch aufgefallen, dass der HWB (PE2) Pin eigentlich nen PullUp Widerstand braucht, damit der USB Bootloader nicht startet auf dem Atmega32 bzw PullDown zum Start. Allerdings meldet er sich auch mit gestartetem USB Bootloader nicht mal an meinem Mac als USB Device an...
Schaltplan hatte ich ja mit angefügt, finde aber bis auf den HWB Pin keine Fehler zum Referenzdesign vom Originalarduino Leonardo.

Wo ist Reset geblieben?

Sorry
Reset -> ICSP 5
5v -> ICSP 2
GND -> ICSP 6

Allerdings wird Reset während des Vorgangs bisher auch nicht auf LOW gezogen, sollte das relevant sein?

Häää.....

Dein Bootloader brennen kann nur funktionieren, wenn der Reset, des Ziels, vom Programmer auf Low gezogen wird.

Und zwar über Pin 10 des (ArduinoAsISP) Mega.

KA, woran du das angeschlossen hast.
Pin 10 des ISP-Mega muss an Reset den Ziel µC

Woran?
Am Ziel oder an der Quelle?

Danke, das war der Stoß in die richtige Richtung... Ich ging die ganze zeit davon aus, dass der mit Reset beschriftete Pin auf dem Mega2560 Board gemeint ist und nicht D10. Nachdem der Kondi nun nur noch mit Reset und 5V und D10 zum Reset auf meinem ICSP Header verbunden war lief alles problemlos durch.

"/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -patmega32u4 -cstk500v1 -P/dev/cu.usbserial-14230 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb: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 "/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/philippmielke/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-14230
         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 = 0x1e9587 (probably m32u4)
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 "0xcb"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xcb:
avrdude: load data efuse data from input file 0xcb:
avrdude: input file 0xcb 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.02s

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 | "/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -patmega32u4 -cstk500v1 -P/dev/cu.usbserial-14230 -b19200 "-Uflash:w:/Users/philippmielke/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex:i" -Ulock:w:0x2F:m
################################################## | 100% 0.01s

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

Writing | ################################################## | 100% 0.02s

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.


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 "/Users/philippmielke/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/philippmielke/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-14230
         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 = 0x1e9587 (probably m32u4)
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 "/Users/philippmielke/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex"
avrdude: writing flash (32730 bytes):

Writing | ################################################## | 100% 38.08s

avrdude: 32730 bytes of flash written
avrdude: verifying flash memory against /Users/philippmielke/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: load data flash data from input file /Users/philippmielke/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: input file /Users/philippmielke/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex contains 32730 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 20.10s

avrdude: verifying ...
avrdude: 32730 bytes of flash verified
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

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

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

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

avrdude done.  Thank you.

Hmm allerdings meldet sich der Atmega nun immer noch nicht am Mac an...

Aus dem ArduinoISP Programm, eine der ersten Zeilen:

// Pin 10 is used to reset the target microcontroller.

Wie ist der Mac denn an Dein Board angeschlossen, bzw. was ist zwischen dem Controller RX/TX und dem USB des MAC?

Die restliche Schaltung ist weiter oben.
Den HWB Pin habe ich jetzt extern über nen PullDown angeschlossen.
Angeschlossen über ein USB C Kabel, was auch definitiv ein Datenkabel ist.

Scheinbar sind die Datenpins auf der einen Seite nicht richtig angelötet oder whatever. Der USB C Plug war leider nen Fehlkauf für meine Platine. Wie dem auch sei, den Stecker umgedreht und siehe da, mein Board wird als Arduino Leonardo erkannt. Denke damit ist der Thread geschlossen.

Vielen Dank nochmal an alle Helfer.

Hatte es fast erraten.
Solche Fehler sind für uns sehr schwer zu finden da wir kienen Zugriff auf die Hardware haben und sonnst alles richtig war.
Gut daß Du das Problem gefunden hast.
Grüße Uwe

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