periph_conf_atmega_common.h File Reference

Common configuration of MCU periphery for ATmega boards. More...

Detailed Description

#include "periph_cpu.h"
+ Include dependency graph for periph_conf_atmega_common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Clock configuration

#define CLOCK_CORECLOCK   (16000000UL)
 

Timer configuration

Only the 16 bit timers are used by xtimer

ATmega256RFR2

The timer driver only supports the four 16-bit timers (Timer1, TST, Timer3, Timer4, Timer5), so those are the Timer we can use here. Timer 1, TST, PORT B5/6/7 Out, Port D4/6 In, Analog Comparator Input Capture, Output Compare Modulator, PWM Timer 3, TST, PORT E3/4/5 Out, Port E/6/7 In, Input or Output Compare and PWM Output Timer 4, TST, It can not be connected to any I/O Pin, Timer 5, TST, It can not be connected to any I/O Pin,

Using Atmel Timer 4 and 5 seems to be the best choice Using Atmel Timer 4 as Xtimer and Atmel Timer 5 as timer available for the the application seems to be the best choice, as the special functions of the other timer are not lost. Atmel Timer1 to be used as PWM timer for RGB LED

ATmega328p

The timer driver only supports the 16-bit timer (Timer1) so this is the only one we can use here.

ATmega1281

The ATmega1281 has 6 timers. Timer0 and Timer2 are 8 Bit Timers, Timer0 has special uses too and therefore we'll avoid using it.

The timer driver only supports the four 16-bit timers (Timer1, Timer3, Timer4, Timer5), so those are the only ones we can use here.

ATmega1284P

The ATmega1284P has 4 timers. Timer0 and Timer2 are 8 Bit Timers.

The timer driver only supports the two 16-bit timers (Timer1 and Timer3), so those are the only ones we can use here.

ATmega2560

The timer driver only supports the four 16-bit timers (Timer1, Timer3, Timer4, Timer5), so those are the only onces we can use here.

ATmega32U4

The ATmega32U4 has 4 timers. Timer0 and Timer2 are 8 Bit Timers.

The timer driver only supports the two 16-bit timers (Timer1 and Timer3), so those are the only ones we can use here.

#define TIMER_NUMOF   (0U)