[go: up one dir, main page]

CN106713092A - Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof - Google Patents

Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof Download PDF

Info

Publication number
CN106713092A
CN106713092A CN201510449880.5A CN201510449880A CN106713092A CN 106713092 A CN106713092 A CN 106713092A CN 201510449880 A CN201510449880 A CN 201510449880A CN 106713092 A CN106713092 A CN 106713092A
Authority
CN
China
Prior art keywords
bus
data
flexray
transceiver
message
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.)
Pending
Application number
CN201510449880.5A
Other languages
Chinese (zh)
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.)
SAIC General Motors Corp Ltd
Pan Asia Technical Automotive Center Co Ltd
Original Assignee
SAIC General Motors Corp Ltd
Pan Asia Technical Automotive Center Co Ltd
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 SAIC General Motors Corp Ltd, Pan Asia Technical Automotive Center Co Ltd filed Critical SAIC General Motors Corp Ltd
Priority to CN201510449880.5A priority Critical patent/CN106713092A/en
Publication of CN106713092A publication Critical patent/CN106713092A/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明提供车载CAN总线数据与FlexRay总线数据之间的转换系统,包括第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器;FlexRay总线收发器接收发送到FlexRay总线上的数据或将FlexRay总线上的数据发出;数据转换模块,用于将接收受的来自CAN总线的数据转换成FlexRay总线数据并将转换后的数据发送给FlexRay总线,以及将接收的CAN总线数据转换成FlexRay总线数据并将转换后的数据发送给接收其的CAN总线;及控制模块,其与第一、第二以及第三CAN总线收发器、FlexRay总线收发器、数据转换模块均电连接,并控制它们的运行;其中,第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器之间互相电连接、且均与数据转换模块电连接,FlexRay总线收发器与数据转换模块电连接。

The present invention provides the conversion system between vehicle-mounted CAN bus data and FlexRay bus data, comprise the first CAN bus transceiver, the second CAN bus transceiver, the 3rd CAN bus transceiver; FlexRay bus transceiver receives and sends to FlexRay bus Data or send the data on the FlexRay bus; the data conversion module is used to convert the received data from the CAN bus into the FlexRay bus data and send the converted data to the FlexRay bus, and convert the received CAN bus data into FlexRay bus data and the data after conversion is sent to the CAN bus that receives it; And control module, it is all electrically connected with first, second and the 3rd CAN bus transceiver, FlexRay bus transceiver, data conversion module, and controls Their operation; Wherein, the first CAN bus transceiver, the second CAN bus transceiver, the third CAN bus transceiver are electrically connected to each other, and are all electrically connected to the data conversion module, and the FlexRay bus transceiver is electrically connected to the data conversion module connect.

Description

车载CAN总线数据与FlexRay总线数据之间的转换系统及方法Conversion system and method between vehicle CAN bus data and FlexRay bus data

技术领域technical field

本发明涉及汽车通信技术,更为具体地,涉及车载CAN总线数据与FlexRay总线数据之间的转换技术。The present invention relates to automobile communication technology, more specifically, relates to the conversion technology between vehicle-mounted CAN bus data and FlexRay bus data.

背景技术Background technique

CAN(Controller Area Network)总线协议是ISO国际标准化串行通信协议。在汽车产业中,出于对安全性、舒适性、方便性、低公害、低成本的要求,开发了各种各样的电子控制系统,线束的数量也随之增加。为适应“减少线束的数量”、“通过多个网络,进行大量数据的高速通信”的需要,博世公司开发出面向汽车的CAN通信协议。此后,CAN通过ISO11898进行了标准化,目前已是汽车网络的标准协议。CAN (Controller Area Network) bus protocol is an ISO international standardized serial communication protocol. In the automotive industry, due to the requirements for safety, comfort, convenience, low pollution, and low cost, various electronic control systems have been developed, and the number of wiring harnesses has also increased. In order to meet the needs of "reducing the number of wiring harnesses" and "carrying out high-speed communication of large amounts of data through multiple networks", Bosch has developed the CAN communication protocol for automobiles. Since then, CAN has been standardized through ISO11898 and is now the standard protocol for automotive networks.

目前车辆主要采用CAN总线及LIN总线进行通信,然而当车辆功能越来越强,智能化程度越来越高,总线的信号量逐渐增大,对通信的可靠性及实时性要求进一步提高,传统的CAN/LIN混合网络已无法满足需求,尤其是面对新一代以线控制(X-BY-WIRE)技术,传统的CAN/LIN网络面临更大的挑战。At present, vehicles mainly use CAN bus and LIN bus for communication. However, when the functions of vehicles become stronger and more intelligent, the signal volume of the bus increases gradually, and the requirements for reliability and real-time performance of communication are further improved. Traditional The current CAN/LIN hybrid network can no longer meet the needs, especially in the face of the new generation of X-BY-WIRE technology, the traditional CAN/LIN network is facing greater challenges.

FlexRay由于其“时间触发”以及“双通道冗余传输”的特性,在实时性和可靠性方面体现了出了更大的优势。同时由于CAN/LIN技术的成熟,规模效应带来的低成本也使得越来越多的汽车会出现多种总线并存的局面。Due to its "time trigger" and "dual-channel redundant transmission" characteristics, FlexRay has shown greater advantages in real-time and reliability. At the same time, due to the maturity of CAN/LIN technology, the low cost brought by the scale effect also makes more and more cars coexist with multiple buses.

传统的车载网关,主要实现将多路CAN的报文互相路由转发,或者将LIN总线和CAN总线消息相互之间进行报文路由。CAN转FlexRay的网关,是一种新型的网关,它可以实现将CAN协议和FlexRay协议相互转换,实现两种完全不同网络之间的互联。The traditional vehicle-mounted gateway mainly realizes routing and forwarding of multi-channel CAN messages, or routing messages between LIN bus and CAN bus messages. The CAN-to-FlexRay gateway is a new type of gateway, which can realize the mutual conversion between the CAN protocol and the FlexRay protocol, and realize the interconnection between two completely different networks.

由于FlexRay协议是一个比较新的总线协议,协议对软硬件提出了很高的要求,因此将FlexRay总线应用在整车上,要远比CAN总线难度大,成本高,且开发调试的时间长。Since the FlexRay protocol is a relatively new bus protocol, the protocol puts forward very high requirements on software and hardware. Therefore, it is far more difficult and costly than the CAN bus to apply the FlexRay bus to the entire vehicle, and it takes a long time to develop and debug.

申请号为200810201830.5、名称为“一种FlexRay-CAN通信网关及实现方法”的我国专利公开了一种FlexRay-CAN通信网关及实现方法,一方面可接收FlexRay协议数据,经协议转换、封装等处理后以CAN协议发送至CAN总线设备,也通过RS232接口发送至上位计算机;另一方面可接收CAN协议数据,经协议转换、封装等处理后以FlexRay协议发送至FlexRay总线设备,或通过RS232接口发送至上位计算机,实现基于微控制器的FlexRay总线与CAN总线的协议转换。但该发明其功能有限,不适合用在车载网络中。The Chinese patent with the application number 200810201830.5 and the name "A FlexRay-CAN Communication Gateway and Its Implementation Method" discloses a FlexRay-CAN communication gateway and its implementation method. On the one hand, it can receive FlexRay protocol data, and process it through protocol conversion and encapsulation. Then send it to the CAN bus device with CAN protocol, and also send it to the host computer through the RS232 interface; on the other hand, it can receive the CAN protocol data, and send it to the FlexRay bus device with the FlexRay protocol after protocol conversion and packaging, or send it through the RS232 interface To the upper computer, realize the protocol conversion between the FlexRay bus and the CAN bus based on the microcontroller. However, the invention has limited functions and is not suitable for use in vehicle-mounted networks.

