avratmegaavrdude

Briecked AVR. Do I set extended fuse?


I've uploaded program to ATmega88p, then executed avrdude with -U lfuse:w:0x63:m -U hfuse:w:0xD9:m -U efuse:w:0xFF:m to set clock to 128kHz according to http://www.engbedded.com/fusecalc/ The proggram executed fine, but then I wanted to execute avrdude with -U lfuse:w:0x7F:m -U hfuse:w:0xD9:m -U efuse:w:0xFF:m to set the clock back to 8MHz, but I've received error rc=-1. When I used avrdude with -F to check the signature, I've received 0xdc57df, wchih looks random. Prevously I did same thing (with diffrent h and l fuses values) to ATmega8, and it worked just fine afterwards. I wanted to know if I should set extended fuse in the future or Is the high and low one enough in most cases?


Solution

  • The ISP clock speed should be at most 1/4 of the CPU frequency. Therefore if the CPU runs at 128kHz, programming speed should be less than 32kHz. I.e. one bit clock period should be at least 32 microseconds or more.

    Try to pass -B 64 option in the avrdude command line. (full list of options is here)