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.

TM4c123GH6PM UARTprintf的串口能定修改成UART1吗

Other Parts Discussed in Thread: TM4C123GH6PM

我是使用 TM4c123GH6PM的新手 看到UARTprintf的使用 默认是UART0?能配置成UART1吗。

  • 可以呀,可以配置为UART0/UART1/UART2的

    //*****************************************************************************
    //
    // The list of possible base addresses for the console UART.
    //
    //*****************************************************************************
    static const uint32_t g_ui32UARTBase[3] =
    {
        UART0_BASE, UART1_BASE, UART2_BASE
    };

    UARTStdioConfig(0, 115200, 16000000);//这个函数的第一个参数就是了。