cancel
Showing results for 
Search instead for 
Did you mean: 

Baud rate calculation for LPUART1 vs. USART1?

briankaz
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

> 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...

waclawekjan_0-1702799109327.png

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

View solution in original post

3 REPLIES 3
gbm
Lead III

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

> 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...

waclawekjan_0-1702799109327.png

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

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.