28 #include "periph_cpu.h"
66 #define CLOCK_USE_PLL (1)
67 #define CLOCK_USE_XOSC32_DFLL (0)
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)
87 #define CLOCK_8MHZ (1)
90 #define CLOCK_DIV (1U)
92 #define CLOCK_CORECLOCK (8000000 / CLOCK_DIV)
104 .pm_mask = PM_APBCMASK_TC3,
105 .gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
106 #if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
111 .flags = TC_CTRLA_MODE_COUNT16,
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,
127 #define TIMER_0_MAX_VALUE 0xffff
130 #define TIMER_0_ISR isr_tc3
131 #define TIMER_1_ISR isr_tc4
133 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
142 .
dev = &SERCOM0->USART,
145 #ifdef MODULE_PERIPH_UART_HW_FC
151 #ifdef MODULE_PERIPH_UART_HW_FC
160 .dev = &SERCOM5->USART,
163 #ifdef MODULE_PERIPH_UART_HW_FC
169 #ifdef MODULE_PERIPH_UART_HW_FC
180 #define UART_0_ISR isr_sercom0
181 #define UART_1_ISR isr_sercom5
183 #define UART_NUMOF ARRAY_SIZE(uart_config)
222 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
231 .
dev = &SERCOM4->SPI,
241 #ifdef MODULE_PERIPH_DMA
242 .tx_trigger = SERCOM4_DMAC_ID_TX,
243 .rx_trigger = SERCOM4_DMAC_ID_RX,
247 .dev = &SERCOM5->SPI,
257 #ifdef MODULE_PERIPH_DMA
258 .tx_trigger = SERCOM5_DMAC_ID_TX,
259 .rx_trigger = SERCOM5_DMAC_ID_RX,
264 #define SPI_NUMOF ARRAY_SIZE(spi_config)
273 .
dev = &(SERCOM3->I2CM),
282 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
289 #ifndef RTT_FREQUENCY
290 #define RTT_FREQUENCY (32768U)
292 #define RTT_MIN_OFFSET (10U)
301 #define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512
303 #define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND
304 #define ADC_GAIN_FACTOR_DEFAULT ADC_INPUTCTRL_GAIN_1X
305 #define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INT1V
313 #define ADC_NUMOF ARRAY_SIZE(adc_channels)
325 .device = &USB->DEVICE,