27 #ifndef CONFIG_BOARD_HAS_LSE
28 #define CONFIG_BOARD_HAS_LSE 1
32 #ifndef CONFIG_BOARD_HAS_HSE
33 #define CONFIG_BOARD_HAS_HSE 1
36 #include "periph_cpu.h"
48 #define RTT_FREQUENCY (16384)
73 #if !defined(BOARD_BLACKPILL_STM32F103C8) \
74 && !defined(BOARD_BLACKPILL_STM32F103CB) \
75 && !defined(MODULE_PERIPH_PWM)
81 #define ADC_NUMOF ARRAY_SIZE(adc_config)
96 #define DMA_0_ISR isr_dma1_channel2
97 #define DMA_1_ISR isr_dma1_channel3
98 #define DMA_2_ISR isr_dma1_channel4
99 #define DMA_3_ISR isr_dma1_channel5
100 #define DMA_4_ISR isr_dma1_channel7
102 #define DMA_NUMOF ARRAY_SIZE(dma_config)
113 .rcc_mask = RCC_APB1ENR_TIM2EN,
120 .rcc_mask = RCC_APB1ENR_TIM3EN,
127 .rcc_mask = RCC_APB1ENR_TIM4EN,
133 #define TIMER_0_ISR isr_tim2
134 #define TIMER_1_ISR isr_tim3
135 #define TIMER_2_ISR isr_tim4
137 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
149 .rcc_mask = RCC_APB1ENR_TIM4EN,
156 #ifndef MODULE_PERIPH_PWM
160 .rcc_mask = RCC_APB1ENR_TIM3EN,
164 .remap = AFIO_MAPR_TIM3_REMAP_1,
170 #ifndef MODULE_PERIPH_UART
174 .rcc_mask = RCC_APB2ENR_TIM1EN,
183 #define QDEC_NUMOF ARRAY_SIZE(qdec_config)
193 .rcc_mask = RCC_APB2ENR_USART1EN,
198 #ifdef MODULE_PERIPH_DMA
205 .rcc_mask = RCC_APB1ENR_USART2EN,
210 #ifdef MODULE_PERIPH_DMA
217 .rcc_mask = RCC_APB1ENR_USART3EN,
222 #ifdef MODULE_PERIPH_DMA
229 #define UART_0_ISR (isr_usart1)
230 #define UART_1_ISR (isr_usart2)
231 #define UART_2_ISR (isr_usart3)
233 #define UART_NUMOF ARRAY_SIZE(uart_config)
248 .rcc_mask = RCC_APB1ENR_I2C1EN,
258 .rcc_mask = RCC_APB1ENR_I2C2EN,
264 #define I2C_0_ISR isr_i2c1_ev
265 #define I2C_1_ISR isr_i2c2_ev
267 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
277 .rcc_mask = RCC_APB1ENR_TIM3EN,
279 .remap = AFIO_MAPR_TIM3_REMAP_1,
283 #if !defined(BOARD_BLACKPILL_STM32F103C8) \
284 && !defined(BOARD_BLACKPILL_STM32F103CB)
297 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
311 .rccmask = RCC_APB1ENR_SPI2EN,
313 #ifdef MODULE_PERIPH_DMA
320 #ifndef MODULE_PERIPH_ADC
327 .rccmask = RCC_APB2ENR_SPI1EN,
329 #ifdef MODULE_PERIPH_DMA
339 #define SPI_NUMOF ARRAY_SIZE(spi_config)
348 .rcc_mask = RCC_APB1ENR_USBEN,
349 .irqn = USB_LP_CAN1_RX0_IRQn,
361 #define USBDEV_ISR isr_usb_lp_can1_rx0
366 #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.
static const uart_conf_t uart_config[]
UART configuration.
static const spi_conf_t spi_config[]
SPI configuration.
static const i2c_conf_t i2c_config[]
I2C configuration.
static const timer_conf_t timer_config[]
All timers on board.
static const stm32_usbdev_fs_config_t stm32_usbdev_fs_config[]
USB device FS configuration.
static const adc_conf_t adc_config[]
ADC configuration.
static const pwm_conf_t pwm_config[]
Actual PWM 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
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
#define CLOCK_APB1
Half AHB clock.
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