基于ARM9的嵌入式车载网关设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着汽车电子技术的发展及汽车性能的不断提高,汽车上的电子装置越来越多。传统的电器系统大多采用点对点的单一通信方式,相互之间很少有联系,这样必然造成庞大的布线系统,并且很大程度上影响了整车的性能。为了适应汽车电子设备的发展,车载网络系统应运而生,例如CAN和LIN, F1exRay等在车载网络系统中均有应用。其中,CAN总线结构独特,性能可靠,所以CAN在车载网络中的使用最为广泛。
     可是由于CAN应用于车身网络低端通讯又具有成本高的缺点。所以,汽车车身控制网络目前要解决的问题就是再建立一个统一的、低成本的低端通讯网络标准,作为CAN的辅助总线而存在。实现车身控制网络的层次化,以更低的成本实现车身控制网络。而LIN总线的目标就是定位于车身网络模块节点间的低端通讯,并且可靠性高,易于开发。本文简单介绍了国内外车载网络的发展现状和趋势。在熟悉了CAN总线和LIN总线的基础上,结合嵌入式系统的特点,给出了基于嵌入式Linux平台的车载信息系统的设计方案和实现。
     为了对车载网络各节点进行有效的监控,以及数据的处理,设计了车载网络主控制节点。主控制结点采用ARM9内核的S3C2410处理器,软件以Linux为平台,实现了基于MCP2510的CAN设备驱动程序,整个系统具有高可靠性和较强的处理能力。所以,为将来扩展成车内信息集控中心提供了软硬件环境。除了CAN总线以外,本系统还将LIN总线应用到车载网络中,提出了车内低成本的CAN/LIN混合网络体系结构。
With the rapid development of electronic technique and the continuity improvement of vehicle performance, the electronic equipments on vehicle are becoming more and more. Traditional electric systems mostly introduced point-to-point communication mode, little affiliation with them. That made the connection system complex. In order to adapt the development of the vehicle electronic equipment, the in-vehicle network system has come forth. For example, CAN bus, LIN bus and F1exRay have been applied in in-vehicle network system. Because of particular structure and stable performance of CAN bus, which applied in it is the most widely.
     CAN is a serial communication protocol which was declared by Bosch company. Compared with other kinds of field buses, CAN bus has low price and good performance. It saves lots of wirings because all of the CAN nodes are linked to the same bus. One message on CAN bus needn’t be sent several times because it is transferred serially and so it is shared by all nodes. Messages of CAN have short frame, whose data field is composed of 8 bytes at most, as a result, every message is transmitted quickly on bus. Nodes in bus compete with each other for bus occupancy privilege when they are going to send message to others. CAN bus uses message coding instead of address coding, and its baud rate could reach 1Mbps. It also has advantages in error detection and self recovery, which evidently ensure the reliability data transmission. Lin bus is an more lower bus than CAN, it is applied in lower velocity environment as supplement of CAN bus.
     In recent years, a lot of automobile factories put their emphases on CAN researching and some of them have worked out products of CAN. We can infer easily that CAN bus would have bright future in the next few years.
     In order to managing the nodes of in-vehicle network efficiently and processing the data, I have designed the MCN(main control node) of the in-vehicle network. That is carried out by the S3C2410 MPU of ARM9 core, and the software platform is Embedded Linux.. The gateway process the communication with the CAN network and Lin network. There are four nodes in the CAN network, They are fixed separately in the four corners of vehicle, which are linked to many lights (such as high beam, passing lamp, turn light, emergency light, etc.).The LIN network also contains four nodes which are linked to different doors.
     Among the gateway circuit, the main chips in the CAN network are: S3C2410, MCP2510 and 82C251, the main chips in the Lin network are S3C2410 and TJA1020. Their characters and functions are shortly described in this paper. The circuit diagrams are also provided in detail. Samsung's S3C2410X is a 16/32-bit RISC microprocessor. This product is designed to provide hand-held devices and general applications with cost-effective, low-power, and high-performance microcontroller solution in small die size.To reduce total system cost, the S3C2410X includes the following Components separate 16KB Instruction and 16KB Data Cache, MMU to handle virtual memory management,
     Besides the existing physical layer protocol data link layer protocol, the application layer protocol should be defined according to the special purpose in this design. Eight different message IDs are used because there are eight kinds of light should be controlled. Those IDs present the meaning of messages, and they also denote the static priority of messages. One byte data is used in every message frame to denote the specified operation type to be done. When several nodes are sending messages to bus at the same time, the one whose message has high priority will get the access to use bus, and the others have to wait until the bus is free again. The gateway should control the four doors to open or close them. Every door is given signal address from oxc0 to 0xc3. Eight instructions are defined to control the doors. Thirty two instructions are defined to explain the feedback.
     Aside from the hardware circuit and the protocol definition, the software also plays a big part in this design. The software is programmed in CAN device drivers and Lin device drivers based on Linux. The application programmer also is realized based on drivers to communicate with CAN and Lin network.
     This design testifies the feasibility of using CAN bus and Lin bus to car body network. it provides the software and hardware environment of extending to the in-vehicle information center in the future. Besides CAN bus, this system used LIN bus into in-vehicle network, and present low cost CAN/LIN mix network architecture for vehicle. The wireless network part could be added in the future work, and we will put emphasis upon the research of communication between different bus network, such as MOST .
