Font Size: a A A

Design And Realization Of CAN Node Based On ARM9 And Linux

Posted on:2010-12-01Degree:MasterType:Thesis
Country:ChinaCandidate:Z Y WenFull Text:PDF
GTID:2178360272995993Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of information and network technology, embedded systems have been widely used in national defense, traffic, energy sources, industry and communication; and they play an important role in daily life. And Linux becomes the preferred operating system for embedded environments for its advantages such as reliability, stability, free, open source and easiness to be transplanted and cut. So it has tremendous potentials and values in the automobile market.In the field of automobile electronics in embedded systems, in-vehicle bus is also a fast-developing research area. CAN (Controller Area Network) bus is a popular field bus in recent years. As a transmission protocol for automobiles, it is standardized by Robert Bosch to solve the data interchange between the numerous controllers and the equipments within the automobile, and can effectively support real-time control and distributed control of the serial communication networks. Now, it has been widely used in various areas of embedded field.Based on the project of Vehicle Traveling Recorder (VTR), an idea of combination of CAN bus technology and embedded Linux system is proposed in this paper. This system provides the VTR an access to the in-vehicle CAN bus. The system can get real-time information about running state of the vehicle through other electronic control units in the CAN bus and then makes feedback to the monitor Center.Vehicle Traveling Recorder, also known as "automobile black box", is an automobile terminal product which can record vehicle speed, time, mileage and other vehicle state information. These records can be analyzed to appraise the traffic accident, improve the capability of the law of traffic administration and ensure the traffic security. In the case of a traffic accident, it sends urgent messages on time to Information Center through the wireless Internet automatically, and provides timely emergency aid for the injuries.In order to share the information of all the in-vehicle electronic units, CAN bus module in this terminal, is used as an access point to the in-vehicle network. As one of the most promising field bus, the data communications based on CAN has outstanding reliability, flexibility and real time capability. These advantages provide a solid foundation for monitoring the vehicle running state. In this paper, we discuss the information interaction between this terminal and other electronic units through the CAN bus network. An embedded system is a specialized computer system which provides a specific function such as control, monitor or other services. In some cases, embedded systems are parts of a larger system or product, such as the Anti-lock Braking System in a car. As a popular field bus, CAN bus is a communication protocol with reliable performance, low-cost and can be used in industrial control. The application of this technology realizes the information interaction among in-vehicle electronic devices.This terminal is based on Embedded Linux and ARM9 platform. The MCU is ATMEL's AT91SAM9260, which is the first member of the pin-compatible ARM9-based microcontroller family and shares the same programming model as ARM7-based controllers, allowing direct migration among controllers based on different ARM cores. The version of Linux OS kernel is 2.6.25 which is a recently released one, so the system has better expansibility, compatibility and stability.The MCU can communicate with the CAN controller MCP2515 through the SPI interface and work in SPI host mode. Besides, MCP2515 can be connected to the physical CAN bus through CAN transceiver PCA82C250. The design of the software includes device driver and software platform structures.Linux manages the hardware devices of a machine in a simple and efficient way by offering the user a simple and uniform programming interface. Device driver is a bridge or interface between hardware and the end-user/programmer. When the system calls occur, MCU communicates with CAN controller through SPI interface.The CAN driver module can be divided into 3 parts: loading/unloading module, I/O service request module and interrupt service module. The first module is responsible for loading and unloading the device driver when instruction"insmod"or"rmmod"is called. The I/O service request module provides a series of uniform interfaces. These interfaces are defined as a structure named file_operations, and mapped to the specific device driver when a related system call (such as"read") is triggered. The interrupt service module receives interrupt signal and calls the corresponding interrupt service program according to a certain interrupt number and interrupt flags.Through a series of test, it has been proved that the CAN node on the VTR has strong design and practice feasibility. The outstanding reliability, flexibility and real time capability of CAN bus ensures the in-vehicle network's integration and information sharing. In order to meet the further needs of practical application, the next phase of work should concentrates on improving the upper application of this CAN module.
Keywords/Search Tags:CAN bus, Linux, ARM9, MCP2515
PDF Full Text Request
Related items