Initialization of Peripherals

Atmel START will generate one system_init() function initializing the system and all the peripherals.

Atmel START will generate one <driver_name>_init() function per peripheral, and these will be called by system_init(). The <driver_name>_init() functions are located in the <driver_name>.{c,h}-files, and configure each peripheral according to the choices made by the user in the Atmel START GUI.

For AVR devices with PRR registers, the system_init() function writes the PRR registers so that peripherals not configured in Atmel START are disabled. This is done to reduce the power consumption of unused peripherals, but is the opposite of the reset value of the PRR registers, which enables all peripherals.

Atmel START configures all unused IO pins to input with pull-ups enabled. This is done to reduce power-consumption.