Simonk Firmware auf HK F-30A mit Arduino funktioniert nicht

avrdude

Neuer Benutzer
#1
Tach!

Ich probiere jetzt mittlerweile an drei PCs vergeblich auf einen ESC (F-30A von HK) die aktuelle Simonk Firmware aufzuspielen. Das ganze probiere ich mittels Arduino als ISP. Den Arduino habe ich mit der Arduino IDE auf ISP geflasht.

Sowohl das kkflashtool als auch avrdude direkt geben mit einerseits Fuse-Fehler (kkflashtool) bzw. sehr kurze Flashzeiten (avrdude) aus.

Hier mal die Konsolenausgabe von avrdude:

Code:
C:\kkft\lib\avrdude\windows>avrdude -P COM4 -c arduino -p m8 -v -e -U flash:w:bs
_nfet.hex

avrdude: Version 5.11svn, compiled on Jan 18 2012 at 22:40:34
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\kkft\lib\avrdude\windows\avrdude.
conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  36
00 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  45
00 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  45
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  45
00 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: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: erasing chip
avrdude: reading input file "bs_nfet.hex"
avrdude: input file bs_nfet.hex auto detected as Intel Hex
avrdude: writing flash (8192 bytes):

Writing | ################################################## | 100% 1.01s

avrdude: 8192 bytes of flash written
avrdude: verifying flash memory against bs_nfet.hex:
avrdude: load data flash data from input file bs_nfet.hex:
avrdude: input file bs_nfet.hex auto detected as Intel Hex
avrdude: input file bs_nfet.hex contains 8192 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.60s

avrdude: verifying ...
avrdude: 8192 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done.  Thank you.
Ich habe sowohl dieses, dieses und auch dieses Tutorial ausprobiert und bin jetzt langsam am Ende...

Als Kapazität habe ich sowohl 10uF, 22uF und 100uF ausprobiert - kein Erfolg...
In den Tutorials wurde immer eine Baudrate von 19200 vorgeschlagen; gebe ich diese Baudrate mit in den avrdude-Befehl bekomme ich keine Rückmeldung vom Programmer.

Code:
C:\kkft\lib\avrdude\windows>avrdude -P COM4 -c arduino -p m8 -b 19200 -v -e -U f
lash:w:bs_nfet.hex

avrdude: Version 5.11svn, compiled on Jan 18 2012 at 22:40:34
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\kkft\lib\avrdude\windows\avrdude.
conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.
 
Zuletzt bearbeitet:

sandrodadon

Fliegender Maschi
#3
Hi! Soweit ich weiß ist ein ISP nicht gleichwertig mit einem USBasp und zum flashen braucht man einen USBasp, keinen ISP

Dazu ein Zitat:
ISP : in-system programming. Ability of some microcontrollers to be programmed in circuit so you don't need to remove it from device.

UsbASP : AVR System Programmer that uses ISP to programm almost all AVR microcontrollers.

Zumindest ist das mein Stand der Dinge den ich in verschiedenen Foren gelesen habe.
Somit glaube ich nicht dass es mit einem ISP geht sondern du wirklich einen USBasp brauchst

LG Sandro
 

DaRaiden

Neuer Benutzer
#4
Das Flashen geht natürlich mit jedem kompatiblen ISP, eines der Protokolle der AVR eigenen ISPs gibts sogar frei bei Atmel zum Download... wenn man das selbst implementiert kann man direkt mit AVRStudio flashen.

Wenn du mit -c avrisp avrdude startest gehts auch nicht? Mich wundert aber dass erst die Kommunikation scheinbar geht. Ansonsten Evtl MOSI/MISO falschrum angeschlossen. Und wie hast du die Verbindungen hergestellt?
 

avrdude

Neuer Benutzer
#5
Hi,
danke für die Antworten. Ich habe mir jetzt einen USBasp gekauft (hatte ich eh schon länger vor) und mit dem geht es anscheinend (wobei mir die Übertragungszeiten immer noch relativ kurz vorkommen - kann mir jemand bestätigen, ob das so ok ist?)
Code:
Flash the firmware from repository.

