ATmega168PA: When are fuses read?

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

Say I have a board where the AVR is wired up for programming via SPI. The first time the board is powered on I would like to program the clock fuses before uploading the rest of the firmware, but what do I have to do to make these changes take effect? Is it enough to e.g. pulse the reset line or does the AVR have to be power cycled?

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

Pulsing _reset should be enough for new fuse settings to take effect I would have thought (obviously the clock source has to be in-circuit already if you just changed from internal to external)

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

why not just set the fuses without loading the program (or load a dummy program) and then run another download and load the program.

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

RTFM or maybe RTFDS :) :

data sheet 27.2.1 Latching of Fuses wrote:
The fuse values are latched when the device enters programming mode and changes of the fuse values will have no effect until the part leaves Programming mode. This does not apply to the EESAVE Fuse which will take effect once it is programmed. The fuses are also latched on Power-up in Normal mode.