28#include "periph_cpu.h"
66#define CLOCK_USE_PLL (0)
67#define CLOCK_USE_XOSC32_DFLL (1)
75#define GEN2_ULP32K (0)
79#define CLOCK_PLL_MUL (47U)
80#define CLOCK_PLL_DIV (1U)
82#define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
83#elif CLOCK_USE_XOSC32_DFLL
85#define CLOCK_CORECLOCK (48000000U)
86#define CLOCK_XOSC32K (32768UL)
92#define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
104 .pm_mask = PM_APBCMASK_TC0 | PM_APBCMASK_TC1,
105 .gclk_ctrl = GCLK_CLKCTRL_ID_TC0_TC1,
106#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
111 .flags = TC_CTRLA_MODE_COUNT32,
116 .pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
117 .gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
118#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
123 .flags = TC_CTRLA_MODE_COUNT32,
128#define TIMER_0_ISR isr_tc0
129#define TIMER_1_ISR isr_tc4
131#define TIMER_NUMOF ARRAY_SIZE(timer_config)
140 .
dev = &SERCOM3->USART,
143#ifdef MODULE_PERIPH_UART_HW_FC
154 .dev = &SERCOM4->USART,
157#ifdef MODULE_PERIPH_UART_HW_FC
168 .dev = &SERCOM0->USART,
171#ifdef MODULE_PERIPH_UART_HW_FC
184#define UART_0_ISR isr_sercom3
185#define UART_1_ISR isr_sercom4
186#define UART_2_ISR isr_sercom0
188#define UART_NUMOF ARRAY_SIZE(uart_config)
197 .
dev = &SERCOM0->SPI,
209 .dev = &SERCOM1->SPI,
221 .dev = &SERCOM5->SPI,
234#define SPI_NUMOF ARRAY_SIZE(spi_config)
243 .
dev = &(SERCOM2->I2CM),
252#define I2C_NUMOF ARRAY_SIZE(i2c_config)
260#define RTT_FREQUENCY (32768U)
282 .chan = pwm_chan0_config,
290#define PWM_NUMOF ARRAY_SIZE(pwm_config)
299#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV128
301#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
302#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
303#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
315#define ADC_NUMOF ARRAY_SIZE(adc_channels)
322#define DAC_CLOCK SAM0_GCLK_1MHZ
324#define DAC_VREF DAC_CTRLB_REFSEL_AVCC
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
#define ARRAY_SIZE(a)
Calculate the number of elements in a static array.
@ UART_PAD_RX_1
select pad 1
@ UART_PAD_RX_3
select pad 3
@ I2C_FLAG_NONE
No flags set.
#define TC_CONFIG(tim)
Static initializer for TC timer configuration.
@ SPI_PAD_MISO_0
use pad 0 for MISO line
@ UART_FLAG_NONE
No flags set.
@ UART_PAD_TX_0
select pad 0
@ UART_PAD_TX_2
select pad 2
@ GPIO_MUX_E
select peripheral function E
@ GPIO_MUX_D
select peripheral function D
@ GPIO_MUX_C
select peripheral function C
@ SPI_PAD_MOSI_2_SCK_3
use pad 2 for MOSI, pad 3 for SCK
@ SAM0_GCLK_1MHZ
1 MHz clock for xTimer
#define ADC_INPUTCTRL_MUXPOS_PA10
Alias for PIN18.
#define ADC_INPUTCTRL_MUXPOS_PA11
Alias for PIN19.
#define ADC_INPUTCTRL_MUXPOS_PB01
Alias for PIN9.
#define ADC_INPUTCTRL_MUXPOS_PA02
ADC pin aliases.
#define ADC_INPUTCTRL_MUXPOS_PA03
Alias for PIN1.
#define ADC_INPUTCTRL_MUXPOS_PB00
Alias for PIN8.
#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.
tc_tcc_cfg_t tim
timer configuration
SPI device configuration.
SPI_t * dev
pointer to the used SPI device
Timer device configuration.
Tc * dev
pointer to the used Timer device
UART device configuration.
USART_t * dev
pointer to the used UART device