Font Size: a A A

Design And Implementation Of CAN Gateway Based On Dual Processor

Posted on:2011-07-16Degree:MasterType:Thesis
Country:ChinaCandidate:G X LiFull Text:PDF
GTID:2178360305955209Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the rapid development of electronic technology, more and more electronic control units are used in the Automotive System, in order to meet the increasing requirements in the area of function. Electronic has brought significant performance improvements in many aspects, such as, power, economy and comfort, etc. comparing with the original line-driven. And, it also comes out with complex wiring, space constraints, less reliability in operating. It also can't complete large data exchange well between the subnets. So, the concept about vehicle bus networks has been put forward, in order to achieve data exchanging and sharing between electronic control units, to enhance the reliability and security of electronic systems.Currently, there are a lot of automotive bus protocols, and these bus protocols could be divided into four classes, A, B, C, and D, in accordance with SAE. Where, class A is used in low-speed networks of network-oriented sensor/actuator control. The data transmission bit rate is typically less than lOkb/s, and is mainly used for locks, electric windows, lighting and other controls. A typical example is the common LIN bus. Class B is a network for data sharing between separate modules with the medium-speed. The range of data transmission bit rate is from lOkb/s to 125kb/s, and is mainly used for electronics comfort module, instrument displays and similarities, such as low-speed CAN bus with speed range of 47.6kb/s to 125kb/s. Class C is defined as a high-speed network, which is used for real-time closed-loop control of multi-channel transmission, e.g. traction control, engine control, braking. Its data transmission bit rate range is from 125kb/s to 1Mb/s, such as the CAN bus with rate higher than 125 kb/s and FlexRay bus. Class D is another high-speed transmission network used for multimedia information in-car multimedia, audio, navigation systems with up to 2 Mb/s, such as the MOST bus. Among these bus classes; CAN bus wins the greater favor from many well-known auto manufacturers with its advantages, such as, low-cost, better reliability, good communication ability, real-time and reliability. And more and more manufacturers are participating in the research and implements.As the automotive system is complex. It is a combination system of the power system, diagnostic systems, comfort systems, information systems and instrumentation systems with different requirement rather than a single one. So, it makes the automotive network is a group of the various sub-systems rather than a simple local network. At present, the development of vehicle electronic needs a large number of data transmissions across the subsystems, and the internal information exchange is unable to meet the requirement of network. So, an interconnection device is pressing needed, which could connect several subsystems and build a real-time and stable data transmission bridge stably. The definition of vehicle gateway was put forward.This project is to build on forecasting the core of the vehicle network in further developing, to present a method to support communication between sub-networks, to design a gateway prototype. In order to improve the performance of a single processor gateway, we realize a simple gateway with dual processor using the co-processor integrated in the chip. The co-processor completes the work about data sending and receiving on the CAN module. It also isolates the internal communication in the subnets. The host processor can be liberated from the heavy work of I/O interrupt, and deal with the data intently. Thus, it will promote the real-time and reliability of the system. The detail work is as followed:(1) Referring to vehicle network system-related information, to understand the composition of automotive systems with the different requirements, and automotive division and to lay a firm theoretical foundation for further research.(2) Controlling CAN bus related knowledge, to be familiar with relevant provisions of the physical layer and data link layer. Looking up relevant agreements of SAE J1939 in the physical layer, data link layer and network layer, to design a protocol according to the actual situation of the system.(3) Based on the five sub-nets of system, we build the automotive system on CAN-bus system. Looking up the related information about embedded development, we chose the MC9S12XDP512 chip which has five CAN controllers and XGATE to build gateway with dual processor.(4) The previous system design usually only consider the use of the main processor. Particularly, the main work of the host processor usually is interrupted because of the interrupt events such as I/O. Besides, the work of saving the scene and restoring the scene reduces the performance of the system greatly, increases the data latency, and also may result in blocking some of the data around the gateway owing to the delayed data processing. In order to solve this problem, we reviewed relevant information of embedded systems development, designed a simple dual processor gateway prototype using the gateway chip with the co-processor XGATE. That means, let co-processors handle the interrupt caused by getting and sending data of CAN model from the three main parts of the gateway's work. And let S12X CPU do the data processing work intensively. Mean while, the co-processor would also accomplish the task about isolating the internal communication of subnets. This will free the main CPU from constantly switch, and the overall system performance would be greatly improved.(5) We made several experiments to verify the correctness of gateway prototype. And the tests proved that the gateway could transmit data stably, real-timely, make correct conversion of data protocol, make good isolation of subnets internal communication, and reduce and network traffic. We also implement parts of network management, such as, error management and traffic control.Due to the time reasons, there are still some deficiencies in this design and implementation of the gateway prototype. For example, the implementation of error control mainly relays on CAN-bus, it can design error detection functions in higher level to improve the system reliability in data transmission. On the other hand, the follow-up work would load real-time operating systemμC/OS II into the system, and make more improvements in the performance of the gateway.
Keywords/Search Tags:CAN bus, SAE J1939, gateway, dual processor
PDF Full Text Request
Related items