引文
[1] 潘巨龙,黄宁,姚伏天,陈科杰,道克刚.ARM9 嵌入式 Linux 系统构建与应用.北京航空航天大学出版社.2006,第一版 1-10,75-154.
    [2] 孙天泽,袁文菊,张海峰,嵌入式设计及 Linux 驱动开发指南-基于 ARM9处理器,2005,第一版,76-94,138-149.
    [3] 饶运涛,邹继军,郑勇芸,现场总线 CAN 原理与应用技术,北京航空航天大学出版社,2003,第二版,1-85,137-159.
    [4] 秦贵和,车上网络技术.机械工业出版社,2003,第一版,18-48,74-107.
    [5] 倪继利等,Linux 内核分析及编程,电子工业出版社,2005,第一版,371-390,683-712.
    [6] 戴佳,戴伟恒,51 单片机 C 语言应用程序设计实例精讲,电子工业出版社, 2006,第一版,248-260.
    [7] (美) Robert Love 著,陈莉君,康华,张波 译, Linux 内核设计与实现,机械工业出版社,2004,第一版,43-51.
    [8] 王巍,秦贵和,范玮, 基于 CAN 总线的汽车车身线束设计,制造业自动化,2005.27(7),71-74.
    [9] 董志国,李式巨,嵌入式 Linux 设备驱动程序开发,计算机工程与设计,2006,20(27),3737-3740.
    [10] 罗锋,苏建,袁大宏,汽车网络与总线标准,汽车工程,2003,4(20),372-376。
    [11] 魏学哲,孙泽昌,陈觉晓,汽车网络分类方法及主流协议发展趋势,同济大学报(自然科学版),2004,6(32), 762-766.
    [12] 康涌泉,桑 楠,邹楚雄,邓竹莎,嵌入式交叉开发环境,计算机应用,2006,6(26),261-263.
    [13] 程军,崔继波,荀凯英,车辆控制系统 CAN 总线通信的实施方法,汽车工程,2001,5(23),300-305。
    [14] 杨波,徐成,李仁发,嵌入式 Linux 上的 CAN 设备驱动程序的设计,科学技术与工程,2004,12(4),1019-1023.
    [15] 朱华旭,CAN/LIN 总线技术在车内网络中的应用研究,武汉理工大学学报(信息与管理工程版),2005.27(5),204-206.
    [16] 广州周立功单片机发展有限公司,TJA1020 收发器应用指南.
    [17] 广州周立功单片机发展有限公司,TJA1020 收发器手册.
    [18] 广州周立功单片机发展有限公司,LIN 协议规范 V1.2.
    [19] Data Sheet PCA82C251, Philips Semiconductors, September 1994.
    [20] USER'S MANNUL S3C2410X 32-RISC Micro-processor Revision 1.2.
    [21] Data Sheet MCP2510, Philips Semiconductors.
    [22] Data Sheet TJA1020,Philips Semiconductors.
    [23] 讲崇科,黄智刚,张军,罗喜伶,嵌入式网关的设计与实现,计算机工程与设计,2006,1(27) ,43-46.
    [24] 宋雪桦,孔峰,陈晨,汽车发动机电控单元 CAN 通信模块研制, 计算机工程与设计,2006, 9(27),1588-1590.
    [25] 程耕国,刘先勇,鲍考明,Linux 内核启动过程分析,计算机工程与设计,2006,9(27),1528-1530.
    [26] 李冰,孙建平,谭悦,张启勤,基于嵌入式 Linux 与 S3C2410 的网络视频监控,华北电力大学学报,2006,4(33) ,9-11.
    [27] 贾明,严世贤,Linux 下的 C 编程,人民邮电出版社,第一版,2001,35-42.
    [28] 杜春雷,ARM 体系结构与编程,清华大学出版社,2003,第一版,11-15.
    [29] 宗群,王宇波,李爱国, CAN 总线在电梯远程监控系统中的应用, 制造业自动化, 2004,26(7),48-50,54.
    [30] 操小军,车载网络系统及 CAN 协议的应用分析,中国汽车工程学会布,2003学术年会论文集,SAE-C2003E224,2003.10.
    [31] 王建,左启耀,高峰,基于 CAN 总线的客车控制系统,吉林大学学报(工学版),2004,34(1),282-285.
    [32] 李光升,谢永成,吕强,李年裕,基于 CAN 总线技术的车辆通讯系统,装甲兵工程学院学报,2000,14(3),8-52.
    [33] 白中浩,曹立波,刘拥华,王耀南,基于 CAN 总线的汽车车身网络系统开发,客车技术与研究,2005,27(6),18-20.
    [34] Peter Hank,Egon J?hnk,SJA1000 Stand-alone CAN controller,ApplicationNote AN97076,Philips Semiconductors,December,1997.
    [35] J?hnk, E. and Dietmayer, K. Determination of Bit Timing Parameters for the CAN Controller SJA1000 , Application Note AN97046, Philips Semiconductors, July 1997.
    [36] Eisele, H. and J?hnk, E.: PCA82C250/251 CAN Transceiver,Application Note AN96116, Philips Semiconductors, October 1996.
    [37] W.RICHARDSTEVENS ,BILL FENNER ,ANDREWM. RUDOFF,UNIX Network Programming,清华大学出版社,2006,第一版,56-78.
    [38] 秦贵和,宋益青,李宝玲,基于 ARM9 和嵌入式 Linux 的 CAN 网关软硬件系统设计,微计算机信息,2007,3(3),271-273.
    [39] 周德恒,基于嵌入式 LINUX 平台的车载网络系统研究与实现,武汉理工大学,硕士学位论文,2006.05.
    [40] 张义磊,基于 S3C2410 嵌入式工业控制器的关键技术研究,中国科学院研究生院,硕士学位论文,2005.01.
    [41] 唐义清,基于 CAN 总线的车辆测控系统的研究,西华大学,硕士学位论文,2006.03.

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

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

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