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

Configuration of CPU peripherals for xG23-PK6068A board. More...

Detailed Description

Configuration of CPU peripherals for xG23-PK6068A board.

Author
Juergen Fitschen me@ju.nosp@m.e.yt

Definition in file periph_conf.h.

#include <stdint.h>
#include "cpu.h"
#include "periph_cpu.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 HFXO_FREQ   (39000000UL)
 
#define CMU_HFXOINIT   CMU_HFXOINIT_DEFAULT
 
#define LFXO_FREQ   (32768UL)
 
#define CMU_LFXOINIT   CMU_LFXOINIT_DEFAULT
 
#define CLK_MUX_NUMOF   ARRAY_SIZE(clk_mux_config)
 
#define CLK_DIV_NUMOF   ARRAY_SIZE(clk_div_config)
 
static const clk_mux_t clk_mux_config []
 
static const clk_div_t clk_div_config []
 

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 []
 

I2C configuration

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

SPI configuration

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

Timer configuration

The implementation can use one low-energy timer or two regular timers in cascade mode.

#define TIMER_0_ISR   isr_timer0
 
#define TIMER_1_ISR   isr_letimer0
 
#define TIMER_0_MAX_VALUE   TIMER_MAX_VALUE
 
#define TIMER_1_MAX_VALUE   LETIMER_MAX_VALUE
 
#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
static const timer_conf_t timer_config []
 

UART configuration

#define UART_0_ISR_RX   isr_eusart1_rx
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

Macro Definition Documentation

◆ ADC_DEV_NUMOF

#define ADC_DEV_NUMOF   ARRAY_SIZE(adc_config)

Definition at line 86 of file periph_conf.h.

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_channel_config)

Definition at line 87 of file periph_conf.h.

◆ CLK_DIV_NUMOF

#define CLK_DIV_NUMOF   ARRAY_SIZE(clk_div_config)

Definition at line 55 of file periph_conf.h.

◆ CLK_MUX_NUMOF

#define CLK_MUX_NUMOF   ARRAY_SIZE(clk_mux_config)

Definition at line 48 of file periph_conf.h.

◆ CMU_HFXOINIT

#define CMU_HFXOINIT   CMU_HFXOINIT_DEFAULT

Definition at line 36 of file periph_conf.h.

◆ CMU_LFXOINIT

#define CMU_LFXOINIT   CMU_LFXOINIT_DEFAULT

Definition at line 39 of file periph_conf.h.

◆ HFXO_FREQ

#define HFXO_FREQ   (39000000UL)

Definition at line 35 of file periph_conf.h.

◆ I2C_0_ISR

#define I2C_0_ISR   isr_i2c0

Definition at line 106 of file periph_conf.h.

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 105 of file periph_conf.h.

◆ LFXO_FREQ

#define LFXO_FREQ   (32768UL)

Definition at line 38 of file periph_conf.h.

◆ SPI_NUMOF

#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Definition at line 124 of file periph_conf.h.

◆ TIMER_0_ISR

#define TIMER_0_ISR   isr_timer0

Definition at line 147 of file periph_conf.h.

◆ TIMER_0_MAX_VALUE

#define TIMER_0_MAX_VALUE   TIMER_MAX_VALUE

Definition at line 150 of file periph_conf.h.

◆ TIMER_1_ISR

#define TIMER_1_ISR   isr_letimer0

Definition at line 148 of file periph_conf.h.

◆ TIMER_1_MAX_VALUE

#define TIMER_1_MAX_VALUE   LETIMER_MAX_VALUE

Definition at line 151 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 153 of file periph_conf.h.

◆ UART_0_ISR_RX

#define UART_0_ISR_RX   isr_eusart1_rx

Definition at line 169 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 171 of file periph_conf.h.

Variable Documentation

◆ adc_channel_config

const adc_chan_conf_t adc_channel_config[]
static
Initial value:
= {
{
.dev = 0,
.input_pos = GPIO_PIN(PA, 10),
.input_neg = GPIO_UNDEF
},
{
.dev = 0,
.input_pos = GPIO_PIN(PA, 0),
.input_neg = GPIO_PIN(PA, 5)
},
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ PA
port A

Definition at line 73 of file periph_conf.h.

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{
.dev = IADC0,
.cmu = cmuClock_IADC0,
.reference = iadcCfgReferenceInt1V2,
.reference_mV = 1210,
.gain = iadcCfgAnalogGain0P5x,
.available_res = { ADC_RES_10BIT, ADC_RES_16BIT }
}
}
@ ADC_RES_16BIT
ADC resolution: 16 bit.
Definition adc.h:99
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition adc.h:96

Definition at line 62 of file periph_conf.h.

◆ clk_div_config

const clk_div_t clk_div_config[]
static
Initial value:
= {
{ .clk = cmuClock_HCLK, .div = 1 },
{ .clk = cmuClock_PCLK, .div = 1 },
{ .clk = cmuClock_LSPCLK, .div = 2 },
}

Definition at line 50 of file periph_conf.h.

◆ clk_mux_config

const clk_mux_t clk_mux_config[]
static
Initial value:
= {
{ .clk = cmuClock_SYSCLK, .src = cmuSelect_HFXO },
{ .clk = cmuClock_EM01GRPACLK, .src = cmuSelect_HFXO },
{ .clk = cmuClock_EM01GRPCCLK, .src = cmuSelect_HFXO },
{ .clk = cmuClock_EM23GRPACLK, .src = cmuSelect_LFXO },
{ .clk = cmuClock_EUSART0CLK, .src = cmuSelect_HFXO },
}

Definition at line 41 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = I2C0,
.sda_pin = GPIO_PIN(PC, 7),
.scl_pin = GPIO_PIN(PC, 5),
.cmu = cmuClock_I2C0,
.irq = I2C0_IRQn,
}
}
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278
@ PC
port C

Definition at line 94 of file periph_conf.h.

◆ spi_config

const spi_dev_t spi_config[]
static
Initial value:
= {
{
.dev = USART0,
.mosi_pin = GPIO_PIN(PC, 1),
.miso_pin = GPIO_PIN(PC, 2),
.clk_pin = GPIO_PIN(PC, 3),
.cmu = cmuClock_USART0,
.irq = USART0_RX_IRQn
}
}

Definition at line 113 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{
.dev = TIMER0,
.cmu = cmuClock_TIMER0,
.irq = TIMER0_IRQn
},
{
.dev = LETIMER0,
.cmu = cmuClock_LETIMER0,
.irq = LETIMER0_IRQn
}
}

Definition at line 134 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = EUSART1,
.rx_pin = GPIO_PIN(PA, 9),
.tx_pin = GPIO_PIN(PA, 8),
.cmu = cmuClock_EUSART1,
.irq = EUSART1_RX_IRQn
}
}

Definition at line 160 of file periph_conf.h.