From 559a278ddb2d56fd9558c7e8f3c4385274d53bc3 Mon Sep 17 00:00:00 2001 From: Tyler Bennett Date: Tue, 6 May 2025 11:08:46 -0500 Subject: [PATCH] boards/stm32h5/nucleo-h563zi: Add USART2 board defines. This adds the ability to use USART2 as a console if wanting to use a console without going through the ST-Link VCOM port. This required when using an external debugger or trace with this board. Signed-off-by: Tyler Bennett --- .../arm/stm32h5/nucleo-h563zi/include/board.h | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/boards/arm/stm32h5/nucleo-h563zi/include/board.h b/boards/arm/stm32h5/nucleo-h563zi/include/board.h index 0f17b75ce0..49ca898078 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/include/board.h +++ b/boards/arm/stm32h5/nucleo-h563zi/include/board.h @@ -251,16 +251,6 @@ #define STM32_RCC_CCIPR5_ADCDACSEL RCC_CCIPR5_ADCDACSEL_PLL2RCK #define STM32_ADC_CLK_FREQUENCY STM32_PLL2R_FREQUENCY -#define GPIO_ADC1_IN3 (GPIO_ADC1_IN3_0) -#define GPIO_ADC1_IN10 (GPIO_ADC1_IN10_0) - -/* USART3: Connected to Arduino connector D0/D1 (or to STLink VCP if solder - * bridges SB123 to SB130 are re-worked accordingly). - */ - -#define GPIO_USART3_RX GPIO_USART3_RX_4 /* PD9 */ -#define GPIO_USART3_TX GPIO_USART3_TX_4 /* PD8 */ - /* LED definitions **********************************************************/ /* The Nucleo board has numerous LEDs but only three, LD1 a Green LED, @@ -325,6 +315,26 @@ #define NUM_BUTTONS 1 #define BUTTON_USER_BIT (1 << BUTTON_USER) +/* Alternate function pin selections ****************************************/ + +/* ADC */ + +#define GPIO_ADC1_IN3 (GPIO_ADC1_IN3_0) +#define GPIO_ADC1_IN10 (GPIO_ADC1_IN10_0) + +/* USART3 (Nucleo Virtual Console): Default board solder bridge configuration + * has USART3 going to the on board ST-Link to provide a VCP. Refer to + * STMicro user manual [UM3115] for more info on solder bridge configuration. + */ + +#define GPIO_USART3_RX GPIO_USART3_RX_4 /* PD9 */ +#define GPIO_USART3_TX GPIO_USART3_TX_4 /* PD8 */ + +/* USART2 */ + +#define GPIO_USART2_RX GPIO_USART2_RX_2 /* PD6 */ +#define GPIO_USART2_TX GPIO_USART2_TX_2 /* PD5 */ + /**************************************************************************** * Public Data ****************************************************************************/