28#ifndef CONFIG_BOARD_HAS_LSE
29#define CONFIG_BOARD_HAS_LSE 1
33#ifndef CONFIG_BOARD_HAS_HSE
34#define CONFIG_BOARD_HAS_HSE 1
37#include "periph_cpu.h"
49#define RTT_FREQUENCY (16384)
74#if !defined(BOARD_BLACKPILL_STM32F103C8) \
75 && !defined(BOARD_BLACKPILL_STM32F103CB) \
76 && !defined(MODULE_PERIPH_PWM)
82#define ADC_NUMOF ARRAY_SIZE(adc_config)
97#define DMA_0_ISR isr_dma1_channel2
98#define DMA_1_ISR isr_dma1_channel3
99#define DMA_2_ISR isr_dma1_channel4
100#define DMA_3_ISR isr_dma1_channel5
101#define DMA_4_ISR isr_dma1_channel7
103#define DMA_NUMOF ARRAY_SIZE(dma_config)
114 .rcc_mask = RCC_APB1ENR_TIM2EN,
121 .rcc_mask = RCC_APB1ENR_TIM3EN,
128 .rcc_mask = RCC_APB1ENR_TIM4EN,
134#define TIMER_0_ISR isr_tim2
135#define TIMER_1_ISR isr_tim3
136#define TIMER_2_ISR isr_tim4
138#define TIMER_NUMOF ARRAY_SIZE(timer_config)
150 .rcc_mask = RCC_APB1ENR_TIM4EN,
157#ifndef MODULE_PERIPH_PWM
161 .rcc_mask = RCC_APB1ENR_TIM3EN,
165 .remap = AFIO_MAPR_TIM3_REMAP_1,
171#ifndef MODULE_PERIPH_UART
175 .rcc_mask = RCC_APB2ENR_TIM1EN,
184#define QDEC_NUMOF ARRAY_SIZE(qdec_config)
194 .rcc_mask = RCC_APB2ENR_USART1EN,
199#ifdef MODULE_PERIPH_DMA
206 .rcc_mask = RCC_APB1ENR_USART2EN,
211#ifdef MODULE_PERIPH_DMA
218 .rcc_mask = RCC_APB1ENR_USART3EN,
223#ifdef MODULE_PERIPH_DMA
230#define UART_0_ISR (isr_usart1)
231#define UART_1_ISR (isr_usart2)
232#define UART_2_ISR (isr_usart3)
234#define UART_NUMOF ARRAY_SIZE(uart_config)
249 .rcc_mask = RCC_APB1ENR_I2C1EN,
259 .rcc_mask = RCC_APB1ENR_I2C2EN,
265#define I2C_0_ISR isr_i2c1_ev
266#define I2C_1_ISR isr_i2c2_ev
268#define I2C_NUMOF ARRAY_SIZE(i2c_config)
278 .rcc_mask = RCC_APB1ENR_TIM3EN,
280 .remap = AFIO_MAPR_TIM3_REMAP_1,
284#if !defined(BOARD_BLACKPILL_STM32F103C8) \
285 && !defined(BOARD_BLACKPILL_STM32F103CB)
298#define PWM_NUMOF ARRAY_SIZE(pwm_config)
312 .rccmask = RCC_APB1ENR_SPI2EN,
314#ifdef MODULE_PERIPH_DMA
321#ifndef MODULE_PERIPH_ADC
328 .rccmask = RCC_APB2ENR_SPI1EN,
330#ifdef MODULE_PERIPH_DMA
340#define SPI_NUMOF ARRAY_SIZE(spi_config)
349 .rcc_mask = RCC_APB1ENR_USBEN,
350 .irqn = USB_LP_CAN1_RX0_IRQn,
362#define USBDEV_ISR isr_usb_lp_can1_rx0
367#define USBDEV_NUMOF ARRAY_SIZE(stm32_usbdev_fs_config)
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
static const stm32_usbdev_fs_config_t stm32_usbdev_fs_config[]
USB device FS configuration.
#define DMA_CHAN_CONFIG_UNSUPPORTED
DMA channel/trigger configuration for DMA peripherals without channel/trigger filtering such as the s...
@ GPIO_AF_UNDEF
an UNDEF value definition, e.g.
@ GPIO_AF_OUT_PP
alternate function output - push-pull
@ APB1
Advanced Peripheral Bus 1
@ APB2
Advanced Peripheral Bus 2
ADC device configuration.
gpio_t pin
pin connected to the channel
int stream
DMA stream on stm32f2/4/7, channel on others STM32F2/4/7:
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
PWM device configuration.
mini_timer_t * dev
Timer used.
Quadrature decoder configuration struct.
TIM_TypeDef * dev
Timer used.
SPI device configuration.
SPI_t * dev
pointer to the used SPI device
stm32 USB device FS configuration
uintptr_t base_addr
USB peripheral base address.
Timer device configuration.
TC0_t * dev
Pointer to the used as Timer device.
UART device configuration.
USART_t * dev
pointer to the used UART device