Fuses are part of the nonvolatile memory and are used to configure system settings
such as clock source, start-up time, Flash sections, etc. Fuses can be read by both the
CPU and an external programmer, but only programmed or cleared by an external
programmer. Some registers are reset to a value stored in the fuses, such as oscillator
calibration. These values are written at the end of the start-up sequence. Thus, when
such a fuse is changed, the device must be reset before the change takes effect.
Fuses for peripheral configuration include:
- Watchdog Timer: Used to set the WDT window and
timeout period upon start-up, thus not requiring any code execution to
operate.
- Brown-out Detector: Used to set the
BOD level, sample frequency, Active and Standby operating mode, thus not
requiring any code execution to operate.
- 16/20 MHz Oscillator: Configures
whether the operating frequency should be 16 or 20 MHz. It is also possible to
lock the calibration registers after they are loaded with factory calibration
values.
- Timer/Counter D: Used to enable or
disable TCD output pins, and also to set the default state of the pins. This
fuse is only available for devices in the tinyAVR®
1-series.
- System Configuration 0: Used to
configure the CRCSCAN to run on start-up, and to select which Flash section to
check.
- System Configuration 1: Used to configure additional start-up time of the device.
- Application Code End: Used to configure the
size of the application code section.
- Boot End: Used to configure the size of the
boot section.
- Lockbits: Used to lock the device and
prevent an external programmer from accessing the fuses, Flash, SRAM and EEPROM.
Regular memory access from within the application still is enabled. A chip erase
must be executed to unlock a device.
Using fuses to set up, e.g., a WDT before any code is executed increases the
robustness of the system. This because corrupt Flash could cause a software-driven
configuration of the WDT to fail. Imagine that the instruction enabling the WDT is
corrupt and is not properly executed. The result is a system that misbehaves, and the
mechanisms to detect erroneous behavior is disabled. Therefore, enabling security
features using fuses is an advantage.
Enabling CRCSCAN using fuses allows the Flash to be scanned for errors
before any instruction has been fetched from Flash.
For more information, refer to the Fuses sub-section in the Memories chapter in the
Relevant Devices data sheet.