Set fuse bits to low frequency, am now stuck

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

So I always used ATmega8s, but decided to try a 328P recently. Everything was working great, until I tried setting the fuse bits.

I am using a USBasp, with avrdude.

I accidentally set the fuse bits to low frequency, and now I can't talk to the MCU at all. Prior to this, I loaded a simple LED blink code. I connected a 32.768 kHz crystal to the MCU, and the LED is blinking at a very slow pace (as expected), but I can't talk to the MCU at all.

I can't set new fuse bits, flash any new code, etc.

I just keep getting:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Is there anything I can do to save my MCU? I'm sure it's savable, but I just don't know how.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have a look at Cliff's tutorial on Recovering from Locked-Out Micros.

Also make sure your ISP programming speed is set as low as possible, at least until you have things working again.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. Connect your 32kHz crystal on the XTAL1, XTAL2 pins.
2. Connect programmer to MOSI, MISO, SCK, RESET, etc.

avrdude -c usbasp -p ATmega328P -B 1000

If your usbasp does not support the -B# switch, you need to use an ISP programmer that does.

I am assuming that you are running at 32kHz with CKDIV8 fuse. i.e. F_CPU = 4kHz

If you were not so foolish as to leave the idiotic CKDIV8 fuse set, you will be running at 32kHz. In which case -B125 should be ok.

David.