Reading/Writing Fuse Bits in Application

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

Is it possible to read and/or write the fuse bits (e.g., bootloader size, bootloader reset vector enabled, clock rate, etc.) from an application running on the processor? Is there a register I can read/write? Or can these fuse bits only be read/written from an external programmer?

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

You can read some of the bits on some of the AVRs but you can only write them using ISP or JTAG

(but have a look at the release announcement of the new WinAVR - it's just added a facility to specify the bits in code files at compile time which are then read out for use by the new SP2 version of Studio)

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

How can I found out which fuse bits can be read? I looked at the data sheet for the ATMega64 and it does not seem to have any information related to programatically reading the fuse bits I'm interested in (i.e., the fuses on the Fuses tab in AVR Studio). I'm assuming this means they cannot be read?

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

In the mega64 datahseet look for the section called "Boot Loader Support - read-while-write self programming". In this section is "Self-programming the flash" and then within this is "Reading the fuse and lock bits from software"

(but I agree that might not be the obvious place to find it - however it all comes down to the fact that the entire section hinges around the use of LPM/SPM and reading the bits is just one of the things it can be used for)