Wrong high Baud Rate on STM32L052 [SOLVED]
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-14 10:58 AM
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
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-14 9:58 PM
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".
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-03-15 9:24 AM
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.