UART

This document provides detailed instructions for accessing UART on the I-Pi SMARC LEC-RB5 module based on Linux.

Prerequisites

Power on the target device and access it via HDMI or ADB shell.

UART Interfaces

The I-Pi SMARC LEC-RB5 module provides a total of four UART interfaces:

  • UART0 -> ttyMSM0 -> Used for serial debugging

  • SER1 -> ttyHS0 -> Used for Bluetooth communication

  • SER2 -> ttyHS1 -> Free

  • SER3 -> ttyHS2 -> Free

UART Testing

SER1 and SER2 will be used for data transfer:

CN1602 CN1602

SER1 TX (PIN 3) - SER2 RX (PIN 7)

SER1 RX (PIN 1) - SER2 TX (PIN 9)

Configuration

To transmit and receive data without an end device connected, ensure that UART power control is turned on.

echo on >  /sys/devices/platform/soc/a94000.qcom,qup_uart/power/control 
echo on > /sys/devices/platform/soc/88c000.qcom,qup_uart/power/control

Transmitting and Receiving Data via UART

Follow these steps to set up data transfer between SER1 and SER2 using two terminals:

Note: Open two terminal sessions (via HDMI or ADB).

Transmitting via SER1:

  1. Terminal 1 (SER1 → SER2):

    • Transmit data on SER1 (ttyHS1).
  2. Terminal 2 (SER2):

    • Receive data on SER2 (ttyHS2).

Transmitting via SER2:

  1. Terminal 1 (SER2 → SER1):

    • Transmit data on SER2 (ttyHS2).
  2. Terminal 2 (SER1):

    • Receive data on SER1 (ttyHS1).