HAL UART loopback

This example demonstrates the usage of the UART HAL APIs for communication in a loopback configuration. The application performs the following operations:

  1. Configures two UART instances - one for transmission and one for reception

  2. Demonstrates how to transmit data using polling mode

  3. Demonstrates how to receive data using interrupt mode

  4. Verifies the received data matches the transmitted data

The example implements a simple “Hello World!” string transmission and reception to validate the UART functionality.

Example Usage

  1. Build and Load the example to your device

  2. The example initializes both UART instances at 9600 bps

  3. It transmits “Hello World !” using polling mode from the TX instance

  4. It receives the string using interrupt mode on the RX instance

  5. The application verifies the received data matches the transmitted data

  6. If successful, “All Test Passed.” will be displayed on the console

Key features demonstrated:

  • UART HAL initialization and configuration

  • Polling-based transmission

  • Interrupt-based reception

  • Proper callback handling for interrupt operations

  • Error detection and status checking

External Connections

Currently the example uses SPGSS Level Internal loopback between unicomms

  • UC2 is configured as the Receiver

  • UC1 is configured as the Transmitter

  • SPG0 provides the loopback connection between these instances