25#ifndef PERIPH_CONF_COMMON_H
26#define PERIPH_CONF_COMMON_H
28#include "periph_cpu.h"
65#define CLOCK_USE_PLL (1)
69#define CLOCK_PLL_MUL (47U)
70#define CLOCK_PLL_DIV (1U)
72#define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
77#define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
89 .pm_mask = PM_APBCMASK_TC3,
90 .gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
91#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
96 .flags = TC_CTRLA_MODE_COUNT16,
101 .pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
102 .gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
103#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
108 .flags = TC_CTRLA_MODE_COUNT32,
112#define TIMER_0_MAX_VALUE 0xffff
115#define TIMER_0_ISR isr_tc3
116#define TIMER_1_ISR isr_tc4
118#define TIMER_NUMOF ARRAY_SIZE(timer_config)
144#define PWM_NUMOF ARRAY_SIZE(pwm_config)
153#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
155#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
156#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
157#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
170#define ADC_NUMOF ARRAY_SIZE(adc_channels)
179 .
dev = &(SERCOM0->I2CM),
188#define I2C_NUMOF ARRAY_SIZE(i2c_config)
196#define RTT_FREQUENCY (32768U)
209 .device = &USB->DEVICE,
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
#define ARRAY_SIZE(a)
Calculate the number of elements in a static array.
@ I2C_FLAG_NONE
No flags set.
#define TCC_CONFIG(tim)
Static initializer for TCC timer configuration.
@ GPIO_MUX_G
select peripheral function G
@ GPIO_MUX_C
select peripheral function C
@ GPIO_MUX_F
select peripheral function F
#define ADC_INPUTCTRL_MUXPOS_PA05
Alias for PIN5.
@ SAM0_GCLK_1MHZ
1 MHz clock for xTimer
#define ADC_INPUTCTRL_MUXPOS_PB02
Alias for PIN10.
#define ADC_INPUTCTRL_MUXPOS_PA07
Alias for PIN7.
#define ADC_INPUTCTRL_MUXPOS_PA04
Alias for PIN4.
#define ADC_INPUTCTRL_MUXPOS_PB03
Alias for PIN11.
#define ADC_INPUTCTRL_MUXPOS_PA06
Alias for PIN6.
#define ADC_INPUTCTRL_MUXPOS_PA02
ADC pin aliases.
#define SAM0_GCLK_MAIN
120 MHz main clock
ADC Channel Configuration.
uint32_t inputctrl
ADC channel pin multiplexer value
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
PWM channel configuration data structure.
PWM device configuration.
USB peripheral parameters.
Timer device configuration.
Tc * dev
pointer to the used Timer device