boards/saml21-xpro/include/periph_conf.h File Reference

Peripheral MCU configuration for the Atmel SAM L21 Xplained Pro board. More...

Detailed Description

#include "periph_cpu.h"
+ Include dependency graph for boards/saml21-xpro/include/periph_conf.h:

Go to the source code of this file.

Macros

#define CLOCK_CORECLOCK   (16000000U)
 GCLK reference speed.
 
Timer peripheral configuration
#define TIMER_NUMOF   (1U)
 
#define TIMER_0_EN   1
 
#define TIMER_0_DEV   TC0->COUNT32
 
#define TIMER_0_CHANNELS   1
 
#define TIMER_0_MAX_VALUE   (0xffffffff)
 
#define TIMER_0_ISR   isr_tc0
 
I2C configuration
#define I2C_NUMOF   (1U)
 
#define I2C_0_EN   1
 
#define I2C_1_EN   0
 
#define I2C_2_EN   0
 
#define I2C_3_EN   0
 
#define I2C_IRQ_PRIO   1
 
#define I2C_0_DEV   SERCOM2->I2CM
 
#define I2C_0_IRQ   SERCOM2_IRQn
 
#define I2C_0_ISR   isr_sercom2
 
#define I2C_0_GCLK_ID   SERCOM2_GCLK_ID_CORE
 
#define I2C_0_GCLK_ID_SLOW   SERCOM2_GCLK_ID_SLOW
 
#define I2C_0_SDA   GPIO_PIN(PA, 8)
 
#define I2C_0_SCL   GPIO_PIN(PA, 9)
 
#define I2C_0_MUX   GPIO_MUX_D
 
RTC configuration
#define RTC_NUMOF   (1)
 
#define EXTERNAL_OSC32_SOURCE   1
 
#define INTERNAL_OSC32_SOURCE   0
 
#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE   0
 
RTT configuration
#define RTT_FREQUENCY   (32768U)
 
#define RTT_MAX_VALUE   (0xffffffffU)
 
#define RTT_NUMOF   (1)
 

UART configuration

#define UART_0_ISR   isr_sercom3
 
#define UART_1_ISR   isr_sercom4
 
#define UART_NUMOF   (sizeof(uart_config) / sizeof(uart_config[0]))
 
static const uart_conf_t uart_config []
 

SPI configuration

#define SPI_NUMOF   (sizeof(spi_config) / sizeof(spi_config[0]))
 
static const spi_conf_t spi_config []
 

ADC Configuration

#define ADC_NUMOF   (3U)
 
#define ADC_0_CLK_SOURCE   0 /* GCLK_GENERATOR_0 */
 
#define ADC_0_PRESCALER   ADC_CTRLB_PRESCALER_DIV256
 
#define ADC_0_NEG_INPUT   ADC_INPUTCTRL_MUXNEG(0x18u)
 
#define ADC_0_REF_DEFAULT   ADC_REFCTRL_REFSEL_INTVCC2
 
static const adc_conf_chan_t adc_channels []
 

Variable Documentation

◆ adc_channels

const adc_conf_chan_t adc_channels[]
static
Initial value:
= {
{GPIO_PIN(PA, 10), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN18)},
{GPIO_PIN(PA, 11), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN19)},
{GPIO_PIN(PA, 2), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN0)}
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.

Definition at line 159 of file boards/saml21-xpro/include/periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = &(SERCOM0->SPI),
.miso_pin = GPIO_PIN(PA, 4),
.mosi_pin = GPIO_PIN(PA, 6),
.clk_pin = GPIO_PIN(PA, 7),
.miso_mux = GPIO_MUX_D,
.mosi_mux = GPIO_MUX_D,
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
}
}
select peripheral function D
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
use pad 2 for MOSI, pad 3 for SCK

Definition at line 89 of file boards/saml21-xpro/include/periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = &SERCOM3->USART,
.rx_pin = GPIO_PIN(PA,23),
.tx_pin = GPIO_PIN(PA,22),
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_PCHCTRL_GEN_GCLK0
},
{
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB, 9),
.tx_pin = GPIO_PIN(PB, 8),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_PCHCTRL_GEN_GCLK0
}
}
select peripheral function D
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
select peripheral function C

Definition at line 55 of file boards/saml21-xpro/include/periph_conf.h.