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)
113#define AT6561_STBY_PIN GPIO_PIN(PC, 13)
129 .enable_pin_active_low =
true,
134#define ISR_CAN1 isr_can1
137#define CAN_NUMOF ARRAY_SIZE(candev_conf)
146 .dev = &SERCOM2->USART,
156 .dev = &SERCOM0->USART,
159#ifdef MODULE_PERIPH_UART_HW_FC
165#ifdef MODULE_PERIPH_UART_HW_FC
174 .dev = &SERCOM5->USART,
184 .dev = &SERCOM1->USART,
196#define UART_0_ISR isr_sercom2_2
197#define UART_0_ISR_TX isr_sercom2_0
199#define UART_1_ISR isr_sercom0_2
200#define UART_1_ISR_TX isr_sercom0_0
202#define UART_2_ISR isr_sercom5_2
203#define UART_2_ISR_TX isr_sercom5_0
205#define UART_3_ISR isr_sercom1_2
206#define UART_3_ISR_TX isr_sercom1_0
208#define UART_NUMOF ARRAY_SIZE(uart_config)
230 .chan = pwm_chan0_config,
232 .gclk_src = SAM0_GCLK_48MHZ,
237#define PWM_NUMOF ARRAY_SIZE(pwm_config)
246 .dev = &(SERCOM4->SPI),
256#ifdef MODULE_PERIPH_DMA
257 .tx_trigger = SERCOM4_DMAC_ID_TX,
258 .rx_trigger = SERCOM4_DMAC_ID_RX,
263 .dev = &(SERCOM6->SPI),
272 .gclk_src = SAM0_GCLK_48MHZ,
273#ifdef MODULE_PERIPH_DMA
274 .tx_trigger = SERCOM6_DMAC_ID_TX,
275 .rx_trigger = SERCOM6_DMAC_ID_RX,
278#ifdef MODULE_PERIPH_SPI_ON_QSPI
290#ifdef MODULE_PERIPH_DMA
291 .tx_trigger = QSPI_DMAC_ID_TX,
292 .rx_trigger = QSPI_DMAC_ID_RX,
298#define SPI_NUMOF ARRAY_SIZE(spi_config)
307 .dev = &(SERCOM3->I2CM),
316 .dev = &(SERCOM7->I2CM),
326#define I2C_NUMOF ARRAY_SIZE(i2c_config)
334#define RTT_FREQUENCY (32768U)
347 .device = &USB->DEVICE,
359#define ADC_GCLK_SRC SAM0_GCLK_PERIPH
360#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV8
362#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
363#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
372#define ADC_NUMOF ARRAY_SIZE(adc_channels)
380#define DAC_CLOCK SAM0_GCLK_TIMER
384#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
394#define SDHC_DEV SDHC1
395#define SDHC_DEV_ISR isr_sdhc1
407#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.
@ GPIO_OUT
select GPIO MASK as output
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
#define AT6561_STBY_PIN
ATA6561 STANDBY pin definition.
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.