2009-02-01 10:02 PM
uasrt1 baudrate when using printf
2011-05-17 04:01 AM
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 , Ronny2011-05-17 04:01 AM
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.2011-05-17 04:01 AM
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.