CN109818844B - Communication gateway and method for converting automobile Ethernet bus into CAN bus - Google Patents

Communication gateway and method for converting automobile Ethernet bus into CAN bus Download PDF

Info

Publication number
CN109818844B
CN109818844B CN201910288287.5A CN201910288287A CN109818844B CN 109818844 B CN109818844 B CN 109818844B CN 201910288287 A CN201910288287 A CN 201910288287A CN 109818844 B CN109818844 B CN 109818844B
Authority
CN
China
Prior art keywords
pin
chip
bus
capacitor
ethernet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910288287.5A
Other languages
Chinese (zh)
Other versions
CN109818844A (en
Inventor
林发明
巫方钊
张艳荣
卓问
胡广地
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN201910288287.5A priority Critical patent/CN109818844B/en
Publication of CN109818844A publication Critical patent/CN109818844A/en
Application granted granted Critical
Publication of CN109818844B publication Critical patent/CN109818844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a communication gateway and a method for converting an automobile Ethernet bus into a CAN bus, wherein the system comprises an automobile Ethernet transceiver, a processor and a CAN bus transceiver; the automobile Ethernet transceiver and the CAN bus transceiver are both connected with the processor; the automobile Ethernet transceiver is connected with equipment connected with the automobile Ethernet through an automobile Ethernet bus interface circuit, and the CAN bus transceiver is connected with the equipment connected with the CAN bus network through a CAN bus network interface circuit. The invention solves the problem that direct communication CAN not be carried out due to the fact that the frame structure of the automobile Ethernet during data transmission is different from the frame structure of the CAN bus during data transmission by arranging the gateway as a conversion device during the communication of the automobile Ethernet and the CAN bus, realizes barrier-free communication between the automobile Ethernet and the CAN bus and ensures the real-time property of the communication process.

Description

Communication gateway and method for converting automobile Ethernet bus into CAN bus
Technical Field
The invention belongs to the technical field of automobile communication, and particularly relates to an automobile Ethernet bus-CAN bus communication gateway and a method.
Background
Ethernet (Ethernet) has been the dominant technology for Local Area Networks (LANs) because of its simplicity, high speed, and easy expansion, which has been a 30-year old generation. With the updating of applications and requirements, the applicable field of ethernet is also expanding.
The CAN bus, as one of the mainstream field buses, has the characteristics of multi-master transmission, high real-time performance, high reliability, convenient data addressing and assembly and the like. The application range of the method comprises the relevant fields of aircraft avionics system communication, automobile electronic equipment communication, industrial measurement and the like. The embedded communication network architecture of ethernet and CAN bus "dual network combination" gradually becomes the mainstream solution of industrial ethernet real-time transmission.
In the existing gateway, because the frame structure of the automobile Ethernet data transmission is different from the frame structure of the CAN bus data transmission, the communication between the automobile Ethernet and the CAN bus cannot be realized.
Disclosure of Invention
Aiming at the defects in the prior art, the communication gateway and the method for converting the automobile Ethernet bus into the CAN bus provided by the invention solve the problem that direct communication cannot be carried out due to the fact that the frame structure during the transmission of the automobile Ethernet data is different from the frame structure during the transmission of the CAN bus data.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: a communication gateway for converting an automobile Ethernet bus into a CAN bus comprises an automobile Ethernet transceiver, a processor and a CAN bus transceiver;
the automobile Ethernet transceiver and the CAN bus transceiver are both connected with the processor;
the automobile Ethernet transceiver is connected with equipment connected with the automobile Ethernet through an automobile Ethernet bus interface circuit, and the CAN bus transceiver is connected with the equipment connected with the CAN bus through a CAN bus interface circuit.
Furthermore, the main control chip of the processor is an FPGA chip with the model XC7Z020CLG 400-2I.
Further, the automobile Ethernet bus interface circuit comprises a chip U1 with the model number of RTL 8211;
the 1 st pin of the chip U1, the 2 nd pin of the chip U1, the 4 th pin of the chip U1, the 5 th pin of the chip U1, the 7 th pin of the chip U1, the 8 th pin of the chip U1, the 10 th pin of the chip U1 and the 11 th pin of the chip U1 are all connected with a 16-hole connector JA 1;
a 34 th pin of the chip U1 is respectively connected with one end of a resistor RA8 and one end of a resistor RA9, the other end of the resistor RA8 is connected with a 16-hole connector JA1, and the other end of the chip RA9 is connected with a 3V power supply;
a 35 th pin of the chip U1 is respectively connected with one end of a resistor RA10 and one end of a resistor RA11, the other end of the resistor RA10 is connected with a 16-hole connector JA1, and the other end of the resistor RA11 is grounded;
a 32 nd pin of the chip U1 is connected with one end of a resistor RA12, and the other end of the resistor RA12 is connected with a 3V power supply;
the 39 th pin of the chip U1 is connected with one end of a resistor RA7, and the other end of the resistor RA7 is respectively connected with the 47 th pin and the pin P of the chip U1 and grounded;
the 14 th pin of the chip U1 is connected with a 3V power supply through a resistor RA 13;
the 38 th pin and the 43 th pin of the chip U1 are grounded;
a 29 th pin of the chip U1 is respectively connected with the anode of a diode DA1, one end of a resistor RA1 and one end of a capacitor CA12, the other end of the resistor RA1 and the cathode of a diode DA1 are both connected with a 3V power supply, and the other end of the capacitor CA12 is grounded;
a 41 th pin of the chip U1 is respectively connected with a 6 th pin of the chip U1, one end of a capacitor CA9, one end of a capacitor CA10 and one end of a fuse FBA2, the other end of the fuse FBA2 is respectively connected with one end of a capacitor CA11 and a 3V power supply, and the other ends of the capacitor CA9, the capacitor CA10 and the capacitor CA11 are all grounded;
the 40 th pin of the chip U1 is respectively connected with the 3 rd pin of the chip U1, the 9 th pin of the chip U1, the 36 th pin of the chip U1, the 28 th pin of the chip U1, one end of the capacitor CA5, one end of the capacitor CA4, one end of the capacitor CA3, one end of the capacitor CA2, one end of the capacitor CA1 and one end of the fuse FBA1, the other end of the capacitor CA5, the other end of the capacitor CA4, the other end of the capacitor CA3, the other end of the capacitor CA2 and the other end of the capacitor CA1 are all grounded, and the other end of the fuse FBA1 is respectively connected with a 1V power supply and the grounded capacitor CA 13.
Further, the CAN bus network interface circuit comprises a chip U15 with the model number of SN65HVD233 DR;
the 1 st pin of the chip U15 and the 4 th pin of the chip U15 are both connected with a main control chip of the processor;
the 2 nd pin of the chip U15 is grounded;
the 3 rd pin of the chip U15 is respectively connected with a 3.3V power supply and a grounding capacitor C22;
the 6 th pin of the chip U15 is respectively connected with the 1 st pin of a 3-hole connector JP12 and the 1 st pin of a 2-hole connector JP14, the 2 nd pin of the 3-hole connector JP12 is connected with the 7 th pin of the chip U15, the 3 rd pin of the 3-hole connector JP12 is grounded, and the 2 nd pin of the 2-hole connector JP14 is connected with the 7 th pin of the chip U15 through a resistor R53;
the 8 th pin of the chip U15 is respectively connected with the 2 nd pin of an 8-hole connector, the 4 th pin of the 8-hole connector, the 6 th pin of the 8-hole connector and the 8 th pin of the 8-hole connector, the 1 st pin of the 8-hole connector is connected with a 3.3V power supply, the 3 rd pin of the 8-hole connector is connected with a grounding resistor R36, the 5 th pin of the 8-hole connector is connected with a grounding resistor R35, and the 7 th pin of the 8-hole connector is grounded;
the 5 th pin of the chip U15 is connected with the 1 st pin of a 2-hole connector JP 11;
the 2 nd pin of the 2-hole connector JP11 is connected to a 3.3V power supply through a resistor R37.
A communication method for converting an automobile Ethernet bus into a CAN bus comprises the following steps:
s1, initializing an automobile Ethernet transceiver and a CAN bus network transceiver;
s2, sending a broadcast frame through the source equipment and determining the target address of the target equipment;
the source equipment is connected with the automobile Ethernet transceiver;
the target equipment is connected with the CAN bus transceiver;
s3, sending the Ethernet data frame with the destination address through the source equipment, and transmitting the Ethernet data frame to the processor;
and S4, converting the Ethernet data frame into a corresponding CAN bus data frame through the processor, and transmitting the Ethernet data frame to corresponding target equipment to realize the communication between the automobile Ethernet bus and the CAN bus.
Further, the step S1 is specifically:
and the initialization of the Ethernet transceiver and the CAN bus transceiver is completed by the TPOD parameters and the RPOD parameters of the Ethernet transceiver and the CAN bus transceiver.
Further, the step S2 is specifically:
s21, receiving the broadcast frame sent by the source equipment through the automobile Ethernet transceiver, and storing the source equipment interface number and the equipment ID carried by the broadcast frame in the routing table of the processor;
s22, acquiring the data in the broadcast frame through the processor, packaging the data into a TPOD data frame, and transmitting the TPOD data frame to all devices connected with the CAN bus transceiver;
s23, generating an RPOD data frame corresponding to the TPOD data frame by the target device and transmitting the RPOD data frame to the processor;
the target device is a device matched with the TPOD data frame;
s24, analyzing the data received in the RPOD data frame by the processor to obtain the interface number and the device ID of the target device required by the transmission, and subpackaging the interface number and the device ID into Ethernet data frames;
s25, according to the interface number and device ID information of the source device stored in the routing table, transmitting the Ethernet data frame with the interface number and device ID of the target device to the source device, so that the source device can obtain the destination address of the target device;
wherein the destination address of the target device comprises the interface number and the device ID of the target device.
Further, the information in the ethernet Data frame in step S3 is a destination address, a source address, a type, a SID, a DA, an SA, Data, and a CRC in sequence;
the CAN bus network data frame in the step S4 includes 11 bytes; wherein, the first 3 bytes are frame header information, and the last 8 bytes are data information.
Further, the step S4 is specifically:
the Ethernet data frame stored in the storage unit is analyzed through the processor to obtain a data part, and the frame header information of the CAN bus network data frame is added into the data part and encapsulated into the CAN bus network data frame to be transmitted to the target equipment, so that the communication between the automobile Ethernet bus and the CAN bus is realized.
The communication gateway and the method for converting the automobile Ethernet bus into the CAN bus solve the problem that direct communication cannot be carried out due to the fact that a frame structure during automobile Ethernet data transmission is different from a frame structure during CAN bus data transmission by arranging the gateway as a conversion device during communication between the automobile Ethernet and the CAN bus, realize barrier-free communication between the automobile Ethernet and the CAN bus, and ensure real-time performance of a communication process.
Drawings
Fig. 1 is a structural diagram of a communication gateway for converting an automobile ethernet into a CAN bus provided by the invention.
Fig. 2 is a schematic diagram of an ethernet bus interface of an automobile according to the present invention.
Fig. 3 is a schematic circuit diagram of a 16-hole connector JA1 circuit connected to an ethernet bus interface of an automobile according to the present invention.
Fig. 4 is a schematic diagram of a CAN bus interface provided by the present invention.
Fig. 5 is a flowchart of a communication method for converting an ethernet bus of an automobile into a CAN bus provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, a communication gateway for converting an automobile ethernet bus into a CAN bus comprises an automobile ethernet transceiver, a processor and a CAN bus transceiver;
the automobile Ethernet transceiver and the CAN bus transceiver are both connected with the processor;
the automobile Ethernet transceiver is connected with equipment connected with the automobile Ethernet through an automobile Ethernet bus interface circuit, and the CAN bus transceiver is connected with the equipment connected with the CAN bus network through a CAN bus network interface circuit.
The automobile Ethernet transceiver is mainly used for receiving data transmitted by equipment in the automobile Ethernet and transmitting the data to the processor; and the processor is matched to extract the data part in the transmitted data frame, simultaneously retain useful information such as address, frame type and the like in the frame header, and store the data part in the data frame and the automobile Ethernet data frame transmitted by the processor so as to ensure that the data frame is accurately transmitted. The CAN bus transceiver functions similarly to the automobile Ethernet transceiver.
The processor is used for converting the automobile Ethernet data frame and the CAN bus frame to ensure the data transmission between the automobile Ethernet and the CAN bus; a routing table is provided for storing the device ID and interface number of the source device.
The main control chip of the processor is an FPGA chip with the model XC7Z020CLG 400-2I.
As shown in fig. 2-3, the ethernet bus interface circuit of the vehicle includes a chip U1 with model number RTL 8211;
the 1 st pin of the chip U1, the 2 nd pin of the chip U1, the 4 th pin of the chip U1, the 5 th pin of the chip U1, the 7 th pin of the chip U1, the 8 th pin of the chip U1, the 10 th pin of the chip U1 and the 11 th pin of the chip U1 are all connected with a 16-hole connector JA 1;
a 34 th pin of the chip U1 is respectively connected with one end of a resistor RA8 and one end of a resistor RA9, the other end of the resistor RA8 is connected with a 16-hole connector JA1, and the other end of the chip RA9 is connected with a 3V power supply;
a 35 th pin of the chip U1 is respectively connected with one end of a resistor RA10 and one end of a resistor RA11, the other end of the resistor RA10 is connected with a 16-hole connector JA1, and the other end of the resistor RA11 is grounded;
a 32 nd pin of the chip U1 is connected with one end of a resistor RA12, and the other end of the resistor RA12 is connected with a 3V power supply;
the 39 th pin of the chip U1 is connected with one end of the resistor RA7, and the other end of the resistor RA7 is respectively connected with the 47 th pin and the pin P of the chip U1 and grounded;
the 14 th pin of the chip U1 is connected with a 3V power supply through a resistor RA 13;
the 38 th pin and the 43 th pin of the chip U1 are grounded;
a 29 th pin of the chip U1 is respectively connected with the anode of the diode DA1, one end of the resistor RA1 and one end of the capacitor CA12, the other end of the resistor RA1 and the cathode of the diode DA1 are both connected with a 3V power supply, and the other end of the capacitor CA12 is grounded;
a 41 th pin of the chip U1 is respectively connected with a 6 th pin of the chip U1, one end of a capacitor CA9, one end of a capacitor CA10 and one end of a fuse FBA2, the other end of the fuse FBA2 is respectively connected with one end of a capacitor CA11 and a 3V power supply, and the other ends of the capacitor CA9, the capacitor CA10 and the capacitor CA11 are all grounded;
the 40 th pin of the chip U1 is respectively connected with the 3 rd pin of the chip U1, the 9 th pin of the chip U1, the 36 th pin of the chip U1, the 28 th pin of the chip U1, one end of the capacitor CA5, one end of the capacitor CA4, one end of the capacitor CA3, one end of the capacitor CA2, one end of the capacitor CA1 and one end of the fuse FBA1, the other end of the capacitor CA5, the other end of the capacitor CA4, the other end of the capacitor CA3, the other end of the capacitor CA2 and the other end of the capacitor CA1 are all grounded, and the other end of the fuse FBA1 is respectively connected with a 1V power supply and the grounded capacitor CA 13.
As shown in fig. 3, in connector JA1, MD10+ and MD10-, MD11+ and MD11-, MD12+ and MD12-, and MD13+ and MD 13-are respectively used as the positive and negative electrodes of the interface for connecting the target device with the automobile ethernet bus transceiver.
As shown in fig. 4, the CAN bus network interface circuit includes a chip U15 of model SN65HVD233 DR;
the 1 st pin of the chip U15 and the 4 th pin of the chip U15 are both connected with a main control chip of the processor;
pin 2 of the chip U15 is grounded;
the 3 rd pin of the chip U15 is respectively connected with a 3.3V power supply and a grounding capacitor C22;
the 6 th pin of the chip U15 is respectively connected with the 1 st pin of a 3-hole connector JP12 and the 1 st pin of a 2-hole connector JP14, the 2 nd pin of the 3-hole connector JP12 is connected with the 7 th pin of the chip U15, the 3 rd pin of the 3-hole connector JP12 is grounded, and the 2 nd pin of the 2-hole connector JP14 is connected with the 7 th pin of the chip U15 through a resistor R53;
the 8 th pin of the chip U15 is respectively connected with the 2 nd pin of an 8-hole connector, the 4 th pin of the 8-hole connector, the 6 th pin of the 8-hole connector and the 8 th pin of the 8-hole connector, the 1 st pin of the 8-hole connector is connected with a 3.3V power supply, the 3 rd pin of the 8-hole connector is connected with a grounding resistor R36, the 5 th pin of the 8-hole connector is connected with a grounding resistor R35, and the 7 th pin of the 8-hole connector is grounded;
the 5 th pin of the chip U15 is connected with the 1 st pin of a 2-hole connector JP 11;
the 2 nd pin of the 2-hole connector JP11 is connected to a 3.3V power supply through a resistor R37.
Connectors JP14, JP12, JP10 and JP11 in fig. 4 are each connected to the source device as an interface of the CAN bus transceiver, respectively.
As shown in fig. 5, the present invention further provides a communication method for converting an ethernet bus of an automobile to a CAN bus, including the following steps:
s1, initializing an automobile Ethernet transceiver and a CAN bus network transceiver;
the step S1 is specifically: and the initialization of the Ethernet transceiver and the CAN bus transceiver is completed by the TPOD parameters and the RPOD parameters of the Ethernet transceiver and the CAN bus transceiver.
S2, transmitting the broadcast frame through the source device, and determining the destination address of the destination device.
The source equipment is connected with the automobile Ethernet transceiver;
the target equipment is connected with the CAN bus transceiver.
And S3, sending the Ethernet data frame with the destination address through the source device, and transmitting the Ethernet data frame to the processor.
As shown in table 1, a Data structure of an ethernet Data frame is shown, and information in the ethernet Data frame is a destination address, a source address, a type, a SID, a DA, an SA, Data, and a CRC in sequence;
table 1: ethernet data frame structure
Destination address Source address Type (B) SID DA SA Data CRC
6 6 2 1 1 1 4
And S4, converting the Ethernet data frame into a corresponding CAN bus data frame through the processor, and transmitting the Ethernet data frame to corresponding target equipment to realize the communication between the automobile Ethernet bus and the CAN bus.
As shown in table 2, the data structure of the CAN bus network data frame is shown: the CAN bus network data frame comprises 11 bytes; wherein, the first 3 bytes are frame header information, and the last 8 bytes are data information.
Table 2: CAN bus network data frame structure
Figure GDA0002705311890000101
The step S2 is specifically:
s21, receiving the broadcast frame sent by the source equipment through the automobile Ethernet transceiver, and storing the source equipment interface number and the equipment ID carried by the broadcast frame in the routing table of the processor;
s22, acquiring the data in the broadcast frame through the processor, packaging the data into a TPOD data frame, and transmitting the TPOD data frame to all devices connected with the CAN bus transceiver;
s23, generating an RPOD data frame corresponding to the TPOD data frame by the target device and transmitting the RPOD data frame to the processor;
the target device is a device matched with the TPOD data frame;
s24, analyzing the data received in the RPOD data frame by the processor to obtain the interface number and the device ID of the target device required by the transmission, and subpackaging the interface number and the device ID into Ethernet data frames;
s25, according to the interface number and device ID information of the source device stored in the routing table, transmitting the Ethernet data frame with the interface number and device ID of the target device to the source device, so that the source device can obtain the destination address of the target device;
wherein the destination address of the target device comprises the interface number and the device ID of the target device.
It should be noted that, the process of determining the destination address of the target device is a process required when the source device and the target device communicate for the first time, and when the ethernet data frame sent by the source device has the destination address of the target device, the ethernet data frame CAN be directly encoded and converted into the CAN bus network data frame by the processor, so as to perform data communication with the target device.
The step S4 is specifically:
the Ethernet data frame stored in the storage unit is analyzed through the processor to obtain a data part, and the frame header information of the CAN bus network data frame is added into the data part and encapsulated into the CAN bus network data frame to be transmitted to the target equipment, so that the communication between the automobile Ethernet bus and the CAN bus is realized.
The communication gateway and the method for converting the automobile Ethernet bus into the CAN bus solve the problem that direct communication cannot be carried out due to the fact that a frame structure during automobile Ethernet data transmission is different from a frame structure during CAN bus data transmission by arranging the gateway as a conversion device during communication between the automobile Ethernet and the CAN bus, realize barrier-free communication between the automobile Ethernet and the CAN bus, and ensure real-time performance of a communication process.

Claims (3)

1. A communication method for converting an automobile Ethernet bus into a CAN bus is characterized in that a communication gateway comprises an automobile Ethernet transceiver, a processor and a CAN bus transceiver;
the automobile Ethernet transceiver and the CAN bus transceiver are both connected with the processor; the automobile Ethernet transceiver is connected with equipment connected with the automobile Ethernet through an automobile Ethernet bus interface circuit, and the CAN bus transceiver is connected with the equipment connected with the CAN bus network through a CAN bus network interface circuit;
the automobile Ethernet bus interface circuit comprises a chip U1 with the model number of RTL 8211;
the 1 st pin of the chip U1, the 2 nd pin of the chip U1, the 4 th pin of the chip U1, the 5 th pin of the chip U1, the 7 th pin of the chip U1, the 8 th pin of the chip U1, the 10 th pin of the chip U1 and the 11 th pin of the chip U1 are all connected with a 16-hole connector JA 1; a 34 th pin of the chip U1 is respectively connected with one end of a resistor RA8 and one end of a resistor RA9, the other end of the resistor RA8 is connected with a 16-hole connector JA1, and the other end of the resistor RA9 is connected with a 3V power supply; a 35 th pin of the chip U1 is respectively connected with one end of a resistor RA10 and one end of a resistor RA11, the other end of the resistor RA10 is connected with a 16-hole connector JA1, and the other end of the resistor RA11 is grounded; a 32 nd pin of the chip U1 is connected with one end of a resistor RA12, and the other end of the resistor RA12 is connected with a 3V power supply; the 39 th pin of the chip U1 is connected with one end of the resistor RA7, and the other end of the resistor RA7 is respectively connected with the 47 th pin and the pin P of the chip U1 and grounded; the 14 th pin of the chip U1 is connected with a 3V power supply through a resistor RA 13; the 38 th pin and the 43 th pin of the chip U1 are grounded; a 29 th pin of the chip U1 is respectively connected with the anode of the diode DA1, one end of the resistor RA1 and one end of the capacitor CA12, the other end of the resistor RA1 and the cathode of the diode DA1 are both connected with a 3V power supply, and the other end of the capacitor CA12 is grounded; a 41 th pin of the chip U1 is respectively connected with a 6 th pin of the chip U1, one end of a capacitor CA9, one end of a capacitor CA10 and one end of a fuse FBA2, the other end of the fuse FBA2 is respectively connected with one end of a capacitor CA11 and a 3V power supply, and the other ends of the capacitor CA9, the capacitor CA10 and the capacitor CA11 are all grounded; the 40 th pin of the chip U1 is respectively connected with the 3 rd pin of the chip U1, the 9 th pin of the chip U1, the 36 th pin of the chip U1, the 28 th pin of the chip U1, one end of a capacitor CA5, one end of a capacitor CA4, one end of a capacitor CA3, one end of a capacitor CA2, one end of a capacitor CA1 and one end of a fuse FBA1, the other end of the capacitor CA5, the other end of the capacitor CA4, the other end of the capacitor CA3, the other end of the capacitor CA2 and the other end of the capacitor CA1 are all grounded, and the other end of the fuse FBA1 is respectively connected with a 1V power supply and a grounded capacitor CA 13;
the CAN bus network interface circuit comprises a chip U15 with the model number of SN65HVD233 DR;
the 1 st pin of the chip U15 and the 4 th pin of the chip U15 are both connected with a main control chip of the processor; pin 2 of the chip U15 is grounded; the 3 rd pin of the chip U15 is respectively connected with a 3.3V power supply and a grounding capacitor C22; the 6 th pin of the chip U15 is respectively connected with the 1 st pin of a 3-hole connector JP12 and the 1 st pin of a 2-hole connector JP14, the 2 nd pin of the 3-hole connector JP12 is connected with the 7 th pin of the chip U15, the 3 rd pin of the 3-hole connector JP12 is grounded, and the 2 nd pin of the 2-hole connector JP14 is connected with the 7 th pin of the chip U15 through a resistor R53; the 8 th pin of the chip U15 is respectively connected with the 2 nd pin of an 8-hole connector, the 4 th pin of the 8-hole connector, the 6 th pin of the 8-hole connector and the 8 th pin of the 8-hole connector, the 1 st pin of the 8-hole connector is connected with a 3.3V power supply, the 3 rd pin of the 8-hole connector is connected with a grounding resistor R36, the 5 th pin of the 8-hole connector is connected with a grounding resistor R35, and the 7 th pin of the 8-hole connector is grounded; the 5 th pin of the chip U15 is connected with the 1 st pin of the 2-hole connector JP 11; the 2 nd pin of the 2-hole connector JP11 is connected with a 3.3V power supply through a resistor R37;
the main control chip of the processor is an FPGA chip with the model of XC7Z020CLG 400-2I;
the method is characterized by comprising the following steps:
s1, initializing an automobile Ethernet transceiver and a CAN bus transceiver;
s2, sending a broadcast frame through the source equipment and determining the destination address of the target equipment;
the source equipment is connected with the automobile Ethernet transceiver;
the target equipment is connected with the CAN bus transceiver;
s3, sending the Ethernet data frame with the destination address through the source equipment, and transmitting the Ethernet data frame to the processor;
s4, converting the Ethernet data frame into a corresponding CAN bus data frame through a processor, and transmitting the Ethernet data frame to corresponding target equipment to realize the communication between the automobile Ethernet bus and the CAN bus;
the step S2 specifically includes:
s21, receiving the broadcast frame sent by the source equipment through the automobile Ethernet transceiver, and storing the source equipment interface number and the equipment ID carried by the broadcast frame in the routing table of the processor;
s22, acquiring the data in the broadcast frame through the processor, packaging the data into a TPOD data frame, and transmitting the TPOD data frame to all devices connected with the CAN bus transceiver;
s23, generating an RPOD data frame corresponding to the TPOD data frame by the target device and transmitting the RPOD data frame to the processor;
the target device is a device matched with the TPOD data frame;
s24, analyzing the data received in the RPOD data frame by the processor to obtain the interface number and the device ID of the target device required by the transmission of the RPOD data frame, and encapsulating the RPOD data frame into an Ethernet data frame;
s25, according to the interface number and device ID information of the source device stored in the routing table, transmitting the Ethernet data frame with the interface number and device ID of the target device to the source device, so that the source device can obtain the destination address of the target device;
the destination address of the target device comprises an interface number and a device ID of the target device;
the step S4 specifically includes:
the Ethernet data frame stored in the storage unit is analyzed through the processor to obtain a data part, the frame header information of the CAN bus network data frame is added into the data part and encapsulated into the CAN bus network data frame to be transmitted to the target equipment, and the communication between the automobile Ethernet bus and the CAN bus is realized.
2. The communication method for converting the ethernet bus of the vehicle into the CAN bus according to claim 1, wherein the step S1 specifically comprises:
and configuring TPOD parameters and RPOD parameters of the automobile Ethernet transceiver and the CAN bus transceiver to complete initialization of the automobile Ethernet transceiver and the CAN bus transceiver.
3. The communication method according to claim 1, wherein the information in the ethernet Data frame in step S3 is sequentially destination address, source address, type, SID, DA, SA, Data and CRC;
the CAN bus network data frame in the step S4 includes 11 bytes; wherein, the first 3 bytes are frame header information, and the last 8 bytes are data information.
CN201910288287.5A 2019-04-11 2019-04-11 Communication gateway and method for converting automobile Ethernet bus into CAN bus Active CN109818844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910288287.5A CN109818844B (en) 2019-04-11 2019-04-11 Communication gateway and method for converting automobile Ethernet bus into CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910288287.5A CN109818844B (en) 2019-04-11 2019-04-11 Communication gateway and method for converting automobile Ethernet bus into CAN bus

Publications (2)

Publication Number Publication Date
CN109818844A CN109818844A (en) 2019-05-28
CN109818844B true CN109818844B (en) 2020-12-29

Family

ID=66611669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910288287.5A Active CN109818844B (en) 2019-04-11 2019-04-11 Communication gateway and method for converting automobile Ethernet bus into CAN bus

Country Status (1)

Country Link
CN (1) CN109818844B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800557B (en) * 2023-08-21 2023-12-29 成都炎兴自动化技术有限公司 CAN bus fusion communication system based on CANOpen application protocol

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780705A (en) * 2012-08-10 2012-11-14 浙江工业大学 Ethernet-(controller area network) CAN protocol converter

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8737913B2 (en) * 2010-12-22 2014-05-27 Verizon Patent And Licensing Inc. Methods and systems for providing a wireless automobile key service
CN105530178A (en) * 2014-10-24 2016-04-27 中车大连电力牵引研发中心有限公司 Vehicular gateway device
CN105430338B (en) * 2015-11-27 2018-08-28 长春精钰电子科技股份有限公司 Car entertainment AVB systems
CN106961437A (en) * 2017-03-24 2017-07-18 华东师范大学 CAN and Ethernet hybrid network gateway network management device and its exchange method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780705A (en) * 2012-08-10 2012-11-14 浙江工业大学 Ethernet-(controller area network) CAN protocol converter

Also Published As

Publication number Publication date
CN109818844A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN105119749B (en) A kind of method and system of home gateway local batch upgrade
CN110109852B (en) Method for realizing TCP _ IP protocol by hardware
EP3528437A1 (en) Method for access network virtualization and proxy node
CN103888386A (en) Extensible virtual local area network message transmission method, device and system
CN102137007B (en) Method and system for generating network topology as well as coordinator
WO2015066840A1 (en) Device and method for network address conversion
EP2680507B1 (en) Packet forwarding method and system, and relay agent device
CN109818844B (en) Communication gateway and method for converting automobile Ethernet bus into CAN bus
EP3062230A1 (en) Data processing method, device, storage controller and equipment cabinet
US9503309B2 (en) Ethernet communication system and method based on MMC/SD interface
US20230091501A1 (en) Port status configuration method, apparatus, and system, and storage medium
CN102571970B (en) Node module for traffic Internet of things and communication method for traffic Internet of things
CN101945110B (en) Configuration method and device of address resolution protocol entry
CN101304342A (en) Enhancement type Ethernet interface apparatus
CN105530154B (en) 1553B and synchronous 485 communication protocol converter
CN105518610A (en) Storage system, method and apparatus for processing operation request
CN109039753A (en) A kind of communication means and communication equipment based on Ethernet
CN107276834B (en) Fiber channel flow analysis recording method and device in avionic environment
EP2760173A1 (en) Data transmission method, device and system
JP2022516355A (en) Data transmission method and equipment
CN101022419A (en) Path maximum transmission unit item establishing method and message transmitting method and device
CN204721360U (en) Based on the fiber buss system of protocol processes FPGA
CN114070405A (en) Optical fiber network system based on multi-type test equipment
KR100411517B1 (en) Method and Apparatus for Internet Protocol Translation using NAT-PT
CN110138505B (en) CRC calculation method and system for heterogeneous protocol conversion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant