摘要
Cypress公司的USB2.0控制芯片CY7C68013A可配置成3种接口模式:端口、从属和GPIF主控模式;从属模式和GPIF主控模式实现了USB内部数据缓冲与外部设备之间的无缝连接,常用于高速实时传输外设;而对于低速实时传输和高速非实时传输外设,由CPU控制的端口模式则提供了有效的传输方案;针对于端口模式文献介绍较少的现状,同时为帮助开发者更好地理解USB数据传输过程,提出了端口模式下数据传输模块的设计方法;以芯片CY7C68013A为核心,通过描述USB数据传输过程,给出了端口模式下数据传输模块的通信协议设计、硬件设计、固件程序设计、驱动程序设计和上位机界面程序设计;模块实现了计算机与外设数据的可靠传输,测试表明,满足了数据传输系统要求;采用命令/响应式传输方式,保障了数据稳定可靠传输,具有很高的使用价值,同时为其它接口模式的开发提供了借鉴意义。
Three interface modes,Ports,Slave FIFO and GPIF Master,are available for CY7C68013A which is a Cypress’s USB2.0 microcontroller.In Slave FIFO mode and GPIF Master mode,the data FIFOs in the USB connect directly to outside interface.And the both mode are usually used for a peripheral which requires high-speed and real-time data transmission.On the other hand,the Port mode where CPU participate provides an effective method for a peripheral which requires low-speed and real-time or high-speed and non-real-time data transmission.Because the Port mode was less paid attention in the previous literatures,and in order to help developers to better understand the details of USB data transmission,this paper introduced the design of data transmission module in detail.This module chose the chip CY7C68013A as the core of the design.Firstly,it described the USB data transmission process.And then,it focused on communication protocol design,hardware design,firmware design,driver software design,and host application design,which are covered in the module design.Reliable data transmission between the computer and peripherals had been achieved by this module.And the test results showed that this module can meet requirements for data transmission system.This module can ensured data be transmitted reliably with the use of command/response transmission protocol,and had high application value.And it had referential value for other interface modes design.
作者
刘正发
韦飞
冷双
王永松
Liu Zhengfa;Wei Fei;Leng Shuang;Wang Yongsong(National Space Science Center,Chinese Academy of Sciences,Beijing 100190,China;University of Chinese Academy of Sciences,Beijing 100049,China)
出处
《计算机测量与控制》
2018年第3期158-161,166,共5页
Computer Measurement &Control
基金
科技部重大科学仪器开发专项(2012YQ130125)