cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong high Baud Rate on STM32L052 [SOLVED]

Posted on March 14, 2016 at 18:58

I am setting the Baud Rate of USART1 by the HAL MX_USART1_UART_Init() function as

huart1.Init.BaudRate = br;

I am also checking the BRR register setting by debugger and I am measuring a real BR on TXD by scope.

BR source clock is PCLK2 from MSI (f = 4.192 MHz). Oversampling remains 16.

Output is correct up to br=260000 (BRR=16) but for br>=270000 (BRR<=15) is output about 1000 Bd or even lower.

Is it a severe hardware bug or what?

Thank you for any information.

Ivan

2 REPLIES 2
TDK
Guru
Posted on March 15, 2016 at 05:58

I doubt you can set your USART clock divider lower than 1 (BRR=16).

If you feel a post has answered your question, please click "Accept as Solution".
Posted on March 15, 2016 at 17:24

Thank you, Tim, for the notice.

I missed the note on the next page of the Baud Rate generation in the datasheet.