24 #ifndef CONFIG_BOARD_HAS_LSE
25 #define CONFIG_BOARD_HAS_LSE 1
28 #include "periph_cpu.h"
30 #include "cfg_rtt_default.h"
52 #define DMA_0_ISR isr_dma1_channel2
53 #define DMA_1_ISR isr_dma1_channel3
54 #define DMA_2_ISR isr_dma1_channel4
55 #define DMA_3_ISR isr_dma1_channel5
56 #define DMA_4_ISR isr_dma1_channel7
57 #define DMA_5_ISR isr_dma2_channel6
58 #define DMA_6_ISR isr_dma2_channel4
60 #define DMA_NUMOF ARRAY_SIZE(dma_config)
108 #if !MODULE_PERIPH_DAC
118 #define ADC_NUMOF ARRAY_SIZE(adc_config)
123 #define VBAT_ADC ADC_LINE(7)
128 #define VREFINT_ADC ADC_LINE(6)
138 #ifndef VREFBUF_ENABLE
139 #define VREFBUF_ENABLE (1)
155 #if !MODULE_PERIPH_SPI
163 #define DAC_NUMOF ARRAY_SIZE(dac_config)
176 .rcc_mask = RCC_AHB3ENR_FMCEN,
177 #if MODULE_PERIPH_FMC_NOR_SRAM
213 #if MODULE_PERIPH_FMC_16BIT
245 .address = 0x64000000,
251 .r_timing = { .addr_setup = 6,
253 .bus_turnaround = 1, },
262 .address = 0x60000000,
274 .r_timing = { .addr_setup = 1,
276 .bus_turnaround = 2, },
284 #define FMC_BANK_NUMOF ARRAY_SIZE(fmc_bank_config)
293 .data_offset = 0x80000,
303 #define LCD_FMC_NUMOF 1
323 .rcc_mask = RCC_APB1ENR1_I2C1EN,
324 .rcc_sw_mask = RCC_CCIPR_I2C1SEL_1,
325 .irqn = I2C1_ER_IRQn,
339 .rcc_mask = RCC_APB1ENR1_I2C2EN,
340 .rcc_sw_mask = RCC_CCIPR_I2C2SEL_1,
341 .irqn = I2C2_ER_IRQn,
345 #define I2C_0_ISR isr_i2c1_er
346 #define I2C_1_ISR isr_i2c2_er
348 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
366 .rcc_mask = RCC_APB2ENR_TIM8EN,
368 { .pin =
GPIO_PIN(PORT_I, 6), .cc_chan = 1},
376 .rcc_mask = RCC_APB1ENR1_TIM4EN,
386 .rcc_mask = RCC_APB1ENR1_TIM5EN,
396 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
411 .rcc_mask = RCC_APB2ENR_SDMMC1EN,
419 #if MODULE_PERIPH_DMA
430 #define SDMMC_CONFIG_NUMOF 1
457 .rccmask = RCC_APB2ENR_SPI1EN,
459 #if MODULE_PERIPH_DMA
466 #if MODULE_PERIPH_SPI_STMOD
477 .rccmask = RCC_APB1ENR1_SPI2EN,
479 #if MODULE_PERIPH_DMA
489 #define SPI_NUMOF ARRAY_SIZE(spi_config)
500 .rcc_mask = RCC_APB1ENR1_TIM2EN,
507 .rcc_mask = RCC_APB1ENR1_TIM3EN,
513 #define TIMER_0_ISR isr_tim2
514 #define TIMER_1_ISR isr_tim3
516 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
533 .rcc_mask = RCC_APB1ENR1_USART2EN,
540 #if MODULE_PERIPH_UART_HW_FC
546 #if MODULE_PERIPH_DMA
553 .rcc_mask = RCC_APB1ENR2_LPUART1EN,
559 .irqn = LPUART1_IRQn,
560 #if MODULE_PERIPH_UART_HW_FC
566 #if MODULE_PERIPH_DMA
572 #if !MODULE_PERIPH_SPI_STMOD
575 .rcc_mask = RCC_APB2ENR_USART1EN,
582 #if MODULE_PERIPH_UART_HW_FC
590 #if MODULE_PERIPH_DMA
598 #define UART_0_ISR (isr_usart2)
599 #define UART_1_ISR (isr_lpuart1)
600 #define UART_2_ISR (isr_usart1)
602 #define UART_NUMOF ARRAY_SIZE(uart_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 adc_conf_t adc_config[]
ADC configuration.
static const pwm_conf_t pwm_config[]
Actual PWM configuration.
static const dac_conf_t dac_config[]
DAC configuration.
static const sdmmc_conf_t sdmmc_config[]
SDIO/SDMMC static configuration struct.
static const lcd_fmc_desc_t lcd_fmc_desc[]
Descriptors of FMC banks used for LCDs.
static const fmc_bank_conf_t fmc_bank_config[]
FMC Bank configuration.
static const fmc_conf_t fmc_config
FMC controller configuration.
Common configuration for STM32 OTG FS peripheral.
@ GPIO_AF2
use alternate function 2
@ GPIO_AF5
use alternate function 5
@ GPIO_AF4
use alternate function 4
@ GPIO_AF8
use alternate function 8
@ GPIO_AF3
use alternate function 3
@ GPIO_AF12
use alternate function 12
@ GPIO_AF7
use alternate function 7
@ STM32_LPUART
STM32 Low-power UART (LPUART) module type.
@ STM32_USART
STM32 USART module type.
@ APB1
Advanced Peripheral Bus 1
@ APB2
Advanced Peripheral Bus 2
#define FMC_BANK_CONFIG(n)
Gives the configuration of n-th bank.
@ FMC_BUS_WIDTH_16BIT
16 bit data bus width
@ FMC_BANK_1
Bank 1 is always available and used for NOR, PSRAM, SRAM.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
ADC device configuration.
gpio_t pin
pin connected to the channel
DAC line configuration data.
int stream
DMA stream on stm32f2/4/7, channel on others STM32F2/4/7:
Bank configuration structure.
FMC peripheral configuration.
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
Descriptor of the FMC bank used for a LCD.
const fmc_bank_conf_t * bank
FMC bank config used for the LCD.
PWM device configuration.
mini_timer_t * dev
Timer used.
SDMMC slot configuration.
SPI device configuration.
SPI_t * dev
pointer to the used SPI device
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
#define MiB(x)
A macro to return the bytes in x MiB.