基于U盘应用的USB2.0接口控制芯片的固件开发.docVIP

  • 17
  • 0
  • 约3.58万字
  • 约 48页
  • 2019-02-19 发布于湖北
  • 举报

基于U盘应用的USB2.0接口控制芯片的固件开发.doc

摘 要 USB(Universal Serial Bus,通用串行总线)是外围设备与计算机进行连接的新型接口总线。自从问世以来,凭借其高速度和高通用性迅速成为个人计算机与外未设备相连的标准接口,现在市场上售出的所有PC机都百分之百的支持USB接口,而且很多外设只推出USB版本。可以预见,USB的应用回越来越广泛,其传输速率和通用性也会越来越高。 固件程序的设计是USB设备开发过程中非常重要的一个环节,它直接影响到USB设备的传输速度。本文在深入分析USB2.0协议、海量存储类规范和SCSI指令集的基础上,提出了一种专门针对U盘应用的固件设计方法,重点论述了固件实现过程中的几个关键技术,证明USB2.0接口控制芯片的固件设计达到了预期目标。 由于USB2.0协议的主/从式模式,固件的整个流程基于中断模式实现。固件程序主要包括三部分:1)初始化单片机和所有外围电路;2)中断服务程序,完成各个模块产生的中断响应;3)任务处理子模块,供中断服务程序调用,完成具体的USB设备操作。在实现的过程中,主处理程序完成系统的初始化并轮询中断,固件负责协议的解析和处理,不干预数据的传输,这样,保证了快速的数据传输和较好的软件结构。 通过对调试过程和性能测试结果,我们可以看出,固件能够控制硬件电路快速的完成各种操作,达到了预期的设计目标。 关键词:通用串行总线;固件;闪存;块传 ABSTRACT Universal Serial Bus(USB)is a new type of serial bus which connects peripherals to computer.Since its advent,USB has rapidly become a standard interface between personal computer(PCs)and peripherals for its high transfer speed and applicability.All PCs on market today support USB interface with no exception,while many peripherals are found with only USB interfaces.It is predictable that USb will be more and more popular with its transfer speed and applicability being increasesd. Firmware is very important in a USB device project, which affects the transfer speed of USB directly.This dissertation puts forward a new solution on the firmwares design of flash memory disk based on studying USB2.0 protocol, mass storage class and Small Computer System Interface (SCSI) command sets thoroughly. This dissertation describes the key technologies during the realization of firmware being designed.which testifies that the firmware of USB2.0 Interface Controller ASIC achieves the desired sights. In accordance with the Master-Slave architecture in USB 2.0 protocol, the workflow of the firmware is implemented based on interrupt pattern. The firmware program includes three sections: initialization microcontroller and all the peripheral circuits; interrupt service routine, which triggers interrupts and executes the interrupt;task module, which is called by the ISR.During the procedure of realization

文档评论(0)

1亿VIP精品文档

相关文档