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.

TMS320F28388D: UART例程为什么是偶次数触发中断

Part Number: TMS320F28388D

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//#############################################################################
//
// FILE: UART_ex1_echoback.c
//
// TITLE: UART echoback example.
//
//! \addtogroup driver_example_cm_list
//! <h1>UART Echoback</h1>
//!
//! This test receives and echo-backs data through the UART0 port.
//!
//! A terminal such as 'putty' can be used to view the data from
//! the CM-UART and to send information to the CM-UART. Characters
//! received by the CM-UART port are sent back to the host.
//!
//! \b Running \b the \b Application
//! Open a COM port with the following settings using a terminal:
//! - Find correct COM port
//! - Bits per second = 115200
//! - Data Bits = 8
//! - Parity = None
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //#############################################################################
    //
    // FILE: UART_ex1_echoback.c
    //
    // TITLE: UART echoback example.
    //
    //! \addtogroup driver_example_cm_list
    //! <h1>UART Echoback</h1>
    //!
    //! This test receives and echo-backs data through the UART0 port.
    //!
    //! A terminal such as 'putty' can be used to view the data from
    //! the CM-UART and to send information to the CM-UART. Characters
    //! received by the CM-UART port are sent back to the host.
    //!
    //! \b Running \b the \b Application
    //! Open a COM port with the following settings using a terminal:
    //! - Find correct COM port
    //! - Bits per second = 115200
    //! - Data Bits = 8
    //! - Parity = None
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  •    取消 while(UART_isDataAvailable(UART0_BASE))后变奇数但最后一次发送为什么不触发中断?实际测试过程也是少接收一个字节数据

  • 取消 while(UART_isDataAvailable(UART0_BASE))后变奇数但最后一次发送为什么不触发中断?

    您现在使用的是controlcard?直接测试例程是测试成功了?

    对于controlcard,可以将 GPIO 84 连接到 GPIO 29,将 GPIO 85 连接到 GPIO 28,以便您可以使用控制卡的内部 ftdi 转换器并尝试运行串行终端。请注意,您可以运行相同的引脚复用器配置(84,85)和示例,因为 GPIO 28、29 硬连线到内部 ftdi。 

    您也可以在CCS Debug Session -> View -> Terminal -> Connect Serial Terminal 中打开串口终端(设置波特率参数,点击确定)。

    这是一个字符回显的例程。不太理解您所说的偶次是什么意思

  • 光标放在CCS的 Terminal 内,在键盘上输入 12345

    而后,如下面视频所示

    uart.zip