申请号为201110193320.X、名称为“FlexRay总线与LIN总线的协议转换装置及方法”的我国专利申请提供了FlexRay总线与LIN总线的协议转换装置及方法,以解决CAN总线的局限性问题。但此发明提出了的LIN与FlexRay的转换关系,因作为速率极低的LIN总线和可达10M带宽的FlexRay总线,将FlexRay总线消息转到LIN上,相当于从高速公路开到了单行道上,只能转发极少量的报文,总线带宽达不到,因此不适用于用在整车网络中。The Chinese patent application with the application number 201110193320.X and titled "FlexRay bus and LIN bus protocol conversion device and method" provides a FlexRay bus and LIN bus protocol conversion device and method to solve the limitations of the CAN bus. But this invention proposes the conversion relationship between LIN and FlexRay, because as the extremely low LIN bus and the FlexRay bus with a bandwidth of up to 10M, the FlexRay bus message is transferred to the LIN, which is equivalent to driving from the expressway to the one-way street. It can forward a very small amount of messages, but the bus bandwidth is not enough, so it is not suitable for use in the vehicle network.

发明内容Contents of the invention

有鉴于此,本发明提供车载CAN总线数据与FlexRay总线数据之间的转换系统,该系统包括:第一CAN总线收发器,用于接收发送到第一CAN总线上的数据或将所述第一CAN总线上的数据发出;第二CAN总线收发器,用于接收发送到第二CAN总线上的数据或将所述第二CAN总线上的数据发出;第三CAN总线收发器,用于接收发送到第三CAN总线上的数据或将所述第三CAN总线上的数据发出;FlexRay总线收发器,用于接收发送到FlexRay总线上的数据或将所述FlexRay总线上的数据发出;数据转换模块,其用于将接收受的来自CAN总线的数据转换成FlexRay总线数据并将转换后的数据发送给FlexRay总线,以及将接收的CAN总线数据转换成FlexRay总线数据并将转换后的数据发送给接收其的CAN总线;以及控制模块,其与第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器、FlexRay总线收发器、数据转换模块均电连接,并控制它们的运行;其中,所述第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器之间互相电连接、且均与数据转换模块电连接,所述FlexRay总线收发器与所述数据转换模块电连接。In view of this, the present invention provides a conversion system between vehicle-mounted CAN bus data and FlexRay bus data, and the system includes: a first CAN bus transceiver, used to receive data sent to the first CAN bus or send the first The data on the CAN bus is sent; the second CAN bus transceiver is used to receive the data sent to the second CAN bus or send the data on the second CAN bus; the third CAN bus transceiver is used to receive and send to the data on the third CAN bus or send the data on the third CAN bus; the FlexRay bus transceiver is used to receive the data sent to the FlexRay bus or send the data on the FlexRay bus; the data conversion module , which is used to convert the received data from the CAN bus into FlexRay bus data and send the converted data to the FlexRay bus, and convert the received CAN bus data into FlexRay bus data and send the converted data to the receiver Its CAN bus; and a control module, which is electrically connected with the first CAN bus transceiver, the second CAN bus transceiver, the third CAN bus transceiver, the FlexRay bus transceiver, and the data conversion module, and controls their operation; Wherein, the first CAN bus transceiver, the second CAN bus transceiver, and the third CAN bus transceiver are electrically connected to each other, and are all electrically connected to the data conversion module, and the FlexRay bus transceiver is connected to the data conversion module. The modules are electrically connected.

可选地,根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统,所述系统还包括诊断模块,其配置成监控所述第一间的转换方法的流程图。Optionally, according to the conversion system between vehicle-mounted CAN bus data and FlexRay bus data according to the example of the present invention, the system further includes a diagnosis module configured to monitor the flow chart of the first conversion method.

具体实施方式detailed description

现在参照附图描述本发明的示意性示例,相同的附图标号表示相同的元件。下文描述的各实施例有助于本领域技术人员透彻理解本发明,且意在示例而非限制。图中各元件、部件、单元、装置的图示不一定按比例绘制,仅示意性表明这些元件、部件、模块、装置之间的相对关系。Illustrative examples of the invention will now be described with reference to the drawings, wherein like reference numerals refer to like elements. The embodiments described below are intended to help those skilled in the art to fully understand the present invention, and are intended to be illustrative rather than limiting. The diagrams of elements, components, units, and devices in the drawings are not necessarily drawn to scale, but only schematically show the relative relationship between these elements, components, modules, and devices.

图1是根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统的结构示意图。如图所示,该车载CAN总线数据与FlexRay总线数据之间的转换系统包括第一CAN总线收发器10、第二CAN总线收发器12、第三CAN总线收发器14、FlexRay总线收发器16、数据转换模块18以及控制模块20。Fig. 1 is a structural schematic diagram of a conversion system between vehicle-mounted CAN bus data and FlexRay bus data according to an example of the present invention. As shown in the figure, the conversion system between the vehicle-mounted CAN bus data and the FlexRay bus data includes a first CAN bus transceiver 10, a second CAN bus transceiver 12, a third CAN bus transceiver 14, a FlexRay bus transceiver 16, A data conversion module 18 and a control module 20 .

第一CAN总线收发器10、第二CAN总线收发器12及第三CAN总线收发器14每一个都与控制模块20电连接,控制模块20还与FlexRay总线收发器16以及数据转换模块18电连接。第一CAN总线收发器10、第二CAN总线收发器12、第三CAN总线收发器14之间互相电连接、且均与数据转换模块18电连接,所述FlexRay总线收发器16与所述数据转换模块18电连接。Each of the first CAN bus transceiver 10, the second CAN bus transceiver 12 and the third CAN bus transceiver 14 is electrically connected with the control module 20, and the control module 20 is also electrically connected with the FlexRay bus transceiver 16 and the data conversion module 18 . The first CAN bus transceiver 10, the second CAN bus transceiver 12, the third CAN bus transceiver 14 are electrically connected to each other, and are all electrically connected with the data conversion module 18, and the FlexRay bus transceiver 16 is connected with the data The conversion module 18 is electrically connected.

第一CAN总线收发器10接收发送到第一CAN总线上的数据或将该第一CAN总线上的数据发出。第二CAN总线收发器12接收发送到第二CAN总线上的数据或将该第二CAN总线上的数据发出。第二CAN总线收发器14接收发送到第三CAN总线上的数据或将该第三CAN总线上的数据发出。控制模块20控制第一CAN总线收发器10、第二CAN总线收发器12、第三CAN总线收发器14、FlexRay总线收发器16、数据转换模块18均电连接的运行。The first CAN bus transceiver 10 receives data sent to the first CAN bus or sends data on the first CAN bus. The second CAN bus transceiver 12 receives data sent to the second CAN bus or sends data on the second CAN bus. The second CAN bus transceiver 14 receives data sent to the third CAN bus or sends data on the third CAN bus. The control module 20 controls the operation of the first CAN bus transceiver 10 , the second CAN bus transceiver 12 , the third CAN bus transceiver 14 , the FlexRay bus transceiver 16 , and the data conversion module 18 .

