boards/mulle/include/periph_conf.h File Reference
#include "periph_cpu.h"
+ Include dependency graph for boards/mulle/include/periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

Timer configuration
#define PIT_NUMOF   (2U)
 
#define PIT_CONFIG
 
#define LPTMR_NUMOF   (1U)
 
#define LPTMR_CONFIG
 
#define TIMER_NUMOF   ((PIT_NUMOF) + (LPTMR_NUMOF))
 
#define PIT_BASECLOCK   (CLOCK_BUSCLOCK)
 
#define PIT_ISR_0   isr_pit1
 
#define PIT_ISR_1   isr_pit3
 
#define LPTMR_ISR_0   isr_lptmr0
 
I2C configuration
#define I2C_NUMOF   (1U)
 
#define I2C_0_EN   1
 
#define I2C_1_EN   0
 
#define I2C_0_DEV   I2C0
 
#define I2C_0_CLKEN()   (BITBAND_REG32(SIM->SCGC4, SIM_SCGC4_I2C0_SHIFT) = 1)
 
#define I2C_0_CLKDIS()   (BITBAND_REG32(SIM->SCGC4, SIM_SCGC4_I2C0_SHIFT) = 0)
 
#define I2C_0_IRQ   I2C0_IRQn
 
#define I2C_0_IRQ_HANDLER   isr_i2c0
 
#define I2C_0_PORT   PORTB
 
#define I2C_0_PORT_CLKEN()   (BITBAND_REG32(SIM->SCGC5, SIM_SCGC5_PORTB_SHIFT) = 1)
 
#define I2C_0_PIN_AF   2
 
#define I2C_0_SDA_PIN   1
 
#define I2C_0_SCL_PIN   2
 
#define I2C_0_PORT_CFG   (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
 
I2C baud rate configuration
#define KINETIS_I2C_F_ICR_LOW   (0x3D)
 
#define KINETIS_I2C_F_MULT_LOW   (1)
 
#define KINETIS_I2C_F_ICR_NORMAL   (0x1F)
 
#define KINETIS_I2C_F_MULT_NORMAL   (1)
 
#define KINETIS_I2C_F_ICR_FAST   (0x17)
 
#define KINETIS_I2C_F_MULT_FAST   (0)
 
#define KINETIS_I2C_F_ICR_FAST_PLUS   (0x10)
 
#define KINETIS_I2C_F_MULT_FAST_PLUS   (0)
 
RTC configuration
#define RTC_NUMOF   (1U)
 
RTT configuration
#define RTT_NUMOF   (1U)
 
#define RTT_IRQ   RTC_IRQn
 
#define RTT_IRQ_PRIO   10
 
#define RTT_ISR   isr_rtc
 
#define RTT_DEV   RTC
 
#define RTT_UNLOCK()   (BITBAND_REG32(SIM->SCGC6, SIM_SCGC6_RTC_SHIFT) = 1)
 
#define RTT_MAX_VALUE   (0xffffffff)
 
#define RTT_FREQUENCY   (1) /* in Hz */
 
#define RTC_LOAD_CAP_BITS   (RTC_CR_SC8P_MASK | RTC_CR_SC4P_MASK | RTC_CR_SC2P_MASK)
 RTC module crystal load capacitance configuration bits.
 

Clock system configuration

#define CLOCK_CORECLOCK   (48000000ul)
 
#define CLOCK_BUSCLOCK   (CLOCK_CORECLOCK / 1)
 
static const clock_config_t clock_config
 

UART configuration

#define UART_0_ISR   (isr_uart0_rx_tx)
 
#define UART_1_ISR   (isr_uart1_rx_tx)
 
#define UART_NUMOF   (sizeof(uart_config) / sizeof(uart_config[0]))
 
static const uart_conf_t uart_config []
 

ADC configuration

#define ADC_NUMOF   (sizeof(adc_config) / sizeof(adc_config[0]))
 
static const adc_conf_t adc_config []
 

DAC configuration

#define DAC_NUMOF   (sizeof(dac_config) / sizeof(dac_config[0]))
 
static const dac_conf_t dac_config []
 

PWM configuration

#define PWM_NUMOF   (sizeof(pwm_config) / sizeof(pwm_config[0]))
 
static const pwm_conf_t pwm_config []
 

SPI configuration

Clock configuration values based on the configured 47988736Hz module clock.

Auto-generated by: cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c

#define SPI_NUMOF   (sizeof(spi_config) / sizeof(spi_config[0]))
 
static const uint32_t spi_clk_config []
 
static const spi_conf_t spi_config []
 

Macro Definition Documentation

◆ LPTMR_CONFIG

