cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 usart

aman
Associate II
Posted on May 16, 2013 at 07:49

How can i use printf() with usart, if i want to dump the values on serial window after reading the register and printing it's value.

#rtfm #stm32l #usart #usart #discovery
5 REPLIES 5
aman
Associate II
Posted on May 16, 2013 at 07:58

due to network error ,this post has been posted twice.... my apologies 

aman
Associate II
Posted on May 16, 2013 at 08:00

due to network error ,this post has been posted twice.... my apologies 

Andrew Neil
Evangelist
Posted on May 16, 2013 at 08:43

You need to consult the documentation for the particular toolset that you're using - that will tell you how it expects you to customise the printf, etc, support to work with the particular interface(s) that you require...

Keil call this ''Retargetting''...
aman
Associate II
Posted on May 16, 2013 at 08:52

yes, i am using keil and i had done the retargeting using retarget.c , it is compiling

but can't see the output on serial window or i don't know how to use it. 

Posted on May 16, 2013 at 13:39

Retargeting Keil's output to a USART is pretty easy. I'd use a terminal app like RealTerm or TeraTerm.

Example of USART2 on a STM32F4-Discovery

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/DispForm.aspx?ID=2606

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