boards/openmote-cc2538/include/periph_conf.h File Reference

Peripheral MCU configuration for the OpenMote-cc2538 board. More...

Detailed Description

Peripheral MCU configuration for the OpenMote-cc2538 board.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t

Definition in file boards/openmote-cc2538/include/periph_conf.h.

#include "cc2538_gpio.h"
#include "periph_cpu.h"
+ Include dependency graph for boards/openmote-cc2538/include/periph_conf.h:

Go to the source code of this file.

Macros

Clock system configuration
#define CLOCK_CORECLOCK   (32000000U) /* desired core clock frequency, 32MHz */
 
UART configuration
#define UART_NUMOF   (1U)
 
#define UART_0_EN   1
 
#define UART_IRQ_PRIO   1
 
#define UART_0_DEV   UART0
 
#define UART_0_IRQ   UART0_IRQn
 
#define UART_0_ISR   isr_uart0
 
#define UART_0_TX_PIN   GPIO_PA1
 
#define UART_0_RX_PIN   GPIO_PA0
 
Radio peripheral configuration
#define RADIO_IRQ_PRIO   1
 

Variables

static const spi_clk_conf_t spi_clk_config []
 Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz) More...
 

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   (sizeof(timer_config) / sizeof(timer_config[0]))
 
#define TIMER_IRQ_PRIO   1
 
static const timer_conf_t timer_config []
 

ADC configuration

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

I2C configuration

#define I2C_NUMOF   1
 
#define I2C_0_EN   1
 
#define I2C_IRQ_PRIO   1
 
#define I2C_0_DEV   0
 
#define I2C_0_IRQ   I2C_IRQn
 
#define I2C_0_IRQ_HANDLER   isr_i2c
 
#define I2C_0_SCL_PIN   GPIO_PB3 /* OpenBattery */
 
#define I2C_0_SDA_PIN   GPIO_PB4 /* OpenBattery */
 
static const i2c_conf_t i2c_config [1]
 

SPI configuration

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

Variable Documentation

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
GPIO_PIN(0, 2),
GPIO_PIN(0, 3),
GPIO_PIN(0, 4),
GPIO_PIN(0, 5),
GPIO_PIN(0, 6),
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.

Definition at line 74 of file boards/openmote-cc2538/include/periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[1]
static
Initial value:
= {
{
.scl_pin = GPIO_PB3,
.sda_pin = GPIO_PB4,
},
}
PB3.
Definition: cc2538_gpio.h:157
PB4.
Definition: cc2538_gpio.h:158

Definition at line 117 of file boards/openmote-cc2538/include/periph_conf.h.

◆ spi_clk_config

const spi_clk_conf_t spi_clk_config[]
static
Initial value:
= {
{ .cpsr = 10, .scr = 31 },
{ .cpsr = 2, .scr = 39 },
{ .cpsr = 2, .scr = 15 },
{ .cpsr = 2, .scr = 2 },
{ .cpsr = 2, .scr = 1 }
}

Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)

Calculated with (CPSR * (SCR + 1)) = (CLOCK_CORECLOCK / bus_freq), where 1 < CPSR < 255 and 0 < SCR < 256

Definition at line 132 of file boards/openmote-cc2538/include/periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = SSI0,
.mosi_pin = GPIO_PA5,
.miso_pin = GPIO_PA4,
.sck_pin = GPIO_PA2,
.cs_pin = GPIO_PA3,
},
}
PA5.
Definition: cc2538_gpio.h:151
PA4.
Definition: cc2538_gpio.h:150
PA2.
Definition: cc2538_gpio.h:148
#define SSI0
SSI0 Instance.
Definition: cc2538_ssi.h:77
PA3.
Definition: cc2538_gpio.h:149

Definition at line 144 of file boards/openmote-cc2538/include/periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{
.chn = 2,
},
{
.chn = 1,
},
{
.chn = 2,
},
{
.chn = 1,
},
}
16-bit timer configuration
32-bit timer configuration

Definition at line 45 of file boards/openmote-cc2538/include/periph_conf.h.