Design and Realization of CAN Node Based on ARM9 and Linux
- Author
- WenZhenYu
- Advisor
- QinGuiHe
- School
- Jilin University
- Major
- Software Engineering
- Classification
- TP273.5 Computer control, computer control system
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 381
- Citations
- 3
Abstract
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.
Table of contents
Summary 4-7
Chapter 1 Introduction 7-9
1.1 Project Background 7
1.2 topics in accordance with 7-8
1.3 In this paper, 8-9
Chapter 2 Embedded Linux and CAN bus technology 9-15
2.1 Embedded System Overview 9-11
2.2 embedded Linux system 11-12
2.3 Linux driver development technology 12-14
2.3.1 Device Driver Overview 12-13
2.3.2 Linux driver development process 13-14
2.4 CAN bus technology 14-15
Chapter 3 of the overall design of the platform to build 15-33
3.1 overall design 15-16
3.2 hardware system design 16-23
3.2.1 microprocessor the AT91SAM9260 characteristics outlined 17-18
3.2.2 CAN controller MCP2515 features outlined 18-19
3.2.3 the CAN interface hardware design 19-23
3.3 software platform to build 23-33
3.3.1 cross-compile environment to establish 23-25
3.3.2 the Bootloader transplantation 25-28
3.3.3 the Linux kernel transplantation 28-31
3.3.4 NFS and TFTP services configuration 31-33
Chapter 4
CAN driver module 33-51
4.1 CAN module structure 33-35
4.2 SPI device and the driver associated with 35-39
4.2.1 SPI devices registration process 35-37
4.2.2 SPI drives the registration process 37-39
4.3 MCP2515 driver specific to achieve 39-47
4.3.1 load / unload module 39-41
4.3.2 I / O request module 41-46
4.3.3 interrupt service module 46-47
4.4 driver module transplantation 47-51
Chapter 5 test and the results 51-57
5.1 driver loaded information 51-52
5.2 application testing procedures 52-57
5.2.1 of important data structures 52-53
5.2.2 The test procedures 53-57
Chapter 6 Conclusions and Outlook 57-58
References 58-60
thank 60-61
Summary 61-64
Abstract 64-65
Related dissertations
- Design and Application of the Distributed Monitoring System Based on Embedded Web
- Movement Gait Control Research of Six Feet Bionic Robot
- Design and Implementation of Climate Compensator Based on ARM9
- Design of Remote Monitoring System for ZigBee-based Embedded Refrigerated Truck Environment
- Design of a Data Communication System for Theodolite Based on Embedded Technology
- Study of Eliminating Image Rotation Control Based on Altitude-azimuth Telescope
- The Design of the Atmospheric Environment Monitoring System Based on ARM
- Research of ARM9-Based NIR Nondestructive Testing Instrument for Camellia Oil
- A Design of Integrated RTU Based on ARM9and Linux
- Design on the System of Tower Crane Video Surveillance Based on Hi3512
- Design of embedded wireless network video monitoring system based on Web Technology
- The Design of Coal Mine Monitoring Station Based on Embedded
- The Research and Exoit of Intelligent Household Security Monitoirng System Based on ARM9
- Design and Implementation of Data Acquisition System Test Platform
- Research and application of field information collection system based on embedded platform
- Can Bus Analysis and Application Programming
- Design of Embedded Wireless Intelligent Home Gateway Based on ARM9
- Design and Research of Face Detection System Based on ARM9
- Research for Wireless Video Surveillance System Based on ARM and Linux
- Research for the Technology of Multi-channel Wireless Video Surveillance System