23#include "periph_cpu.h"
33#ifndef CLOCK_CORECLOCK
34#define CLOCK_CORECLOCK MHZ(120)
42#define EXTERNAL_OSC32_SOURCE 1
43#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 0
50#define USE_VREG_BUCK (1)
60 .mclk = &MCLK->APBAMASK.reg,
61 .mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
62 .gclk_id = TC0_GCLK_ID,
64 .flags = TC_CTRLA_MODE_COUNT32,
69 .mclk = &MCLK->APBBMASK.reg,
70 .mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
71 .gclk_id = TC2_GCLK_ID,
73 .flags = TC_CTRLA_MODE_COUNT32,
78#define TIMER_0_CHANNELS 2
79#define TIMER_0_ISR isr_tc0
82#define TIMER_1_CHANNELS 2
83#define TIMER_1_ISR isr_tc2
85#define TIMER_NUMOF ARRAY_SIZE(timer_config)
109#define ISR_CAN0 isr_can0
112#define ISR_CAN1 isr_can1
115#define CAN_NUMOF ARRAY_SIZE(candev_conf)
124 .
dev = &SERCOM5->USART,
134 .dev = &SERCOM4->USART,
137#ifdef MODULE_PERIPH_UART_HW_FC
143#ifdef MODULE_PERIPH_UART_HW_FC
152 .dev = &SERCOM0->USART,
155#ifdef MODULE_PERIPH_UART_HW_FC
161#ifdef MODULE_PERIPH_UART_HW_FC
170 .dev = &SERCOM3->USART,
182#define UART_0_ISR isr_sercom5_2
183#define UART_0_ISR_TX isr_sercom5_0
185#define UART_1_ISR isr_sercom4_2
186#define UART_1_ISR_TX isr_sercom4_0
188#define UART_2_ISR isr_sercom0_2
189#define UART_2_ISR_TX isr_sercom0_0
191#define UART_3_ISR isr_sercom3_2
192#define UART_3_ISR_TX isr_sercom3_0
194#define UART_NUMOF ARRAY_SIZE(uart_config)
216 .chan = pwm_chan0_config,
218 .gclk_src = SAM0_GCLK_48MHZ,
223#define PWM_NUMOF ARRAY_SIZE(pwm_config)
232 .
dev = &SERCOM1->SPI,
242#ifdef MODULE_PERIPH_DMA
243 .tx_trigger = SERCOM1_DMAC_ID_TX,
244 .rx_trigger = SERCOM1_DMAC_ID_RX,
250#define SPI_NUMOF ARRAY_SIZE(spi_config)
259 .
dev = &SERCOM2->I2CM,
269#define I2C_NUMOF ARRAY_SIZE(i2c_config)
277#define RTT_FREQUENCY (32768U)
292 .device = &USB->DEVICE,
304#define ADC_GCLK_SRC SAM0_GCLK_PERIPH
305#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV8
307#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
308#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
329#define ADC_NUMOF ARRAY_SIZE(adc_channels)
337#define DAC_CLOCK SAM0_GCLK_TIMER
341#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
@ 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_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_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 ADC0_INPUTCTRL_MUXPOS_PA04
Alias for AIN4.
#define ADC0_INPUTCTRL_MUXPOS_PA07
Alias for AIN7.
#define ADC0_INPUTCTRL_MUXPOS_PA10
Alias for AIN10.
#define ADC1_INPUTCTRL_MUXPOS_PB05
Alias for AIN7.
#define ADC1_INPUTCTRL_MUXPOS_PB04
Alias for AIN6.
#define ADC0_INPUTCTRL_MUXPOS_PB01
Alias for AIN13.
#define ADC0_INPUTCTRL_MUXPOS_PB03
Alias for AIN15.
#define ADC0_INPUTCTRL_MUXPOS_PB08
Alias for AIN2.
#define ADC0_INPUTCTRL_MUXPOS_PA11
Alias for AIN11.
#define ADC0_INPUTCTRL_MUXPOS_PB00
Alias for AIN12.
#define ADC1_INPUTCTRL_MUXPOS_PB07
Alias for AIN9.
#define ADC0_INPUTCTRL_MUXPOS_PA03
Alias for AIN1.
#define ADC0_INPUTCTRL_MUXPOS_PB09
Alias for AIN3.
#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
ESP CAN device configuration.
Linux candev configuration.
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