Loading...
Searching...
No Matches
periph_conf.h File Reference

Configuration of CPU peripherals for the SLSTK3701A starter kit. More...

Detailed Description

Configuration of CPU peripherals for the SLSTK3701A starter kit.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file periph_conf.h.

#include "cpu.h"
#include "mii.h"
#include "periph_cpu.h"
#include "em_cmu.h"
#include "usbdev_cfg_otg_fs.h"
+ Include dependency graph for periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Clock configuration

#define CLOCK_HF   cmuSelect_HFXO
 
#define CLOCK_CORE_DIV   cmuClkDiv_1
 
#define CLOCK_LFA   cmuSelect_LFXO
 
#define CLOCK_LFB   cmuSelect_LFXO
 
#define CLOCK_LFE   cmuSelect_LFXO
 

ADC configuration

#define ADC_DEV_NUMOF   ARRAY_SIZE(adc_config)
 
#define ADC_NUMOF   ARRAY_SIZE(adc_channel_config)
 
static const adc_conf_t adc_config []
 
static const adc_chan_conf_t adc_channel_config []
 

DAC configuration

#define DAC_DEV_NUMOF   ARRAY_SIZE(dac_config)
 
#define DAC_NUMOF   ARRAY_SIZE(dac_channel_config)
 
static const dac_conf_t dac_config []
 
static const dac_chan_conf_t dac_channel_config []
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
#define I2C_0_ISR   isr_i2c0
 
#define I2C_1_ISR   isr_i2c1
 
#define I2C_2_ISR   isr_i2c2
 
static const i2c_conf_t i2c_config []
 

RTT configuration

#define RTT_FREQUENCY   (1U)
 

SPI configuration

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

Timer configuration

The implementation uses two timers in cascade mode.

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
#define TIMER_0_ISR   isr_wtimer1
 
#define TIMER_1_ISR   isr_timer1
 
#define TIMER_2_ISR   isr_letimer0
 
static const timer_conf_t timer_config []
 

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
#define UART_0_ISR_RX   isr_usart4_rx
 
#define UART_1_ISR_RX   isr_usart5_rx
 
static const uart_conf_t uart_config []
 

Ethernet (RMII) configuration

The SLSTK3701A wires the EFM32GG11 ETH peripheral to a Microchip KSZ8091-RNDCA PHY at MIIM address 0.

static const eth_conf_t eth_config
 

Macro Definition Documentation

◆ ADC_DEV_NUMOF

#define ADC_DEV_NUMOF   ARRAY_SIZE(adc_config)

Definition at line 76 of file periph_conf.h.

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_channel_config)

Definition at line 77 of file periph_conf.h.

◆ CLOCK_CORE_DIV

#define CLOCK_CORE_DIV   cmuClkDiv_1

Definition at line 37 of file periph_conf.h.

◆ CLOCK_HF

#define CLOCK_HF   cmuSelect_HFXO

Definition at line 34 of file periph_conf.h.

◆ CLOCK_LFA

#define CLOCK_LFA   cmuSelect_LFXO

Definition at line 40 of file periph_conf.h.

◆ CLOCK_LFB

#define CLOCK_LFB   cmuSelect_LFXO

Definition at line 43 of file periph_conf.h.

◆ CLOCK_LFE

#define CLOCK_LFE   cmuSelect_LFXO

Definition at line 46 of file periph_conf.h.

◆ DAC_DEV_NUMOF

#define DAC_DEV_NUMOF   ARRAY_SIZE(dac_config)

Definition at line 99 of file periph_conf.h.

◆ DAC_NUMOF

#define DAC_NUMOF   ARRAY_SIZE(dac_channel_config)

Definition at line 100 of file periph_conf.h.

◆ I2C_0_ISR

#define I2C_0_ISR   isr_i2c0

Definition at line 144 of file periph_conf.h.

◆ I2C_1_ISR

#define I2C_1_ISR   isr_i2c1

Definition at line 145 of file periph_conf.h.

◆ I2C_2_ISR

#define I2C_2_ISR   isr_i2c2

Definition at line 146 of file periph_conf.h.

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 143 of file periph_conf.h.

◆ RTT_FREQUENCY

#define RTT_FREQUENCY   (1U)

Definition at line 154 of file periph_conf.h.

◆ SPI_NUMOF

#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Definition at line 187 of file periph_conf.h.

