UART internal loopback polling

This example demonstrates the UART internal loopback functionality, where transmitted data is internally routed back to the receiver without requiring external connections. The application configures a single UART instance with internal loopback enabled and verifies that data sent through the transmitter is correctly received by the same UART’s receiver.

Example Usage

  1. Build and run the example after connecting to the target.

  2. The application initializes the UART instance with:

    • 115200 baud rate

    • FIFO enabled

    • RX FIFO threshold set to NOT_EMPTY

    • TX FIFO threshold set to EMPTY

    • Internal loopback enabled

  3. The application transmits 8 bytes of test data (“TESTDATA”).

  4. The data is internally looped back from TX to RX.

  5. The application reads the received data and compares it with the transmitted data.

  6. The example indicates success or failure via console output.

Key features demonstrated:

  • UART configuration with internal loopback mode

  • Basic UART transmit and receive operations

  • FIFO configuration

  • Data validation

External Connections

No external connections are required as the example uses internal loopback mode.