Application and Study of CAN Bus and J1939 Protocol Based on ARM
- Author
- LiYan
- Advisor
- PanMing
- School
- Guilin University of Electronic Science and Technology
- Major
- Systems Engineering
- Classification
- TP273 Automatic control,automatic control system
- Degree
- Master's thesis
- Year
- 2010
- Downloads
- 296
- Citations
- 1
Abstract
Controller Area Network (CAN) bus has become one of the most important busworldwide. According to the OSI model defined by International Organization for Stan-dardization (OSI), CAN protocol defines the standards of physical layer and data linklayer. To build a perfect communication system, it is necessary to choose a appropri-ate application layer protocol based on CAN. As the most popular high-level protocolapplied to trucks and passenger cars, however, J1939 is limited in use for its expensivecost. Aiming at the implementation of J1939 protocol this paper reported the design ofJ1939 protocol communication system using high-powered ARM9 architecture-based32-bit microprocessor S3C2410 as core. The major achievement are as follows:(1) Built a Linux-ARM development platform, based on ARM microprocessorS3C2410 and embedded Linux operating system (OS). Firstly, the details of the op-eration of U-boot, embedded Linux kernel and root file system are included; the im-plementation of automatic actuation of application program in the process of buildingthe platform is described: CAN driver is static compile to the kernel when making theembedded Linux kernel. Then add the J1939 protocol stack and user application intoroot file system. At last, modify the system initialization functions;(2) Based on intensive analysis of the CAN2.0B protocol, the Polo car CAN dataframes are captured and their frame structure are analyzed with a USB virtual oscil-loscope;(3) CAN driver based on single chip are written, and the implementation detailsof driver are reported, including the set of CAN baud rate, how the driver operate theregister of CAN controller MCP2510 in the term of figures, text and program, as wellas how driver support the CAN extending frame;(4) New features of 100kbps baud rate supporting of and CAN extending frame isadded, in the process of writing CAN driver based on embedded Linux OS. Reportedare also the detailed calling process and realization method of driver in the embeddedLinux OS;(5) In order to realize a stable J1939 communication network, from simply to com-plex system, a simple CAN bus communication network is firstly realized, with 100kbpsbaud rate, custom application protocol and consist of ARM development board, CANbus test-bed of Polo car and monitoring node. The experiment results verified thecorrectness of the simple CAN communication network;(6) After intensively study of the J1939 protocol, a J1939 protocol with basicfunction is written. Consists mainly of the realization of data link layer and net-work management. its features includes: address claiming message, request of address claiming message, management of address con?ict, order message, broadcast message,request of engine data, transport protocol function and so on;(7) A J1939 communication network is implemented according to J1939 protocol,with 250kbps baud rate and consist of ARM development board, virtual node andsingle chip note. The experiment results verified the correctness of various functionsof the J1939 protocol stack designed. The process of experiment verified the stability,validity and security of data transport.
Table of contents
Abstract 3-4
Abstract 4-9
The first chapter 9-18
1.1 project background and significance 9-10
1.2 CAN bus technology application status 10-11
1.2.1 CAN bus technology application status abroad 10
1.2.2 Domestic CAN bus technology application status 10-11
1.3 CAN bus protocol description 11-14
1.3.1 J1939 protocol 12-13
1.3.2 CANopen 13
1.3.3 DeviceNet protocol 13-14
1.3.4 iCAN protocol 14
1.3.5 TTCAN protocol 14
1.4 This topic optional CAN bus application layer protocol 14-15
1.5 ARM technology introduction 15
1.6 embedded operating system 15-16
1.7 The paper is organized 16-18
The second chapter discusses system solutions 18-24
2.1 System Requirements Analysis 18
2.2 overall system implementation 18-24
2.2.1 CAN bus physical layer and the data link layer implementation 18-19
2.2.2 CAN bus application layer and the driver realize 19-20
2.2.3 CAN bus communication network to achieve 20-22
2.3 Chapter Summary 22-24
Chapter embedded Linux operating system to build 24-33
3.1 embedded Linux operating system boot process 24-25
3.2 U-boot production 25-27
3.3 Linux kernel production 27-30
3.3.1 Linux kernel and kernel compilation cut 27-28
3.3.2 Embedded Linux kernel porting 28-30
3.4 Linux root file system produced 30-32
3.4.1 Making a basic root file system 30-31
3.4.2 application boot from the start 31-32
3.5 Summary 32-33
Chapter CAN bus driver programming 33-51
4.1 CAN bus technology introduction 33-42
4.1.1 CAN protocol features 33
4.1.2 CAN protocol standard 33-34
4.1.3 CAN2.0B agreement describes 34-40
4.1.4 CAN test bed frame analysis 40-42
4.2 MCP2510 introduction 42-44
4.2.1 SRAM registers introduced 42-43
4.2.2 SPI introduced 43-44
4.3 microcontroller-based CAN bus driver programming 44-48
4.3.1 baud rate setting 44-45
4.3.2 data frame transmission 45-47
4.3.3 Data frame reception 47-48
4.4 embedded Linux operating system based on CAN bus driver written 48-50
4.4.1 driver calls the process 49-50
4.4.2 driver realize 50
4.5 Chapter Summary 50-51
Chapter simple CAN bus communication networks 51-59
5.1 CAN bus test platform to introduce 51-52
5.2 simple CAN bus communication network hardware 52-53
5.3 CAN bus communication network software simple introduction 53-56
5.3.1 simple CAN bus network application programming 53-55
5.3.2 LabVIEW PC software 55-56
5.4 simple CAN bus communication network experiment and results analysis 56-58
5.5 Chapter Summary 58-59
Chapter J1939 communication networks 59-88
6.1 J1939 protocol model discussed 59-60
6.2 J1939 communication network overall hardware architecture 60
6.3 J1939 data link layer protocol stack implementation 60-75
6.3.1 J1939 frame format analysis 60-62
6.3.2 J1939 protocol data transmission model 62-63
6.3.3 J1939 protocol data transmission to achieve code 63-65
6.3.4 The concept of parameter sets and analysis 65-68
6.3.5 J1939 protocol stack message mechanism to achieve 68-70
6.3.6 J1939 transport protocol stack implementation 70-75
6.4 Network management implementation 75-83
6.4.1 definition of the name 75-77
6.4.2 herein CA name 77-78
6.4.3 CA address 78
6.4.4 network management program to achieve 78-83
6.5 J1939 communication network applications written 83
6.6 J1939 communication network experimental results and analysis 83-87
6.7 Chapter Summary 87-88
Chapter Summary and Outlook work 88-89
References 89-92
Thanks 92-93
Author During master key findings 93
Related dissertations
- The Design of Small Coal Mine Remote Monitoring System Based on ARM
- The Design and Realization of Extended System in Distributed Firealarm System Based on Microcontroller
- The Design of Monitoring System for the Photovoltaic Plant Based on DSP
- Design and Application of the Distributed Monitoring System Based on Embedded Web
- The Design of Hybrid Electric Bus Data Acquisition and Test System
- Industrial Field Data Acquisition System Design Based on CAN Bus
- Design of the Hazard Source Monitoring System Based on CAN Bus
- The Design of Displacement Detection System Based on CPLD Grating Subdividing Technology
- Research on Data Acquisition System of Can Bus
- The Design and Implementation of Vehicle Data Acquisition and Communication Device Based on CAN Bus
- Design of Remote Monitoring System of Agricultural Field Information Based on GPRS Network
- Design and Implementation of Intelligent Wiring Hardness Detection System
- Research on Indoor Localization System for Intelligent Wheelchair
- Research on CAN Bus Communication and Application Experiments
- Based on Can Field-bus Technology and Web Service Home Intelligent Control System Design and Realization
- Research of Fieldbus Relay Basing on CAN Bus
- Research and Realization of Fieldbus Conversion and Monitoring System Based on ARM
- CAN Network Development of Commercial Vehicle
- Based on Smith Fuzzy-PID of Hot Drawing Roller Temperature Control System
- Research on the Scheduling Algorithm of Networked Control System Based on CAN Bus