22#include "periph_cpu.h"
32#ifndef CLOCK_CORECLOCK
33#define CLOCK_CORECLOCK MHZ(120)
41#define EXTERNAL_OSC32_SOURCE 0
42#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 1
49#define USE_VREG_BUCK (1)
59 .mclk = &MCLK->APBAMASK.reg,
60 .mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
61 .gclk_id = TC0_GCLK_ID,
63 .flags = TC_CTRLA_MODE_COUNT32,
68 .mclk = &MCLK->APBBMASK.reg,
69 .mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
70 .gclk_id = TC2_GCLK_ID,
72 .flags = TC_CTRLA_MODE_COUNT32,
77#define TIMER_0_CHANNELS 2
78#define TIMER_0_ISR isr_tc0
81#define TIMER_1_CHANNELS 2
82#define TIMER_1_ISR isr_tc2
84#define TIMER_NUMOF ARRAY_SIZE(timer_config)
93 .
dev = &SERCOM3->USART,
96#ifdef MODULE_PERIPH_UART_HW_FC
109#define UART_0_ISR isr_sercom3_2
110#define UART_0_ISR_TX isr_sercom3_0
112#define UART_NUMOF ARRAY_SIZE(uart_config)
133 .chan = pwm_chan0_config,
141#define PWM_NUMOF ARRAY_SIZE(pwm_config)
150 .
dev = &(SERCOM1->SPI),
160#ifdef MODULE_PERIPH_DMA
161 .tx_trigger = SERCOM1_DMAC_ID_TX,
162 .rx_trigger = SERCOM1_DMAC_ID_RX,
165#ifdef MODULE_PERIPH_SPI_ON_QSPI
177#ifdef MODULE_PERIPH_DMA
178 .tx_trigger = QSPI_DMAC_ID_TX,
179 .rx_trigger = QSPI_DMAC_ID_RX,
185#define SPI_NUMOF ARRAY_SIZE(spi_config)
194 .
dev = &(SERCOM2->I2CM),
204#define I2C_NUMOF ARRAY_SIZE(i2c_config)
212#define RTT_FREQUENCY (32768U)
225 .device = &USB->DEVICE,
237#define ADC_GCLK_SRC SAM0_GCLK_PERIPH
238#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV8
240#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
241#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
253#define ADC_NUMOF ARRAY_SIZE(adc_channels)
261#define DAC_CLOCK SAM0_GCLK_TIMER
265#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
#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_D
select peripheral function D
@ 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 SAM0_GCLK_MAIN
120 MHz main clock
#define ADC0_INPUTCTRL_MUXPOS_PA04
Alias for AIN4.
#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 ADC0_INPUTCTRL_MUXPOS_PB08
Alias for AIN2.
#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
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