This note is intended for anyone who may have accidentally programmed their fuses incorrectly on an AVR microcontroller.
While tinkering with clocks, I mistakenly set the lfuse of my attiny45 to decimal 22 instead of 0x22. This turns out to enable a mode expecting an external watch quartz crystal running at 32.768kHz instead of the on-board clock. As soon as I set it and exited the programmer, the micro did nothing and wouldn't respond to the programmer (in this case, an Olimex AVR-ISP500).
To recover the chip, you need to drive it with an external clock on the xtal1 pin and lower the ISP programming rate. Conveniently, my programmer happens to have such an output on one of its spare pins, which runs at 62.5kHz. Just driving it with an external clock wasn't enough. The key for me was to additionally lower the programming speed using avrdude -B 200 (measured in µs). The suggested rate is 1/4 the target MCU clock, so in my case it needs to be slower than 122µs (= 1/(32.768kHz * 0.25)) and 200µs seemed to work just fine.
Atom
RSS 1.0
RSS 1.1
RSS 1.0 no comments
Technorati Profile
GeoURL
![]()
All original sound, text and graphics on this site (staticfree.info) are licensed under a
Creative Commons License.