节点文献

基于Linux的USB OTG IP核设备驱动开发技术

【作者】 陈效友

【导师】 李晓峰;

【作者基本信息】 电子科技大学 , 通信与信息系统, 2010, 硕士

【摘要】 OTG(On-The-Go)技术,是USB接口规范的重要扩展,主要应用于各种外围设备之间的数据交换。USB技术的发展,使PC和外围设备以简单的方式、较低的成本连接到一起。OTG技术,使外围设备之间进行数据交换而无须PC参与,极大地拓展了USB接口技术的应用范围。本文以USB OTG IP核设计为主线,讲解了作者所参与的OTG驱动、设备驱动和DMA驱动。OTG驱动用于实现主机控制器和设备控制器的切换,OTG驱动设计参考OTG协议(HNP协议和SRP协议)。OTG设备接入后,USB OTG IP核根据OTG请求类型,转入相应的主机/设备模式;设备模式下,设备端驱动和硬件一起实现USB OTG IP核的USB设备功能。设备驱动设计参考USB协议、大容量传输协议、文件管理系统等。USB OTG IP核与PC完成数据交换过程;DMA驱动用于提高IP系统性能,DMA驱动的设计,参考DMA协议、ARM Realview EB的DMA控制器文档和S3C2410的DMA驱动代码,最后完成DMA驱动代码编写。相对于PIO模式,IP核降低了中断次数,减轻了CPU的负担,提高了系统整体性能。Linux操作系统以其开放性、良好的可移植性、不付费等成为嵌入式操作系统开发的首选。Linux提供了比较完善的USB驱动体系,大大地缩短开发周期。本项目完成Linux操作系统的移植、测试平台的搭建和USB OTG IP核性能的测试。论文介绍了整个硬件和软件的测试平台、驱动程序的调试方法、驱动程序的测试流程,并给出了测试结果及测试结论。USB OTG IP核的FPGA级测试结果表明:USB OTG IP核实现预期USB主机控制器、USB设备控制器以及主从切换功能。IP核的研究经验和成果可应用于USB OTG设备、嵌入式OTG设备驱动开发等,具有广泛的应用前景。

【Abstract】 OTG (USB On-The-Go) is a major supplement to the USB 2.0 specification. It is widely used in connections and communications among PC peripherals. With the development of the USB technology, the PC and peripherals are connected by simple way. OTG technology makes the peripherals communicate with each other without the computers’partition.This dissertation mainly explains the USB OTG IP core, especially OTG driver, device driver and DMA driver which the author takes part in. The OTG driver is used for the switch between the host module and the device module and written by referring to the OTG protocol (HNP protocol and SRP protocol). After the OTG device is connected, USB OTG IP core switches to the host/device mode according to the OTG request type. In the device mode, the USB OTG IP core is used as a USB device. The device driver is written by referring to the USB protocol and the Mass Storage protocol. The DMA driver is used for improving the IP core’s system performance and written by referring to the DMA protocol, the DMA controller specification of the ARM Realview EB, the DMA driver of the S3C2410 and so on. Comparing to the PIO mode, IP core decreases the interrupts, reduces the CPU’s burden in order to improve the system performance.Because of its open source, excellent trainability, free software, Linux OS becomes the best in the open source and the first OS in our design. Linux operation system is transplanted into the ARM Realview EB. The test platform for the USB OTG IP core is set up. This dissertation briefly introduces the test platform for the hardware and software, the method of debugging the driver, as well as test course, and gives the result of the test. The result demonstrates that the design of the USB OTG IP core is excellent in performance.The achievement of this project is applied to development of other OTG devices, embedded OTG software development etc. It has a good prospect of application and extension.

【关键词】 USBOTGDMAEHCIOHCI设备端驱动
【Key words】 USBOTGDMAEHCIOHCIDevice driver
节点文献中: