From fe89c19ac0e02a5673010e9601b5a9c2f89fcf2a Mon Sep 17 00:00:00 2001 From: Liam Powell Date: Thu, 24 Oct 2024 23:10:09 +0800 Subject: stm32: Add support for USART3 on PC11/PC10 on STM32G474. (#6704) Signed-off-by: Liam Powell --- src/stm32/stm32f0_serial.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/stm32/stm32f0_serial.c') diff --git a/src/stm32/stm32f0_serial.c b/src/stm32/stm32f0_serial.c index c987f149..964601b6 100644 --- a/src/stm32/stm32f0_serial.c +++ b/src/stm32/stm32f0_serial.c @@ -71,6 +71,14 @@ #define USARTx_FUNCTION GPIO_FUNCTION(CONFIG_MACH_STM32G0 ? 0 : 7) #define USARTx USART3 #define USARTx_IRQn USART3_IRQn +#elif CONFIG_STM32_SERIAL_USART3_ALT_PC11_PC10 + // Currently only supports STM32G474. + DECL_CONSTANT_STR("RESERVE_PINS_serial", "PC11,PC10"); + #define GPIO_Rx GPIO('C', 11) + #define GPIO_Tx GPIO('C', 10) + #define USARTx_FUNCTION GPIO_FUNCTION(7) + #define USARTx USART3 + #define USARTx_IRQn USART3_IRQn #elif CONFIG_STM32_SERIAL_UART4 DECL_CONSTANT_STR("RESERVE_PINS_serial", "PA1,PA0"); #define GPIO_Rx GPIO('A', 1) -- cgit v1.2.3-70-g09d2