From a5e8e8f5da7e879bbeb17580de46ba8dfaf8a1c3 Mon Sep 17 00:00:00 2001 From: Rodrigo Sim Date: Tue, 20 Aug 2024 18:39:48 -0300 Subject: [PATCH] nucleo-l432kc: Revert the USART2 config to be use by virtual COM port This reverts commit 60236ce94d310935bd9f9663b19454b86fa45957 and fix the issue reported by https://github.com/apache/nuttx/issues/13061. Signed-off-by: Rodrigo Sim rcsim10@gmail.com --- boards/arm/stm32l4/nucleo-l432kc/include/board.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boards/arm/stm32l4/nucleo-l432kc/include/board.h b/boards/arm/stm32l4/nucleo-l432kc/include/board.h index 3976a7fc8e62c..5872e806802fb 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/include/board.h +++ b/boards/arm/stm32l4/nucleo-l432kc/include/board.h @@ -90,9 +90,13 @@ # define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */ #endif -/* USART2: Connected to STLInk Debug via PA2(TX), PA3(RX) */ +/* USART2: Connected to STLInk Debug via PA2(TX), PA15(RX) */ -#define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +#if defined(CONFIG_ARCH_BOARD_USART2_RX_PA3) +# define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +#elif defined(CONFIG_ARCH_BOARD_USART2_RX_PA15) +# define GPIO_USART2_RX GPIO_USART2_RX_2 /* PA15 */ +#endif #define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */ #define GPIO_USART2_RTS GPIO_USART2_RTS_2 #define GPIO_USART2_CTS GPIO_USART2_CTS_2