cancel
Showing results for 
Search instead for 
Did you mean: 

Setting UART baud rate to 600

Domantas Cibas
Associate

Posted on April 24, 2018 at 10:13

Hi,

I'm trying to set the UART baud rate to 600 on a Nucleo F070RB board to communicate with the CS5490 chip. (

https://www.cirrus.com/products/cs5490/

)

I've only managed to go down to 732 baud rate. Anything below, it seems that the clock divider is not capable to produce (I think it overflows).

So, the question is, how can I achieve a 600 baud rate on this board?

Cheers

2 REPLIES 2
Domantas Cibas
Associate
Posted on April 24, 2018 at 13:23

found the answer here: 

https://community.st.com/0D50X00009Xkfr6SAB

 

TLDR; need to explicitly select the HSI clock, and set the APBxCLKDivider to RCC_HCLK_DIV2, or RCC_HCLK_DIV4

Posted on April 24, 2018 at 15:21

Some of the L0 parts, and others, have a prescaler for the USART to expand the scope of the 16-bit baud rate register (BRR). Otherwise you have to drop the APB clock the USART is attached too.

Material covered in the Reference Manual most likely

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..