示例地,图1所示的车载CAN总线数据与FlexRay总线数据之间的转换系统中,第一CAN总线收发器10上的数据可以发送给第二CAN总线收发器12,相应地,第二CAN总线收发器12上的数据可以发送给第一CAN总线收发器10。进一步,第一CAN总线收发器10与第二CAN总线收发器12上的数据均可经由数据转换模块18进行转换,将其从CAN总线数据转换为FlexRay总线数据,从而发送到FlexRay总线收发器16。相应地,FlexRay总线收发器16发出的FlexRay总线数据也可由数据转换模块18进行转换,转换成CAN总线数据,从而再发送到CAN总线收发器上。Illustratively, in the conversion system between the vehicle-mounted CAN bus data and the FlexRay bus data shown in Figure 1, the data on the first CAN bus transceiver 10 can be sent to the second CAN bus transceiver 12, correspondingly, the second CAN bus transceiver 12 Data on the bus transceiver 12 can be sent to the first CAN bus transceiver 10 . Further, the data on the first CAN bus transceiver 10 and the second CAN bus transceiver 12 can be converted through the data conversion module 18, and it is converted from CAN bus data to FlexRay bus data, thereby sending to the FlexRay bus transceiver 16 . Correspondingly, the FlexRay bus data sent by the FlexRay bus transceiver 16 can also be converted by the data converting module 18 into CAN bus data, and then sent to the CAN bus transceiver.

根据本发明的示例,数据转换模块18包括第一单元180,其用于将要发送到第一CAN总线收发器10、第二CAN总线收发器12及第三CAN总线收发器14中任意一个的FlexRay数据分成n帧CAN数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定。数据转换模块18还包括第二单元182,其用于将要发送到FlexRay总线收发器16的来自第一CAN总线收发器10、第二CAN总线收发器12及第三CAN总线收发器14中任意一个的CAN数据构造成FlexRay数据。According to an example of the present invention, the data conversion module 18 includes a first unit 180, which is used to be sent to any FlexRay in the first CAN bus transceiver 10, the second CAN bus transceiver 12 and the third CAN bus transceiver 14. The data is divided into n frames of CAN data, and each frame of CAN data has the same cycle and different IDs, where n is determined based on the length of the FlexRay data and the length of the CAN data under the vehicle CAN protocol. The data conversion module 18 also includes a second unit 182, which is used for any one of the first CAN bus transceiver 10, the second CAN bus transceiver 12 and the third CAN bus transceiver 14 to be sent to the FlexRay bus transceiver 16. The CAN data is structured into FlexRay data.

在举例说明数据转换模块18的运行之前,在此先分别简述一下CAN总线数据与FlexRay总线数据。Before illustrating the operation of the data conversion module 18 with examples, the CAN bus data and the FlexRay bus data are briefly described here.

CAN报文包含CAN报文标识(CAN ID)及有效数据两部分,每帧报文的CAN ID是唯一的,而有效数据的长度一般为8个字节,在某些情况下,每帧报文的有效数据长度可以小于8字节。CAN总线是一种广播式总线,每一个CAN节点都可向总线上广播数据,每帧报文没有明显的优先级,报文发送不分先后,当总线空闲时,谁先抢占到总线,谁就可以向总线广播数据,若其它节点要发送报文,只能等总线空闲时发送。可以说,CAN总线是可抢占的总线。CAN message contains two parts: CAN message identification (CAN ID) and valid data. The CAN ID of each frame message is unique, and the length of valid data is generally 8 bytes. In some cases, each frame message The effective data length of the text can be less than 8 bytes. The CAN bus is a broadcast bus. Each CAN node can broadcast data to the bus. There is no obvious priority for each frame message, and the messages are sent in no particular order. You can broadcast data to the bus. If other nodes want to send messages, they can only send them when the bus is free. It can be said that the CAN bus is a preemptible bus.

FlexRay总线是一种非抢占式总线,其报文发送具有严格的时序,报文发送的先后顺序在通信调度表有规定,不允许某一个节点违背调度表规定,独自向总线发送数据。FlexRay总线的报文格式与CAN报文有差别,其中,FlexRay总线的有效数据长度可以很大,最多达254个字节,其长度可变。The FlexRay bus is a non-preemptive bus. Its message transmission has strict timing. The order of message transmission is stipulated in the communication schedule. It is not allowed for a certain node to violate the schedule and send data to the bus alone. The message format of the FlexRay bus is different from the CAN message. Among them, the effective data length of the FlexRay bus can be very large, up to 254 bytes, and its length is variable.

FlexRay总线数据分为静态段报文与动态段报文,静态段报文数据是一些周期性发送且长度固定的报文,动态段报文一般是一些非周期的且长度不等的报文。FlexRay bus data is divided into static segment messages and dynamic segment messages. The static segment message data is some messages sent periodically and with a fixed length, and the dynamic segment messages are generally some aperiodic messages with different lengths.

根据本发明的一个具体示例来阐述第一单元180将FlexRay总线数据转换为CAN总线数据的情况。假设FlexRay总线数据,亦即FlexRay报文的有效数据为32字节,第一单元180基于车载CAN协议下的CAN数据,亦即CAN报文的有效数据为8个字节,则基于FlexRay报文与CAN报的有效数据,可确定n为4,亦即将32字节的FlexRay报文分成4帧CAN报文,且第一单元180向每帧CAN报文分配不同的ID。假设FlexRay报文的有效数据为80字节,第一单元180基于车载CAN协议下的CAN数据,亦即CAN报文的有效数据为8个字节,则基于FlexRay报文与CAN报的有效数据,可确定n为10,亦即将80字节的FlexRay报文分成10帧CAN报文,且第一单元180向每帧CAN报文分配不同的ID。According to a specific example of the present invention, the situation that the first unit 180 converts FlexRay bus data into CAN bus data is explained. Assuming that the FlexRay bus data, that is, the valid data of the FlexRay message is 32 bytes, and the first unit 180 is based on the CAN data under the vehicle CAN protocol, that is, the valid data of the CAN message is 8 bytes, then based on the FlexRay message With valid data reported by CAN, it can be determined that n is 4, that is, the 32-byte FlexRay message is divided into 4 frames of CAN messages, and the first unit 180 assigns a different ID to each frame of CAN messages. Assuming that the valid data of the FlexRay message is 80 bytes, the first unit 180 is based on the CAN data under the vehicle-mounted CAN protocol, that is, the valid data of the CAN message is 8 bytes, then based on the valid data of the FlexRay message and the CAN message , it can be determined that n is 10, that is, the 80-byte FlexRay message is divided into 10 frames of CAN messages, and the first unit 180 assigns a different ID to each frame of CAN messages.

根据本发明的示例,同一网络中,静态段FlexRay的报文的有效数据长度最好设计成相同的,这样有利于网络中的网关进行统一的数据拆包打包。According to the example of the present invention, in the same network, the effective data length of the message of the static segment FlexRay is preferably designed to be the same, which is beneficial to the unified data unpacking and packaging of the gateway in the network.

根据本发明的一个具体示例来阐述第二单元182将CAN总线数据转换为FlexRay总线数据的情况。假设FlexRay总线数据的静态段有效数据为32字节,则可将4帧周期相同的CAN报文合成一帧FlexRay报文发到FlexRay的静态段。如果4帧CAN报文周期不等,则选4帧报文中周期最小的作为此FlexRay报文的周期,这样就不会损失通信质量。According to a specific example of the present invention, the situation that the second unit 182 converts CAN bus data into FlexRay bus data is explained. Assuming that the valid data of the static segment of the FlexRay bus data is 32 bytes, then 4 CAN messages with the same frame period can be synthesized into one frame of FlexRay messages and sent to the static segment of FlexRay. If the periods of the 4 frames of CAN messages are not equal, choose the period of the 4 frames of messages with the smallest period as the period of the FlexRay message, so that the communication quality will not be lost.

根据本发明的示例,将FlexRay静态段有效数据长度设为16字节。According to the example of the present invention, the effective data length of the FlexRay static segment is set to 16 bytes.

