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

MSB-A2 peripheral configuration. More...

Detailed Description

MSB-A2 peripheral configuration.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file periph_conf.h.

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

Go to the source code of this file.

Clock configuration

#define XTAL_HZ   (16000000U) /* the board provides a 16 MHz XTAL */
 
#define CLOCK_CORECLOCK   (72000000U) /* the msba2 runs with 72MHz */
 
#define CLOCK_PCLK   (CLOCK_CORECLOCK)
 

Timer configuration, select a number from 1 to 4

#define TIMER_NUMOF   (1U)
 

PWM device and pinout configuration

Currently, we only support a single device and 3 channels, the implementation is fixed on PWM1.

#define PWM_NUMOF   (1U)
 
#define PWM_CHANNELS   (3)
 
#define PWM_CH0   (3)
 
#define PWM_CH0_MR   PWM1MR3
 
#define PWM_CH1   (4)
 
#define PWM_CH1_MR   PWM1MR4
 
#define PWM_CH2   (5)
 
#define PWM_CH2_MR   PWM1MR5
 
#define PWM_PORT   PINSEL4
 
#define PWM_CH0_PIN   (2)
 
#define PWM_CH1_PIN   (3)
 
#define PWM_CH2_PIN   (4)
 
#define PWM_FUNC   (1)
 

UART configuration

#define UART_NUMOF   (4)
 
static const uart_conf_t uart_config []
 

SPI configuration

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

ADC configuration

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

I2C configuration

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

Macro Definition Documentation

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_config)

Definition at line 155 of file periph_conf.h.

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   (72000000U) /* the msba2 runs with 72MHz */

Definition at line 35 of file periph_conf.h.

◆ CLOCK_PCLK

#define CLOCK_PCLK   (CLOCK_CORECLOCK)

Definition at line 37 of file periph_conf.h.

◆ I2C_NUMOF

#define I2C_NUMOF   (1)

Definition at line 175 of file periph_conf.h.

◆ PWM_CH0

#define PWM_CH0   (3)

Definition at line 58 of file periph_conf.h.

◆ PWM_CH0_MR

#define PWM_CH0_MR   PWM1MR3

Definition at line 59 of file periph_conf.h.

◆ PWM_CH0_PIN

#define PWM_CH0_PIN   (2)

Definition at line 66 of file periph_conf.h.

◆ PWM_CH1

#define PWM_CH1   (4)

Definition at line 60 of file periph_conf.h.

◆ PWM_CH1_MR

#define PWM_CH1_MR   PWM1MR4

Definition at line 61 of file periph_conf.h.

◆ PWM_CH1_PIN

#define PWM_CH1_PIN   (3)

Definition at line 67 of file periph_conf.h.

◆ PWM_CH2

#define PWM_CH2   (5)

Definition at line 62 of file periph_conf.h.

◆ PWM_CH2_MR

#define PWM_CH2_MR   PWM1MR5

Definition at line 63 of file periph_conf.h.

◆ PWM_CH2_PIN

#define PWM_CH2_PIN   (4)

Definition at line 68 of file periph_conf.h.

◆ PWM_CHANNELS

#define PWM_CHANNELS   (3)

Definition at line 57 of file periph_conf.h.

◆ PWM_FUNC

#define PWM_FUNC   (1)

Definition at line 69 of file periph_conf.h.

◆ PWM_NUMOF

#define PWM_NUMOF   (1U)

Definition at line 54 of file periph_conf.h.

◆ PWM_PORT

#define PWM_PORT   PINSEL4

Definition at line 65 of file periph_conf.h.

◆ SPI_NUMOF

#define SPI_NUMOF   (1)

Definition at line 130 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   (1U)

Definition at line 44 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   (4)

Definition at line 111 of file periph_conf.h.

◆ XTAL_HZ

#define XTAL_HZ   (16000000U) /* the board provides a 16 MHz XTAL */

Definition at line 33 of file periph_conf.h.

Variable Documentation

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{
.chan = 0,
.pinsel = 1,
.pinsel_msk = BIT14,
},
{
.chan = 1,
.pinsel = 1,
.pinsel_msk = BIT16,
},
{
.chan = 2,
.pinsel = 1,
.pinsel_msk = BIT18,
},
}
#define BIT14
Bit 14 set define.
Definition bitarithm.h:75
#define BIT18
Bit 18 set define.
Definition bitarithm.h:81
#define BIT16
Bit 16 set define.
Definition bitarithm.h:79

Definition at line 137 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = I2C2,
.speed = I2C_SPEED_NORMAL,
.irq_prio = 5,
.pinsel_sda = 0,
.pinsel_scl = 0,
.pinsel_msk_sda = BIT21,
.pinsel_msk_scl = BIT23,
},
}
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278
#define BIT21
Bit 21 set define.
Definition bitarithm.h:84
#define BIT23
Bit 23 set define.
Definition bitarithm.h:86

Definition at line 162 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = SPI0,
.pinsel_mosi = 3,
.pinsel_miso = 3,
.pinsel_clk = 3,
.pinsel_msk_mosi = (BIT16 | BIT17),
.pinsel_msk_miso = (BIT14 | BIT15),
.pinsel_msk_clk = (BIT8 | BIT9),
},
}
#define BIT8
Bit 8 set define.
Definition bitarithm.h:67
#define BIT17
Bit 17 set define.
Definition bitarithm.h:80
#define BIT9
Bit 9 set define.
Definition bitarithm.h:68
#define BIT15
Bit 15 set define.
Definition bitarithm.h:76

Definition at line 118 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static

Definition at line 76 of file periph_conf.h.