Loading...
Searching...
No Matches
periph_conf_common.h File Reference
#include "periph_cpu.h"
+ Include dependency graph for periph_conf_common.h:

Go to the source code of this file.

Clock system configuration

#define CLOCK_RADIOXTAL   (32000000ul)
 
#define CLOCK_CORECLOCK   (48000000ul)
 
#define CLOCK_BUSCLOCK   (CLOCK_CORECLOCK / 2)
 
#define CLOCK_MCGIRCLK   (4000000ul)
 
static const clock_config_t clock_config
 

Timer configuration

#define PIT_NUMOF   (1U)
 
#define PIT_CONFIG
 
#define LPTMR_NUMOF   (1U)
 
#define LPTMR_CONFIG
 
#define TIMER_NUMOF   ((PIT_NUMOF) + (LPTMR_NUMOF))
 
#define PIT_BASECLOCK   (CLOCK_BUSCLOCK)
 
#define LPTMR_ISR_0   isr_lptmr0
 

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
#define LPUART_0_ISR   isr_lpuart0
 
#define LPUART_0_SRC   3
 
static const uart_conf_t uart_config []
 

Random Number Generator configuration

#define KINETIS_TRNG   TRNG
 

SPI clock configuration

Clock configuration values based on the configured 16Mhz module clock.

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

static const uint32_t spi_clk_config []
 

Macro Definition Documentation

◆ CLOCK_BUSCLOCK

#define CLOCK_BUSCLOCK   (CLOCK_CORECLOCK / 2)

Definition at line 71 of file periph_conf_common.h.

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   (48000000ul)

Definition at line 70 of file periph_conf_common.h.

◆ CLOCK_MCGIRCLK

#define CLOCK_MCGIRCLK   (4000000ul)

Definition at line 72 of file periph_conf_common.h.

◆ CLOCK_RADIOXTAL

#define CLOCK_RADIOXTAL   (32000000ul)

Definition at line 68 of file periph_conf_common.h.

◆ KINETIS_TRNG

#define KINETIS_TRNG   TRNG

Definition at line 173 of file periph_conf_common.h.

◆ LPTMR_CONFIG

#define LPTMR_CONFIG
Value:
{ \
{ \
.dev = LPTMR0, \
.irqn = LPTMR0_IRQn, \
.src = 2, \
.base_freq = 32768u, \
} \
}

Definition at line 87 of file periph_conf_common.h.

◆ LPTMR_ISR_0

#define LPTMR_ISR_0   isr_lptmr0

Definition at line 97 of file periph_conf_common.h.

◆ LPTMR_NUMOF

#define LPTMR_NUMOF   (1U)

Definition at line 86 of file periph_conf_common.h.

◆ LPUART_0_ISR

#define LPUART_0_ISR   isr_lpuart0

Definition at line 120 of file periph_conf_common.h.

◆ LPUART_0_SRC

#define LPUART_0_SRC   3

Definition at line 122 of file periph_conf_common.h.

◆ PIT_BASECLOCK

#define PIT_BASECLOCK   (CLOCK_BUSCLOCK)

Definition at line 96 of file periph_conf_common.h.

◆ PIT_CONFIG

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

Definition at line 80 of file periph_conf_common.h.

◆ PIT_NUMOF

#define PIT_NUMOF   (1U)

Definition at line 79 of file periph_conf_common.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ((PIT_NUMOF) + (LPTMR_NUMOF))

Definition at line 95 of file periph_conf_common.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 119 of file periph_conf_common.h.

Variable Documentation

◆ clock_config

const clock_config_t clock_config
static
Initial value:
= {
.clkdiv1 = SIM_CLKDIV1_OUTDIV1(0) | SIM_CLKDIV1_OUTDIV4(1),
.rtc_clc = 0,
.osc32ksel = SIM_SOPT1_OSC32KSEL(0),
.clock_flags =
KINETIS_CLOCK_OSC0_EN |
KINETIS_CLOCK_RTCOSC_EN |
KINETIS_CLOCK_USE_FAST_IRC |
KINETIS_CLOCK_MCGIRCLK_EN |
KINETIS_CLOCK_MCGIRCLK_STOP_EN |
0,
.default_mode = KINETIS_MCG_MODE_FEI,
.erc_range = KINETIS_MCG_ERC_RANGE_VERY_HIGH,
.osc_clc = 0,
.oscsel = MCG_C7_OSCSEL(0),
.fcrdiv = MCG_SC_FCRDIV(0),
.fll_frdiv = MCG_C1_FRDIV(0b101),
.fll_factor_fei = KINETIS_MCG_FLL_FACTOR_1464,
.fll_factor_fee = KINETIS_MCG_FLL_FACTOR_1280,
}

Definition at line 33 of file periph_conf_common.h.

◆ spi_clk_config

const uint32_t spi_clk_config[]
static

Definition at line 135 of file periph_conf_common.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = LPUART0,
.freq = CLOCK_MCGIRCLK,
.pin_rx = GPIO_PIN(PORT_C, 6),
.pin_tx = GPIO_PIN(PORT_C, 7),
.pcr_rx = PORT_PCR_MUX(4),
.pcr_tx = PORT_PCR_MUX(4),
.irqn = LPUART0_IRQn,
.scgc_addr = &SIM->SCGC5,
.scgc_bit = SIM_SCGC5_LPUART0_SHIFT,
.mode = UART_MODE_8N1,
.type = KINETIS_LPUART,
},
}
@ PORT_C
port C
Definition periph_cpu.h:49
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ KINETIS_LPUART
Kinetis Low-power UART (LPUART) module type.
Definition periph_cpu.h:539
@ UART_MODE_8N1
8 data bits, no parity, 1 stop bit
Definition periph_cpu.h:294

Definition at line 104 of file periph_conf_common.h.