periph_conf.h File Reference

Configuration of CPU peripherals for the Microchip SAM E54 Xplained Pro board. More...

Detailed Description

Configuration of CPU peripherals for the Microchip SAM E54 Xplained Pro board.

Author
Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com

Definition in file periph_conf.h.

#include "periph_cpu.h"
+ Include dependency graph for periph_conf.h:

Go to the source code of this file.

#define CLOCK_CORECLOCK   (120000000U)
 GCLK reference speed.
 

Timer peripheral configuration

#define TIMER_0_CHANNELS   2
 
#define TIMER_0_ISR   isr_tc0
 
#define TIMER_1_CHANNELS   2
 
#define TIMER_1_ISR   isr_tc2
 
#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
static const tc32_conf_t timer_config []
 

UART configuration

#define UART_0_ISR   isr_sercom2_2
 
#define UART_0_ISR_TX   isr_sercom2_0
 
#define UART_1_ISR   isr_sercom0_2
 
#define UART_1_ISR_TX   isr_sercom0_0
 
#define UART_2_ISR   isr_sercom5_2
 
#define UART_2_ISR_TX   isr_sercom5_0
 
#define UART_3_ISR   isr_sercom1_2
 
#define UART_3_ISR_TX   isr_sercom1_0
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

SPI configuration

#define SPI_NUMOF   ARRAY_SIZE(spi_config)
 
static const spi_conf_t spi_config []
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
static const i2c_conf_t i2c_config []
 

RTC configuration

#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)
 

USB peripheral configuration

static const sam0_common_usb_config_t sam_usbdev_config []
 

DAC configuration

#define DAC_CLOCK   SAM0_GCLK_8MHZ
 
#define DAC_VREF   DAC_CTRLB_REFSEL_VREFPU
 

Variable Documentation

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = &(SERCOM3->I2CM),
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PA, 23),
.sda_pin = GPIO_PIN(PA, 22),
.mux = GPIO_MUX_C,
.gclk_src = SAM0_GCLK_48MHZ,
.flags = I2C_FLAG_NONE
},
{
.dev = &(SERCOM7->I2CM),
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PD, 9),
.sda_pin = GPIO_PIN(PD, 8),
.mux = GPIO_MUX_C,
.gclk_src = SAM0_GCLK_48MHZ,
.flags = I2C_FLAG_NONE
}
}
No flags set.
port A
Definition: periph_cpu.h:87
48 MHz DFLL clock
Definition: periph_cpu.h:61
select peripheral function C
port D
Definition: periph_cpu.h:90
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
normal mode: ~100 kbit/s
Definition: i2c.h:183

Definition at line 190 of file periph_conf.h.

◆ sam_usbdev_config

const sam0_common_usb_config_t sam_usbdev_config[]
static
Initial value:
= {
{
.dm = GPIO_PIN(PA, 24),
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_H,
.device = &USB->DEVICE,
.gclk_src = SAM0_GCLK_48MHZ,
}
}
port A
Definition: periph_cpu.h:87
48 MHz DFLL clock
Definition: periph_cpu.h:61
select peripheral function H
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35

Definition at line 236 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = &(SERCOM4->SPI),
.miso_pin = GPIO_PIN(PB, 29),
.mosi_pin = GPIO_PIN(PB, 27),
.clk_pin = GPIO_PIN(PB, 26),
.miso_mux = GPIO_MUX_D,
.mosi_mux = GPIO_MUX_D,
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = SAM0_GCLK_48MHZ,
},
{
.dev = &(SERCOM6->SPI),
.miso_pin = GPIO_PIN(PC, 7),
.mosi_pin = GPIO_PIN(PC, 4),
.clk_pin = GPIO_PIN(PC, 5),
.miso_mux = GPIO_MUX_C,
.mosi_mux = GPIO_MUX_C,
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = SAM0_GCLK_48MHZ,
}
}
select peripheral function D
port B
Definition: periph_cpu.h:88
port C
Definition: periph_cpu.h:89
48 MHz DFLL clock
Definition: periph_cpu.h:61
select peripheral function C
use pad 0 for MISO line
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
use pad 0 for MOSI, pad 1 for SCK

Definition at line 155 of file periph_conf.h.

◆ timer_config

const tc32_conf_t timer_config[]
static
Initial value:
= {
{
.dev = TC0,
.irq = TC0_IRQn,
.mclk = &MCLK->APBAMASK.reg,
.mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = SAM0_GCLK_8MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
.flags = TC_CTRLA_MODE_COUNT32,
},
{
.dev = TC2,
.irq = TC2_IRQn,
.mclk = &MCLK->APBBMASK.reg,
.mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
.gclk_id = TC2_GCLK_ID,
.gclk_src = SAM0_GCLK_8MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
.flags = TC_CTRLA_MODE_COUNT32,
}
}
8 MHz clock for xTimer
Definition: periph_cpu.h:60

Definition at line 38 of file periph_conf.h.