From e2ec69c956784be8596d0fb45b1e6cb28c6f7d5c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 6 Jan 2017 15:03:08 +0100 Subject: [PATCH] boards/nucleo-f401: configure a second UART using USART6 on PA11/PA12 pins --- boards/nucleo-f401/include/periph_conf.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/boards/nucleo-f401/include/periph_conf.h b/boards/nucleo-f401/include/periph_conf.h index 6f8608a394..391e057c36 100644 --- a/boards/nucleo-f401/include/periph_conf.h +++ b/boards/nucleo-f401/include/periph_conf.h @@ -92,12 +92,28 @@ static const uart_conf_t uart_config[] = { #ifdef UART_USE_DMA .dma_stream = 6, .dma_chan = 4 +#endif + }, + { + .dev = USART6, + .rcc_mask = RCC_APB2ENR_USART6EN, + .rx_pin = GPIO_PIN(PORT_A, 12), + .tx_pin = GPIO_PIN(PORT_A, 11), + .rx_af = GPIO_AF8, + .tx_af = GPIO_AF8, + .bus = APB2, + .irqn = USART6_IRQn, +#ifdef UART_USE_DMA + .dma_stream = 6, + .dma_chan = 4 #endif } }; #define UART_0_ISR (isr_usart2) #define UART_0_DMA_ISR (isr_dma1_stream6) +#define UART_1_ISR (isr_usart6) +#define UART_1_DMA_ISR (isr_dma1_stream6) #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) /** @} */