FlexRay总线报文与CAN总线报文在周期上不同,CAN总线报文是基于事件触发的,每一个报文的周期并不非常精确,接收方只需识别CAN ID就可知道是哪帧报文;但FlexRay总线报文与CAN总线报文不同,FlexRay总线报文是基于时间触发的,它的每一帧报文在时间上都是确定的,且不能简单通过FlexRay的帧识别号(Frame ID)来确定到底是哪帧报文,而是通过一张调度表,将过FlexRay的Frame ID以及其循环计数(Cycle Count)和调度表对照,便知道是FlexRay网络中哪一个节点发来的报文。FlexRay一般以64个Cycle Count(Cycle 0-Cycle 63)为一个完整的周期,因此FlexRay的静态段报文周期一般是单个CycleCount周期的整数倍。FlexRay bus messages are different from CAN bus messages in terms of cycle. CAN bus messages are triggered based on events, and the cycle of each message is not very accurate. The receiver only needs to identify the CAN ID to know which frame message it is ; But the FlexRay bus message is different from the CAN bus message. The FlexRay bus message is triggered based on time, and each frame message of it is determined in time, and the frame identification number (Frame ID) of FlexRay cannot be simply passed. ) to determine which frame the message is, but through a scheduling table, compare the FlexRay Frame ID and its cycle count (Cycle Count) with the scheduling table to know which node in the FlexRay network sent the message arts. FlexRay generally takes 64 Cycle Counts (Cycle 0-Cycle 63) as a complete cycle, so the static segment message cycle of FlexRay is generally an integer multiple of a single CycleCount cycle.

本发明将单个Cycle Count的周期设计成5ms,一个完整的通信大周期为5ms*64=320ms,因此FlexRay总线上的周期将是5ms的整数倍,即5ms、10ms、15ms等。CAN总线的报文周期相对灵活,有10ms,12ms,15ms,20ms等,对于类似12ms的报文,转到FlexRay总线上,需将其转发成10ms报文,以保证通信不损失速率,不丢失数据。In the present invention, the cycle of a single Cycle Count is designed to be 5ms, and a complete communication cycle is 5ms*64=320ms, so the cycle on the FlexRay bus will be an integer multiple of 5ms, that is, 5ms, 10ms, 15ms, etc. The message period of the CAN bus is relatively flexible, including 10ms, 12ms, 15ms, 20ms, etc. For a message similar to 12ms, if it is transferred to the FlexRay bus, it needs to be forwarded into a 10ms message to ensure that the communication does not lose speed or loss data.

根据本发明的示例,车载CAN总线数据与FlexRay总线数据之间的转换系统还包括诊断模块。诊断模块配置成监控所述第一CAN总线、CAN总线、第二CAN总线以及第三CAN总线的运行。According to an example of the present invention, the conversion system between vehicle CAN bus data and FlexRay bus data further includes a diagnosis module. The diagnostic module is configured to monitor the operation of the first CAN bus, the CAN bus, the second CAN bus and the third CAN bus.

可选地,根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统,所述第三CAN总线配置成通过其管理所述诊断模块以及通过其进行FlexRay报文路由与诊断路由。Optionally, according to the conversion system between on-vehicle CAN bus data and FlexRay bus data according to the example of the present invention, the third CAN bus is configured to manage the diagnostic module through it and perform FlexRay message routing and diagnostic routing through it.

可选地,根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统,所述数据转换模块包括:第一单元,其用于将要发送到第一CAN总线、第二CAN总线及第三CAN总线中任意一个的FlexRay数据分成n帧CAN数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定;第二单元,其用于将要发送到FlexRay总线的来自第一CAN总线收发器、第二CAN总线收发器及第三CAN总线收发器中任意一个的CAN数据构造成FlexRay数据。Optionally, according to the conversion system between the vehicle-mounted CAN bus data and the FlexRay bus data according to the example of the present invention, the data conversion module includes: a first unit, which is used to send data to the first CAN bus, the second CAN bus and Any one of the FlexRay data in the third CAN bus is divided into n frames of CAN data, and each frame of CAN data has different IDs of the same cycle, wherein n is determined based on the length of the FlexRay data and the length of the CAN data under the vehicle-mounted CAN protocol; the second unit uses The CAN data from any one of the first CAN bus transceiver, the second CAN bus transceiver and the third CAN bus transceiver to be sent to the FlexRay bus is configured as FlexRay data.

可选地,根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统,所述第二单元配置成将若干帧CAN报文数据构造成一帧FlexRay报文数据,且以所述若干帧CAN报文数据中周期最小的周期作为所构成的FlexRay报文数据的传送周期。Optionally, according to the conversion system between vehicle-mounted CAN bus data and FlexRay bus data according to the example of the present invention, the second unit is configured to construct several frames of CAN message data into one frame of FlexRay message data, and use the several frames The cycle with the smallest cycle in the frame CAN message data is used as the transmission cycle of the formed FlexRay message data.

还提供一种车载CAN总线数据与FlexRay总线数据之间的转换方法,其特征在于,所述方法包括:接收要转换成FlexRay总线数据的CAN总线数据,将若干帧所接收的CAN总线数据构造成一帧FlexRay数据;接收要转换成CAN总线数据的FlexRay总线数据,将一帧FlexRay总线数据分成n帧CAN总线数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定。Also provide a kind of conversion method between vehicle-mounted CAN bus data and FlexRay bus data, it is characterized in that, described method comprises: receive the CAN bus data that will be converted into FlexRay bus data, the CAN bus data received by several frames is constructed into a Frame FlexRay data; receive the FlexRay bus data to be converted into CAN bus data, divide one frame of FlexRay bus data into n frames of CAN bus data, each frame of CAN data has the same period and different ID, where n is based on the length of the FlexRay data and the vehicle CAN protocol The following CAN data length is determined.

可选地,根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换方法,将若干帧所接收的CAN总线数据构造成一帧FlexRay数据时,以所述若干帧CAN报文数据中周期最小的周期作为所构成的FlexRay报文数据的传送周期。Optionally, according to the conversion method between the vehicle-mounted CAN bus data and the FlexRay bus data of the example of the present invention, when the CAN bus data received by several frames is constructed into a frame of FlexRay data, the period of the several frames of CAN message data is The minimum cycle is used as the transmission cycle of the formed FlexRay message data.

附图说明Description of drawings

图1是根据本发明示例的车载CAN总线数据与FlexRay总线数据之间的转换系统的结构示意图。Fig. 1 is a structural schematic diagram of a conversion system between vehicle-mounted CAN bus data and FlexRay bus data according to an example of the present invention.

图2示出了的通过CAN网络诊断FlexRay节点的通信过程。Figure 2 shows the communication process of FlexRay nodes diagnosed through the CAN network.

图3是根据本发明示例的车载CAN总线数据与FlexRay总线数据之第二CAN总线以及第三CAN总线的运行。且第三CAN总线被配置成通过其管理所述诊断模块以及通过其进行FlexRay报文路由与诊断路由。Fig. 3 is the operation of the second CAN bus and the third CAN bus of the vehicle CAN bus data and the FlexRay bus data according to the example of the present invention. And the third CAN bus is configured to manage the diagnostic module through it and perform FlexRay message routing and diagnostic routing through it.

诊断模块在诊断过程中,对于CAN网络诊断报文,要符合ISO15765-2中规定的TP层协议,以及ISO14229-2中规定的诊断应用层协议,对于FlexRay网络诊断报文,要符合ISO10681-2中规定的TP层协议及ISO14229-2诊断应用层协议。During the diagnostic process of the diagnostic module, for CAN network diagnostic messages, it must comply with the TP layer protocol specified in ISO15765-2, and the diagnostic application layer protocol specified in ISO14229-2. For FlexRay network diagnostic messages, it must comply with ISO10681-2 The TP layer protocol and the ISO14229-2 diagnosis application layer protocol specified in .

