Fixing a bad frequency fuse bit on an AVR

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
zzag
 
Posts: 17
Joined: Wed Jul 04, 2007 12:48 am

Fixing a bad frequency fuse bit on an AVR

Post by zzag »

Operating with my USBtiny, I took an ATtiny13 to a tiny frequency of 128kHz and as to be predicted, cannot access it any more.

To try and recover, I followed the instruction here:

http://www.evilmadscientist.com/article ... Bfrequency

with no luck (the feedback during the recovery looked promising).

Is there something else to try?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

can you post a screenshot of what happened when you tried that?

zzag
 
Posts: 17
Joined: Wed Jul 04, 2007 12:48 am

Post by zzag »

trying to reset:
C:\AVR>avrdude -p t13 -c usbtiny -P usb -tuF

avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny13 is 1E 90 07
avrdude> sck 1000
>>> sck 1000
avrdude: Setting SCK period to 250 usec
avrdude> e
>>> e
avrdude: erasing chip
avrdude> sck 10
>>> sck 10
avrdude: Setting SCK period to 10 usec
avrdude> quit
>>> quit

avrdude done. Thank you.
and then trying to program:
C:\AVR\Soap Timer>make program

Compiling C: 13Timer.c
avr-gcc -c -mmcu=attiny13 -I. -gdwarf-2 -Os 13Timer.c -o 13Timer.o
In file included from 13Timer.c:19:
c:/winavr/bin/../avr/include/util/delay.h:136:3: warning: #warning "F_CPU not de
fined for <util/delay.h>"

Linking: 13Timer.elf
avr-gcc -mmcu=attiny13 -I. -gdwarf-2 -Os 13Timer.o --output 13Timer.elf -Wl,
-Map=13Timer.map,--cref -lm

Creating load file for Flash: 13Timer.hex
avr-objcopy -O ihex -R .eeprom 13Timer.elf 13Timer.hex

Creating load file for EEPROM: 13Timer.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex 13Timer.elf 13Timer.
eep || exit 0
c:\WinAVR\bin\avr-objcopy.exe: there are no sections to be copied!
avrdude -p attiny13 -P usb -c usbtiny -U flash:w:13Timer.hex

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

make: *** [program] Error 1

C:\AVR\Soap Timer>make program

Creating load file for EEPROM: 13Timer.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex 13Timer.elf 13Timer.
eep || exit 0
c:\WinAVR\bin\avr-objcopy.exe: there are no sections to be copied!
avrdude -p attiny13 -P usb -c usbtiny -U flash:w:13Timer.hex

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

make: *** [program] Error 1

C:\AVR\Soap Timer>
thanks in advance!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

well you erased the chip but you didnt fix the fuses so now its blank but the fuses are still wrong.

just use '-B 250' on the command line and reprogram the fuses, and you should be able to fix it.

zzag
 
Posts: 17
Joined: Wed Jul 04, 2007 12:48 am

Post by zzag »

I tried:
C:\AVR\Soap Timer>avrdude -p t13 -c usbtiny -P usb -B 250

avrdude: Setting SCK period to 250 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.13s

avrdude: Device signature = 0x1e9007

avrdude: safemode: Fuses OK

avrdude done. Thank you.


C:\AVR\Soap Timer>avrdude -p attiny13 -P usb -c usbtiny -U lfuse:w:0x6A:m -U hfu
se:w:0xFF:m

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.
Is that what you meant?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

no, i mean you put -B 250 in the command used to fix the fuse

zzag
 
Posts: 17
Joined: Wed Jul 04, 2007 12:48 am

Post by zzag »

got it.... thank you very much!

PS - i've read that you are misanthropic. don't worry... i'm not human.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”