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
Build and run the example after connecting to the target.
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
The application transmits 8 bytes of test data (“TESTDATA”).
The data is internally looped back from TX to RX.
The application reads the received data and compares it with the transmitted data.
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.