摘要
在实际嵌入式项目开发过程中,需要通过一个USB接口实现虚拟串口通信和外部Flash芯片做虚拟U盘的复合功能,设计了一种基于USB的CDC类和MSC类复合设备,该设计以STM32F407系列单片机为核心,进行USB接口电路和外部Flash芯片的SPI接口电路设计,对USB设备库驱动程序中的底层驱动代码、各类描述符和初始化函数进行修改,最终完成USB复合设备的设计。USB复合设备功能测试结果表明,本设计不仅可以实现USB虚拟串口通信,还可以实现虚拟U盘功能,方便嵌入式系统的设计与开发。
In this paper,according to the actual embedded project development process,a USB interface is needed to realize the composite function of virtual serial port communication and external Flash chip to do virtual U disk.A kind of CDC and MSC composite device based on USB is designed.The design takes STM32F407 series single chip microcomputer as the core,designs the SPI interface circuit of USB interface circuit and external Flash chip,modifies the underlying driver function,various descriptors and initialization code in USB device library driver,and finally completes the design of USB composite device.After testing the function of USB composite device,this design can not only realize USB virtual serial communication,but also realize the function of virtual U disk,which is convenient for the design and development of embedded system.
作者
蒲泽坤
沈勇
陈旅超
Pu Zekun;Shen Yong;Chen Lvchao(School of Electrical and Information Engineering,Yunnan Minzu University,Kunming 650504,China)
出处
《单片机与嵌入式系统应用》
2023年第7期53-56,61,共5页
Microcontrollers & Embedded Systems