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.

[参考译文] TM4C1294NCPDT:UARTprintf 函数用于 UART 3端口

Guru**** 2609955 points
Other Parts Discussed in Thread: TM4C1294NCPDT

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1014738/tm4c1294ncpdt-usage-of-uartprintf-function-for-uart-3-port

器件型号:TM4C1294NCPDT

当天的问候语、

我目前正在使用 TM4C1294XL 评估套件。 我使用 uartstdio.h 头文件中的 UARTprintf API 将数据发送到串行控制台。 其中、我使用 UART 0端口、UARTprintf 函数可与 UART 0正常工作。 现在、我想使用 UART 端口3、能否为此端口使用 UARTprintf 函数。

如果我可以使用方法、如何配置端口3。

器件型号: TM4C1294NCPDT

谢谢你。

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

    您好、Balaji

    UARTStdioConfig 仅支持提供的 UART 0至2。

    您可以通过展开 uartstdio.c 文件的工作方式进行编辑、并将 UART 端口3添加到 g_ui32UARTPeriph、 g_ui32UARTInt 和 g_ui32UARTBase  、然后调整 UARTStdioConfig 函数以不将"3"拒绝为接受的 ui32PortNum。

    此致、

    Ralph Jacobi

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

    我不确定这在 TivaWare 中的位置、但 MSP432E 示例包含 uartstdio.c 文件。 沿着130线向下、有一个表格  

    static const uint32_t g_ui32UARTBase[3] =
    {
        UART0_BASE, UART1_BASE, UART2_BASE
    };

    只需将 UART3添加到此表中:

    static const uint32_t g_ui32UARTBase[4] =
    {
        UART0_BASE, UART1_BASE, UART2_BASE, UART3_BASE
    };

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

    它现在正在工作、感谢您的快速支持。

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

    它现在正在工作、感谢您的快速支持。