C:\kkflashtool\lib\avrdude\windows\avrdude.exe -C C:\kkflashtool\lib\avrdude\windows\avrdude.conf -p m8 -P usb -c usbasp -e -U lfuse:r:C:\kkflashtool\tmp\/lfuse.hex:r -U hfuse:r:C:\kkflashtool\tmp\/hfuse.hex:r 

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading lfuse memory:

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

avrdude.exe: writing output file "C:\kkflashtool\tmp\/lfuse.hex"
avrdude.exe: reading hfuse memory:

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

avrdude.exe: writing output file "C:\kkflashtool\tmp\/hfuse.hex"

avrdude.exe done.  Thank you.


C:\kkflashtool\lib\avrdude\windows\avrdude.exe -C C:\kkflashtool\lib\avrdude\windows\avrdude.conf -p m8 -P usb -c usbasp -e -U lfuse:w:46:m -U hfuse:w:202:m 

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "46"
avrdude.exe: writing lfuse (1 bytes):

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

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

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

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

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

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

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

avrdude.exe: verifying ...
avrdude.exe: 1 bytes of hfuse verified

avrdude.exe done.  Thank you.

Flashing firmware from file.: C:\kkflashtool\tmp\tgy-master\bs_nfet.hex

C:\kkflashtool\lib\avrdude\windows\avrdude.exe -C C:\kkflashtool\lib\avrdude\windows\avrdude.conf -p m8 -P usb -c usbasp -e -U flash:w:C:\kkflashtool\tmp\tgy-master\bs_nfet.hex:i 

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e9307
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "C:\kkflashtool\tmp\tgy-master\bs_nfet.hex"
avrdude.exe: writing flash (8192 bytes):

Writing | ################################################## | 100% 2.22s

avrdude.exe: 8192 bytes of flash written
avrdude.exe: verifying flash memory against C:\kkflashtool\tmp\tgy-master\bs_nfet.hex:
avrdude.exe: load data flash data from input file C:\kkflashtool\tmp\tgy-master\bs_nfet.hex:
avrdude.exe: input file C:\kkflashtool\tmp\tgy-master\bs_nfet.hex contains 8192 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 1.72s

avrdude.exe: verifying ...
avrdude.exe: 8192 bytes of flash verified

avrdude.exe done.  Thank you.

Flashing of firmware was successful.
Zumal auch
Code:
warning: cannot set sck period. please check for usbasp firmware update.
da steht... ([edit]: USBasp Firmware habe ich geupdated -> immer noch der selbe Fehler :-( )
 
Zuletzt bearbeitet:

DaRaiden

Neuer Benutzer
#6
Hmm, immerhin wurde die geschriebene Firmware erfolgreich verifiziert, also sollte das ok sein. Solche Fehler hatte ich allerdings dennoch nicht :p.

Hast du eigentlich ein fertiges hex-File benutzt, oder tatsächlich die aktuelle Version selbst gebaut? Zum damaligen Stand waren jedenfalls die bereits gebauten Files deutlich veraltet.
 

Blamer

Erfahrener Benutzer
#7
Zumal auch
Code:
warning: cannot set sck period. please check for usbasp firmware update.
da steht... ([edit]: USBasp Firmware habe ich geupdated -> immer noch der selbe Fehler :-( )[/QUOTE]

--> Das passt schon. Bei meinem USBasp von Ulrich Radig kommt immer genau die gleiche Fehlermeldung. Womit das zusamenhängt kann ich nicht sagen. Bis jetzt haben meine .hex files auf dem Atmel immer problemlos funktioniert.
 

avrdude

Neuer Benutzer
#8
Anscheinend hat das Firmwareupdate auf Simonk erfolgreich geklappt - die Tonfolge ist zumindest eine andere als die des ESC ohne Simonk. Ich habe die daily-Build genommen.
Danke für die Hilfe und Gruß
 
FPV1

Banggood

Oben Unten