From 6778da3659bca44b453a30b7e6e2a32e21986969 Mon Sep 17 00:00:00 2001 From: blutack Date: Tue, 1 Apr 2025 12:51:44 +0100 Subject: [PATCH] Add LPUART1 definition to usart.h for stm32g4x Add LPUART1 definition for the STM32G4xx LPUART. It is possible to use LPUART1_BASE, but without the LPUART1 definition, usart_set_baudrate will calculate BRR incorrectly and the UART will not work due to an ifdef. Tested and working @ 115200 on a NUCLEO-G474RE. --- include/libopencm3/stm32/g4/usart.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/libopencm3/stm32/g4/usart.h b/include/libopencm3/stm32/g4/usart.h index a4c0474d..4217b4d7 100644 --- a/include/libopencm3/stm32/g4/usart.h +++ b/include/libopencm3/stm32/g4/usart.h @@ -43,6 +43,7 @@ #define USART3 USART3_BASE #define UART4 UART4_BASE #define UART5 UART5_BASE +#define LPUART1 LPUART1_BASE /**@}*/ BEGIN_DECLS