基于Linux的USB OTG IP核设备驱动开发技术
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
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设备驱动开发等,具有广泛的应用前景。
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.
引文
[1] http://www.usb.org
    [2] Universal Serial Bus Specification, Revision 2.0. Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NE,Philips Inc.2000
    [3] USB Implementers Forum, USB Mass Storage Class Bulk-Only Transport Revision 1.0
    [4] Gen Chandler, Chris Kolb, Maria Polhman, et al. On-the-go supplement to the USB2.0 specification [EB/OL]. (2006-04-04) www.usb.org.
    [5] Philips.ISP1761 Hi-Speed Universal Serial Bus On-The-Go controller.Rev.03-06.2004
    [6] Philips.ISP1362 Single-chip Universal Serial Bus On-The-Go controller.Rev.01-12.2005
    [7] Synopsys.DesignWare Cores Hi-Speed USB On-The-Go(OTG) Controller Subsystem Evaluation Databook.Release 2.4a.2006
    [8] Lalitha Ramdoss and John Y. Hung. A Study on Universal Serial Bus Latency in a Real-Time Control System. IEEE,2008
    [9]刘俊江.基于ARM核的AHB_USB2.0接口ASIC设计:[硕士学位论文],成都:电子科技大学,2007,25-36
    [10]朱宇.基于Linux的OTG USB2.0 IP核主机驱动的研究与实现:[硕士学位论文],成都:电子科技大学,2009,65-66
    [11]赵挺竹,Nand+flash与USB闪存之间的数据交互:[硕士学位论文],西安:西安电子科技大学,2009,22-26
    [12]戈志华,基于ARM的Linux平台上USB驱动的实现:[硕士学位论文],西安:西安电子科技大学,2008,36-38
    [13]赵炯.Linux内核注释详解.同济大学,2004
    [14]成月良,方寿海.面向应用的嵌入式Linux裁剪方法与研究:计算机工程与设计2684页,2009
    [15]陈祖爵,罗星,张志雄.嵌入式Linux内核硬实时性能研究与优化:小型微型计算机系统1596页到1599页,2009
    [16] Zhiyong Zhang, Tiejun Lu, Xiebin Chu, Yamin Zhang.Design and Implementation of Embedded System Data Acqusition Based on USB and Flash MultiMediaCard memory.IEEE.2008
    [17]王成儒,李英伟.USB2.0原理与工程开发.国防工业出版社,2004
    [18]周立功. USB2.0与OTG规范及开发指南[M].北京:北京航空航天出版社, 2004
    [19] Philips, ARC, Cypress, Synopsys, SMSC, Mentor Graphics, ST Microelectronics. UTMI+ Specification [EB/OL]. (2004-2-25)
    [20] GL850 Datasheet[R].Cypress Company.2009
    [21] USB2.0 Transceiver Macrocell Interface (UTMI) Specification. Version 1.05. Intel. 2001
    [22] Philips, SMSC, Mentor Graphics, ARC International, Conexant Systems. UTMI+ Low Pin Interface Specification [EB/OL]. (2004-10-20) www.usb.org.
    [23] Open Host Controller Interface Specification for USB, Compaq Microsoft National Conductor.1999
    [24] Philips.ISP1164A1 Universal Serial Bus single-chip host and device controller.Rev.03-23.2004
    [25] Janick Bergeron著.张春,陈新凯.李晓雯等译.编写测试平台一HDL模型的功能验证.第二版.北京:电子工业出版社,2006
    [26]熊明.基于嵌入式Linux的OTG USB2.0 IP驱动程序研究与设计:[硕士学位论文],成都:电子科技大学,2009,41-44
    [27]熊明,林水生.基于OTG补充规范的OTG控制器的设计与实现:中国通信集成电路技术与应用研讨会,222-226,2008
    [28] Synopsys. DesignWare USB Verification IP Databook. 2005
    [29] Enhanced Host Controller Interfaces Specification for Universal Serial Bus Revisionl.1 Intel,March 12, 2002
    [30] Samsung.S3C2410A 200MHz&266MHz 32-BIT RISC MICROPROCESSOR USER’S MANUAL.Revision 1.0,2004
    [31] http://www.opencore.org
    [32] USB Implementers Forum, USB Mass Storage Class UFI Command Specification Revision 1.0
    [33]罗乐. USB 2.0 OTG IP核设计和FPGA实现:[硕士学位论文],成都:电子科技大学,2009,20-23
    [34]陈静瑾等.USB2.0中CRC码的并行算法及硬件实现:西安理工大学学报,2004
    [35]梅张雄,郑为民,张志敏.一种USB OHCI主机控制器的根集线器设计:计算机工程与设计,2005,25-29
    [36]夏宇闻.Verilog数字系统设计教程.北京航空航天大学出版社,2003
    [37] ARM Limited.Core Tile User Guide.2004-2007
    [38] ARM Limited.ARM926EJ-S Development Chip Reference Manual.2004,2007
    [39] ARM Limited.ARM926EJ-S Technical Reference Manual.2001-2003
    [40] ARM Limited.Versatile/LT-XC2V4000+Logic Tile User Guide.2002,2004,2006,2007
    [41] ARM Limited.Application Note 148 Using a CT7TDMI,CT926EJ-S,CT1136JF-S Core Tile with an Emulation Baseboard.2007
    [42] ARM Limited.Application Note 146 Example AHB design for a Logic Tile on top of the Emulation Baseboard.2007

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700