#define LPTMR_CONFIG
Value:
{ \
{ \
.dev = LPTMR0, \
.irqn = LPTMR0_IRQn, \
} \
}

Definition at line 90 of file boards/mulle/include/periph_conf.h.

◆ PIT_CONFIG

#define PIT_CONFIG
Value:
{ \
{ \
.prescaler_ch = 0, \
.count_ch = 1, \
}, \
{ \
.prescaler_ch = 2, \
.count_ch = 3, \
}, \
}

Definition at line 79 of file boards/mulle/include/periph_conf.h.

Variable Documentation

◆ clock_config

const clock_config_t clock_config
static
Initial value:
= {
.clkdiv1 = SIM_CLKDIV1_OUTDIV1(0) | SIM_CLKDIV1_OUTDIV2(0) |
SIM_CLKDIV1_OUTDIV3(2) | SIM_CLKDIV1_OUTDIV4(2),
.default_mode = KINETIS_MCG_MODE_FEE,
.fcrdiv = 0,
.oscsel = 1,
.clc = 0b0001,
.fll_frdiv = 0b000,
.fll_factor_fei = KINETIS_MCG_FLL_FACTOR_1464,
.fll_factor_fee = KINETIS_MCG_FLL_FACTOR_1464,
.pll_prdiv = 0b00111,
.pll_vdiv = 0b01100,
.enable_oscillator = false,
.select_fast_irc = true,
.enable_mcgirclk = false,
}
FLL Engaged External Mode.
for 31.25-39.0625 kHz crystal

Definition at line 36 of file boards/mulle/include/periph_conf.h.

◆ dac_config

const dac_conf_t dac_config[]
static
Initial value:
= {
{
.dev = DAC0,
.scgc_addr = &SIM->SCGC2,
.scgc_bit = SIM_SCGC2_DAC0_SHIFT
}
}

Definition at line 192 of file boards/mulle/include/periph_conf.h.

◆ pwm_config

const pwm_conf_t pwm_config[]
static
Initial value:
= {
{
.ftm = FTM0,
.chan = {
{ .pin = GPIO_PIN(PORT_C, 1), .af = 4, .ftm_chan = 0 },
{ .pin = GPIO_PIN(PORT_C, 2), .af = 4, .ftm_chan = 1 },
{ .pin = GPIO_UNDEF, .af = 0, .ftm_chan = 0 },
{ .pin = GPIO_UNDEF, .af = 0, .ftm_chan = 0 }
},
.chan_numof = 2,
.ftm_num = 0
},
{
.ftm = FTM1,
.chan = {
{ .pin = GPIO_PIN(PORT_A, 12), .af = 3, .ftm_chan = 0 },
{ .pin = GPIO_PIN(PORT_A, 13), .af = 3, .ftm_chan = 1 },
{ .pin = GPIO_UNDEF, .af = 0, .ftm_chan = 0 },
{ .pin = GPIO_UNDEF, .af = 0, .ftm_chan = 0 }
},
.chan_numof = 2,
.ftm_num = 1
}
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
#define GPIO_UNDEF
Define custom value to speficy undefined or unused GPIOs.

Definition at line 207 of file boards/mulle/include/periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = UART0,
.freq = CLOCK_CORECLOCK,
.pin_rx = GPIO_PIN(PORT_A, 14),
.pin_tx = GPIO_PIN(PORT_A, 15),
.pcr_rx = PORT_PCR_MUX(3),
.pcr_tx = PORT_PCR_MUX(3),
.irqn = UART0_RX_TX_IRQn,
.scgc_addr = &SIM->SCGC4,
.scgc_bit = SIM_SCGC4_UART0_SHIFT,
.mode = UART_MODE_8N1,
.type = KINETIS_UART,
},
{
.dev = UART1,
.freq = CLOCK_CORECLOCK,
.pin_rx = GPIO_PIN(PORT_C, 3),
.pin_tx = GPIO_PIN(PORT_C, 4),
.pcr_rx = PORT_PCR_MUX(3),
.pcr_tx = PORT_PCR_MUX(3),
.irqn = UART1_RX_TX_IRQn,
.scgc_addr = &SIM->SCGC4,
.scgc_bit = SIM_SCGC4_UART1_SHIFT,
.mode = UART_MODE_8N1,
.type = KINETIS_UART,
},
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
cc2538_uart_t *const UART0
UART0 Instance.
8 data bits, no parity, 1 stop bit
#define CLOCK_CORECLOCK
Core clock frequency, used by the ARM core and certain hardware modules in Kinetis CPUs...
Definition: mcg.h:137
cc2538_uart_t *const UART1
UART1 Instance.
Kinetis UART module type.

Definition at line 109 of file boards/mulle/include/periph_conf.h.