Hallo!
Ich bin recht neu in der Elektronikwelt und habe mir zum Einstieg einen
Arduino Mega2560 gekauft. Es ist eine atmega2560 verbaut. Das hat auch
alles super funktioniert aber vom einen auf den anderen Augenblick ließ
er sich nicht mehr richtig programmieren. Zufällig bekam ich den
folgenden Fehler beim Programmieren:
1 | avrdude: stk500_2_ReceiveMessage(): timeout
|
Ich habe dann nach längerem Rätselraten den Schuldigen gefunden. Die
Fusebits sind verstellt. Die Ausgabe von
1 | avrdude -p atmega2560 -c stk500v2 -P /dev/ttyACM3 -n -v
|
ist
1 | avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14
|
2 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
|
3 | Copyright (c) 2007-2009 Joerg Wunsch
|
4 |
|
5 | System wide configuration file is "/etc/avrdude.conf"
|
6 | User configuration file is "/home/tobias/.avrduderc"
|
7 | User configuration file does not exist or is not a regular file, skipping
|
8 |
|
9 | Using Port : /dev/ttyACM3
|
10 | Using Programmer : stk500v2
|
11 | AVR Part : ATMEGA2560
|
12 | Chip Erase delay : 9000 us
|
13 | PAGEL : PD7
|
14 | BS2 : PA0
|
15 | RESET disposition : dedicated
|
16 | RETRY pulse : SCK
|
17 | serial program mode : yes
|
18 | parallel program mode : yes
|
19 | Timeout : 200
|
20 | StabDelay : 100
|
21 | CmdexeDelay : 25
|
22 | SyncLoops : 32
|
23 | ByteDelay : 0
|
24 | PollIndex : 3
|
25 | PollValue : 0x53
|
26 | Memory Detail :
|
27 |
|
28 | Block Poll Page Polled
|
29 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
|
30 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
|
31 | eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
|
32 | flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
|
33 | lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
|
34 | hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
|
35 | efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
|
36 | lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
|
37 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
|
38 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
|
39 |
|
40 | Programmer Type : STK500V2
|
41 | Description : Atmel STK500 Version 2.x firmware
|
42 | Programmer Model: AVRISP
|
43 | Hardware Version: 15
|
44 | Firmware Version Master : 2.10
|
45 | Vtarget : 0.0 V
|
46 | SCK period : 0.1 us
|
47 |
|
48 | avrdude: AVR device initialized and ready to accept instructions
|
49 |
|
50 | Reading | ################################################## | 100% 0.01s
|
51 |
|
52 | avrdude: Device signature = 0x1e9801
|
53 | avrdude: safemode: lfuse reads as 0
|
54 | avrdude: safemode: hfuse reads as 0
|
55 | avrdude: safemode: efuse reads as 0
|
56 |
|
57 | avrdude: safemode: lfuse reads as 0
|
58 | avrdude: safemode: hfuse reads as 0
|
59 | avrdude: safemode: efuse reads as 0
|
60 | avrdude: safemode: Fuses OK
|
61 |
|
62 | avrdude done. Thank you.
|
Die Fusebits bei einem Arduino Mega 2560 sollen jedoch so aussehen:
Low fuses = 0xff
High Fuses = 0xd8
Extended Fuses = 0xfd
Ich habe dann folgendes versucht:
1 | avrdude -p atmega2560 -c stk500v2 -P /dev/ttyACM3 -b 10 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFD:m
|
Dabei erhalte ich jedoch folgende Ausgabe:
1 | avrdude: AVR device initialized and ready to accept instructions
|
2 |
|
3 | Reading | ################################################## | 100% 0.02s
|
4 |
|
5 | avrdude: Device signature = 0x1e9801
|
6 | avrdude: reading input file "0xFF"
|
7 | avrdude: writing lfuse (1 bytes):
|
8 |
|
9 | Writing | | 0% 0.00s ***failed;
|
10 | Writing | ################################################## | 100% 0.11s
|
11 |
|
12 | avrdude: 1 bytes of lfuse written
|
13 | avrdude: verifying lfuse memory against 0xFF:
|
14 | avrdude: load data lfuse data from input file 0xFF:
|
15 | avrdude: input file 0xFF contains 1 bytes
|
16 | avrdude: reading on-chip lfuse data:
|
17 |
|
18 | Reading | ################################################## | 100% 0.01s
|
19 |
|
20 | avrdude: verifying ...
|
21 | avrdude: verification error, first mismatch at byte 0x0000
|
22 | 0xff != 0x00
|
23 | avrdude: verification error; content mismatch
|
24 |
|
25 | avrdude: safemode: lfuse changed! Was ff, and is now 0
|
26 | Would you like this fuse to be changed back? [y/n]
|
Wenn ich mit y bestätige, dann passiert einfach nichts mehr.
Gibt es noch eine Möglichkeit die Fusebits zu resetten, oder ist der
Arduino gebrickt?
Gruß, Tobias