Titan-Board-Mini SDK

Contents

  • Getting Started
    • Template Project
      • Introduction
      • Features
      • Project Structure
      • Quick Start
      • Secondary Development
      • Further Reading
  • Basics
    • LED Blink Example
      • Introduction
      • GPIO Introduction
        • 1. Overview
        • 2. RA8 Series GPIO Features
        • 3. RT-Thread PIN Framework
      • Hardware Description
      • Software Description
      • Compilation & Download
      • Run Effect
      • Further Reading
  • Drivers
    • Ethernet Example Guide
      • Introduction
      • Ethernet Overview
        • 1. General Introduction
        • 2. Ethernet Frame Structure
      • RA8 Series Ethernet Features
        • 1. Network Interface Features
        • 2. MAC Features
        • 3. DMA and Buffer Features
        • 4. Interrupt Mechanism
        • 5. PHY Management
        • 6. Protocol and Stack Support
        • 7. Performance and Reliability
      • FSP Configuration
      • RT-Thread Settings Configuration
      • Software Description
        • LwIP Performance Tuning Recommendations
        • RTL8211 PHY Initialization
      • Build & Download
      • Running Effect
        • iperf Test
        • Network Application Examples
    • Titan Mini Driver All Example Guide
      • Introduction
      • FSP Configuration
        • Version Requirements
        • Project Directory Layout
        • Steps to Modify the FSP Configuration
        • Common Issues
      • Build and Run
      • RTC Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • GPIO / PWM / Key Interrupt Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Parameter Conversion
        • Result
      • SD Card Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • Flash File System Example
        • Introduction
        • Hardware Parameters
        • Software Stack
        • Usage Steps
        • Key Code
        • Result
      • SDRAM Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • ADC Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Voltage Conversion
        • Result
      • SPI Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • CANFD Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • I2C Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
      • Watchdog Example
        • Introduction
        • Hardware Parameters
        • Usage Steps
        • Key Code
        • Result
  • Multimedia Display
    • LVGL Example Guide
      • Instruction
      • LVGL Instruction
        • Key Features
        • Application Scenarios
        • Ecosystem and Community
        • I2C0 Configuration
        • Touch Interrupt Configuration
      • RT-Thread Settings Configuration
      • Software Description
      • Compilation & Download
      • Run Effect
    • MIPI CSI Camera Example Guide
      • Introduction
      • RA8 Series MIPI CSI Features
        • 1. Hardware Interface Features
        • 2. Image Formats and Processing Capabilities
        • 3. DMA Support and Buffering
        • 4. Interrupt Mechanism
        • 5. Timing and Synchronization Features
        • 6. Performance Optimization
        • 7. Application Scenarios
      • RA8 Series MCU GLCDC (Graphics LCD Controller) Features
        • 1. Hardware Features
        • 2. Layers and Display Modes
        • 3. DMA and Frame Buffer
        • 4. Hardware Graphics Functions
        • 5. Interrupt Mechanism
        • 6. Performance Optimization
      • RT-Thread Settings Configuration
      • Compilation & Download
      • Run Effect
    • MIPI NPU Face Detection
      • Overview
      • Features
      • Data Flow
      • Model
      • Runtime Controls
      • Important Notes
      • RT-Thread / FSP Configuration
      • Build and Flash
      • Expected Result
  • Multicore
    • Titan_Mini_rpmsg_master Inter-Core Communication Example (M85)
      • Introduction
      • Project Structure
      • Communication Flow
      • Usage
      • Expected Output
    • Titan_Mini_rpmsg_remote Inter-Core Communication Example (M33)
      • Introduction
      • Project Structure
      • Communication Flow
      • Usage
      • Expected Output
  • Peripherals
    • IMU Sensor Example
      • Overview
      • Hardware Introduction
        • 1. LSM6DS3TR-C IMU Sensor
      • Software Architecture
        • 1. Layered Design
        • 2. Core Components
        • 3. Project Structure
      • Usage Instructions
      • Configuration Instructions
        • 1. Kconfig Configuration
        • 2. RT-Thread Settings
      • Running Results
        • 1. Terminal Output
      • Related Resources
    • PDM Microphone Real-time Loopback Example Guide
      • Introduction
      • Hardware Introduction
        • 1. PDM Microphone
        • 2. RA8P1 PDM Interface
        • 3. Audio Output
      • Software Architecture
        • 1. Data Flow
        • 2. Core Components
        • 3. Double Buffer Mechanism
        • 4. Project Structure
      • Configuration
        • 1. PDM Configuration
        • 2. Key Parameters
      • Run Effect
      • Troubleshooting
        • 1. No Audio Output
        • 2. Audio Stuttering
        • 3. Audio Distortion
      • Further Reading
    • RGB LCD Example Guide
      • Introduction
      • RA8 Series GLCDC Module
        • 1. Overview
        • 2. Module Architecture
        • 3. GLCDC Working Principle
        • 4. GLCDC Supported Features
      • RT-Thread LCD Driver Framework
        • Main Interfaces
      • Hardware Description
      • FSP Configuration
        • HyperRAM Configuration
        • RGB LCD Configuration
        • LCD Backlight Configuration
        • D/AVE 2D Configuration
      • RT-Thread Settings Configuration
      • Compilation & Download
      • Run Effect
    • USB PCDC Driver Example Guide
      • Introduction
      • USB PCDC Instructions
        • 1. Overview
        • 2. PCDC Protocol Features
        • 3. Typical Application Architecture
        • 4. Advantages
      • RA8 Series USB PCDC Module (r_usb_pcdc) Overview
        • 1. Module Functionality
        • 2. Supported Features
        • 3. Module Architecture
        • 4. Workflow
      • FSP Configuration Configuration
      • RT-Thread Settings Configuration
      • Compilation & Download
      • Running Effect
    • WAV Audio Player Example Guide
      • Introduction
      • Hardware Introduction
        • 1. ES8156 Audio Codec
        • 2. ES8156 Key Features
        • 3. SSI (Synchronous Serial Interface)
      • Software Architecture
        • 1. Layered Design
        • 2. Core Components
        • 3. Project Structure
      • Usage
        • 1. Initialization Flow
        • 2. Playing WAV Files
        • 3. WAV File Format Requirements
      • Configuration
        • 1. Kconfig Configuration
        • 2. RT-Thread Settings
        • 3. Hardware Connections
      • Run Effect
      • Further Reading
