2023-12-16 10:07 PM
Hello,
I was trying to use USART1 in a project with STM32H742VIT6 but decided to use LPUART1 instead. I found that using the same BRR computation the baud rate is coming out MUCH slower (it's around a factor of 51 slower). LPUART1SEL is in the reset state and the prescalers are set the same (D1PPRE, D2PPRE1/2, D3PPRE are all set to divide-by-2) so LPUART1 should be getting the same clock as USART1 was.
Is there something fundamentally different in the BRR calculation for LPUART1 compared to USART1? I can't find anything of the sort in the programming reference...
Thanks,
-Brian
Solved! Go to Solution.
2023-12-16 11:49 PM
> Is there something fundamentally different in the BRR calculation for LPUART1 compared to USART1? I can't find anything of the sort in the programming reference...
Well, a factor of 256 IMO is quite a fundamental difference.
Then there's also OVER8 in USART, the prescalers, and, most importantly, different kernel clocks selected in RCC.
Read out and check/compare/post content of UART, USART and relevant RCC registers content.
JW
2023-12-16 11:45 PM
And what exactly prohibits you comparing the descriptions of BRR registers of UART and LPUART in the reference manual? They are quite similar but not exactly the same. Also, note the presence of a prescaler register in LPUART.
2023-12-16 11:49 PM
> Is there something fundamentally different in the BRR calculation for LPUART1 compared to USART1? I can't find anything of the sort in the programming reference...
Well, a factor of 256 IMO is quite a fundamental difference.
Then there's also OVER8 in USART, the prescalers, and, most importantly, different kernel clocks selected in RCC.
Read out and check/compare/post content of UART, USART and relevant RCC registers content.
JW
2023-12-18 11:59 AM
Thanks! I indeed did not notice the factor of 256 difference before. I assumed that LPUART1 has all the same programming registers as all the USART instances and didn't even look for different settings.