23#include "periph_cpu.h"
36#define USE_XOSC_ONLY (0)
43#define XOSC1_FREQUENCY MHZ(12)
50#ifndef CLOCK_CORECLOCK
52#define CLOCK_CORECLOCK XOSC1_FREQUENCY
54#define CLOCK_CORECLOCK MHZ(120)
63#define EXTERNAL_OSC32_SOURCE 1
64#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 0
71#define USE_VREG_BUCK (1)
81 .mclk = &MCLK->APBAMASK.reg,
82 .mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
83 .gclk_id = TC0_GCLK_ID,
85 .flags = TC_CTRLA_MODE_COUNT32,
90 .mclk = &MCLK->APBBMASK.reg,
91 .mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
92 .gclk_id = TC2_GCLK_ID,
94 .flags = TC_CTRLA_MODE_COUNT32,
99#define TIMER_0_CHANNELS 2
100#define TIMER_0_ISR isr_tc0
103#define TIMER_1_CHANNELS 2
104#define TIMER_1_ISR isr_tc2
106#define TIMER_NUMOF ARRAY_SIZE(timer_config)
124#define ISR_CAN1 isr_can1
127#define CAN_NUMOF ARRAY_SIZE(candev_conf)
136 .dev = &SERCOM2->USART,
146 .dev = &SERCOM0->USART,
149#ifdef MODULE_PERIPH_UART_HW_FC
155#ifdef MODULE_PERIPH_UART_HW_FC
164 .dev = &SERCOM5->USART,
174 .dev = &SERCOM1->USART,
186#define UART_0_ISR isr_sercom2_2
187#define UART_0_ISR_TX isr_sercom2_0
189#define UART_1_ISR isr_sercom0_2
190#define UART_1_ISR_TX isr_sercom0_0
192#define UART_2_ISR isr_sercom5_2
193#define UART_2_ISR_TX isr_sercom5_0
195#define UART_3_ISR isr_sercom1_2
196#define UART_3_ISR_TX isr_sercom1_0
198#define UART_NUMOF ARRAY_SIZE(uart_config)
220 .chan = pwm_chan0_config,
222 .gclk_src = SAM0_GCLK_48MHZ,
227#define PWM_NUMOF ARRAY_SIZE(pwm_config)
236 .dev = &(SERCOM4->SPI),
246#ifdef MODULE_PERIPH_DMA
247 .tx_trigger = SERCOM4_DMAC_ID_TX,
248 .rx_trigger = SERCOM4_DMAC_ID_RX,
253 .dev = &(SERCOM6->SPI),
262 .gclk_src = SAM0_GCLK_48MHZ,
263#ifdef MODULE_PERIPH_DMA
264 .tx_trigger = SERCOM6_DMAC_ID_TX,
265 .rx_trigger = SERCOM6_DMAC_ID_RX,
268#ifdef MODULE_PERIPH_SPI_ON_QSPI
280#ifdef MODULE_PERIPH_DMA
281 .tx_trigger = QSPI_DMAC_ID_TX,
282 .rx_trigger = QSPI_DMAC_ID_RX,
288#define SPI_NUMOF ARRAY_SIZE(spi_config)
297 .dev = &(SERCOM3->I2CM),
306 .dev = &(SERCOM7->I2CM),
316#define I2C_NUMOF ARRAY_SIZE(i2c_config)
324#define RTT_FREQUENCY (32768U)
337 .device = &USB->DEVICE,
349#define ADC_GCLK_SRC SAM0_GCLK_PERIPH
350#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV8
352#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
353#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
362#define ADC_NUMOF ARRAY_SIZE(adc_channels)
370#define DAC_CLOCK SAM0_GCLK_TIMER
374#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
384#define SDHC_DEV SDHC1
385#define SDHC_DEV_ISR isr_sdhc1
397#define SDHC_CONFIG_NUMOF 1
#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
static const sdhc_conf_t sdhc_config[]
SDHC devices.
#define ARRAY_SIZE(a)
Calculate the number of elements in a static array.
@ UART_PAD_RX_1
select pad 1
@ I2C_FLAG_NONE
No flags set.
@ SPI_PAD_MISO_0
use pad 0 for MISO line
@ SPI_PAD_MISO_3
use pad 3 for MISO line
@ UART_FLAG_NONE
No flags set.
@ UART_PAD_TX_0_RTS_2_CTS_3
TX is pad 0, on top RTS on pad 2 and CTS on pad 3.
@ UART_PAD_TX_0
select pad 0
#define TCC_CONFIG(tim)
Static initializer for TCC timer configuration.
@ GPIO_MUX_H
select peripheral function H
@ GPIO_MUX_D
select peripheral function D
@ GPIO_MUX_C
select peripheral function C
@ GPIO_MUX_F
select peripheral function F
@ SPI_PAD_MOSI_0_SCK_1
use pad 0 for MOSI, pad 1 for SCK
#define SAM0_GCLK_MAIN
120 MHz main clock
#define ADC0_INPUTCTRL_MUXPOS_PA07
Alias for AIN7.
#define SAM0_QSPI_PIN_CLK
Clock
#define ADC0_INPUTCTRL_MUXPOS_PA05
Alias for AIN5.
#define SAM0_QSPI_PIN_DATA_0
D0 / MOSI
#define SAM0_QSPI_PIN_DATA_1
D1 / MISO
#define SAM0_QSPI_MUX
QSPI mux
#define ADC0_INPUTCTRL_MUXPOS_PA03
Alias for AIN1.
#define SAM0_GCLK_TIMER
4-8 MHz clock for xTimer
#define SAM0_GCLK_32KHZ
32 kHz clock
#define SAM0_GCLK_PERIPH
12-48 MHz (DFLL) clock
ADC Channel Configuration.
ESP CAN device configuration.
Linux candev configuration.
Frequency meter configuration.
I2C configuration structure.
PWM channel configuration data structure.
PWM device configuration.
Ethernet parameters struct.
USB peripheral parameters.
SDHC peripheral configuration.
SPI device configuration.
Timer device configuration.
UART device configuration.