概括地说,CAN网络的诊断报文符合CAN的要求,FlexRay网络上的诊断报文符合FlexRay要求。In a nutshell, the diagnostic messages of the CAN network meet the requirements of CAN, and the diagnostic messages on the FlexRay network meet the requirements of FlexRay.

根据本发明的示例,对于本系统,诊断口直接网关,诊断报文需要先经过网关,数据转换模块根据CAN ID判断出诊断报文是给FlexRay网络的,则将报文由数据转换模块18处理成FlexRay格式的报文。CAN报文和FlexRay报文是可以一一对应的,一帧CAN诊断报文可以对应一个FlexRay诊断报文。CAN诊断报文有效数据长度为8字节,FlexRay网络的诊断报文有效数据长度定为16字节。According to the examples of the present invention, for this system, the diagnostic port is directly connected to the gateway, and the diagnostic message needs to go through the gateway first, and the data conversion module judges that the diagnostic message is for the FlexRay network according to the CAN ID, and then the message is processed by the data conversion module 18 into a message in FlexRay format. There is a one-to-one correspondence between CAN messages and FlexRay messages, and one frame of CAN diagnostic messages can correspond to one FlexRay diagnostic message. The effective data length of the CAN diagnosis message is 8 bytes, and the effective data length of the diagnosis message of the FlexRay network is 16 bytes.

根据本发明的示例,数据转换模块18可实现在车辆的电控单元ECU中。According to an example of the present invention, the data conversion module 18 may be implemented in the electronic control unit ECU of the vehicle.

图2示出了的通过CAN网络诊断FlexRay节点的通信过程。CAN诊断仪首先将诊断报文发给网关,再由数据转换模块18进行数据转换后转发至FlexRay网络上的某个节点,FlexRay节点接收到诊断报文后,回复相应的报文至网关,数据转换模块18再进行协议转换处理后,将报文转发至CAN网络,诊断仪便可接收到此报文。其中CAN网络中的多帧传输,可与FlexRay网络中的多帧传输一一对应。在此,数据转换模块18可配置成网关内。Figure 2 shows the communication process of FlexRay nodes diagnosed through the CAN network. The CAN diagnostic instrument first sends the diagnostic message to the gateway, and then the data conversion module 18 performs data conversion and forwards it to a certain node on the FlexRay network. After the FlexRay node receives the diagnostic message, it replies to the corresponding message to the gateway, and the data After the conversion module 18 performs protocol conversion processing, the message is forwarded to the CAN network, and the diagnostic instrument can receive the message. Among them, the multi-frame transmission in the CAN network can correspond to the multi-frame transmission in the FlexRay network. Here, the data conversion module 18 can be configured in the gateway.

在图2中,1(SF)是单帧诊断报文,诊断目标节点是FlexRay网络上的ECU;2(STF)是FlexRay的一个单帧诊断报文;3(STF)是FlexRay网络的多帧传输,是对诊断仪的多帧响应报文;4(FF)是CAN网络的多帧传输;5(FC)是CAN网络上的流控制信息;6(FC)是FlexRay网络上的流控制信息;7(LF)是FlexRay网络诊断回复多帧传输的最后一帧;8(CF)是CAN网络上诊断报文回复多帧传输的最后一帧。In Figure 2, 1 (SF) is a single-frame diagnostic message, and the diagnostic target node is the ECU on the FlexRay network; 2 (STF) is a single-frame diagnostic message of FlexRay; 3 (STF) is a multi-frame of the FlexRay network Transmission is a multi-frame response message to the diagnostic instrument; 4 (FF) is the multi-frame transmission of the CAN network; 5 (FC) is the flow control information on the CAN network; 6 (FC) is the flow control information on the FlexRay network ; 7 (LF) is the last frame of the FlexRay network diagnosis reply multi-frame transmission; 8 (CF) is the last frame of the diagnosis message reply multi-frame transmission on the CAN network.

示例地,在此说明如何将CAN诊断报文转换成FlexRay诊断报文以及其通信细节。As an example, here is how to convert a CAN diagnostic message into a FlexRay diagnostic message and its communication details.

条件condition

例如:读取参数标识(PID)C000的命令,指令格式为241 03 22C0 00,则诊断模块发送:For example: read the command of parameter identification (PID) C000, the command format is 241 03 22C0 00, then the diagnostic module sends:

241 03 22 C0 00(241表示某一ECU诊断地址,03是TP层信息,表示有效诊断数据长度为3字节,22为诊断服务号,表示读取某个PID,符合ISO 14229及ISO 15765-2诊断规范)241 03 22 C0 00 (241 represents an ECU diagnostic address, 03 is TP layer information, indicating that the effective diagnostic data length is 3 bytes, 22 is a diagnostic service number, indicating that a certain PID is read, in line with ISO 14229 and ISO 15765- 2 diagnostic specification)

总线回复:641 10 0A 62 C0 00 00 00 00Bus reply: 641 10 0A 62 C0 00 00 00 00

诊断模块发送:241 30 00 00(流控制帧)Diagnosis module sends: 241 30 00 00 (flow control frame)

总线回复:641 21 01 03 FF FF 00 00 00Bus reply: 641 21 01 03 FF FF 00 00 00

传输流程transfer process

0x241为ECU的地址,0x641为诊断仪的地址,数据流如表1所示:0x241 is the address of the ECU, 0x641 is the address of the diagnostic instrument, and the data flow is shown in Table 1:

表1中,对传输层来说,斜体字部分为有效数据;加粗部分为传输层协议控制信息;其余数据为填充数据。表1的第1列的标号所代表的各行,说明如下:In Table 1, for the transport layer, the italicized part is valid data; the bold part is the transport layer protocol control information; the rest of the data is filling data. The rows represented by the labels in the first column of Table 1 are explained as follows:

●1和2都为单帧请求读取PID,2中0241为ECU的地址,0641为诊断仪的地址,40是FlexRay的STF的通信层协议控制信息,03为本帧的有效数据的长度(即FPL),0003为单帧或者多帧的传输数据的长度(即ML),2为一个单帧传输。● Both 1 and 2 are single-frame requests to read the PID, 0241 in 2 is the address of the ECU, 0641 is the address of the diagnostic instrument, 40 is the communication layer protocol control information of STF of FlexRay, and 03 is the length of the effective data of this frame ( That is, FPL), 0003 is the length of the transmission data of a single frame or multiple frames (ie, ML), and 2 is a single frame transmission.

●3为多帧传输,是对诊断仪的多帧响应,其中,0641为诊断仪地址,0241为ECU地址,40为STF,06为FPL长度,000A为ML,后面6字节为有效数据域。3 is multi-frame transmission, which is a multi-frame response to the diagnostic instrument, among which, 0641 is the address of the diagnostic instrument, 0241 is the address of the ECU, 40 is STF, 06 is the length of FPL, 000A is ML, and the following 6 bytes are valid data fields .

●5为诊断仪收到多帧请求的第一帧后发送的流控制帧,6为网关把收到的流控制帧转为FlexRay的通信层的流控制帧,0241为ECU地址,0641为诊断仪地址,83为CTS的流控制帧,00为BC(Bandwidth Control),0F FF为网络层Buffer,需要说明的是,该网络层Buffer在CAN的当前流控制帧是没有的,因此网关转发的时候需要添加,来表征诊断仪的网络层的Buffer。5 is the flow control frame sent by the diagnostic instrument after receiving the first frame of the multi-frame request, 6 is the flow control frame received by the gateway into the flow control frame of the communication layer of FlexRay, 0241 is the ECU address, 0641 is the diagnosis 83 is the flow control frame of CTS, 00 is BC (Bandwidth Control), and 0F FF is the network layer Buffer. It should be noted that the network layer Buffer does not exist in the current flow control frame of CAN, so the gateway forwards It needs to be added to represent the Buffer of the network layer of the diagnostic instrument.