Titan-Board-Mini SDK
  • Basics
  • LED Blink Example

LED Blink Example

English | 中文

Introduction

This example is the simplest and most basic example in the SDK, similar to the “Hello World” program that programmers encounter as their first program. The main function of this example is to make the onboard RGB LED blink periodically.

GPIO Introduction

1. Overview

GPIO (General Purpose Input/Output) is one of the most commonly used peripheral interfaces of an MCU. It can be configured under software control as either input mode or output mode:

  • Input mode: Used to read external voltage levels, such as button inputs.

  • Output mode: Used to control peripheral voltage levels, such as lighting up an LED or driving a buzzer.

2. RA8 Series GPIO Features

  • Rich pin resources: Each port can be independently configured as input/output/multiplexed function.

  • Multi-function multiplexing: In addition to GPIO functionality, the same pin can also serve as a signal line for peripherals such as UART, SPI, or I2C.

  • Level control: In output mode, pins can drive either high or low levels; some pins support open-drain mode.

  • Direction control: Input/output direction can be dynamically switched.

3. RT-Thread PIN Framework

RT-Thread provides a PIN device driver framework, which offers a unified interface to shield hardware differences:

  • rt_pin_mode() - Set the working mode of a pin (input/output/pull-up/pull-down, etc.)

  • rt_pin_write() - Output a voltage level (high/low)

  • rt_pin_read() - Read an input voltage level

This way, developers don’t need to directly manipulate registers; GPIO control can be achieved through RT-Thread’s API.

In this example, the LED pin is configured as output mode, and the software continuously toggles between high and low levels to make the LED blink.

Hardware Description

Titan Board Mini provides three user LEDs: LED_R (RED), LED_B (BLUE), LED_G (GREEN). The LED corresponds to specific pins on the MCU. To turn on the LED, a low level signal is output from the MCU pin, and to turn it off, a high level signal is output.

Software Description

The source code for this example is located in src/hal_entry.c. The MCU pin definitions for the LEDs and the LED control logic can be found in the source file.

/* Configure LED pins */
rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);

/* Control LED */
rt_pin_write(LED_PIN, LED_ON);  // Turn on
rt_pin_write(LED_PIN, LED_OFF); // Turn off

Compilation & Download

  1. Open the project in RT-Thread Studio

  2. Build the project using the build button

  3. Connect the debug probe to the development board

  4. Download the firmware to the board

Run Effect

After pressing the reset button to restart the development board, observe the LED blinking effect. The RGB LEDs will change periodically.

Further Reading

  • RT-Thread PIN Device

Previous Next

© Copyright Copyright (c) 2006-2025, RT-Thread Development Team.

Titan-Board-Mini SDK • 版本:1.2.0
构建时间: