From 7df4b20af0fede25c00ecc74873d3410397f38a5 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 10 May 2017 11:45:19 +0200 Subject: [PATCH] pinmux: stm32l4x: Fix USART 2 pinmux for nucleo-l432kc The RX pin should be PA15 to use the Virtual COM port of the ST-LINK. Also adds the missing entry in pinmux_stm32l4x.h. Signed-off-by: Neil Armstrong --- drivers/pinmux/stm32/pinmux_board_nucleo_l432kc.c | 2 +- drivers/pinmux/stm32/pinmux_stm32l4x.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinmux/stm32/pinmux_board_nucleo_l432kc.c b/drivers/pinmux/stm32/pinmux_board_nucleo_l432kc.c index 9ee4e4a48f1..95254a6b9f9 100644 --- a/drivers/pinmux/stm32/pinmux_board_nucleo_l432kc.c +++ b/drivers/pinmux/stm32/pinmux_board_nucleo_l432kc.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { #endif /* CONFIG_UART_STM32_PORT_1 */ #ifdef CONFIG_UART_STM32_PORT_2 {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, - {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, + {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_USART2_RX}, #endif /* CONFIG_UART_STM32_PORT_2 */ #ifdef CONFIG_I2C_1 {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, diff --git a/drivers/pinmux/stm32/pinmux_stm32l4x.h b/drivers/pinmux/stm32/pinmux_stm32l4x.h index 92a732f8c46..29e8d9c09c3 100644 --- a/drivers/pinmux/stm32/pinmux_stm32l4x.h +++ b/drivers/pinmux/stm32/pinmux_stm32l4x.h @@ -23,6 +23,7 @@ #define STM32L4X_PINMUX_FUNC_PA9_USART1_TX STM32_PINMUX_FUNC_ALT_7 #define STM32L4X_PINMUX_FUNC_PA10_USART1_RX STM32_PINMUX_FUNC_ALT_7 #define STM32L4X_PINMUX_FUNC_PA15_PWM2_CH1 STM32_PINMUX_FUNC_ALT_1 +#define STM32L4X_PINMUX_FUNC_PA15_USART2_RX STM32_PINMUX_FUNC_ALT_3 /* Port B */ #define STM32L4X_PINMUX_FUNC_PB3_SPI1_SCK STM32_PINMUX_FUNC_ALT_5