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

Peripheral MCU configuration for TI CC1312 LaunchPad. More...

Detailed Description

Peripheral MCU configuration for TI CC1312 LaunchPad.

Author
Nicholas Jackson nicho.nosp@m.las..nosp@m.jacks.nosp@m.on@g.nosp@m.riffi.nosp@m.thun.nosp@m.i.edu.nosp@m..au
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t
Jean Pierre Dudey jeand.nosp@m.udey.nosp@m.@hotm.nosp@m.ail..nosp@m.com

Definition in file periph_conf.h.

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

Go to the source code of this file.

Clock configuration

#define CLOCK_CORECLOCK   (48000000U)
 

Timer configuration

General purpose timers (GPT[0-3]) are configured consecutively and in order (without gaps) starting from GPT0, i.e.

if multiple timers are enabled.

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
static const timer_conf_t timer_config []
 

UART configuration

The used LAUNCHXL-CC1312R board has a single UART device available through the debugger, so all we need to configure are the RX and TX pins.

Optionally we can enable hardware flow control, by setting UART_HW_FLOW_CTRL to 1 and defining pins for cts_pin and rts_pin.

Add a second UART configuration if using external pins.

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

I2C configuration

#define I2C_NUMOF   (1)
 
#define I2C_SCL_PIN   (4)
 
#define I2C_SDA_PIN   (5)
 

Macro Definition Documentation

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   (48000000U)

Definition at line 37 of file periph_conf.h.

◆ I2C_NUMOF

#define I2C_NUMOF   (1)

Definition at line 112 of file periph_conf.h.

◆ I2C_SCL_PIN

#define I2C_SCL_PIN   (4)

Definition at line 113 of file periph_conf.h.

◆ I2C_SDA_PIN

#define I2C_SDA_PIN   (5)

Definition at line 114 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 67 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 105 of file periph_conf.h.

Variable Documentation

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{
.cfg = GPT_CFG_16T,
.chn = 2,
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
},
{
.cfg = GPT_CFG_16T,
.chn = 2,
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
}
}
#define GPT_CFG_32T
GPT register values.

Definition at line 48 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.regs = UART0,
.tx_pin = 3,
.rx_pin = 2,
.intn = UART0_IRQN
},
{
.regs = UART1,
.tx_pin = 11,
.rx_pin = 12,
.intn = UART1_IRQN
}
}
@ UART0_IRQN
21 UART0 Rx and Tx
#define UART0
UART0 register bank.
#define UART1
UART1 register bank.

Definition at line 83 of file periph_conf.h.