UART external loopback polling

This example demonstrates UART communication using polling-based transmit and receive operations. The application configures two UART instances (transmitter and receiver) and performs an external loopback test where data sent from one UART instance is received by the other. The transfer uses polling mechanisms to check for data availability and transmission completion.

Example Usage

  1. Connect the UART pins as described in the External Connections table.

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

  3. The application initializes both UART instances with:

    • 921600 baud rate

    • FIFO enabled

    • Polling-based operation

  4. The transmitter sends test data in a polling loop.

  5. The receiver collects the data using polling mechanisms.

  6. The application verifies that the received data matches the transmitted data.

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

Key features demonstrated:

  • UART configuration with FIFOs

  • Polling-based UART transfers

  • Software-controlled data transfer timing

  • External loopback validation of UART communication

External connections

Transmitter

Receiver

UC0 TX (PA23)

UC1 RX (PD8)

UC0 RX (PA26)

UC1 TX (PD7)