26 #include "periph_cpu.h"
63 #define CLOCK_USE_PLL (1)
67 #define CLOCK_PLL_MUL (47U)
68 #define CLOCK_PLL_DIV (1U)
69 #define CLOCK_CORECLOCK (((CLOCK_PLL_MUL + 1) * 1000000U) / CLOCK_PLL_DIV)
72 #define CLOCK_DIV (1U)
74 #define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
86 .pm_mask = PM_APBCMASK_TC3,
87 .gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
88 #if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
93 .flags = TC_CTRLA_MODE_COUNT16,
98 .pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
99 .gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
100 #if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
105 .flags = TC_CTRLA_MODE_COUNT32,
109 #define TIMER_0_MAX_VALUE 0xffff
112 #define TIMER_0_ISR isr_tc3
113 #define TIMER_1_ISR isr_tc4
115 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
124 .
dev = &SERCOM3->USART,
127 #ifdef MODULE_PERIPH_UART_HW_FC
138 .dev = &SERCOM4->USART,
141 #ifdef MODULE_PERIPH_UART_HW_FC
154 #define UART_0_ISR isr_sercom3
155 #define UART_1_ISR isr_sercom4
157 #define UART_NUMOF ARRAY_SIZE(uart_config)
166 .
dev = &SERCOM1->SPI,
176 #ifdef MODULE_PERIPH_DMA
177 .tx_trigger = SERCOM1_DMAC_ID_TX,
178 .rx_trigger = SERCOM1_DMAC_ID_RX,
183 #define SPI_NUMOF ARRAY_SIZE(spi_config)
191 .
dev = &(SERCOM0->I2CM),
200 .dev = &(SERCOM2->I2CM),
210 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
216 #ifndef RTT_FREQUENCY
217 #define RTT_FREQUENCY (32768U)
227 #define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
229 #define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
230 #define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
231 #define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
236 {
GPIO_PIN(
PA, 4), ADC_INPUTCTRL_MUXPOS_PIN4 },
237 {
GPIO_PIN(
PA, 5), ADC_INPUTCTRL_MUXPOS_PIN5 },
238 {
GPIO_PIN(
PA, 6), ADC_INPUTCTRL_MUXPOS_PIN6 },
239 {
GPIO_PIN(
PA, 7), ADC_INPUTCTRL_MUXPOS_PIN7 },
240 {
GPIO_PIN(
PA, 3), ADC_INPUTCTRL_MUXPOS_PIN1 },
241 {
GPIO_PIN(
PA, 2), ADC_INPUTCTRL_MUXPOS_PIN0 },
244 #define ADC_NUMOF ARRAY_SIZE(adc_channels)
256 .device = &USB->DEVICE,