[Erledigt] Nano Clone Bootloader mit 2. Nano brennen funktioniert nicht

Hi Leute,

ich wollte beim Nano Clone den Sleepmode testen, bzw. dazu den Watchdog verwenden. Wie ich in verschiedenen Threads gelesen habe, sollten Nanos mit dem alten Bootloader den neuen erhalten.

So weit so gut, ich habe viele Anleitungen im Forum und auch auf Blogs und Webseiten gefunden und dieses versucht.

Kurz gesagt, es funktioniert nicht. Ausführlicher gesagt, habe ich folgendes versucht:

Den Nano, den ich als ISP nutzen will, habe ich mit dem Beispielsketch ArduinoISP über die IDE 1.8.9 geflasht, hier ich die Baudrate auch mal testweise von 19200 auf 115200 gesetzt (Zeilen 142 und 143). Der Nano ist in der IDE unter Werkzeuge/Board als "Arduino Nano" und /Prozessor "ATmega328P (Old Bootloader)" gesetzt. Der Sketch wird ohne Probleme hochgeladen. USB wieder getrennt.

Jetzt verbinde ich den Nano(ISP) per ICSP-Port zu ICSP-Port mit dem anderen Nano, auch die Pins D10-D13 , 5V und GND habe ich versucht.

Nano(ISP) wieder mit USB verbunden, beide POW-LEDs sind aktiviert. Unter Werkzeuge/Prozessor auf "ATmega328P", Programmer "Arduino as ISP" gesetzt und auf "Bootloader brennen" geklickt.

Der Vorgang wird mit folgender Meldung abgebrochen:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA: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                    : COM4
         Using Programmer              : arduino
         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 : 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.00s

avrdude: Device signature = 0x000000 (retrying)

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

avrdude: Device signature = 0x000000 (retrying)

Fehler beim Brennen des Bootloaders.
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.

Die Funktion "Boardinformationen holen" ergibt folgende Infos, falls es relevant ist:
2019-05-16 22_14_39-Boardinformationen.png

Was kann ich machen um den Bootloader zu brennen? Ich habe noch 2 Mega2560 und einen Wemos D1 Mini (clone) hier.

Gruß
Jörg

2019-05-16 22_14_39-Boardinformationen.png

Hast du einen Elko 10μF am Reset des Arduino as ISP gegen GND ?

HotSystems:
Hast du einen Elko 10μF am Reset des Arduino as ISP gegen GND ?

Nein natürlich nicht, so eine Info konnte ich bisher nicht finden...

Ich teste es gleich mal!

Ändert leider nichts:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA: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                    : COM4
         Using Programmer              : arduino
         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 : 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.00s

avrdude: Device signature = 0x000000 (retrying)

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

avrdude: Device signature = 0x000000 (retrying)

Fehler beim Brennen des Bootloaders.
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.

Dann beschreibe nochmal genau, wie du die Verbindung zwischen den Teilen aufgebaut hast.
Das liest sich irgend wie falsch.

Ich habe sowohl den ICSP-Port 1:1 verbunden, als auch:
ISP - Slave
MISO - D12
MOSI - D11
SCK - D13
RST - D10 (auch ohne getestet)

Du hast RST und D10 verdreht.

so muss es sein: ISP = D10 und Slave = RST

Funktioniert auch nicht:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA: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                    : COM4
         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                      : 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
Fehler beim Brennen des Bootloaders.
         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 : 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

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.

Ich habe beide jetzt wie folgt angeschlossen:
ISP - Slave
MISO - D12
MOSI - D11
SCK - D13
D10 - RST (Pin neben GND)

Als auch ICSP-ICSP:
ISP - Slave
MISO - MISO
MOSI - MOSI
SCK - SCK
D10 - RST (Pin neben GND)

Hast du den Programmer auch auf "Arduino as ISP" gestellt ?

Der zeigt bei dir was falsches an!

Habe ich, ich habe auch testweise andere Programmer getestet, da kamen aber auch Fehler, die aber abweichen.

Und den Elko drin ?

Zeige mal ein Foto deines Aufbaus, da muss noch ein Fehler sein.

Und die Software ArduinoISP ist auch noch drauf ?
Ohne Elko wird die gelöscht.

HotSystems:
Und den Elko drin ?