◆ TIMER_0_ISR

#define TIMER_0_ISR   isr_wtimer1

Definition at line 236 of file periph_conf.h.

◆ TIMER_1_ISR

#define TIMER_1_ISR   isr_timer1

Definition at line 237 of file periph_conf.h.

◆ TIMER_2_ISR

#define TIMER_2_ISR   isr_letimer0

Definition at line 238 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 235 of file periph_conf.h.

◆ UART_0_ISR_RX

#define UART_0_ISR_RX   isr_usart4_rx

Definition at line 267 of file periph_conf.h.

◆ UART_1_ISR_RX

#define UART_1_ISR_RX   isr_usart5_rx

Definition at line 268 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 266 of file periph_conf.h.

Variable Documentation

◆ adc_channel_config

const adc_chan_conf_t adc_channel_config[]
static
Initial value:
= {
{
.dev = 0,
.input = adcPosSelTEMP,
.reference = adcRef1V25,
.acq_time = adcAcqTime8
},
{
.dev = 0,
.input = adcPosSelAVDD,
.reference = adcRef5V,
.acq_time = adcAcqTime8
}
}

Definition at line 61 of file periph_conf.h.

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{
.dev = ADC0,
.cmu = cmuClock_ADC0,
}
}

Definition at line 54 of file periph_conf.h.

◆ dac_channel_config

const dac_chan_conf_t dac_channel_config[]
static
Initial value:
= {
{
.dev = 0,
.index = 0,
},
}

Definition at line 92 of file periph_conf.h.

◆ dac_config

const dac_conf_t dac_config[]
static
Initial value:
= {
{
.dev = VDAC0,
.ref = vdacRefAvdd,
.cmu = cmuClock_VDAC0,
},
}

Definition at line 84 of file periph_conf.h.

◆ eth_config

const eth_conf_t eth_config
static
Initial value:
= {
.phy_en_pin = GPIO_PIN(PI, 10),
.phy_rst_pin = GPIO_UNDEF,
.routeloc1 = ETH_ROUTELOC1_RMIILOC_LOC1 | ETH_ROUTELOC1_MDIOLOC_LOC1,
.phy_addr = 0,
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
#define MII_BMCR_FULL_DPLX
Set for full duplex.
Definition mii.h:65
#define MII_BMCR_SPEED_100
Set speed to 100 Mbps.
Definition mii.h:69

Definition at line 278 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static

Definition at line 107 of file periph_conf.h.

◆ spi_config

const spi_dev_t spi_config[]
static
Initial value:
= {
{
.dev = USART0,
.mosi_pin = GPIO_PIN(PE, 10),
.miso_pin = GPIO_PIN(PE, 11),
.clk_pin = GPIO_PIN(PE, 12),
.loc = USART_ROUTELOC0_TXLOC_LOC0 |
USART_ROUTELOC0_RXLOC_LOC0 |
USART_ROUTELOC0_CLKLOC_LOC0,
.cmu = cmuClock_USART0,
.irq = USART0_RX_IRQn
},
{
.dev = USART1,
.mosi_pin = GPIO_PIN(PA, 14),
.miso_pin = GPIO_PIN(PC, 2),
.clk_pin = GPIO_PIN(PC, 15),
.loc = USART_ROUTELOC0_TXLOC_LOC6 |
USART_ROUTELOC0_RXLOC_LOC4 |
USART_ROUTELOC0_CLKLOC_LOC3,
.cmu = cmuClock_USART1,
.irq = USART1_RX_IRQn
}
}
@ PC
port C
@ PA
port A

Definition at line 162 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static

Definition at line 196 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = USART4,
.rx_pin = GPIO_PIN(PH, 5),
.tx_pin = GPIO_PIN(PH, 4),
.loc = USART_ROUTELOC0_RXLOC_LOC4 |
USART_ROUTELOC0_TXLOC_LOC4,
.cmu = cmuClock_USART4,
.irq = USART4_RX_IRQn,
},
{
.dev = USART5,
.rx_pin = GPIO_PIN(PE, 9),
.tx_pin = GPIO_PIN(PE, 8),
.loc = USART_ROUTELOC0_RXLOC_LOC4 |
USART_ROUTELOC0_TXLOC_LOC4,
.cmu = cmuClock_USART5,
.irq = USART5_RX_IRQn,
}
}

Definition at line 245 of file periph_conf.h.