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
Connect the UART pins as described in the External Connections table.
Build and run the example after connecting to the target.
The application initializes both UART instances with:
921600 baud rate
FIFO enabled
Polling-based operation
The transmitter sends test data in a polling loop.
The receiver collects the data using polling mechanisms.
The application verifies that the received data matches the transmitted data.
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) |