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.
尊敬的 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、
非常感谢。 此输入解决了我的问题。