●7为ECU发送的连续帧,06 41为诊断仪地址,02 41为ECU地址,90为最后一帧(LF),04为FPL,00 0A为ML(与前面的STF的ML相等),后面四个字节为通信层有效的数据字节。7 is the continuous frame sent by the ECU, 06 41 is the address of the diagnostic instrument, 02 41 is the address of the ECU, 90 is the last frame (LF), 04 is FPL, 00 0A is ML (equal to the ML of the previous STF), and the following The four bytes are valid data bytes for the communication layer.

由于通过第三CAN总线来对FlexRay网络进行诊断,当诊断模块通过第三CAN总线来接收总线消息并记录时,由于数据量大,无法实现全部数据同时监控记录。当FlexRay网络向第三CAN总线进行报文路由时,将报文进行分组路由。根据本发明,网关对FlexRay网络上的各个模块进行报文分组,本发明的FlexRay网络中可以包含8个ECU节点,编号从1至8,则将节点1、节点2、节点3分为A组,将节点4、节点5、节点6分为B组,将节点7、节点8分为C组。通过向网关发送控制命令,可以切换网关的路由模式。网关针对FlexRay网络向诊断口CAN网络(亦即,诊断模块与第三CAN总线的接口)的报文路由模式分为三种,模式1、模式2、模式3。Since the FlexRay network is diagnosed through the third CAN bus, when the diagnostic module receives and records bus messages through the third CAN bus, due to the large amount of data, it is impossible to monitor and record all data at the same time. When the FlexRay network routes the message to the third CAN bus, the message is routed in groups. According to the present invention, the gateway performs message grouping for each module on the FlexRay network. The FlexRay network of the present invention can include 8 ECU nodes, numbered from 1 to 8, and then nodes 1, 2 and 3 are divided into group A , divide nodes 4, 5, and 6 into group B, and divide nodes 7 and 8 into group C. By sending control commands to the gateway, the routing mode of the gateway can be switched. There are three routing modes for the gateway to route messages from the FlexRay network to the diagnostic port CAN network (that is, the interface between the diagnostic module and the third CAN bus), mode 1, mode 2, and mode 3.

若网关工作在路由模式1,则网关将A组FlexRay报文转发至CAN3网络,以供数据分析及数据记录;若网关工作在模式2,则网关将B组FlexRay报文转发至CAN3网络,若网关工作在模式3,则网关将C组FlexRay报文转发至CAN3网络。CAN3网络指的是第三CAN总线及其收发器以及借由第三CAN总线互相连接的元件而构成的网络。If the gateway works in routing mode 1, the gateway will forward Group A FlexRay messages to CAN3 network for data analysis and data recording; if the gateway works in mode 2, the gateway will forward Group B FlexRay messages to CAN3 network, if When the gateway works in mode 3, the gateway forwards Group C FlexRay messages to the CAN3 network. The CAN3 network refers to a network formed by the third CAN bus and its transceivers, and components connected to each other by the third CAN bus.

针对FlexRay网络,本发明所述网关支持跨网络总线程序刷新功能。所谓总线程序刷新,是指不通过单片机烧写口,把通信网络作为传输介质,采用诊断服务中的程序刷新服务来实现网络中各个模块程序刷新的功能。采用FlexRay诊断仪,可直接连接到FlexRay网络中对各模块进行刷新。本发明所述网关支持诊断路由功能,其中诊断服务包含程序刷新所需的各项服务。通过本发明所述网关的CAN-FlexRay诊断路由功能,将程序刷新报文路由转发至FlexRay网络,实现对FlexRay网络中节点的刷新。For the FlexRay network, the gateway of the present invention supports the program refreshing function across the network bus. The so-called bus program refresh refers to the function of refreshing the program of each module in the network by using the program refresh service in the diagnostic service without using the single-chip programming port, using the communication network as the transmission medium. Using the FlexRay diagnostic instrument, it can be directly connected to the FlexRay network to refresh each module. The gateway of the present invention supports the diagnostic routing function, wherein the diagnostic service includes various services required for program refresh. Through the CAN-FlexRay diagnostic routing function of the gateway in the present invention, the program refreshing message is routed and forwarded to the FlexRay network, so as to realize the refreshing of the nodes in the FlexRay network.

针对FlexRay网络,本发明所述网关支持跨网络总线程序刷新功能。所谓总线程序刷新,是指不通过单片机烧写口,把通信网络作为传输介质,采用诊断服务中的程序刷新服务来实现网络中各个模块程序刷新的功能。采用FlexRay诊断仪,可直接连接到FlexRay网络中对各模块进行刷新。本发明所述网关支持诊断路由功能,其中诊断服务包含程序刷新所需的各项服务。通过本发明所述网关的CAN-FlexRay诊断路由功能,将程序刷新报文路由转发至FlexRay网络,实现对FlexRay网络中节点的刷新。For the FlexRay network, the gateway of the present invention supports the program refreshing function across the network bus. The so-called bus program refresh refers to the function of refreshing the program of each module in the network by using the program refresh service in the diagnostic service without using the single-chip programming port, using the communication network as the transmission medium. Using the FlexRay diagnostic instrument, it can be directly connected to the FlexRay network to refresh each module. The gateway of the present invention supports the diagnostic routing function, wherein the diagnostic service includes various services required for program refresh. Through the CAN-FlexRay diagnostic routing function of the gateway in the present invention, the program refreshing message is routed and forwarded to the FlexRay network, so as to realize the refreshing of the nodes in the FlexRay network.

其中电源模式管理模块,由两部分组成,一部分是输入开关电路,另一部分是输出继电器电路。其中输入开关电路,外接三路硬线输入,通过电平转换后连接到单片机上。三路硬线输入分别为ACC、RUN、CRANK,与整车点火开关相连。点火开关有4个位置,分别为OFF、ACC、RUN、CRANK。其中输出继电器电路,有三个输出端外接继电器,三个输出端分别为ACC Relay输出端、RAP Relay输出端、RUN/CRANK Relay输出端。The power mode management module is composed of two parts, one part is an input switch circuit, and the other part is an output relay circuit. Among them, the input switch circuit is externally connected with three hard-line inputs, and connected to the single-chip microcomputer after level conversion. The three hard-line inputs are ACC, RUN, and CRANK, which are connected to the ignition switch of the vehicle. The ignition switch has 4 positions, which are OFF, ACC, RUN, and CRANK. Among them, the output relay circuit has three output terminals connected to external relays, and the three output terminals are ACC Relay output terminal, RAP Relay output terminal, and RUN/CRANK Relay output terminal.

