• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (5): 68-72.

• 论文 • 上一篇    下一篇

基于CotexM3的USB-CAN转换器开发

岳彬彬,李向阳   

  1. (华南理工大学自动化科学与工程学院,广东 广州 510640)
  • 收稿日期:2011-09-12 修回日期:2011-11-02 出版日期:2012-05-25 发布日期:2012-05-25

Development of the USBCAN Converter Based on CotexM3

YUE Binbin,LI Xiangyang   

  1. (School of Automation Science and Engineering,South China University of Technology,Guangzhou 510640,China)
  • Received:2011-09-12 Revised:2011-11-02 Online:2012-05-25 Published:2012-05-25

摘要:

对比USB总线和CAN总线性能,根据实际需要,设计了基于STM32f107 CotexM3的USB CAN转换器,该转换器体积小、成本低、可靠性高,具有广阔的应用空间[1]。本文介绍转换器的整体设计思路,简析硬件电路结构、固件程序开发及其流程、USB的驱动程序开发、基于VB的上位机应用程序开发,最终实现设备的快速开发。设备可实现USB和CAN 协议的数据转换,完成对CAN侧数据的收发、监听、显示和存储。开发过程独到之处是从实际应用的角度出发,借助第三方软件Windriver快速开发USB驱动,避开复杂设计,避免运行中的可能错误会导致的对整个操作系统的灾难性后果。

关键词: 通用串行总线, 控制局域网, 转换器, CotexM3

Abstract:

Comparing the USB and CAN protocols, for practical use, a converter based on STM32f107 CotextM3 is designed in this paper .It is small, cheap, and reliable, which makes sure it can be used widely. This paper includes the design methods, the framework of drivers developed by Windriver, the software development based on VB, which facilitates the device development. This converter realizes the data communication and protocol conversion between USB and CAN, which accomplishes data transmission, monitoring, display and storage. The highlight of this paper is that the rapid development of drivers is based on the thirdparty software Windriver, which avoids the catastrophic effect of possible errors on the operating system.

Key words: USB;CAN;converter;CotexM3