periph_conf.h File Reference

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

Detailed Description

Configuration of CPU peripherals for the STK3700 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 "periph_cpu.h"
#include "em_cmu.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
 

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
 
static const i2c_conf_t i2c_config []
 

PWM configuration

#define PWM_DEV_NUMOF   ARRAY_SIZE(pwm_config)
 
#define PWM_NUMOF   ARRAY_SIZE(pwm_channel_config)
 
static const pwm_chan_conf_t pwm_channel_config []
 
static const pwm_conf_t pwm_config []
 

RTC configuration

#define RTC_NUMOF   (1U)
 

RTT configuration

#define RTT_NUMOF   (1U)
 
#define RTT_MAX_VALUE   (0xFFFFFF)
 
#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_timer1
 
static const timer_conf_t timer_config []
 

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
#define UART_0_ISR_RX   isr_uart0_rx
 
#define UART_1_ISR_RX   isr_usart1_rx
 
#define UART_2_ISR_RX   isr_leuart0
 
static const uart_conf_t uart_config []
 

Variable Documentation

◆ adc_channel_config

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

Definition at line 60 of file periph_conf.h.

◆ adc_config

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

Definition at line 53 of file periph_conf.h.

◆ dac_channel_config

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

Definition at line 90 of file periph_conf.h.

◆ dac_config

const dac_conf_t dac_config[]
static
Initial value:
= {
{
.dev = DAC0,
.cmu = cmuClock_DAC0,
}
}

Definition at line 83 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = I2C0,
.sda_pin = GPIO_PIN(PD, 6),
.scl_pin = GPIO_PIN(PD, 7),
.loc = I2C_ROUTE_LOCATION_LOC1,
.cmu = cmuClock_I2C0,
.irq = I2C0_IRQn,
},
{
.dev = I2C1,
.sda_pin = GPIO_PIN(PC, 4),
.scl_pin = GPIO_PIN(PC, 5),
.loc = I2C_ROUTE_LOCATION_LOC0,
.cmu = cmuClock_I2C1,
.irq = I2C1_IRQn,
}
}
port C
Definition: periph_cpu.h:89
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: ~100kbit/s
Definition: periph_cpu.h:116

Definition at line 106 of file periph_conf.h.

◆ pwm_channel_config

const pwm_chan_conf_t pwm_channel_config[]
static
Initial value:
= {
{
.index = 2,
.pin = GPIO_PIN(PE, 2),
.loc = TIMER_ROUTE_LOCATION_LOC1
}
}
port E
Definition: periph_cpu.h:91
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35

Definition at line 136 of file periph_conf.h.

◆ pwm_config

const pwm_conf_t pwm_config[]
static
Initial value:
= {
{
.dev = TIMER3,
.cmu = cmuClock_TIMER3,
.irq = TIMER3_IRQn,
.channels = 1,
.channel = pwm_channel_config
}
}

Definition at line 144 of file periph_conf.h.

◆ spi_config

const spi_dev_t spi_config[]
static
Initial value:
= {
{
.dev = USART1,
.mosi_pin = GPIO_PIN(PD, 0),
.miso_pin = GPIO_PIN(PD, 1),
.clk_pin = GPIO_PIN(PD, 2),
.loc = USART_ROUTE_LOCATION_LOC1,
.cmu = cmuClock_USART1,
.irq = USART1_RX_IRQn
},
{
.dev = USART2,
.mosi_pin = GPIO_UNDEF,
.miso_pin = GPIO_PIN(PC, 3),
.clk_pin = GPIO_PIN(PC, 4),
.loc = USART_ROUTE_LOCATION_LOC0,
.cmu = cmuClock_USART2,
.irq = USART2_RX_IRQn
}
}
port C
Definition: periph_cpu.h:89
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

Definition at line 179 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{
{
.dev = TIMER0,
.cmu = cmuClock_TIMER0
},
{
.dev = TIMER1,
.cmu = cmuClock_TIMER1
},
.irq = TIMER1_IRQn
}
}

Definition at line 209 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = UART0,
.rx_pin = GPIO_PIN(PE, 1),
.tx_pin = GPIO_PIN(PE, 0),
.loc = UART_ROUTE_LOCATION_LOC1,
.cmu = cmuClock_UART0,
.irq = UART0_RX_IRQn
},
{
.dev = USART1,
.rx_pin = GPIO_PIN(PD, 1),
.tx_pin = GPIO_PIN(PD, 0),
.loc = USART_ROUTE_LOCATION_LOC1,
.cmu = cmuClock_USART1,
.irq = USART1_RX_IRQn
},
{
.dev = LEUART0,
.rx_pin = GPIO_PIN(PD, 5),
.tx_pin = GPIO_PIN(PD, 4),
.loc = LEUART_ROUTE_LOCATION_LOC0,
.cmu = cmuClock_LEUART0,
.irq = LEUART0_IRQn
}
}
port E
Definition: periph_cpu.h:91
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

Definition at line 231 of file periph_conf.h.