当钥匙转到OFF时,三个硬线输入均为低电平,整车处于OFF模式,此时三个继电器输出端均为低电平,此时3路CAN与1路FlexRay处于休眠状态,无总线通信;当钥匙转到ACC时,ACC输入端为高电平,其它两路输入为低电平,整车处于ACC模式下,此时ACC Relay及RAP Relay均为高电平,此时3路CAN与1路FlexRay均处于唤醒状态,有总线通信及报文路由;当钥匙转到RUN时,ACC、RUN输出端均为高电平,整车处于RUN模式,此时ACC Relay、RAP Relay及RUN/CRANK Relay均为高电平,3路CAN与1路FlexRay处于唤醒状态,有总线通信及报文路由;当钥匙转到CRANK时,RUN输入端与CRANK输出端为高电平,ACC输入端为低电平,整车处于CRANK模式,此时ACC Relay及RUN/CRANK Relay为高电平,RAPRelay为低电平,整车处于点火状态,发动机在马达带动下执行点火动作,总线处于唤醒状态。CRANK是一个不稳定状态,当整车点火成功后,自动退出CRANK模式,进入到RUN模式,钥匙会自动从CRANK位置回弹到RUN位置。When the key is turned to OFF, the three hard-line inputs are all at low level, and the vehicle is in OFF mode. At this time, the three relay outputs are all at low level. At this time, the 3-way CAN and 1-way FlexRay are in a dormant state. No bus communication; when the key is turned to ACC, the ACC input terminal is at high level, the other two inputs are at low level, and the vehicle is in ACC mode, at this time both ACC Relay and RAP Relay are at high level, at this time The 3 channels of CAN and 1 channel of FlexRay are both in the wake-up state, with bus communication and message routing; when the key is turned to RUN, the output terminals of ACC and RUN are both high, and the whole vehicle is in RUN mode. At this time, ACC Relay and RAP Relay and RUN/CRANK Relay are both at high level, 3 channels of CAN and 1 channel of FlexRay are in the wake-up state, with bus communication and message routing; when the key is turned to CRANK, the RUN input terminal and CRANK output terminal are at high level, The ACC input terminal is at low level, and the whole vehicle is in CRANK mode. At this time, ACC Relay and RUN/CRANK Relay are at high level, and RAP Relay is at low level, the whole vehicle is in the ignition state, and the engine performs ignition action driven by the motor, and the bus is awake. CRANK is an unstable state. When the vehicle is successfully ignited, it will automatically exit the CRANK mode and enter the RUN mode, and the key will automatically bounce back from the CRANK position to the RUN position.

由点火钥匙所处的位置,决定了整车的供电模式以及网络的休眠唤醒状态,完成了整车网络管理。当点火钥匙从ACC转到OFF时,整车网络不会立刻进入休眠,网关会启动一个定时器,当定时结束后,整个网络才会进入休眠,停止通信。The position of the ignition key determines the power supply mode of the vehicle and the sleep and wake-up state of the network, and completes the network management of the vehicle. When the ignition key is turned from ACC to OFF, the vehicle network will not immediately go to sleep, the gateway will start a timer, and when the timer is over, the whole network will go to sleep and stop communication.

根据本发明的示例,还提供一种车载CAN总线数据与FlexRay总线数据之间的转换方法。图3是该方法的流程示意图。如图所示,在步骤30,接收要转换成FlexRay总线数据的CAN总线数据。在步骤32,将若干帧所接收的CAN总线数据构造成一帧FlexRay数据,其中,所构成的FlexRay数据。在步骤34,接收要转换成CAN总线数据的FlexRay总线数据。在步骤36,将一帧FlexRay总线数据分成n帧CAN总线数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定。如图3所示的方法可结合如图1所示的车载CAN总线数据与FlexRay总线数据之间的转换系统来实现。According to an example of the present invention, a conversion method between vehicle CAN bus data and FlexRay bus data is also provided. Figure 3 is a schematic flow chart of the method. As shown, at step 30, CAN bus data to be converted into FlexRay bus data is received. In step 32, several frames of received CAN bus data are constructed into a frame of FlexRay data, wherein the formed FlexRay data. In step 34, the FlexRay bus data to be converted into CAN bus data is received. In step 36, a frame of FlexRay bus data is divided into n frames of CAN bus data, each frame of CAN data has the same cycle and different IDs, wherein n is determined based on the length of the FlexRay data and the length of the CAN data under the vehicle CAN protocol. The method shown in FIG. 3 can be implemented in conjunction with the conversion system between the vehicle CAN bus data and the FlexRay bus data shown in FIG. 1 .

尽管已结合附图在上文的描述中,公开了本发明的具体实施例,但是本领域技术人员可以理解到,可在不脱离本发明精神的情况下,对公开的具体实施例进行变形或修改。本发明的实施例仅用于示意并不用于限制本发明。Although specific embodiments of the present invention have been disclosed in the above description with reference to the accompanying drawings, those skilled in the art can understand that the disclosed specific embodiments can be modified or modified without departing from the spirit of the present invention. Revise. The embodiments of the present invention are only for illustration and are not intended to limit the present invention.

Claims (7)

1.一种车载CAN总线数据与FlexRay总线数据之间的转换系统,其特征在于,该系统包括:第一CAN总线收发器,用于接收发送到第一CAN总线上的数据或将所述第一CAN总线上的数据发出; 1. a conversion system between vehicle-mounted CAN bus data and FlexRay bus data, it is characterized in that the system includes: a first CAN bus transceiver, for receiving data sent to the first CAN bus or sending the first CAN bus Send data on the CAN bus; 第二CAN总线收发器,用于接收发送到第二CAN总线上的数据或将所述第二CAN总线上的数据发出; The second CAN bus transceiver is used to receive data sent to the second CAN bus or send data on the second CAN bus; 第三CAN总线收发器,用于接收发送到第三CAN总线上的数据或将所述第三CAN总线上的数据发出; A third CAN bus transceiver, configured to receive data sent to the third CAN bus or send data on the third CAN bus; FlexRay总线收发器,用于接收发送到FlexRay总线上的数据或将所述FlexRay总线上的数据发出; FlexRay bus transceiver, used to receive data sent to the FlexRay bus or send data on the FlexRay bus; 数据转换模块,其用于将接收的来自CAN总线的数据转换成FlexRay总线数据并将转换后的数据发送给FlexRay总线,以及将接收的CAN总线数据转换成FlexRay总线数据并将转换后的数据发送给接收其的CAN总线;以及 Data conversion module, which is used to convert the received data from the CAN bus into FlexRay bus data and send the converted data to the FlexRay bus, and convert the received CAN bus data into FlexRay bus data and send the converted data to the CAN bus that receives it; and 控制模块,其与第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器、FlexRay总线收发器、数据转换模块均电连接,并控制它们的运行; A control module, which is electrically connected to the first CAN bus transceiver, the second CAN bus transceiver, the third CAN bus transceiver, the FlexRay bus transceiver, and the data conversion module, and controls their operation; 其中,所述第一CAN总线收发器、第二CAN总线收发器、第三CAN总线收发器之间互相电连接、且均与数据转换模块电连接,所述FlexRay总线收发器与所述数据转换模块电连接。 Wherein, the first CAN bus transceiver, the second CAN bus transceiver, and the third CAN bus transceiver are electrically connected to each other, and are all electrically connected to the data conversion module, and the FlexRay bus transceiver is connected to the data conversion module. The modules are electrically connected. 2. 如权利要求1所述的转换系统,其特征在于,所述系统还包括诊断模块,其配置成监控所述第一CAN总线、第二CAN总线以及第三CAN总线的运行。 2. The switching system of claim 1, further comprising a diagnostic module configured to monitor operation of the first CAN bus, the second CAN bus, and the third CAN bus. 3. 如权利要求2所述的转换系统,其特征在于,所述第三CAN总线配置成通过其管理所述诊断模块以及通过其进行FlexRay报文路由与诊断路由。 3. The conversion system according to claim 2, wherein the third CAN bus is configured to manage the diagnostic module through it and perform FlexRay message routing and diagnostic routing through it. 4. 如权利要求1到3中任意一项所述的转换系统,其特征在于,所述数据转换模块包括: 4. The conversion system according to any one of claims 1 to 3, wherein the data conversion module comprises: 第一单元,其用于将要发送到第一CAN总线、第二CAN总线及第三CAN总线中任意一个的FlexRay数据分成n帧CAN数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定; The first unit, which is used to divide the FlexRay data to be sent to any one of the first CAN bus, the second CAN bus and the third CAN bus into n frames of CAN data, each frame of CAN data has the same cycle and different IDs, where n is based on FlexRay The data length is determined with the CAN data length under the vehicle CAN protocol; 第二单元,其用于将要发送到FlexRay总线的来自第一CAN总线收发器、第二CAN总线收发器及第三CAN总线收发器中任意一个的CAN数据构造成FlexRay数据。 The second unit is used for constructing the CAN data from any one of the first CAN bus transceiver, the second CAN bus transceiver and the third CAN bus transceiver to be sent to the FlexRay bus into FlexRay data. 5. 如权利要求4所述的转换系统,其特征在于,所述第二单元配置成将若干帧CAN报文数据构造成一帧FlexRay报文数据,且以所述若干帧CAN报文数据中周期最小的周期作为所构成的FlexRay报文数据的传送周期。 5. conversion system as claimed in claim 4, is characterized in that, described second unit is configured to construct a frame of FlexRay message data with several frames CAN message data, and with described several frames CAN message data cycle The minimum cycle is used as the transmission cycle of the formed FlexRay message data. 6. 一种车载CAN总线数据与FlexRay总线数据之间的转换方法,其特征在于,所述方法包括: 6. a conversion method between vehicle-mounted CAN bus data and FlexRay bus data, is characterized in that, described method comprises: 接收要转换成FlexRay总线数据的CAN总线数据, Receive CAN bus data to be converted into FlexRay bus data, 将若干个所接收的CAN总线数据构造成一帧FlexRay数据; Construct several received CAN bus data into a frame of FlexRay data; 接收要转换成CAN总线数据的FlexRay总线数据, Receive the FlexRay bus data to be converted into CAN bus data, 将一帧FlexRay总线数据分成n帧CAN总线数据,每帧CAN数据具有相同周期不同ID,其中n基于FlexRay数据长度与该车载CAN协议下的CAN数据长度确定。 Divide one frame of FlexRay bus data into n frames of CAN bus data, each frame of CAN data has the same period and different ID, where n is determined based on the length of FlexRay data and the length of CAN data under the vehicle CAN protocol. 7. 如权利要求6所述的转换方法,其特征在于,将若干帧所接收的CAN总线数据构造成一帧FlexRay数据时,以所述若干帧CAN报文数据中周期最小的周期作为所构成的FlexRay报文数据的传送周期。 7. conversion method as claimed in claim 6, it is characterized in that, when the received CAN bus data of several frames is constructed into a frame of FlexRay data, the period with the minimum cycle in the described several frames of CAN message data is as constituted The transmission cycle of FlexRay message data.
CN201510449880.5A 2015-07-28 2015-07-28 Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof Pending CN106713092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510449880.5A CN106713092A (en) 2015-07-28 2015-07-28 Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510449880.5A CN106713092A (en) 2015-07-28 2015-07-28 Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof

