This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28379D:在 UART 上启用 printf

Guru**** 2039030 points
Other Parts Discussed in Thread: TMS320F28379D, C2000WARE
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1018787/tms320f28379d-printf-enable-on-uart

器件型号:TMS320F28379D
主题中讨论的其他器件: C2000WARE

尊敬的 TI 团队:

 我想获得有关在 TMS320F28379D launchpad 上启用 printf 的帮助 ,如何使用 UART 引脚42和43使用 printf 函数。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Atul、

    我建议查看 C2000Ware SDK 中的以下示例。 它包含使用 printf 所需的文件、然后在示例中加以利用。

    C2000Ware_version\device_support\f2837xd\examples\cpu1\launchxl_f28379d

    此致、

    Marlyn

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Marlyn、

       我正在使用  C2000Ware_3_04_00_00_Software\driverlib\f2837xd\examples\cpu1\sci\sci_ex1_loopback.c  此示例并添加 printf 支持的文件。 但 UART 在此处无法正常工作。控制台显示的是垃圾值。

    以下是 printf 的代码和文件  

    状态= add_device ("scia"、_ssa、SCI_open、SCI_close、SCI_read、 SCI_WRITE、
    SCI_lseek、SCI_unlink、SCI_rename);
     FID = fopen ("scia"、"w");
     freopen ("scia:"、"w"、stdout);
     setvbuf (stdout、NULL、_IONBF、0);

    .e2e.ti.com/.../4503.sci_5F00_io.ce2e.ti.com/.../sci_5F00_io.h

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Atul、

    您是否已在 项目中添加预定义"_LAUNCHXL_F28379D"? 在使用 LaunchPad 时、设置适当的器件时钟需要执行此操作。

    此致、

    Marlyn

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Marlyn、

       非常感谢。 此输入解决了我的问题。