boards/nucleo-f103/include/periph_conf.h File Reference

Peripheral MCU configuration for the nucleo-f103 board. More...

Detailed Description

Peripheral MCU configuration for the nucleo-f103 board.

Author
Víctor Ariño victo.nosp@m.r.ar.nosp@m.ino@t.nosp@m.riag.nosp@m.nosys.nosp@m..com

Definition in file boards/nucleo-f103/include/periph_conf.h.

#include "periph_cpu.h"
+ Include dependency graph for boards/nucleo-f103/include/periph_conf.h:

Go to the source code of this file.

Macros

Clock settings
Note
This is auto-generated from cpu/stm32_common/dist/clk_conf/clk_conf.c
#define CLOCK_CORECLOCK   (72000000U)
 
#define CLOCK_HSE   (8000000U)
 
#define CLOCK_LSE   (1)
 
#define CLOCK_AHB_DIV   RCC_CFGR_HPRE_DIV1
 
#define CLOCK_AHB   (CLOCK_CORECLOCK / 1)
 
#define CLOCK_APB1_DIV   RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
 
#define CLOCK_APB1   (CLOCK_CORECLOCK / 2)
 
#define CLOCK_APB2_DIV   RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
 
#define CLOCK_APB2   (CLOCK_CORECLOCK / 1)
 
#define CLOCK_PLL_PREDIV   (1)
 
#define CLOCK_PLL_MUL   (9)
 
ADC configuration
#define ADC_NUMOF   (0)
 
Real time counter configuration
#define RTT_NUMOF   (1U)
 
#define RTT_IRQ_PRIO   1
 
#define RTT_DEV   RTC
 
#define RTT_IRQ   RTC_IRQn
 
#define RTT_ISR   isr_rtc
 
#define RTT_MAX_VALUE   (0xffffffff)
 
#define RTT_FREQUENCY   (16384) /* in Hz */
 
#define RTT_PRESCALER   (0x1) /* run with ~16 kHz Hz */
 
I2C configuration
#define I2C_NUMOF   (2U)
 
#define I2C_0_EN   1
 
#define I2C_1_EN   0
 
#define I2C_IRQ_PRIO   1
 
#define I2C_APBCLK   (CLOCK_APB1)
 
#define I2C_0_DEV   I2C1
 
#define I2C_0_CLKEN()   (periph_clk_en(APB1, RCC_APB1ENR_I2C1EN))
 
#define I2C_0_CLKDIS()   (periph_clk_dis(APB1, RCC_APB1ENR_I2C1EN))
 
#define I2C_0_EVT_IRQ   I2C1_EV_IRQn
 
#define I2C_0_EVT_ISR   isr_i2c1_ev
 
#define I2C_0_ERR_IRQ   I2C1_ER_IRQn
 
#define I2C_0_ERR_ISR   isr_i2c1_er
 
#define I2C_0_SCL_PIN   GPIO_PIN(PORT_B, 8) /* remapped */
 
#define I2C_0_SDA_PIN   GPIO_PIN(PORT_B, 9) /* remapped */
 
#define I2C_1_DEV   I2C2
 
#define I2C_1_CLKEN()   (periph_clk_en(APB1, RCC_APB1ENR_I2C2EN))
 
#define I2C_1_CLKDIS()   (periph_clk_dis(APB1, RCC_APB1ENR_I2C2EN))
 
#define I2C_1_EVT_IRQ   I2C2_EV_IRQn
 
#define I2C_1_EVT_ISR   isr_i2c2_ev
 
#define I2C_1_ERR_IRQ   I2C2_ER_IRQn
 
#define I2C_1_ERR_ISR   isr_i2c2_er
 
#define I2C_1_SCL_PIN   GPIO_PIN(PORT_B, 10)
 
#define I2C_1_SDA_PIN   GPIO_PIN(PORT_B, 11)
 

Timer configuration

#define TIMER_0_ISR   isr_tim2
 
#define TIMER_1_ISR   isr_tim3
 
#define TIMER_NUMOF   (sizeof(timer_config) / sizeof(timer_config[0]))
 
static const timer_conf_t timer_config []
 

UART configuration

#define UART_0_ISR   (isr_usart2)
 
#define UART_1_ISR   (isr_usart1)
 
#define UART_2_ISR   (isr_usart3)
 
#define UART_NUMOF   (sizeof(uart_config) / sizeof(uart_config[0]))
 
static const uart_conf_t uart_config []
 

SPI configuration

Note
The spi_divtable is auto-generated from cpu/stm32_common/dist/spi_divtable/spi_divtable.c
#define SPI_NUMOF   (sizeof(spi_config) / sizeof(spi_config[0]))
 
static const uint8_t spi_divtable [2][5]
 
static const spi_conf_t spi_config []