Font Size: a A A

Design And Implementation Of CAN Bus And Ethernet Backup Gateway Based On Embedded System

Posted on:2017-04-03Degree:MasterType:Thesis
Country:ChinaCandidate:C LiuFull Text:PDF
GTID:2272330482478476Subject:Electronic Science and Technology
Abstract/Summary:PDF Full Text Request
As the rapid development of modern ship automation oriented large-scale, high-speed and intelligent, there are increasingly higher requirements for automatic control of the ship. CAN-bus does not fit long-distance data transmission and remote control, though the CAN-bus with high network security, communications reliability, timeliness and low cost, and many other advantages. CAN-bus network also has the inconvenience on network composition and information sharing. But the strong point of Ethernet such as stable communication quality, self-correcting capabilities, and unlimited transmission distance can compensate the shortcomings of CAN-bus. In summary, it is very necessary that to create the effective data communication between the field bus underlying ship and Ethernet.CAN-bus and Ethernet gateway is a protocol conversion device between CAN-bus and Ethernet. The gateway is used to exchange information between CAN-bus and Ethernet transparently. This paper is aimed to design and implement a CAN bus and Ethernet two-way backup gateway for data communication between CAN-bus and Ethernet. The gateway is designed by multithreading. Design platforms are SAM9X25 board of ATMEL and embedded linux system. Designed by a operation of the public data interaction region, the hot standby redundancy ways of information have increased to 4 kinds.Based on research of CAN-bus principles and combined with the features of the Linux system, the whole design is divided into CAN bus transmission, Ethernet transmission tips, memory management, fault detection and other parts. By establishing a ring buffer and public semaphore, the threads working are coordinated. The real-time performance and reliability of the gateway has been improved.In this paper, the function such as data transmission, baud rate setting and mask code(filter code) setting has been realized in CAN-bus transmission. In Ethernet part, the information transmitted is data and waring sign. In the part of memory management, the ring buffer is able to be read and wrotten at the same time on macro level. It also realized the function that detecting occupancy degree and warning. In the part of fault detection, the function that CAN bus fault detectionincluding bus open circuit and bus short circuit has been realized. It also has been realized that to obtain the network interface status and judge the Ethernet connectivity.In this paper, Ethernet transmission mainly uses the TCP protocol, while supporting the UDP protocol. In addition, this design implements the user parameter setting mode.In this mode, user can set related parameters of gateway after account password authentication. Finally, the dynamic link library used by PC software has been developed on the VC++ 6.0.Finally, the design of the gateway can finish protocol conversion and fault detection. It can also report error of CAN, fault of Ethernet and other warningto the PC.By the four kinds of redundancy,it improves the reliability, satisfied the design requirements of Marine equipment and suitable for various fields of automatic control.
Keywords/Search Tags:Gateway, CAN-bus Communication, Ethernet Communication, Embedded Linux
PDF Full Text Request
Related items