cancel
Showing results for 
Search instead for 
Did you mean: 

uasrt1 baudrate when using printf

manes69692
Associate II
Posted on February 02, 2009 at 07:02

uasrt1 baudrate when using printf

3 REPLIES 3
manes69692
Associate II
Posted on May 17, 2011 at 13:01

Hi

I'm using the printf function , but it looks my baudrate is always 9600Bd

whatever value I put in the usart1_brr.

I do an include , and call the printf function

the first thing in my main program is set the clock to pll and 72Mhz

after that setting the baudrate , but whatever value I write in the baudrate register , it always prints at 9600 Bd.

What must I do to change the baudrate ?

Regards ,

Ronny

st3
Associate II
Posted on May 17, 2011 at 13:01

This depends entirely on how your particulat printf has been implemented; specifically, the USART ''driver'' part.

Therefore, without knowing what printf you're using, it is impossible to answer!

You should check the documentation for your toolchain - it should describe its implementation, and how to adapt it to your own requirements.

sofiene
Associate III
Posted on May 17, 2011 at 13:01

Hi Ronny,

Could you send your clock+UART configurations?

However, you have to retarget the C library printf function to the USART as described in the STM32 firmware library example. I attach it!

B.R.

M3allem.