-
        

Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 10 von 18

Thema: Atmega32 reagiert nicht mehr nach fuse Änderung

  1. #1
    Neuer Benutzer Öfters hier
    Registriert seit
    04.07.2010
    Beiträge
    19

    Atmega32 reagiert nicht mehr nach fuse Änderung

    Anzeige

    Hi,

    ich experimentiere gerade ein bisschen mit einem RNControl V1.4 Board herum und mir ist gerade folgendes Problem in die Quere gekommen.

    Ich hab ganz normal mittels folgendes Befehls mein Programm über einen mySmartUSB Programmer via avrdude auf meinen Atmega32 übertragen:

    Code:
    avrdude -p atmega32 -c AVR910 -U flash:w:programm.hex -v -F -P /dev/ttyUSB0
    Beim übertragen habe ich folgende Frage gestellt bekommen, die ich bis jetzt noch nie gestellt bekommen hab:

    "Would you like this fuse to be changed back? [y/n]"

    Code:
        Device code: 0x29 = (unknown)
        Device code: 0x2a = (unknown)
        Device code: 0x2b = (unknown)
        Device code: 0x2c = (unknown)
        Device code: 0x2d = (unknown)
        Device code: 0x2e = (unknown)
        Device code: 0x2f = (unknown)
        Device code: 0x30 = AT90S4433
        Device code: 0x31 = (unknown)
        Device code: 0x32 = (unknown)
        Device code: 0x33 = (unknown)
        Device code: 0x34 = AT90S2333
        Device code: 0x35 = (unknown)
        Device code: 0x36 = (unknown)
        Device code: 0x37 = (unknown)
        Device code: 0x38 = AT90S8515
        Device code: 0x39 = (unknown)
        Device code: 0x3a = ATMEGA8515
        Device code: 0x3b = (unknown)
        Device code: 0x3c = (unknown)
        Device code: 0x3d = (unknown)
        Device code: 0x3e = (unknown)
        Device code: 0x3f = (unknown)
        Device code: 0x40 = (unknown)
        Device code: 0x41 = ATMEGA103
        Device code: 0x42 = (unknown)
        Device code: 0x43 = ATMEGA128
        Device code: 0x44 = (unknown)
        Device code: 0x45 = ATMEGA64
        Device code: 0x46 = (unknown)
        Device code: 0x47 = (unknown)
        Device code: 0x48 = (unknown)
        Device code: 0x49 = (unknown)
        Device code: 0x4a = (unknown)
        Device code: 0x4b = (unknown)
        Device code: 0x4c = AT90S2343
        Device code: 0x4d = (unknown)
        Device code: 0x4e = (unknown)
        Device code: 0x4f = (unknown)
        Device code: 0x50 = (unknown)
        Device code: 0x51 = (unknown)
        Device code: 0x52 = (unknown)
        Device code: 0x53 = (unknown)
        Device code: 0x54 = (unknown)
        Device code: 0x55 = ATtiny12
        Device code: 0x56 = ATtiny15
        Device code: 0x57 = (unknown)
        Device code: 0x58 = (unknown)
        Device code: 0x59 = (unknown)
        Device code: 0x5a = (unknown)
        Device code: 0x5b = (unknown)
        Device code: 0x5c = (unknown)
        Device code: 0x5d = (unknown)
        Device code: 0x5e = ATtiny2313
        Device code: 0x5f = (unknown)
        Device code: 0x60 = ATMEGA161
        Device code: 0x61 = (unknown)
        Device code: 0x62 = (unknown)
        Device code: 0x63 = ATMEGA162
        Device code: 0x64 = ATMEGA163
        Device code: 0x65 = (unknown)
        Device code: 0x66 = (unknown)
        Device code: 0x67 = (unknown)
        Device code: 0x68 = AT90S8535
        Device code: 0x69 = ATMEGA8535
        Device code: 0x6a = (unknown)
        Device code: 0x6b = (unknown)
        Device code: 0x6c = AT90S4434
        Device code: 0x6d = (unknown)
        Device code: 0x6e = (unknown)
        Device code: 0x6f = (unknown)
        Device code: 0x70 = (unknown)
        Device code: 0x71 = (unknown)
        Device code: 0x72 = ATMEGA32
        Device code: 0x73 = (unknown)
        Device code: 0x74 = ATMEGA6450
        Device code: 0x75 = ATMEGA6490
        Device code: 0x76 = ATMEGA8
        Device code: 0x77 = (unknown)
        Device code: 0x78 = ATMEGA169
        Device code: 0x79 = (unknown)
        Device code: 0x7a = (unknown)
        Device code: 0x7b = (unknown)
        Device code: 0x7c = (unknown)
        Device code: 0x7d = (unknown)
        Device code: 0x7e = (unknown)
        Device code: 0x7f = (unknown)
    
    avrdude: AVR910_devcode selected: 0x01
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.06s
    
    avrdude: Device signature = 0x000000
    avrdude: Yikes!  Invalid device signature.
    avrdude: Expected signature for ATMEGA32 is 1E 95 02
    avrdude: safemode: lfuse reads as 0
    avrdude: safemode: hfuse reads as 0
    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 "can_testprogram.hex"
    avrdude: input file can_testprogram.hex auto detected as Intel Hex
    avrdude: writing flash (1102 bytes):
    
    Writing | ################################################## | 100% 7.19s
    
    
    
    avrdude: 1102 bytes of flash written
    avrdude: verifying flash memory against can_testprogram.hex:
    avrdude: load data flash data from input file can_testprogram.hex:
    avrdude: input file can_testprogram.hex auto detected as Intel Hex
    avrdude: input file can_testprogram.hex contains 1102 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 3.87s
    
    
    
    avrdude: verifying ...
    avrdude: verification error, first mismatch at byte 0x0000
             0x0c != 0xff
    avrdude: verification error; content mismatch
    
    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as FF
    avrdude: safemode: lfuse changed! Was 0, and is now ff
    Would you like this fuse to be changed back? [y/n] y
    ^C
    Da ich die Fuse bits nicht wissentliche geändert habe, dachte ich mal, ich beantworte das ganze mit "Yes", da ich mir dachte, dass es sich vielleicht um einen Fehler gehandelt hat, der somit wieder behoben wird.
    Leider hat avrdude dann gar nicht mehr reagiert, weswegen ich das ganze nach ein paar Minuten abgebrochen habe.
    Ich hab speziell von Fuse bits gar keine Ahnung. Mir ist nur bekannt, dass man damit bei falschem Umgang den Controller unbrauchbar machen kann.
    Da mein Controller jetzt leider nichts mehr macht hab ich ein bischen Angst, dass das nun jetzt auch bei mir der Fall ist...
    Programmieren lässt er sich noch ohne Probleme, das Programm macht nur leider nichts.

    Beim Googlen hab ich zwar Fälle gefunden bei denen auch diese Frage gestellt wurde, aber ohne einfrieren des Programm im Anschluss.

    Gibt es eine Möglichkeit das wieder hin zu kriegen? Ich weiß leider auch nicht welche Informationen dafür relevant sind, werde aber gerne alles geforderte posten.

    Gruß,
    toti

  2. #2
    Erfahrener Benutzer Robotik Visionär Avatar von Hubert.G
    Registriert seit
    14.10.2006
    Ort
    Pasching OÖ
    Beiträge
    6.186
    Wenn du den Kontroller noch programmieren kannst dann solltest du auch noch die Fuses abfragen können. Was steht denn da drinnen?
    Grüsse Hubert
    ____________

    Meine Projekte findet ihr auf schorsch.at

  3. #3
    Neuer Benutzer Öfters hier
    Registriert seit
    04.07.2010
    Beiträge
    19
    Hi,

    also avrdude gibt mittels:

    avrdude -p atmega32 -c AVR910 -P /dev/ttyUSB0 -v -U lfuse:r:-:i -F

    folgendes aus:



    Code:
    avrdude -p atmega32 -c AVR910 -P /dev/ttyUSB0 -v -U lfuse:r:-:i -F
    
    avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2009 Joerg Wunsch
    
             System wide configuration file is "/etc/avrdude.conf"
             User configuration file is "/home/toti/.avrduderc"
             User configuration file does not exist or is not a regular file, skipping
    
             Using Port                    : /dev/ttyUSB0
             Using Programmer              : AVR910
             AVR910_devcode (avrdude.conf) : 0x72
             AVR Part                      : ATMEGA32
             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         4    10    64    0 no       1024    4      0  9000  9000 0xff 0xff
               flash         33     6    64    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
               lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
               calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
    
             Programmer Type : AVR910
             Description     : Atmel Low Cost Serial Programmer
    
    Found programmer: Id = "AVR ISP"; type = S
        Software Version = 2.5; Hardware Version = 2.0
    Programmer supports auto addr increment.
    Programmer supports buffered memory access with buffersize = 8 bytes.
    
    Programmer supports the following devices:
        Device code: 0x01 = (unknown)
        Device code: 0x02 = (unknown)
        Device code: 0x03 = (unknown)
        Device code: 0x04 = (unknown)
        Device code: 0x05 = (unknown)
        Device code: 0x06 = (unknown)
        Device code: 0x07 = (unknown)
        Device code: 0x08 = (unknown)
        Device code: 0x09 = (unknown)
        Device code: 0x0a = (unknown)
        Device code: 0x0b = (unknown)
        Device code: 0x0c = (unknown)
        Device code: 0x0d = (unknown)
        Device code: 0x0e = (unknown)
        Device code: 0x0f = (unknown)
        Device code: 0x10 = (unknown)
        Device code: 0x11 = (unknown)
        Device code: 0x12 = (unknown)
        Device code: 0x13 = AT90S1200
        Device code: 0x14 = (unknown)
        Device code: 0x15 = (unknown)
        Device code: 0x16 = (unknown)
        Device code: 0x17 = (unknown)
        Device code: 0x18 = (unknown)
        Device code: 0x19 = (unknown)
        Device code: 0x1a = (unknown)
        Device code: 0x1b = (unknown)
        Device code: 0x1c = (unknown)
        Device code: 0x1d = (unknown)
        Device code: 0x1e = (unknown)
        Device code: 0x1f = (unknown)
        Device code: 0x20 = ATtiny84
        Device code: 0x21 = (unknown)
        Device code: 0x22 = (unknown)
        Device code: 0x23 = (unknown)
        Device code: 0x24 = (unknown)
        Device code: 0x25 = (unknown)
        Device code: 0x26 = (unknown)
        Device code: 0x27 = (unknown)
        Device code: 0x28 = AT90S4414
        Device code: 0x29 = (unknown)
        Device code: 0x2a = (unknown)
        Device code: 0x2b = (unknown)
        Device code: 0x2c = (unknown)
        Device code: 0x2d = (unknown)
        Device code: 0x2e = (unknown)
        Device code: 0x2f = (unknown)
        Device code: 0x30 = AT90S4433
        Device code: 0x31 = (unknown)
        Device code: 0x32 = (unknown)
        Device code: 0x33 = (unknown)
        Device code: 0x34 = AT90S2333
        Device code: 0x35 = (unknown)
        Device code: 0x36 = (unknown)
        Device code: 0x37 = (unknown)
        Device code: 0x38 = AT90S8515
        Device code: 0x39 = (unknown)
        Device code: 0x3a = ATMEGA8515
        Device code: 0x3b = (unknown)
        Device code: 0x3c = (unknown)
        Device code: 0x3d = (unknown)
        Device code: 0x3e = (unknown)
        Device code: 0x3f = (unknown)
        Device code: 0x40 = (unknown)
        Device code: 0x41 = ATMEGA103
        Device code: 0x42 = (unknown)
        Device code: 0x43 = ATMEGA128
        Device code: 0x44 = (unknown)
        Device code: 0x45 = ATMEGA64
        Device code: 0x46 = (unknown)
        Device code: 0x47 = (unknown)
        Device code: 0x48 = (unknown)
        Device code: 0x49 = (unknown)
        Device code: 0x4a = (unknown)
        Device code: 0x4b = (unknown)
        Device code: 0x4c = AT90S2343
        Device code: 0x4d = (unknown)
        Device code: 0x4e = (unknown)
        Device code: 0x4f = (unknown)
        Device code: 0x50 = (unknown)
        Device code: 0x51 = (unknown)
        Device code: 0x52 = (unknown)
        Device code: 0x53 = (unknown)
        Device code: 0x54 = (unknown)
        Device code: 0x55 = ATtiny12
        Device code: 0x56 = ATtiny15
        Device code: 0x57 = (unknown)
        Device code: 0x58 = (unknown)
        Device code: 0x59 = (unknown)
        Device code: 0x5a = (unknown)
        Device code: 0x5b = (unknown)
        Device code: 0x5c = (unknown)
        Device code: 0x5d = (unknown)
        Device code: 0x5e = ATtiny2313
        Device code: 0x5f = (unknown)
        Device code: 0x60 = ATMEGA161
        Device code: 0x61 = (unknown)
        Device code: 0x62 = (unknown)
        Device code: 0x63 = ATMEGA162
        Device code: 0x64 = ATMEGA163
        Device code: 0x65 = (unknown)
        Device code: 0x66 = (unknown)
        Device code: 0x67 = (unknown)
        Device code: 0x68 = AT90S8535
        Device code: 0x69 = ATMEGA8535
        Device code: 0x6a = (unknown)
        Device code: 0x6b = (unknown)
        Device code: 0x6c = AT90S4434
        Device code: 0x6d = (unknown)
        Device code: 0x6e = (unknown)
        Device code: 0x6f = (unknown)
        Device code: 0x70 = (unknown)
        Device code: 0x71 = (unknown)
        Device code: 0x72 = ATMEGA32
        Device code: 0x73 = (unknown)
        Device code: 0x74 = ATMEGA6450
        Device code: 0x75 = ATMEGA6490
        Device code: 0x76 = ATMEGA8
        Device code: 0x77 = (unknown)
        Device code: 0x78 = ATMEGA169
        Device code: 0x79 = (unknown)
        Device code: 0x7a = (unknown)
        Device code: 0x7b = (unknown)
        Device code: 0x7c = (unknown)
        Device code: 0x7d = (unknown)
        Device code: 0x7e = (unknown)
        Device code: 0x7f = (unknown)
    
    avrdude: AVR910_devcode selected: 0x01
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.06s
    
    avrdude: Device signature = 0xffffff
    avrdude: Yikes!  Invalid device signature.
    avrdude: Expected signature for ATMEGA32 is 1E 95 02
    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as FF
    avrdude: reading lfuse memory:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: writing output file "<stdout>"
    :01000000FF00
    :00000001FF
    
    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as FF
    avrdude: safemode: Fuses OK
    
    avrdude done.  Thank you.

  4. #4
    Erfahrener Benutzer Robotik Visionär Avatar von Hubert.G
    Registriert seit
    14.10.2006
    Ort
    Pasching OÖ
    Beiträge
    6.186
    Hier steht es doch
    Code:
    avrdude: Device signature = 0xffffff
    avrdude: Yikes!  Invalid device signature.
    avrdude: Expected signature for ATMEGA32 is 1E 95 02
    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as FF
    avrdude: reading lfuse memory:
    Es wird nichts gelesen.
    Sieht so aus als würde keine Verbindung zustande kommen.
    Grüsse Hubert
    ____________

    Meine Projekte findet ihr auf schorsch.at

  5. #5
    Neuer Benutzer Öfters hier
    Registriert seit
    04.07.2010
    Beiträge
    19
    Mhhh, also ich hab noch einen anderen atmega32 hier, der lässt sich ohne Probleme programmieren. Könnte es sein, dass ich mir ausversehen den ISP deaktiviert habe?

  6. #6
    Erfahrener Benutzer Robotik Visionär Avatar von Hubert.G
    Registriert seit
    14.10.2006
    Ort
    Pasching OÖ
    Beiträge
    6.186
    Eher nicht, ein sehr oft vorkommender Fehler ist das Umschalten auf ext.Clock.
    Probier mal einen externen Takt auf XTAL1 zu legen.
    Grüsse Hubert
    ____________

    Meine Projekte findet ihr auf schorsch.at

  7. #7
    Neuer Benutzer Öfters hier
    Registriert seit
    04.07.2010
    Beiträge
    19
    Da ich das RN-Control Board benutze habe ich doch automatisch einen 16 Mhz Quarz betriebsbereit oder?

  8. #8
    Erfahrener Benutzer Robotik Visionär Avatar von Hubert.G
    Registriert seit
    14.10.2006
    Ort
    Pasching OÖ
    Beiträge
    6.186
    Ja, aber nur wenn die Fuses im Kontroller richtig eingestellt sind.
    Wenn auf ext. Clock gestellt ist, erwartet der Kontroller einen Takt auf XTAL1.
    Der Oszillator, der den 16MHz Quarz benötigt, ist dann nicht aktiv.
    Grüsse Hubert
    ____________

    Meine Projekte findet ihr auf schorsch.at

  9. #9
    Neuer Benutzer Öfters hier
    Registriert seit
    04.07.2010
    Beiträge
    19
    ok, wo bekomme ich denn einen externen Takt her? Kann ich den irgendwie von dem funktionsfähigen atmega32 abzweigen? Geht das generell über irgendeinen PIN oder muss ich dafür einen Timer verwenden?

  10. #10
    Erfahrener Benutzer Robotik Visionär Avatar von Hubert.G
    Registriert seit
    14.10.2006
    Ort
    Pasching OÖ
    Beiträge
    6.186
    Der Mega32 hat soviel ich weiss keinen Taktausgang. Du kannst einen Quarz verwenden, CKOPT in den Fuses aktivieren und den Takt an XTAL2 abnehmen.
    Ansonst in der while eine Port togglen.
    Grüsse Hubert
    ____________

    Meine Projekte findet ihr auf schorsch.at

Seite 1 von 2 12 LetzteLetzte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •