CherryUSB原理性分析和应用实践
CherryUSB Principle Analysis and Application Practice
DOI: 10.12677/etis.2025.23012, PDF,   
作者: 吕家振:CherryUSB社区,江苏 南京
关键词: USB协议栈嵌入式系统CherryUSB项目USB Stack Embedded System CherryUSB Project
摘要: CherryUSB是一个轻量级、高性能的开源USB主从协议栈,由国内开发者维护,专为资源受限的带USB外设的嵌入式系统设计。近年来,随着带USB外设的嵌入式设备逐渐增多,CherryUSB成为了一个可靠稳定的选择。相比其他USB协议栈,CherryUSB更注重用户阅读体验、驱动全面性、稳定性和高性能,降低了开发者入门的门槛,发挥出了嵌入式设备中USB的优势。本文对CherryUSB主机和从机代码进行原理性的分析,并基于rt-thread artpi2开源硬件平台,进行CherryUSB主从机的应用实践,为嵌入式USB开发提供参考和借鉴。
Abstract: CherryUSB is a lightweight, high-performance open source USB device and host stack, maintained by domestic developers, designed for resource-constrained embedded systems with USB peripherals. In recent years, with the increasing number of embedded devices with USB peripherals, CherryUSB has become a reliable and stable choice. Compared with other USB protocol stacks, CherryUSB focuses more on user reading experience, driver comprehensiveness, stability, and high performance, lowering the barrier for developers to get started and giving full play to the advantages of USB in embedded devices. This paper analyzes the CherryUSB host and slave code in principle, and conducts the application practice of CherryUSB host and slave based on the rt-thread open source hardware platform named art-pi2, and provides a reference for embedded USB development.
文章引用:吕家振. CherryUSB原理性分析和应用实践[J]. 嵌入式技术与智能系统, 2025, 2(3): 149-160. https://doi.org/10.12677/etis.2025.23012

参考文献

[1] CherryUSB官方文档[EB/OL].
https://cherryusb.cherry-embedded.org, 2025-08-04.
[2] The Micriμm USB Team. 嵌入式协议栈uc/USB-Device [M]. 何小庆, 译. 北京: 航空航天大学出版社, 2015.
[3] 刘荣. 圈圈教你玩USB [M]. 第3版. 北京: 航空航天大学出版社, 2022.
[4] USB Implementers Forum (2000) Universal Serial Bus Specification Revision 2.0.
https://www.usb.org/document-library/usb-20-specification
[5] (2000) Linux Project USB Request Block.
https://docs.linuxkernel.org.cn/driver-api/usb/URB.html
[6] (2025) RT-Thread Artpi2 Project.
https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2
[7] 王小强. 多种嵌入式平台通用USB2.0协议栈的研究与设计[D]: [硕士学位论文]. 成都: 电子科技大学, 2009.