Hallo zusammen,
seit längerem habe ich Probleme einen ATTiny12 mit avrdude und usbasp zu
flashen.
Beim ersten Mal (nach längerer Pause) klappt das. Alles ok. Danach mache
ich eine Änderung am Code, compiliere und versuche dann zu flashen.
Dabei kommt folgende Ausgabe:
1 | avrdude -p t12 -B 60 -c usbasp -U flash:w:staub-ab.hex:i
|
2 |
|
3 | avrdude: set SCK frequency to 16000 Hz
|
4 | avrdude: AVR device initialized and ready to accept instructions
|
5 |
|
6 | Reading | ################################################## | 100% 0.01s
|
7 |
|
8 | avrdude: Device signature = 0x1e9005 (probably t12)
|
9 | avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
|
10 | To disable this feature, specify the -D option.
|
11 | avrdude: erasing chip
|
12 | avrdude: set SCK frequency to 16000 Hz
|
13 | avrdude: reading input file "staub-ab.hex"
|
14 | avrdude: writing flash (146 bytes):
|
15 |
|
16 | Writing | | 0% 0.00s ***failed;
|
17 | Writing | ################################################## | 100% 1.67s
|
18 |
|
19 | avrdude: 146 bytes of flash written
|
20 | avrdude: verifying flash memory against staub-ab.hex:
|
21 | avrdude: load data flash data from input file staub-ab.hex:
|
22 | avrdude: input file staub-ab.hex contains 146 bytes
|
23 | avrdude: reading on-chip flash data:
|
24 |
|
25 | Reading | ################################################## | 100% 0.52s
|
26 |
|
27 | avrdude: verifying ...
|
28 | avrdude: verification error, first mismatch at byte 0x0001
|
29 | 0x80 != 0xc0
|
30 | avrdude: verification error; content mismatch
|
31 |
|
32 | avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
|
33 |
|
34 | avrdude done. Thank you.
|
35 |
|
36 | Makefile:16: recipe for target 'flash' failed
|
37 | make: *** [flash] Error 1
|
38 |
|
39 | Compilation exited abnormally with code 2 at Wed Nov 15 10:49:14
|
Der ATTiny12 ist in dem ATMEL Eval Board von Pollin. Gleiches Verhalten
auch wenn der Chip auf einem Steckbrett direkt mit dem usbasp verbunden
ist. Nehme ich den Chip heraus und schließe die Pins kurz dann klappt
die Programmierung danach. Nur die Versorgungsspannung abklemmen hilft
nicht.
Auch versucht habe ich einen Arduino als Programmer. Dabei tritt das
selbe Verhalten auf. Den Bit-Clock runter zu setzen (-B 600) bringt auch
keine Besserung.
Wenn ich den Flash-Speicher auslese und mit dem *.hex file vergleiche so
ist nur das 1. Byte unterschiedlich. Der Rest stimmt überein.
Kann mir jemand einen Tipp geben was ich tun könnte um nicht jedes Mal
den Chip rausnehmen zu müssen?
Vielen Dank schon mal und bis neulich ...
Thommy