Titan-Board-Mini SDK

目录

  • 快速上手
    • 模板工程
      • 简介
      • 特性
      • 项目结构
      • 快速开始
      • 二次开发
      • 进阶阅读
  • 基础篇
    • LED 闪烁示例
      • 简介
      • GPIO 简介
        • 1. 概述
        • 2. RA8 系列 GPIO 特点
        • 3. RT-Thread PIN 框架
      • 硬件说明
      • 软件说明
      • 编译下载
      • 运行效果
      • 进阶阅读
    • 按键中断 示例说明
      • 简介
      • RA8 系列 MCU 中断体系概述
      • FSP配置
      • 示例代码说明
      • 编译&下载
      • 运行效果
  • 驱动篇
    • ADC 驱动示例
      • 简介
        • 主要特性
      • 1. 硬件介绍
        • 1.1 RA8P1 微控制器概述
        • 1.2 ADC 硬件特性
        • 1.3 硬件连接图
      • 2. 软件架构
        • 2.1 RT-Thread ADC 驱动框架
        • 2.2 项目软件架构
        • 2.3 程序执行流程
      • 3. 使用示例
        • 3.1 基础 ADC 采样
        • 3.2 多线程实现
        • 3.3 命令行接口使用
      • 4. 运行效果
        • 4.1 终端输出示例
      • 5. 参考资源
        • 5.1 技术文档
    • CAN FD 驱动示例说明
      • 简介
        • 主要特性
        • RA8P1 CAN FD硬件特性
      • 软件架构 - RT-Thread CAN设备框架
        • RT-Thread驱动模型
        • CAN设备操作接口
        • 中断处理机制
      • 运行效果示例
        • 1. 硬件连接
        • 2. PCAN-View 软件配置
        • 3. 终端命令操作
        • 4. 数据收发测试
    • Ethernet 示例说明
      • 简介
      • 以太网(Ethernet)简介
        • 1. 概述
        • 2. 以太网帧结构
      • RA8 系列以太网特性
        • 1. 网络接口特性
        • 2. MAC 特性
        • 3. DMA 与缓冲特性
        • 4. 中断机制
        • 5. PHY 管理
        • 6. 协议与栈支持
        • 7. 性能与可靠性
      • FSP 配置
      • RT-Thread Settings 配置
      • 软件说明
      • 编译&下载
      • 运行效果
        • iperf 测试
    • GPT 驱动示例说明
      • 简介
        • 核心功能特性
        • 技术栈
      • 硬件介绍
        • 1. RA8P1 微控制器特性
        • 2. GPT 硬件模块详解
      • 软件架构
        • 1. RT-Thread 设备框架
        • 2. 驱动程序架构
      • 使用示例
      • 配置说明
      • 运行效果示例
    • RTC 驱动示例说明
      • 简介
        • 主要功能
      • 硬件介绍 - RA8P1 RTC 特性
        • 1. 概述
        • 2. RA8P1 RTC 主要特性
        • 3. RA8P1 RTC 技术参数
      • 软件架构 - RT-Thread RTC 设备框架
        • 1. RT-Thread 设备架构
        • 2. RTC 设备类型
        • 3. 设备管理接口
        • 4. RT-Thread RTC API
      • 使用示例
        • 1. 时间设置与读取
        • 2. 闹钟配置
      • 配置说明
      • 运行效果示例
        • 1. 控制台输出
    • SDRAM 驱动示例说明
      • 项目概述
        • 主要特性
        • 技术架构
      • 硬件介绍
        • 2.1 RA8P1 外部存储器接口特性
        • 2.2 SDRAM 类型支持
        • 2.3 硬件连接说明
      • 软件架构
        • 3.1 SDRAM 驱动初始化流程
        • 3.2 内存管理机制
        • 3.3 BSP 层封装
      • 使用示例
        • 4.1 基础读写操作
      • 运行效果示例
    • SD卡文件系统示例说明
      • 简介
      • SD 卡简介
        • 1. 概述
        • 2. SD 卡类型
        • 3. SD 卡接口
        • 4. 工作原理
        • 5. SD 卡性能指标
        • 6. SD 卡应用场景
      • RA8 系列 SDHI 模块概述
        • 1. 总体特性
        • 2. SDHI 模块架构
        • 3. SDHI 工作原理
      • FSP 配置
      • RT-Thread Settings 配置
      • 示例工程说明
      • 编译&下载
      • 运行效果
    • SPI 驱动示例说明
      • 项目介绍
        • 主要特性
      • 目录结构
      • 1. 硬件介绍 - RA8P1 的 SPI 特性
        • 1.1 RA8P1 微控制器概述
        • 1.2 SPI 硬件特性
        • 1.3 SPI 引脚映射
      • 2. 软件架构 - RT-Thread SPI 设备框架
        • 2.1 RT-Thread SPI 架构概览
        • 2.2 主要数据结构
        • 2.3 SPI 工作模式
        • 2.4 核心 API 接口
      • 3. 运行效果示例
    • WDT 驱动示例说明
      • 概述
      • 目录结构
      • 1. 硬件介绍 - RA8P1的WDT特性
        • 1.1 看门狗概述
        • 1.2 RA8P1 WDT 主要特性
        • 1.3 硬件参数配置
      • 2. 软件架构 - RT-Thread看门狗设备框架
        • 2.1 RT-Thread 看门狗驱动架构
        • 2.2 FSP 集成
        • 2.3 RT-Thread 设备配置
      • 3. 使用示例 - 基于实际代码的看门狗初始化、喂狗
        • 3.1 主要功能分析
        • 3.2 看门狗测试函数 (wdt_sample)
        • 3.3 RT-Thread 看门狗 API
      • 4. 配置说明 - 超时时间、复位模式
        • 4.1 超时时间配置
        • 4.2 复位模式配置
      • 5.WDT工程配置
      • 5. 运行效果示例
        • 5.1 正常运行流程
      • 结论
  • 组件篇
    • QSPI Flash 文件系统示例说明
      • 简介
      • 硬件介绍
        • 1. W25Q64 QSPI Flash
        • 2. QSPI 接口特性
      • 软件架构
        • 1. 分层设计
        • 2. 核心组件
        • 3. 工程结构
      • 使用示例
        • 1. 初始化流程
        • 2. 文件操作示例
      • 运行效果
        • 1. 终端输出
        • 2. 文件系统测试
      • 注意事项
        • 1. Flash 使用限制
        • 2. 文件系统建议
        • 3. 性能优化
      • 扩展应用
      • 相关资料
  • 多媒体显示篇
    • LVGL 示例说明
      • 简介
      • LVGL 简介
        • 主要特点
        • 应用场景
        • 生态与社区
        • I2C0 配置
        • 触摸中断配置
      • RT-Thread Settings 配置
      • 软件说明
      • 编译&下载
      • 运行效果
    • MIPI CSI 摄像头示例说明
      • 简介
      • RA8 系列 MIPI CSI 特性
        • 1. 硬件接口特性
        • 2. 图像格式与处理能力
        • 3. DMA 支持与缓冲机制
        • 4. 中断机制
        • 5. 时序与同步特性
        • 6. 性能优化
        • 7. 应用场景
      • RA8 系列 MCU GLCDC(Graphics LCD Controller)特性
        • 1. 硬件特性
        • 2. 图层与显示模式
        • 3. DMA 与帧缓冲
        • 4. 硬件图形功能
        • 5. 中断机制
        • 6. 性能优化
      • RT-Thread Settings 配置
      • 编译&下载
      • 运行效果
  • 外设扩展篇
    • IMU 传感器示例说明
      • 简介
      • 硬件介绍
        • 1. LSM6DS3TR-C IMU 传感器
        • 2. 加速度计特性
        • 3. 陀螺仪特性
        • 4. 主要功能
      • 软件架构
        • 1. 分层设计
        • 2. 核心组件
        • 3. 工程结构
      • 使用说明
        • 1. 初始化流程
        • 2. I2C 平台接口实现
        • 3. 数据格式转换
      • 配置说明
        • 1. Kconfig 配置
        • 2. RT-Thread Settings
      • 运行效果
        • 1. 终端输出
      • 相关资料
    • RGB LCD 示例说明
      • 简介
      • RA8 系列 GLCDC 模块
        • 1. 简介
        • 2. 模块架构
        • 3. GLCDC 工作原理
        • 4. GLCDC 支持的功能与特性
      • RT-Thread LCD 驱动框架
        • 主要接口
      • 硬件说明
      • FSP 配置
        • HyperRAM 配置
        • RGB LCD 配置
        • LCD 背光配置
        • D/AVE 2D 配置
      • RT-Thread Settings 配置
      • 编译&下载
      • 运行效果
    • USB-PCDC 驱动示例说明
      • 简介
      • USB PCDC 简介
        • 1. 概述
        • 2. PCDC 的协议特性
        • 3. 典型应用架构
        • 4. 优点
      • RA8 系列 USB PCDC 模块(r_usb_pcdc)简介
        • 1. 模块定位与功能
        • 2. 支持能力
        • 3. 模块架构
        • 4. 工作流程
      • FSP 配置
      • RT-Thread Settings 配置
      • 编译&下载
      • 运行效果
    • WAV 音频播放器示例说明
      • 简介
      • 硬件介绍
        • 1. ES8156 音频编解码器
        • 2. ES8156 主要特性
        • 3. SSI (Synchronous Serial Interface) 接口
      • 软件架构
        • 1. 分层设计
        • 2. 核心组件
        • 3. 工程结构
      • 使用说明
        • 1. 初始化流程
        • 2. 播放 WAV 文件
        • 3. WAV 文件格式要求
      • 配置说明
        • 1. Kconfig 配置
        • 2. RT-Thread Settings
        • 3. 硬件连接
      • 运行效果
      • 相关资料
Titan-Board-Mini SDK
  • 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


© 版权所有 Copyright (c) 2006-2025, RT-Thread Development Team。

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