27#include "periph_cpu.h"
64#define CLOCK_USE_PLL (1)
68#define CLOCK_PLL_MUL (47U)
69#define CLOCK_PLL_DIV (1U)
70#define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
75#define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
87 .pm_mask = PM_APBCMASK_TC3,
88 .gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
89#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
94 .flags = TC_CTRLA_MODE_COUNT16,
99 .pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
100 .gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
101#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
106 .flags = TC_CTRLA_MODE_COUNT32,
110#define TIMER_0_MAX_VALUE 0xffff
113#define TIMER_0_ISR isr_tc3
114#define TIMER_1_ISR isr_tc4
116#define TIMER_NUMOF ARRAY_SIZE(timer_config)
125 .
dev = &SERCOM4->USART,
137#define UART_0_ISR isr_sercom4
139#define UART_NUMOF ARRAY_SIZE(uart_config)
148 .
dev = &SERCOM0->SPI,
158#ifdef MODULE_PERIPH_DMA
159 .tx_trigger = SERCOM0_DMAC_ID_TX,
160 .rx_trigger = SERCOM0_DMAC_ID_RX,
165#define SPI_NUMOF ARRAY_SIZE(spi_config)
174 .
dev = &(SERCOM2->I2CM),
183#define I2C_NUMOF ARRAY_SIZE(i2c_config)
191#define RTT_FREQUENCY (32768U)
199#define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
201#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
202#define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
203#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
218#define ADC_NUMOF ARRAY_SIZE(adc_channels)
230 .device = &USB->DEVICE,
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
@ UART_PAD_RX_1
select pad 1
@ I2C_FLAG_NONE
No flags set.
@ SPI_PAD_MISO_1
use pad 1 for MISO line
@ UART_FLAG_NONE
No flags set.
@ UART_PAD_TX_0
select pad 0
@ GPIO_MUX_D
select peripheral function D
@ GPIO_MUX_G
select peripheral function G
@ SPI_PAD_MOSI_2_SCK_3
use pad 2 for MOSI, pad 3 for SCK
#define ADC_INPUTCTRL_MUXPOS_PA05
Alias for PIN5.
#define ADC_INPUTCTRL_MUXPOS_PB08
Alias for PIN2.
@ SAM0_GCLK_1MHZ
1 MHz clock for xTimer
#define ADC_INPUTCTRL_MUXPOS_PA08
Alias for PIN16.
#define ADC_INPUTCTRL_MUXPOS_PB09
Alias for PIN3.
#define ADC_INPUTCTRL_MUXPOS_PA09
Alias for PIN17.
#define ADC_INPUTCTRL_MUXPOS_PA07
Alias for PIN7.
#define ADC_INPUTCTRL_MUXPOS_PA04
Alias for PIN4.
#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.
USB peripheral parameters.
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