23 #include "periph_cpu.h"
32 #define CLOCK_CORECLOCK (16000000U)
38 #define USE_VREG_BUCK (1)
48 .mclk = &MCLK->APBCMASK.reg,
49 .mclk_mask = MCLK_APBCMASK_TC0 | MCLK_APBCMASK_TC1,
50 .gclk_id = TC0_GCLK_ID,
52 .flags = TC_CTRLA_MODE_COUNT32,
57 .mclk = &MCLK->APBCMASK.reg,
58 .mclk_mask = MCLK_APBCMASK_TC2,
59 .gclk_id = TC2_GCLK_ID,
61 .flags = TC_CTRLA_MODE_COUNT16,
66 #define TIMER_0_CHANNELS 2
67 #define TIMER_0_ISR isr_tc0
70 #define TIMER_1_CHANNELS 2
71 #define TIMER_1_ISR isr_tc2
72 #define TIMER_1_MAX_VALUE 0xffff
74 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
83 .
dev = &SERCOM2->USART,
86 #ifdef MODULE_PERIPH_UART_HW_FC
97 .dev = &SERCOM1->USART,
100 #ifdef MODULE_PERIPH_UART_HW_FC
113 #define UART_0_ISR isr_sercom2_2
114 #define UART_0_ISR_TX isr_sercom2_0
115 #define UART_1_ISR isr_sercom1_2
116 #define UART_1_ISR_TX isr_sercom1_0
118 #define UART_NUMOF ARRAY_SIZE(uart_config)
148 .chan = pwm_chan0_config,
156 .chan = pwm_chan1_config,
164 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
173 .
dev = &(SERCOM0->SPI),
183 #ifdef MODULE_PERIPH_DMA
184 .tx_trigger = SERCOM0_DMAC_ID_TX,
185 .rx_trigger = SERCOM0_DMAC_ID_RX,
190 #define SPI_NUMOF ARRAY_SIZE(spi_config)
199 .
dev = &(SERCOM1->I2CM),
209 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
216 #define EXTERNAL_OSC32_SOURCE 1
217 #define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 0
224 #ifndef RTT_FREQUENCY
225 #define RTT_FREQUENCY (32768U)
235 #define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV256
237 #define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
238 #define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC2
242 {
GPIO_PIN(
PA, 10), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN8)},
245 #define ADC_NUMOF ARRAY_SIZE(adc_channels)
252 #define DAC_CLOCK SAM0_GCLK_32KHZ
254 #define DAC_VREF DAC_CTRLB_REFSEL_AVCC