From fda36fd81b25bac914e977654beecdb41aaabbb3 Mon Sep 17 00:00:00 2001 From: Patrick Oppenlander Date: Mon, 6 Feb 2023 10:12:10 +1100 Subject: [PATCH] stm32/usart: fix LPUART clock multiplier According to RM0351 Rev 9 (L4) and RM0399 Rev 3 (H7): baud = (256 * clock) / LPUARTDIV --- embassy-stm32/src/usart/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index 20f4eede..121699c7 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs @@ -1148,7 +1148,7 @@ macro_rules! impl_lpuart { foreach_interrupt!( ($inst:ident, lpuart, $block:ident, $signal_name:ident, $irq:ident) => { - impl_lpuart!($inst, $irq, 255); + impl_lpuart!($inst, $irq, 256); }; ($inst:ident, usart, $block:ident, $signal_name:ident, $irq:ident) => {