From d1128c3aacd093340a7e4577ad1c0567a823fd0f Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 9 Jan 2017 22:38:49 +0100 Subject: [PATCH] boards/nucleo-f446: configure 2 new UARTs using USART3 and USART1 --- boards/nucleo-f446/include/periph_conf.h | 34 +++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/boards/nucleo-f446/include/periph_conf.h b/boards/nucleo-f446/include/periph_conf.h index 21670decc6..885397ba11 100644 --- a/boards/nucleo-f446/include/periph_conf.h +++ b/boards/nucleo-f446/include/periph_conf.h @@ -93,11 +93,43 @@ static const uart_conf_t uart_config[] = { .dma_stream = 6, .dma_chan = 4 #endif - } + }, + { + .dev = USART3, + .rcc_mask = RCC_APB1ENR_USART3EN, + .rx_pin = GPIO_PIN(PORT_C, 11), + .tx_pin = GPIO_PIN(PORT_C, 10), + .rx_af = GPIO_AF7, + .tx_af = GPIO_AF7, + .bus = APB1, + .irqn = USART3_IRQn, +#ifdef UART_USE_DMA + .dma_stream = 5, + .dma_chan = 4 +#endif + }, + { + .dev = USART1, + .rcc_mask = RCC_APB2ENR_USART1EN, + .rx_pin = GPIO_PIN(PORT_A, 10), + .tx_pin = GPIO_PIN(PORT_A, 9), + .rx_af = GPIO_AF7, + .tx_af = GPIO_AF7, + .bus = APB2, + .irqn = USART1_IRQn, +#ifdef UART_USE_DMA + .dma_stream = 4, + .dma_chan = 4 +#endif + }, }; #define UART_0_ISR (isr_usart2) #define UART_0_DMA_ISR (isr_dma1_stream6) +#define UART_1_ISR (isr_usart3) +#define UART_1_DMA_ISR (isr_dma1_stream5) +#define UART_2_ISR (isr_usart1) +#define UART_2_DMA_ISR (isr_dma1_stream4) #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) /** @} */