2.4.1.2 Pin Override

The AVR microcontrollers are using the I/O PORT pins for basic operations (I/O access) and peripherals. The megaAVR microcontroller uses Alternate Port Function registers to switch between the two functionalities. It is the user’s responsibility to properly configure the Alternate Port Function registers when the I/O pins are used by a peripheral.

For the AVR Dx devices, the peripheral configuration overwrites the basic functionality of the GPIO pin when the peripheral is enabled and uses the I/O pin. There are some peripherals (i.e., Timers, CCL, SPI) that do not mandatory require an I/O pin when they are used; the features of those peripherals are available internally as inputs to other peripherals (i.e., Event System, Interrupt, CCL) and/or for software access. In this case, an additional output enable option is provided into the peripheral configuration registers.