XMC1400 How to output printf with uart port

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
mh09
Level 1
Level 1
First reply posted First question asked Welcome!

Hi,

I am developing a board with XMC1400 micro. Can you explain how to output printf() to one of the serial uart ports? I looked at some examples but they all use Jlink connection and DAVE IDE console.

Thanks,

mh09 

0 Likes
1 Solution
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @mh09 ,

    Here is an  example which demonstrates how to use the printf function with a Universal Serial Interface Channel (USIC) based UART in XMC™ MCU devices. Infineon-mtb-example-xmc-uart-printf . Hope this can help you.

Regards,

Owen_Su

View solution in original post

0 Likes
4 Replies
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @mh09 ,

    Here you can find the example of XMC1400_UART, and it demonstrates the transmission of a periodic message via UART. https://www.infineon.com/cms/en/search.html#!term=UART&view=all

Owen_Su_0-1660182821245.png

 

Regards,

Owen_Su

0 Likes
mh09
Level 1
Level 1
First reply posted First question asked Welcome!

Hi, 

Thanks for the reply. But I guess I did not explain about my problem well.  I want to use printf()/XMC_DEBUG() with the uart hardware. As far as I know all the solutions in the forum for use of printf() is tied to semihosting which outputs strings to a console of DAVE IDE via. jlink/XMC debugger. It is ok, but I also need another option to output strings by printf() to one of the uart hardware. 
Thank you

0 Likes
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @mh09 ,

    Here is a code example using UART to output with printf() function: UART-to-output-with-printf-function , and it's also suitable for the XMC 1400. 

    With ModusToolbox, you can find the example of UART_Printf . Hope this can help you.

Owen_Su_0-1660547616856.png

 

Regards,

Owen_Su

 

0 Likes
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @mh09 ,

    Here is an  example which demonstrates how to use the printf function with a Universal Serial Interface Channel (USIC) based UART in XMC™ MCU devices. Infineon-mtb-example-xmc-uart-printf . Hope this can help you.

Regards,

Owen_Su

0 Likes