how to enable application uses UART2 for logging with printf() ?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
kuda
Offline
Last seen:3 weeks 2 days ago
加入:2020-03-21 14:58
how to enable application uses UART2 for logging with printf() ?

HI!

I am new DA14683 user,I have a problem about "how to enable application uses UART2 for logging with printf() ?"

I follow//www.wsdof.com/sites/default/files/um-b-056-da1468..., and turn on smartsnippets terminal . but the terminal only output DA14683BB.

Can someone help me to solve this?

Thanks.

kuda

Device:
PM_Dialog
Offline
Last seen:4天18小时前
工作人员
加入:2018-02-08 11:03
Hi kuda,

Hi kuda,

Can you please indicate which is the SDK you are using, and which SDK example are you running?

Please take a look at the freertos_retarget example of the SDK. For debugging or for general printing since you would like to use the UART2 you can use the CONFIG_RETARGET flag, this will redirect the printf functionality to the UART2 (or to the UART, depends on the configuration). You can change the configuration in the custom_config_xxxx.h file.

Thanks, PM_Dialog