A three-party communication system for vehicle body, vehicle instrument system and vehicle central control system
By designing a three-party communication system for the vehicle body, vehicle instrument system and vehicle central control system, the SOC main control and MCU controller are used to realize data interaction between the vehicle body, central control and instrument, solving the problems of high communication costs and inconvenient operation in traditional vehicle systems, and achieving flexible data communication and protocol conversion.
Patent Information
- Application Number
- CN202311623866.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-11-30
AI Technical Summary
In traditional vehicle computer systems, electronic instruments and central control systems communicate with the vehicle body through external MCUs, resulting in high costs and inconvenient installation and operation.
A three-party communication system for the body, vehicle instrument system and vehicle central control system is designed, using SOC main control and MCU controller, and the central control module, instrument module and RTOS module are set through hard isolation. The virtual serial port module, data communication processing module, protocol adaptation layer and interface layer are used to realize data interaction between the body, central control and instrument.
It realizes the communication needs of the vehicle body and central control and instrument through a single communication interface, supports conversion between different MCU protocols, and can be extended to data communication between the MCU and multiple systems, making it easy to use.
Smart Images

Figure CN117622025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-mounted intelligent cockpits, and in particular to a three-party communication system among a vehicle body, a vehicle-mounted instrument system and a vehicle-mounted central control system. Background Art
[0002] In traditional car systems, electronic instruments and central control are separated. The two parts are completely independent of each other, have their own hardware and software, and may even be provided by different solution providers or manufacturers. For the instrument to communicate with the body, an external MCU needs to be configured. The MCU communicates with the body through the CAN interface, and the instrument SOC communicates with the MCU through the serial port or SPI interface, thereby realizing data communication between the instrument and the body. For the central control to communicate with the body, an external MCU also needs to be configured. The MCU communicates with the body through the CAN interface, and the central control SOC communicates with the MCU through the serial port or SPI interface, thereby realizing data communication between the central control and the body. This is costly and inconvenient to install and operate.
[0003] Therefore, it is very necessary to design a three-party communication system among the vehicle body, the vehicle instrument system and the vehicle central control system. Summary of the invention
[0004] The purpose of the present invention is to provide a three-party communication system for a vehicle body, a vehicle instrument system and a vehicle central control system. Only one communication interface is needed to satisfy the communication between the vehicle body and the central control and instrument, and can also be used for data exchange between the central control and the instrument, which is easy to use.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A three-party communication system of a vehicle body, an on-board instrument system and an on-board central control system, comprising: a SOC main control and an MCU controller, wherein the vehicle body is connected to the MCU controller through a CAN bus, and the MCU controller is connected to the SOC main control through a serial port or an SPI port;
[0007] The SOC main control is provided with a central control module, an instrument module and an RTOS module in a hard isolation manner. The MCU controller is connected to the RTOS module through a serial port or SPI, and the RTOS module is connected to the central control module and the instrument module.
[0008] Optionally, the RTOS module runs a virtual serial port module, a data communication processing module, a protocol adaptation layer and an interface layer; the central control module and the instrument module are connected to the virtual serial port module; the virtual serial port module is connected to the data communication processing module; the data communication processing module is connected to the protocol adaptation layer and the interface layer; and the interface layer is connected to the serial port and the SPI port.
[0009] Optionally, the virtual serial port module is used to realize communication between the instrument module and the RTOS module, the central control module and the RTOS module, and the instrument module and the central control module, wherein the virtual serial port module creates a data transmission channel between the instrument module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the instrument module and the RTOS module through the serial port communication protocol, the virtual serial port module creates a data transmission channel between the central control module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the central control module and the RTOS module through the serial port communication protocol, each virtual serial port channel is allocated a circular receiving buffer for receiving data sent by the instrument module or the central control module to the MCU controller, a sending thread is started when the circular receiving buffer is created, the sending thread sends the data in the circular receiving buffer to the MCU controller, and sleeps when the data in the circular receiving buffer is empty, and is awakened when data is written to the circular receiving buffer, the instrument module and the central control module respectively forward through each other's virtual serial port to realize communication, and the data sent by the MCU controller to the central control module or the instrument module are sent to the central control module or the instrument module through the data transmission channel of the central control module or the instrument module.
[0010] Optionally, the interface layer is used to implement serial port reception and transmission and SPI port reception and transmission. The interface layer calls the serial port and SPI port drivers to receive and send MCU data. The interface layer includes a circular receiving buffer, a circular sending buffer, a data receiving interrupt routine and a data sending completion interrupt routine. The circular receiving buffer, the circular sending buffer, the data receiving interrupt routine and the data sending completion interrupt routine cooperate with the data communication processing module through rtos events and mutually exclusive semaphore mechanisms to drive the reception and transmission of MCU data streams. The data receiving interrupt routine is the entry point of the MCU data. When the serial port or SPI port receives MCU data, the interrupt routine is triggered to execute, the data is stored in the circular receiving buffer, and the data receiving thread of the data communication processing module blocked by the receiving event is awakened. The data sent by the data communication processing module to the MCU controller is written to the circular sending buffer, and then the sending function of the interface driver is called to start data sending. After the data sending is completed, the data sending completion interrupt routine will be triggered. In the data sending completion interrupt routine, the remaining data in the circular sending buffer continues to be sent, and the data in the circular sending buffer is continuously sent to the serial port or SPI interface until the data in the circular sending buffer is empty.
[0011] Optionally, the data communication processing module is used to read, process and send data packets, and the data communication processing module includes a data receiving thread and two data sending threads. The data receiving thread is used to read data from the ring receiving buffer of the interface layer, and enters sleep mode when there is no data in the ring receiving buffer, and is awakened when data is written to the ring receiving buffer. After the data receiving thread reads the data, it parses the data packet according to the protocol, wherein valid data packets are eventually diverted and sent to the instrument module or the central control module. One data sending thread is used to send data from the instrument module to the MCU controller, and the other data sending thread is used to send data from the central control module to the MCU controller. It is started when the virtual serial port module creates a ring receiving buffer, and the data sending thread sends the data in the ring receiving buffer in the virtual serial port module to the ring sending buffer in the interface layer.
[0012] Optionally, the protocol adaptation module is used to unify various protocol processing interfaces, parse and assemble data packets, and implement conversion between different protocols.
[0013] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the present invention provides a three-party communication system of a vehicle body, an on-board instrument system and an on-board central control system, the system includes a SOC main control and an MCU controller, the SOC main control is provided with a central control module, an instrument module and an RTOS module in a hard isolation manner, the RTOS module runs a virtual serial port module, a data communication processing module, a protocol adaptation layer and an interface layer, and adopts a single SOC multi-system hard isolation solution. Only one communication interface is needed to meet the communication between the vehicle body and the central control and instrument, and it can also be used for data interaction between the central control and the instrument. It can support conversion between different MCU protocols, and under the current hard front design, it can be arbitrarily expanded to data communication between the MCU and any multiple systems, which is easy to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0015] Figure 1 This is a schematic diagram of the structure of a three-party communication system among a vehicle body, an on-board instrument system and an on-board central control system according to an embodiment of the present invention;
[0016] Figure 2 Schematic diagram of the software structure running for the RTOS module;
[0017] Figure 3 Run the flowchart for the virtual serial port module;
[0018] Figure 4 Run the flow chart for the data communication processing module. DETAILED DESCRIPTION
[0019] The purpose of the present invention is to provide a three-party communication system for a vehicle body, a vehicle instrument system and a vehicle central control system. Only one communication interface is needed to satisfy the communication between the vehicle body and the central control and instrument, and can also be used for data exchange between the central control and the instrument, which is easy to use.
[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] like Figure 1 As shown, the three-party communication system of the vehicle body, the vehicle instrument system and the vehicle central control system provided by the embodiment of the present invention includes: a SOC master control and an MCU controller, the vehicle body is connected to the MCU controller through a CAN bus, and the MCU controller is connected to the SOC master control through a serial port or an SPI port;
[0022] The SOC main control is provided with a central control module, an instrument module and an RTOS module in a hard isolation manner. The MCU controller is connected to the RTOS module through a serial port or SPI, and the RTOS module is connected to the central control module and the instrument module.
[0023] Among them, the SOC master control can adopt the CoreChi X9HP master control chip, NXP IMX8QM master control chip, etc.
[0024] The SOC master control supports multi-system operation in hard isolation mode;
[0025] The SOC master supports running at least one RTOS system;
[0026] The communication port connecting SOC and MCU can be a serial port or an SPI port;
[0027] Only one serial port or SPI port is needed to connect the SOC and MCU;
[0028] The communication port that connects the SOC to the MCU. The RTOS running on the SOC must have access control permissions to it.
[0029] like Figure 2 As shown, the RTOS module runs a virtual serial port module, a data communication processing module, a protocol adaptation layer and an interface layer. The central control module and the instrument module are connected to the virtual serial port module, the virtual serial port module is connected to the data communication processing module, the data communication processing module is connected to the protocol adaptation layer and the interface layer, and the interface layer is connected to the serial port and the SPI port.
[0030] like Figure 3 As shown, the virtual serial port module is used to realize the communication between the instrument module and the RTOS module, the central control module and the RTOS module, and the instrument module and the central control module, wherein the virtual serial port module creates a data transmission channel between the instrument module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the instrument module and the RTOS module through the serial port communication protocol, the virtual serial port module creates a data transmission channel between the central control module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the central control module and the RTOS module through the serial port communication protocol, each virtual serial port channel is allocated a ring receiving buffer for receiving data sent by the instrument module or the central control module to the MCU controller, a sending thread is started when the ring receiving buffer is created, the sending thread sends the data in the ring receiving buffer to the MCU controller, and sleeps when the data in the ring receiving buffer is empty, and is awakened when data is written to the ring receiving buffer, the instrument module and the central control module respectively forward through the virtual serial port of the other party to realize communication, and the data sent by the MCU controller to the central control module or the instrument module are sent to the central control module or the instrument module through the data transmission channel of the central control module or the instrument module.
[0031] The interface layer is used to realize serial port reception and transmission and SPI port reception and transmission. The interface layer calls the serial port and SPI port drivers to receive and send MCU data. The interface layer includes a ring receiving buffer, a ring sending buffer, a data receiving interrupt routine and a data sending completion interrupt routine. The ring receiving buffer, the ring sending buffer, the data receiving interrupt routine and the data sending completion interrupt routine cooperate with the data communication processing module through rtos events and mutually exclusive semaphore mechanisms to drive the reception and transmission of MCU data streams. Among them, the data receiving interrupt routine is the entry point of MCU data. When the serial port or SPI port receives MCU data, the interrupt routine is triggered to execute, the data is stored in the ring receiving buffer, and the data receiving thread of the data communication processing module blocked by the receiving event is awakened. The data sent to the MCU controller by the data communication processing module is written to the ring sending buffer, and then the sending function of the interface driver is called to start data sending. After the data sending is completed, the data sending completion interrupt routine will be triggered. After the data sending is completed, the remaining data in the ring sending buffer will continue to be sent in the data sending completion interrupt routine, and the data in the ring sending buffer will be continuously sent to the serial port or SPI interface until the data in the ring sending buffer is empty.
[0032] like Figure 4As shown, the data communication processing module is used to read, process and send data packets. The data communication processing module includes a data receiving thread and two data sending threads. The data receiving thread is used to read data from the ring receiving buffer of the interface layer, and enters sleep when there is no data in the ring receiving buffer, and is awakened when data is written to the ring receiving buffer. After the data receiving thread reads the data, the data packet is parsed according to the protocol, wherein the valid data packet is finally diverted and sent to the instrument module or the central control module. A data sending thread is used to send the data of the instrument module to the MCU controller, and the other data sending thread is used to send the data of the central control module to the MCU controller. It is started when the virtual serial port module creates the ring receiving buffer, and the data sending thread sends the data in the ring receiving buffer in the virtual serial port module to the ring sending buffer in the interface layer.
[0033] The protocol adapter module is used to unify the protocol processing interfaces, parse and assemble data packets, and realize conversion between different protocols.
[0034] The present invention provides a three-party communication system for a vehicle body, an on-board instrument system and an on-board central control system. The system includes a SOC main control and an MCU controller. The SOC main control is provided with a central control module, an instrument module and an RTOS module in a hard isolation manner. The RTOS module runs a virtual serial port module, a data communication processing module, a protocol adaptation layer and an interface layer. A single SOC multi-system hard isolation solution is adopted. Only one communication interface is needed to satisfy the communication between the vehicle body and the central control and the instrument. At the same time, it can also be used for data interaction between the central control and the instrument. It can support conversion between different MCU protocols. Under the current hard front design, it can be arbitrarily expanded to data communication between the MCU and any number of systems, which is easy to use.
[0035] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A three-party communication system for a vehicle body, an on-board instrument system and an on-board central control system, characterized in that: include: SOC master control and MCU controller, the vehicle body is connected to the MCU controller through the CAN bus, and the MCU controller is connected to the SOC master control through the serial port or SPI port; The SOC main control is provided with a central control module, an instrument module and an RTOS module in a hard isolation manner. The MCU controller is connected to the RTOS module through a serial port or SPI, and the RTOS module is connected to the central control module and the instrument module. The RTOS module runs a virtual serial port module, a data communication processing module, a protocol adaptation layer and an interface layer, the central control module and the instrument module are connected to the virtual serial port module, the virtual serial port module is connected to the data communication processing module, the data communication processing module is connected to the protocol adaptation layer and the interface layer, and the interface layer is connected to the serial port and the SPI port; The virtual serial port module is used to realize the communication between the instrument module and the RTOS module, the central control module and the RTOS module, and the instrument module and the central control module, wherein the virtual serial port module creates a data transmission channel between the instrument module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the instrument module and the RTOS module through the serial port communication protocol, the virtual serial port module creates a data transmission channel between the central control module and the RTOS module based on the inter-core communication technology, and performs bidirectional data transmission between the central control module and the RTOS module through the serial port communication protocol, each virtual serial port channel is allocated a ring receiving buffer for receiving data sent by the instrument module or the central control module to the MCU controller, a sending thread is started when the ring receiving buffer is created, the sending thread sends the data in the ring receiving buffer to the MCU controller, and sleeps when the data in the ring receiving buffer is empty, and is awakened when data is written to the ring receiving buffer, the instrument module and the central control module respectively forward through each other's virtual serial port to realize communication, and the data sent by the MCU controller to the central control module or the instrument module are sent to the central control module or the instrument module through the data transmission channel of the central control module or the instrument module.
2. The vehicle body, vehicle instrument system and vehicle central control system three-party communication system according to claim 1 is characterized in that: The interface layer is used to realize serial port reception and transmission and SPI port reception and transmission. The interface layer calls the serial port and SPI port drivers to receive and send MCU data. The interface layer includes a ring receiving buffer, a ring sending buffer, a data receiving interrupt routine and a data sending completion interrupt routine. The ring receiving buffer, the ring sending buffer, the data receiving interrupt routine and the data sending completion interrupt routine cooperate with the data communication processing module through rtos events and mutually exclusive semaphore mechanisms to drive the reception and transmission of MCU data streams. Among them, the data receiving interrupt routine is the entry point of MCU data. When the serial port or SPI port receives MCU data, the interrupt routine is triggered to execute, the data is stored in the ring receiving buffer, and the data receiving thread of the data communication processing module blocked by the receiving event is awakened. The data sent to the MCU controller by the data communication processing module is written to the ring sending buffer, and then the sending function of the interface driver is called to start data sending. After the data sending is completed, the data sending completion interrupt routine will be triggered. After the data sending is completed, the remaining data in the ring sending buffer will continue to be sent in the data sending completion interrupt routine, and the data in the ring sending buffer will be continuously sent to the serial port or SPI interface until the data in the ring sending buffer is empty.
3. The vehicle body, vehicle instrument system and vehicle central control system three-party communication system according to claim 2 is characterized in that: The data communication processing module is used to read, process and send data packets. The data communication processing module includes a data receiving thread and two data sending threads. The data receiving thread is used to read data from the ring receiving buffer of the interface layer, enter sleep mode when there is no data in the ring receiving buffer, and be awakened when data is written to the ring receiving buffer. After the data receiving thread reads the data, the data packet is parsed according to the protocol, wherein the valid data packet is finally diverted and sent to the instrument module or the central control module. One data sending thread is used to send the data of the instrument module to the MCU controller, and the other data sending thread is used to send the data of the central control module to the MCU controller. It is started when the virtual serial port module creates the ring receiving buffer, and the data sending thread sends the data in the ring receiving buffer in the virtual serial port module to the ring sending buffer in the interface layer.
4. The vehicle body, vehicle instrument system and vehicle central control system three-party communication system according to claim 1 is characterized in that: The protocol adaptation layer is used to unify the protocol processing interfaces, parse and assemble data packets, and realize conversion between different protocols.
Citation Information
Patent Citations
Multimedia entertainment system of vehicle, control method and vehicle
CN110385991A
Automobile service system based on someip instrument data
CN113608738A