4.3.1 FUSES

FUSES - Configuration and User Fuses

4.3.1.1 Introduction

AVR® devices have Fuse registers that define the hardware configuration, such as instruction clock speed, watchdog timer, and debug mode. Fuse register bits, also referred to as configuration bits, are changed at programming time with a connected programmer. They are latched in place after the power-up and also at the programming of the device.

4.3.1.2 Supported Device Families

AVR® DxAVR® EAATmega16xx
ATmega48xxATmega80xATmega88xx

4.3.1.3 Required Header Files:

#include "mcc_generated_files/system/config_bits.h"

4.3.1.4 Sample Code

Note: The below code is an example code snippet and the values assigned to the Fuse bits will change, depending on the configuration in the Configuration Bits module.
FUSES = 
{
  .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
  .BOOTSIZE = 0x0,
  .CODESIZE = 0x0,
  .OSCCFG = CLKSEL_OSCHF_gc,
  .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
  .SYSCFG1 = SUT_0MS_gc,
  .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
}

4.3.1.5 Module Documentation

4.3.1.5.1 CONFIGBITS Driver

This file contains the API Prototypes for the Configuration Bits driver.

Module description

This file contains the API Prototypes for the Configuration Bits driver.

Version: Driver Version 1.0.6 Package Version 4.2.13

4.3.1.5.2 System Driver

This file contains the API prototype for the System Driver.

Module description

This file contains the API prototype for the System Driver.

Version: Driver Version 1.0.2 Package Version 4.2.13
Functions
  • void SYSTEM_Initialize (void)

    Initializes the System module. This routine is called only once during system initialization, before calling any other API.

Function Documentation

SYSTEM_Initialize()

void SYSTEM_Initialize (void )

Initializes the System module. This routine is called only once during system initialization, before calling any other API.

Parameters:
None.
Returns:

None.

4.3.1.6 File Documentation

4.3.1.6.1 source/config_bits.c File Reference

This file contains the API implementation for the Device Configuration Bits driver.

#include <avr/io.h>

Detailed Description

This file contains the API implementation for the Device Configuration Bits driver.

CONFIGURATION BITS Generated Driver Source File

Version: Driver Version 1.0.6 Package Version 4.2.13

Variable Documentation

FUSES

FUSES

Initial value:

= 
{
  .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
  .BOOTSIZE = 0x0,
  .CODESIZE = 0x0,
  .OSCCFG = CLKSEL_OSCHF_gc,
  .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
  .SYSCFG1 = SUT_0MS_gc,
  .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
}

Configures the Fuse bits.

4.3.1.6.2 source/config_bits.h File Reference

#include "../system/clock.h"

Detailed Description

CONFIGURATION BITS Generated Driver Header File

4.3.1.6.3 source/system.c File Reference

This file contains the API implementation for the System driver.

#include "../system.h"

Functions

  • void SYSTEM_Initialize (void)

    Initializes the System module. This routine is called only once during system initialization, before calling any other API.

Detailed Description

This file contains the API implementation for the System driver.

System Driver Source File

Version: Driver Version 1.0.2 Package Version 4.2.13

4.3.1.6.4 source/system.h File Reference

#include "../system/utils/compiler.h"
#include "config_bits.h"
#include "../system/clock.h"
#include "../system/pins.h"
#include "../system/interrupt.h"

Functions

  • void SYSTEM_Initialize (void)

    Initializes the System module. This routine is called only once during system initialization, before calling any other API.

Detailed Description

System Driver Header File