24#include "periph_cpu.h"
34#ifndef CLOCK_CORECLOCK
35#define CLOCK_CORECLOCK MHZ(120)
43#define EXTERNAL_OSC32_SOURCE 1
44#define INTERNAL_OSC32_SOURCE 0
45#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 0
52#define USE_VREG_BUCK (1)
60#define ADC_GCLK_SRC SAM0_GCLK_PERIPH
61#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV8
63#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
64#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
86#define ADC_NUMOF ARRAY_SIZE(adc_channels)
94#define DAC_CLOCK SAM0_GCLK_TIMER
98#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
107 .
dev = &(SERCOM3->I2CM),
116 .dev = &(SERCOM6->I2CM),
126#define I2C_NUMOF ARRAY_SIZE(i2c_config)
147 .chan = pwm_chan0_config,
155#define PWM_NUMOF ARRAY_SIZE(pwm_config)
163#define RTT_FREQUENCY (32768U)
175 .mclk = &MCLK->APBAMASK.reg,
176 .mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
177 .gclk_id = TC0_GCLK_ID,
179 .flags = TC_CTRLA_MODE_COUNT32,
184 .mclk = &MCLK->APBBMASK.reg,
185 .mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
186 .gclk_id = TC2_GCLK_ID,
188 .flags = TC_CTRLA_MODE_COUNT32,
193#define TIMER_0_CHANNELS 2
194#define TIMER_0_ISR isr_tc0
197#define TIMER_1_CHANNELS 2
198#define TIMER_1_ISR isr_tc2
200#define TIMER_NUMOF ARRAY_SIZE(timer_config)
209 .
dev = &(SERCOM7->SPI),
219#ifdef MODULE_PERIPH_DMA
220 .tx_trigger = SERCOM7_DMAC_ID_TX,
221 .rx_trigger = SERCOM7_DMAC_ID_RX,
225 .dev = &(SERCOM2->SPI),
235#ifdef MODULE_PERIPH_DMA
236 .tx_trigger = SERCOM2_DMAC_ID_TX,
237 .rx_trigger = SERCOM2_DMAC_ID_RX,
240#ifdef MODULE_PERIPH_SPI_ON_QSPI
252#ifdef MODULE_PERIPH_DMA
253 .tx_trigger = QSPI_DMAC_ID_TX,
254 .rx_trigger = QSPI_DMAC_ID_RX,
260#define SPI_NUMOF ARRAY_SIZE(spi_config)
272 .device = &USB->DEVICE,
284 .
dev = &SERCOM0->USART,
287#ifdef MODULE_PERIPH_UART_HW_FC
298 .dev = &SERCOM4->USART,
301#ifdef MODULE_PERIPH_UART_HW_FC
312 .dev = &SERCOM1->USART,
315#ifdef MODULE_PERIPH_UART_HW_FC
328#define UART_0_ISR isr_sercom0_2
329#define UART_0_ISR_TX isr_sercom0_0
330#define UART_1_ISR isr_sercom4_2
331#define UART_1_ISR_TX isr_sercom4_0
332#define UART_2_ISR isr_sercom1_2
333#define UART_2_ISR_TX isr_sercom1_0
335#define UART_NUMOF ARRAY_SIZE(uart_config)
#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
#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
select pad 0
#define TCC_CONFIG(tim)
Static initializer for TCC timer configuration.
@ GPIO_MUX_H
select peripheral function H
@ GPIO_MUX_G
select peripheral function G
@ GPIO_MUX_C
select peripheral function C
@ SPI_PAD_MOSI_0_SCK_1
use pad 0 for MOSI, pad 1 for SCK
#define ADC1_INPUTCTRL_MUXPOS_PC03
Alias for AIN5.
#define SAM0_GCLK_MAIN
120 MHz main clock
#define ADC0_INPUTCTRL_MUXPOS_PA04
Alias for AIN4.
#define ADC0_INPUTCTRL_MUXPOS_PA07
Alias for AIN7.
#define ADC1_INPUTCTRL_MUXPOS_PC02
Alias for AIN4.
#define SAM0_QSPI_PIN_CLK
Clock
#define ADC1_INPUTCTRL_MUXPOS_PB05
Alias for AIN7.
#define ADC1_INPUTCTRL_MUXPOS_PB04
Alias for AIN6.
#define ADC1_INPUTCTRL_MUXPOS_PC00
Alias for AIN10.
#define ADC0_INPUTCTRL_MUXPOS_PA05
Alias for AIN5.
#define SAM0_QSPI_PIN_DATA_0
D0 / MOSI
#define ADC1_INPUTCTRL_MUXPOS_PC01
Alias for AIN11.
#define SAM0_QSPI_PIN_DATA_1
D1 / MISO
#define ADC0_INPUTCTRL_MUXPOS_PB03
Alias for AIN15.
#define ADC0_INPUTCTRL_MUXPOS_PB08
Alias for AIN2.
#define ADC1_INPUTCTRL_MUXPOS_PB07
Alias for AIN9.
#define SAM0_QSPI_MUX
QSPI mux
#define ADC0_INPUTCTRL_MUXPOS_PB09
Alias for AIN3.
#define ADC0_INPUTCTRL_MUXPOS_PA06
Alias for AIN6.
#define SAM0_GCLK_TIMER
4-8 MHz clock for xTimer
#define ADC0_INPUTCTRL_MUXPOS_PA02
ADC pin aliases.
#define SAM0_GCLK_PERIPH
12-48 MHz (DFLL) clock
#define ADC1_INPUTCTRL_MUXPOS_PB06
Alias for AIN8.
ADC Channel Configuration.
uint32_t inputctrl
ADC channel pin multiplexer value
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
PWM channel configuration data structure.
PWM device configuration.
tc_tcc_cfg_t tim
timer configuration
USB peripheral parameters.
SPI device configuration.
SPI_t * dev
pointer to the used SPI device
Timer device configuration.
Tc * dev
pointer to the used Timer device
UART device configuration.
USART_t * dev
pointer to the used UART device