Publications (1)

Publication Number Publication Date
CN106713092A true CN106713092A (en) 2017-05-24

Family

ID=58894861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510449880.5A Pending CN106713092A (en) 2015-07-28 2015-07-28 Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof

Country Status (1)

Country Link
CN (1) CN106713092A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121326A (en) * 2017-12-11 2018-06-05 北京经纬恒润科技有限公司 A kind of fault diagnosis method and system
CN108614500A (en) * 2018-06-22 2018-10-02 北京科东电力控制系统有限责任公司 Electric vehicle monitoring device and electric vehicle
CN108891227A (en) * 2018-06-29 2018-11-27 深圳市汇川技术股份有限公司 A kind of method, system and control panel that vehicle is communicated with air-conditioning
CN114500679A (en) * 2022-01-27 2022-05-13 中国第一汽车股份有限公司 Can protocol conversion method and device, electronic equipment and storage medium
CN114650194A (en) * 2022-03-29 2022-06-21 深圳市元征科技股份有限公司 Data communication method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996966A (en) * 2005-12-20 2007-07-11 富士通天株式会社 Communication message converting apparatus and communication message converting method
CN101478460A (en) * 2008-10-28 2009-07-08 上海电力学院 FlexRay-CAN communication gateway and implementing method
CN102325128A (en) * 2011-07-11 2012-01-18 北京交通大学 Protocol Conversion Device and Method for FlexRay Bus and LIN Bus
CN102710479A (en) * 2012-06-14 2012-10-03 北京理工大学 Automobile gateway system for inverse resolution of communication protocols

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996966A (en) * 2005-12-20 2007-07-11 富士通天株式会社 Communication message converting apparatus and communication message converting method
CN101478460A (en) * 2008-10-28 2009-07-08 上海电力学院 FlexRay-CAN communication gateway and implementing method
CN102325128A (en) * 2011-07-11 2012-01-18 北京交通大学 Protocol Conversion Device and Method for FlexRay Bus and LIN Bus
CN102710479A (en) * 2012-06-14 2012-10-03 北京理工大学 Automobile gateway system for inverse resolution of communication protocols

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121326A (en) * 2017-12-11 2018-06-05 北京经纬恒润科技有限公司 A kind of fault diagnosis method and system
CN108614500A (en) * 2018-06-22 2018-10-02 北京科东电力控制系统有限责任公司 Electric vehicle monitoring device and electric vehicle
CN108891227A (en) * 2018-06-29 2018-11-27 深圳市汇川技术股份有限公司 A kind of method, system and control panel that vehicle is communicated with air-conditioning
CN108891227B (en) * 2018-06-29 2021-12-21 深圳市汇川技术股份有限公司 Method and system for communication between whole vehicle and air conditioner and control panel
CN114500679A (en) * 2022-01-27 2022-05-13 中国第一汽车股份有限公司 Can protocol conversion method and device, electronic equipment and storage medium
CN114500679B (en) * 2022-01-27 2024-03-26 中国第一汽车股份有限公司 can protocol conversion method, can protocol conversion device, electronic equipment and storage medium
CN114650194A (en) * 2022-03-29 2022-06-21 深圳市元征科技股份有限公司 Data communication method, device, electronic equipment and storage medium
CN114650194B (en) * 2022-03-29 2024-05-10 深圳市元征科技股份有限公司 Data communication method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11233750B2 (en) Method and apparatus for allocating transmission opportunities in vehicle network
CN105388858B (en) Method of operating a communication node in a network
CN111565139B (en) Data processing and storage system and method in a vehicle of an in-vehicle communication network architecture
US10382221B2 (en) Communication method based on automotive safety integrity level in vehicle network and apparatus for the same
US10574348B2 (en) Method for time synchronization between communication nodes in network
CN107659494B (en) Data processing method and intelligent vehicle-mounted gateway
CN106713092A (en) Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof
US10693668B2 (en) Operation method of communication node in network
CN107920007B (en) First communication node of a plurality of communication nodes in a vehicle network and method for operating the same
Tuohy et al. Next generation wired intra-vehicle networks, a review
US10715417B2 (en) Method for configuring stream communication path in network
US20160364247A1 (en) Operation method of communication node in automotive network
US20160366646A1 (en) Operation method of communication node in automotive network
CN117917881A (en) A flow scheduling method, device and vehicle
KR102772723B1 (en) Method and apparatus for allocating priority transmission opportunities in a vehicle network
CN106506252B (en) Conformance testing device and method for communication node
US20200287995A1 (en) Data transmission and reception method in vehicle network, and apparatus for the same
CN108880965B (en) Power CAN gateway for automatically driving automobile and implementation method thereof
CN108093028B (en) Method and apparatus for reproducing content based on presentation time in vehicle network
CN115695067A (en) Communication method and device for vehicle bus
Herpel et al. Routing of safety-relevant messages in automotive ECU networks
JP4361540B2 (en) Gateway device, data transfer method, and program
US11330057B2 (en) Operation methods of communication node in network
CN103458017A (en) Routing system of local area networks and communication method thereof
US20160364245A1 (en) Operation method of communication node in automotive network

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170524