Zeige mal ein Foto deines Aufbaus, da muss noch ein Fehler sein.

Und die Software ArduinoISP ist auch noch drauf ?
Ohne Elko wird die gelöscht.

Moment, ich flashe doch den Beispiel-Sketch "ArduinoISP" auf den ISP, der sollte dann doch nicht wieder gelöscht werden, weil der Elko fehlt?

Aber nein, den Elko hatte ich erstmal wieder entfernt, ich teste es aber trotzdem mal damit.

wapjoe:
Moment, ich flashe doch den Beispiel-Sketch "ArduinoISP" auf den ISP, der sollte dann doch nicht wieder gelöscht werden, weil der Elko fehlt?

Aber nein, den Elko hatte ich erstmal wieder entfernt, ich teste es aber trotzdem mal damit.

:fearful: :fearful: :fearful:

Das verstehe wer will.....ich hatte doch geschrieben, der Elko muss drauf.

Edit:

Bin weg....morgen mehr.

Ja ist ja schon klar, ich hatte den Elko aber erstmal wieder entfernt, weil es nicht geändert hat. Ich hab jetzt auf dem ISP den Elko zw. RST und GND gesteckt und dann den Sketch versucht zu flashen. Das verursachte folgende Meldungen:

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                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xa6
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1c

avrdude done.  Thank you.

Problem beim Hochladen auf das Board. Hilfestellung dazu unter http://www.arduino.cc/en/Guide/Troubleshooting#upload.

Zum Flashen habe ich natürlich Old Bootloader ausgewählt.

Watchdog hat nichts mit dem Sleepmode zu tun.
Der Watchdog resetiert den Controller wenn dieser blockiert ist, das heist wenn er nicht immer wieder ein "Lebenszeichen" an den Watchdog sendet.
Sleepmodus ist ein Stromsparmodus bei dem je nach Art Teile oder der ganze Controller aufgehalten wird und später an der angehalteten Stelle weiterarbeitet. Aus dem Sleepmodus kann der Controller durch interne Ereignisse (zB Timer) oder durch externe Signale aufgeweckt werden.

"Die Funktion "Boardinformationen holen" holt Dir die Infos des am USB angeschlossenen Clone also desjenigen wo Du den ISP-Sketch drauf hast.

Grüße Uwe

den Elko hatte ich erstmal wieder entfernt,

Das widerspricht einer organisierten zielgerichteten Vorgehensweise.

Siehe:

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.

Aus: https://www.arduino.cc/en/Tutorial/ArduinoISP

wapjoe:
Ja ist ja schon klar ...

Nein, nein ... :slight_smile:

Ich bin erst jetzt auf diesen Thread gestoßen und habe beim Lesen des bisherigen Threads den Faden verloren. Nun wüsste ich gerne, wie die aktuelle Lage ist.

Könntest Du mal kurz schreiben, was Du hast, was Du tun möchtest und welcher Fehler auftritt?

Gruß

Gregor

Sketch auf ISP wurde ohne Elko ohne Probleme geflasht, danach Elko mit RST und GND verbunden, sowie ISP-Slave wie folgt gesteckt:
ISP - Slave
D12 - MISO
D11 - MOSI
D13 - SCK

Keine Änderung:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA: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                    : COM4
         Using Programmer              : arduino
         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 : 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.00s

avrdude: Device signature = 0x000000 (retrying)

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

avrdude: Device signature = 0x000000 (retrying)

Fehler beim Brennen des Bootloaders.
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.

Und auch umgekehrt bereits versucht.

Macht es vielleicht Probleme wenn ISP und Slave den Old Bootloader haben? Oder sind die Clone dermaßen abartig, dass es einfach nicht funktioniert?

uwefed:
Watchdog hat nichts mit dem Sleepmode zu tun.

Das ist erstmal nebensächlich, mich wurmt erstmal das sich der Bootloader nicht aufspielen lässt.

combie:
Das widerspricht einer organisierten zielgerichteten Vorgehensweise.

Das entspricht normalen Tests, die durch eventuell fehlerhaften Tutorials publiziert werden. Die Arduino ISP-Info taucht bei der Suche leider nicht auf und die Blogs/Seiten erwähnen keinen Elko.

Aber davon abgesehen, es funktioniert nicht.