Vehicle-mounted central gateway diagnosis system and method and storage medium

By combining a multi-core processor architecture with an MCU and an MPU and using an inter-core communication mechanism, the problems of low diagnostic efficiency and conflicts when multiple diagnostic sources are accessed are solved, achieving efficient and reliable diagnostic response and improving user experience.

CN118938866APending Publication Date: 2024-11-12UNITED AUTOMOTIVE ELECTRONICS SYST
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411071536.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When multiple diagnostic sources are connected to the vehicle's central gateway system at the same time, the diagnostic efficiency is low and functional abnormalities may occur, resulting in slow response speed and poor user experience.

Method used

A multi-core processor architecture combining MCU and MPU is adopted, and the arbitration of diagnostic requests and the synchronization of results are realized through the inter-core communication mechanism to ensure that only one diagnostic mode exists at a time. This provides an in-vehicle central gateway diagnostic system and method, including a diagnostic arbitration module, an inter-core communication module and different communication modules. The arbitration strategy is first-come, first-served and mutually exclusive.

Benefits of technology

It improves diagnostic efficiency and stability when multiple diagnostic sources are accessed simultaneously, avoids diagnostic conflicts, enhances response speed and diagnostic reliability, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118938866A_ABST
    Figure CN118938866A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile diagnosis, in particular to a vehicle-mounted central gateway diagnosis system and method and a storage medium. And when a diagnosis request of the OBD DoCAN external diagnosis equipment, a diagnosis request of the OBD DoIP external diagnosis equipment, an OTA diagnosis request or a remote diagnosis request is received, the MCU and the MPU carry out arbitration. According to the invention, correct state conversion and response of the central gateway in different diagnosis scenes are realized, a diagnosis request is responded by a rapid and efficient diagnosis arbitration method, and the central gateway realizes arbitration of a plurality of diagnosis requests such as an OTA mode, an OTA read version, a remote diagnosis mode, OBD DoIP and OBD CAN diagnosis through mutual cooperation of the MPU core and the MCU core. Moreover, no conflict occurs when multiple diagnosis sources are accessed at the same time, thereby improving the response speed of the vehicle-mounted central gateway in different diagnosis scenes, improving the diagnosis efficiency, enhancing the diagnosis reliability, and improving the diagnosis user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile diagnosis, and in particular to an on-vehicle central gateway diagnosis system, method and storage medium. Background Art

[0002] With the continuous development of electrification and automation in the automotive industry, the methods and sources of vehicle diagnosis, as well as diagnostic application scenarios, are constantly increasing and diversifying, such as OTA (Over-the-Air Technology, OTA for short) and remote diagnosis technologies, which have been widely used in recent years. In addition, this also puts higher requirements on the diagnostic adaptability of the on-board central gateway controller, the access node for diagnostic requests of the off-board diagnostic instrument, in different diagnostic scenarios. The gateway controller has also evolved from the traditional single MCU (Microcontroller Unit, MCU for short) to a multi-core processor architecture composed of an MPU (Microprocessor Unit, MPU for short) and an MCU controller. Therefore, in different diagnostic scenarios, the main control core node of the on-board central gateway controller is no longer a simple single processor body, and the data interaction between the processing cores can be realized through the inter-core interaction mechanism of the central gateway core.

[0003] Based on this background, higher requirements are put forward for the response mode of external diagnostic request. It is necessary to deploy a diagnostic arbitration scheme suitable for multiple diagnostic mode competition based on the on-board central gateway in multiple diagnostic mode application scenarios at the same time, so as to accurately judge the on-board central gateway system, reasonably access the diagnostic request mode and access diagnosis time, and correctly respond to the diagnostic request to prevent conflicts between various diagnostic request modes, which will lead to slow response speed when multiple diagnostic sources are connected at the same time, reduce diagnostic efficiency, and even fail the diagnostic function, and may cause central gateway system function abnormality, which has a negative impact on user experience. Therefore, how to improve the diagnostic efficiency and functional reliability in the application scenario of multiple diagnostic sources connected at the same time is a technical difficulty and problem that urgently needs to be solved. Summary of the invention

[0004] The invention discloses a vehicle-mounted central gateway diagnostic system, method and storage medium, which can improve the diagnostic efficiency and stability when multiple diagnostic sources are connected simultaneously.

[0005] To achieve the above-mentioned object, on the one hand, a vehicle-mounted central gateway diagnostic system is provided, comprising: an MCU and an MPU capable of exchanging information with each other;

[0006] The MCU receives and processes the OBD DoCAN external diagnostic device diagnostic request sent through the CAN channel of the vehicle OBD interface;

[0007] The MPU receives and processes OBD DoIP external diagnostic device diagnosis requests, OTA diagnosis and remote diagnosis requests sent through the vehicle OBD interface Ethernet channel;

[0008] The MCU and MPU communicate with each other through an inter-core communication mechanism, and ensure that only one diagnostic mode exists at the same time through arbitration and result synchronization.

[0009] Further, the MCU includes: a diagnostic arbitration slave module, an MCU inter-core communication module, an MCU Ethernet communication module and an MCU diagnostic communication module;

[0010] The MCU inter-core communication module completes arbitration information communication with the MPU;

[0011] The MCU Ethernet communication module completes Ethernet communication with the MPU;

[0012] The MCU diagnostic communication module receives and processes the OBD DoCAN external diagnostic device diagnostic request sent by the external diagnostic device through the CAN channel of the vehicle OBD interface;

[0013] The diagnostic arbitration slave module determines whether to execute the OBD DoCAN external diagnostic device diagnostic request.

[0014] Further, the MPU includes: an OTA module, a remote diagnosis control module, a diagnosis arbitration main module, an MPU inter-core communication module, an MPU Ethernet communication module and a DoIP diagnosis module;

[0015] The MPU inter-core communication module completes arbitration information communication with the MCU;

[0016] The MPU Ethernet communication module completes Ethernet communication with the MCU;

[0017] The diagnostic arbitration main module determines whether to execute the OBD DoIP external diagnostic device diagnostic request, OTA diagnostic request and remote diagnostic request;

[0018] The OTA module receives and processes an OTA diagnostic request;

[0019] The remote diagnosis control module diagnoses the vehicle controller through the CAN channel according to the remote diagnosis request;

[0020] The DoIP diagnosis module receives and processes OBD DoIP external diagnostic device diagnosis requests.

[0021] In order to achieve the above purpose, on the other hand, a vehicle-mounted central gateway diagnosis method is provided, and the specific method is as follows:

[0022] When receiving an OBD DoCAN external diagnostic device diagnostic request, an OBD DoIP external diagnostic device diagnostic request, an OTA diagnostic request or a remote diagnostic request, the MCU and the MPU perform arbitration. The arbitration decision strategy is first come first served. The four diagnostic modes are all prioritized and mutually exclusive. If no diagnostic request is currently being executed, the diagnostic request is executed. If a diagnostic request is currently being executed, the diagnostic request is not executed.

[0023] Furthermore, the OBD DoCAN external diagnostic device diagnostic request is received and processed by the MCU, and the specific arbitration execution method is as follows:

[0024] The external diagnostic device requests the MCU to perform OBD DoCAN diagnostic mode through the CAN channel of the vehicle's OBD interface;

[0025] MCU receives OBD DoCAN diagnostic mode request;

[0026] MCU requests MPU to send status identification through SPI, MPU sends status identification, and MCU determines whether MPU and its own status identification are in idle state;

[0027] If the MCU and MPU are in idle state, they agree to enter the OBD DoCAN diagnostic mode, and the MCU status indicator switches to the OBD DoCAN diagnostic mode;

[0028] If the MCU or MPU is not in idle state, the OBD DoCAN diagnostic mode will not be entered.

[0029] Furthermore, after the MCU enters the OBD DoCAN diagnostic mode, if no CAN message is received for a preset time, the MCU enters an idle state.

[0030] Furthermore, the BD DoIP external diagnostic device diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0031] The external diagnostic device requests the MPU to enter the OBD DoIP diagnostic mode through the vehicle OBD interface Ethernet channel;

[0032] MPU receives OBD DoIP diagnostic mode request;

[0033] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0034] If the MCU and MPU are in idle state, they agree to enter the OBD DoIP diagnostic mode, and the MPU status indicator switches to the OBD DoIP diagnostic mode;

[0035] If the MCU or MPU is not in idle state, the OBD DoIP diagnostic mode will not be entered.

[0036] Furthermore, after the MPU enters the OBD DoIP diagnostic mode, the activation line is not enabled or the external diagnostic device disconnects the TCP connection for more than a preset time, and the MPU enters the idle state.

[0037] Furthermore, the remote diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0038] The remote diagnosis device requests the MPU to enter the remote diagnosis mode via Ethernet;

[0039] The MPU receives a remote diagnosis request;

[0040] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0041] If the MCU and MPU are in idle state, they agree to enter the remote diagnosis mode, and the MPU status indicator switches to the remote diagnosis mode;

[0042] If the MCU or MPU is not in idle state, the remote diagnosis mode will not be entered.

[0043] Further, after the MPU enters the remote diagnosis mode, upon receiving a request to exit the remote diagnosis mode, the MPU enters an idle state.

[0044] Further, the OTA diagnostic mode includes an OTA mode state and an OTA read version state;

[0045] In the OTA mode, the vehicle controller is updated via the CAN or Ethernet channel;

[0046] The OTA reads the version status and obtains the version information of the vehicle controller through the CAN channel.

[0047] Furthermore, the OTA mode status request is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0048] The MPU receives an OTA mode status request;

[0049] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0050] If the MCU and MPU are in idle state, they agree to enter the OTA mode state, and the MPU status flag switches to the OTA mode state;

[0051] If the MCU or MPU is not in idle state, it will not enter OTA mode.

[0052] Furthermore, after the MPU enters the OTA mode state, upon receiving a request to exit the OTA mode state, the MPU enters an idle state.

[0053] Furthermore, the OTA read version status is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0054] The MPU receives an OTA read version status request;

[0055] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0056] If the MCU and MPU are in idle state, they agree to enter the OTA version reading state, and the MPU status flag switches to the OTA version reading state;

[0057] If the MCU or MPU is not in the idle state, the OTA version reading state will not be entered.

[0058] Furthermore, after the MPU enters the OTA version reading state, the MPU enters the idle state after a preset time for the gateway to read the version.

[0059] In order to achieve the above-mentioned purpose, on the other hand, a storage medium is provided, which stores a number of instructions, and a processor loads the instructions to execute the above-mentioned vehicle-mounted central gateway diagnostic method.

[0060] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:

[0061] The present invention realizes the correct state conversion and response of the central gateway in various diagnostic scenarios, and responds to diagnostic requests with a fast and efficient diagnostic arbitration method. The central gateway realizes arbitration of various diagnostic requests such as OTA mode, OTA version reading, remote diagnostic mode, OBD DoIP and OBD CAN diagnosis through the mutual cooperation of the MPU core and the MCU core, and there is no conflict when multiple diagnostic sources are connected at the same time, which improves the response speed of the vehicle-mounted central gateway in different diagnostic scenarios, thereby improving the diagnostic efficiency and enhancing the diagnostic reliability, and improving the diagnostic user experience.

[0062] It should be noted that the terms "first", "second" and similar terms used in this article are only for describing the various components in the technical solution, and do not constitute a limitation of the technical solution, nor can they be understood as an indication or suggestion of the importance of the corresponding elements; elements with "first", "second" and similar terms indicate that the corresponding technical solution contains at least one of the element. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solution of the present invention and facilitate further understanding of the technical effects, technical features and purposes of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings. The accompanying drawings constitute an essential part of the specification and are used together with the embodiments of the present invention to illustrate the technical solution of the present invention, but do not constitute a limitation to the present invention.

[0064] The same reference numerals in the accompanying drawings represent the same components, specifically:

[0065] Figure 1 This is a schematic diagram of the structure of the on-board central gateway diagnostic system in Example 1.

[0066] Figure 2 This is a schematic diagram of the diagnostic state retention and conversion conditions of Example 2.

[0067] Figure 3 This is a schematic diagram of the on-vehicle central gateway diagnostic arbitration process of Example 2.

[0068] Figure 4 This is a schematic diagram of the arbitration process of the OTA and remote diagnosis modes in Example 2.

[0069] Figure 5 This is a flowchart of exiting the OTA and remote diagnosis modes in Example 2.

[0070] Figure 6 This is a flow chart of entering the OBD diagnostic state in Example 2.

[0071] Figure 7 This is a schematic diagram of the DoCAN diagnostic mode state transition process in Example 2. DETAILED DESCRIPTION

[0072] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described below are only for explaining the technical solutions of the present invention, rather than for limiting the present invention. In addition, the parts described in the embodiments or the accompanying drawings are only examples of the relevant parts of the present invention, rather than the whole of the present invention.

[0073] Embodiment 1:

[0074] A vehicle-mounted central gateway diagnostic system, such as Figure 1 As shown, it includes: a microcontroller MCU and a microprocessor MPU that can interact with each other;

[0075] The MCU receives and processes the OBD DoCAN external diagnostic device diagnostic request sent through the CAN channel of the vehicle OBD interface;

[0076] The MPU receives and processes OBD DoIP external diagnostic device diagnosis requests, OTA diagnosis and remote diagnosis requests sent through the vehicle OBD interface Ethernet channel;

[0077] The MCU and MPU communicate with each other through an inter-core communication mechanism, and ensure that only one diagnostic mode exists at the same time through arbitration and result synchronization.

[0078] In this embodiment, the CU serves as a DoIP vehicle Ethernet diagnostic node, the MPU serves as a DoIP edge node, and the external diagnostic device can be connected to the vehicle central gateway through the vehicle self-diagnostic system OBD connector, and can realize DoCAN diagnosis and OBD DoIP diagnosis based on the controller area network protocol. Among them, DoCAN diagnosis is implemented by the MCU core, and DoIP diagnosis can enable external diagnostic equipment to complete diagnosis of the MPU core, MCU core and CAN / DoIP node entities hanging under the gateway. The vehicle central gateway assumes the responsibility of diagnostic routing.

[0079] The MCU comprises: a diagnostic arbitration slave module, an MCU inter-core communication module, an MCU Ethernet communication module and an MCU diagnostic communication module;

[0080] The MCU inter-core communication module completes arbitration information communication with the MPU;

[0081] The MCU Ethernet communication module completes Ethernet communication with the MPU;

[0082] The MCU diagnostic communication module receives and processes the OBD DoCAN external diagnostic device diagnostic request sent by the external diagnostic device through the CAN channel of the vehicle OBD interface;

[0083] The diagnostic arbitration slave module determines whether to execute the OBD DoCAN external diagnostic device diagnostic request.

[0084] The MPU includes: an OTA module, a remote diagnosis control module, a diagnosis arbitration main module, an MPU inter-core communication module, an MPU Ethernet communication module and a DoIP diagnosis module;

[0085] The MPU inter-core communication module completes arbitration information communication with the MCU;

[0086] The MPU Ethernet communication module completes Ethernet communication with the MCU;

[0087] The diagnostic arbitration main module determines whether to execute the OBD DoIP external diagnostic device diagnostic request, OTA diagnostic request and remote diagnostic request;

[0088] The OTA module receives and processes an OTA diagnostic request;

[0089] The remote diagnosis control module diagnoses the vehicle controller through the CAN channel according to the remote diagnosis request;

[0090] The DoIP diagnosis module receives and processes OBD DoIP external diagnostic device diagnosis requests.

[0091] In this embodiment, the information exchange of diagnostic arbitration request and diagnostic arbitration response is completed between the MCU core and the MPU core, and the communication is realized by the inter-core communication module. The external diagnostic device can be activated by connecting to the MPU core route, and then the diagnostic route is forwarded to the MCU core DoIP node, thereby realizing the DoIP diagnosis of the MCU core. Thus, the DoIP diagnostic communication between the MCU core and the MPU core is realized through the Ethernet private protocol between the Ethernet communication modules deployed in the two cores. The on-board central gateway diagnostic arbitration system needs to perform diagnostic arbitration according to the diagnostic mode and status of the MCU core and the MPU core, and transmit the diagnostic arbitration results to the MCU core, and finally realize the multi-mode diagnosis of the on-board central gateway by the external diagnostic device without conflict, so as to achieve the purpose of rapid response diagnosis.

[0092] Embodiment 2:

[0093] A vehicle central gateway diagnostic method, when receiving an OBD DoCAN external diagnostic device diagnostic request, an OBD DoIP external diagnostic device diagnostic request, an OTA diagnostic request or a remote diagnostic request, the MCU and the MPU perform arbitration, the arbitration decision strategy is first come first served, the four diagnostic modes are all prioritized and mutually exclusive; if no diagnostic request is currently being executed, the diagnostic request is executed, if a diagnostic request is currently being executed, the diagnostic request is not executed.

[0094] In this embodiment, arbitration judgment is required according to a variety of different diagnostic states, and finally the vehicle central gateway is switched from the current diagnostic state to the target diagnostic state, and the external diagnostic request is quickly responded to. The conditions for maintaining and switching the diagnostic state are as follows: Figure 2 The diagnostic status is shown as follows:

[0095] OBD CAN diagnostic status: In this status, the external diagnostic equipment is diagnosing the vehicle through the CAN channel in the vehicle's OBD interface.

[0096] OBD DoIP diagnostic status: In this status, the external diagnostic device is diagnosing the vehicle through the Ethernet channel in the vehicle's OBD interface.

[0097] OTA mode status: This status indicates that the OTA module in the gateway is updating the programs of other controllers in the vehicle through the gateway's CAN or Ethernet channel.

[0098] Remote diagnosis status: This status means that the remote diagnosis module in the gateway is diagnosing other controllers of the vehicle through the gateway's CAN channel.

[0099] OTA read version status: In this status, the OTA module in the gateway is obtaining version information of other controllers in the vehicle through the gateway's CAN channel.

[0100] Idle state: No diagnostic source occupies the diagnostic resources or diagnostic channels of the central gateway. At this time, the gateway should allow entry into any diagnostic state, and the gateway in the idle state needs to ensure normal diagnostic routing functions. In addition, upon exiting any state, the central gateway will switch back to the idle state.

[0101] The above diagnoses have the same priority, and the arbitration policy is first come first served. The OBD CAN diagnostic status, OBDDoIP diagnostic status, OTA mode status, OTA read version status, remote diagnostic status and idle status are all judged, executed and completed by the vehicle central gateway.

[0102] Except for the idle state, the other diagnostic states are not allowed to switch at will; the OTA mode and the OTA read version state cannot be effective at the same time, and can be combined into one diagnostic state, which is referred to as the OTA mode below and is determined by the OTA component; for OBD diagnostic CAN requests, if the gateway is in other modes at this time, the CAN diagnostic message will not be forwarded; for OBD diagnostic DoIP requests, if the gateway is in other modes at this time, it should return failure when the route is activated.

[0103] The central gateway completes the diagnostic arbitration process division as follows Figure 3 As shown in the figure, the implementation of the diagnostic arbitration scheme of the vehicle central gateway mainly involves the MCU core and the MPU core, where the MPU core is the diagnostic arbitration master module, which is mainly responsible for the OTA mode request / OTA reading version number of the OTA component, remote diagnostic request and DoIP diagnostic request of the diagnostic device. The MCU core is the diagnostic arbitration slave module, which is mainly responsible for the DoCAN access of the external diagnostic instrument, and determines whether there is an OBD DoCAN diagnostic request from the external diagnostic instrument. If there is an OBD DoCAN diagnostic status request, the diagnostic arbitration slave module in the MCU core determines whether there is an OTA request or a remote diagnostic request or an OBD DoIP diagnostic request. If so, the OBD DoCAN diagnostic access is rejected and the error code NRC 22 is returned; if not, the diagnostic instrument is allowed to access the OBD DoCAN diagnosis and enter the DoCAN diagnostic mode; these diagnostic status requests are transmitted from the MPU core to the MCU core through the inter-core interactive communication SPI.

[0104] The current diagnostic status is OTA mode / OTA read version number, which can be unified into OTA mode. The MPU core diagnostic arbitration module needs to combine and judge whether there is currently a diagnostic instrument DoIP activation line online or the MCU core is in DoCAN diagnostic state. The DoCAN diagnostic state flag of the MCU core is transmitted to the MPU core through the SPI serial peripheral device interface of the inter-core interaction module. If the current diagnostic state is DoIP diagnosis or DoCAN diagnosis, it refuses to enter the OTA mode; otherwise, it enters the OTA mode / OTA read version number state; the current diagnostic state is a remote diagnostic request, and the MPU core diagnostic arbitration module needs to combine and judge whether there is currently a diagnostic instrument DoIP activation line online or the MCU core is in DoCAN diagnostic state. If the current diagnostic state is DoIP diagnosis or DoCAN diagnosis, it refuses to enter the remote diagnostic mode; otherwise, it enters the remote diagnostic state and runs the remote diagnostic process; the current diagnostic state is a DoIP diagnostic request, and the MPU core diagnostic arbitration module needs to combine and judge whether it is currently in OTA request or remote diagnostic state or DoCAN state. If none of them is true, the external diagnostic device is allowed to access DoIP and perform routing activation; otherwise, the diagnostic device is denied access to DoIP diagnosis.

[0105] In this embodiment, the processes involved in the MPU diagnostic arbitration module include an OTA service process, a diagnostic arbitration process, and an inter-core interaction process.

[0106] The main functions of the OTA service process include: receiving a request from the OTA master to enter OTA mode, receiving a request from the OTA master to enter remote diagnosis mode, determining whether OTA mode or remote diagnosis mode can be entered, and notifying the inter-core interaction module to send a request to enter / exit OTA mode / remote diagnosis mode via SPI.

[0107] The main functions of the diagnostic arbitration process include: receiving the DoIP request of the diagnostic instrument, judging whether it is possible to enter the DoIP mode, and notifying the SPI to send a notification of entering / exiting the DoIP mode.

[0108] The main functions of the inter-core interaction process include: receiving requests to enter / exit OTA mode / remote diagnosis mode from the OTA service process and sending them to the MCU core via SPI, receiving notifications to enter / exit DoIP mode from the diagnostic arbitration process and sending them to the MCU core via SPI, and receiving notifications of DoCAN mode switching from the MCU core and sending them to the OTA service and diagnostic arbitration processes.

[0109] Each diagnostic arbitration and state switching method is as follows:

[0110] 1. OBD DoCAN diagnostic mode

[0111] The OBD DoCAN external diagnostic device diagnostic request is received and processed by the MCU, and the specific arbitration execution method is as follows:

[0112] The external diagnostic device requests the MCU to perform OBD DoCAN diagnostic mode through the CAN channel of the vehicle's OBD interface;

[0113] MCU receives OBD DoCAN diagnostic mode request;

[0114] MCU requests MPU to send status identification through SPI, MPU sends status identification, and MCU determines whether MPU and its own status identification are in idle state;

[0115] If the MCU and MPU are in idle state, they agree to enter the OBD DoCAN diagnostic mode, and the MCU status indicator switches to the OBD DoCAN diagnostic mode;

[0116] If the MCU or MPU is not in idle state, the OBD DoCAN diagnostic mode will not be entered.

[0117] After the MCU enters the OBD DoCAN diagnostic mode, if no CAN message is received within the preset time, the MCU enters the idle state.

[0118] 2. OBD DoIP diagnostic mode

[0119] The BD DoIP external diagnostic device diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0120] The external diagnostic device requests the MPU to enter the OBD DoIP diagnostic mode through the vehicle OBD interface Ethernet channel;

[0121] MPU receives OBD DoIP diagnostic mode request;

[0122] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0123] If the MCU and MPU are in idle state, they agree to enter the OBD DoIP diagnostic mode, and the MPU status indicator switches to the OBD DoIP diagnostic mode;

[0124] If the MCU or MPU is not in idle state, the OBD DoIP diagnostic mode will not be entered.

[0125] After the MPU enters the OBD DoIP diagnostic mode, the activation line is not enabled or the external diagnostic device disconnects the TCP connection for more than the preset time, and the MPU enters the idle state.

[0126] In this embodiment, the process of the vehicle central gateway diagnostic system entering the OBD diagnostic state is as follows: Figure 6 As shown in the figure, it can be seen that the diagnostic instrument requests to enter the OBD diagnostic mode, and the MPU core diagnostic arbitration process determines whether it is currently in DoIP or DoCAN mode. If so, it returns that entering the OBD mode failed; if not, the inter-core interaction module notifies the MCU core through SPI to enter the DoIP mode, enter the routing activation, and the MCU core marks the diagnostic state as the DoIP diagnostic state. At this time, the MPU core enters the OBDDoIP diagnostic process. If the diagnosis fails / ends midway, the inter-core communication module of the MPU core notifies the MCU through SPI to exit the DoIP mode. After receiving the notification, the MCU marks the current state as Normal mode.

[0127] The external diagnostic instrument requests the vehicle central gateway to access the OBD DoCAN diagnostic mode request. The state transition flow chart is as follows: Figure 7 As shown, the inter-core interaction module of the MCU core notifies the MPU core of the OBD DoCAN diagnostic flag through SPI. After the OTA service process and the diagnostic arbitration process in the MPU core receive the status flag, the state transitions performed respectively include: the OTA service process saves the local diagnostic status as DoCAN mode / Normal mode; the diagnostic arbitration process saves the local diagnostic status as DoCAN mode / Normal mode.

[0128] 3. Remote diagnosis mode

[0129] The remote diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows:

[0130] The remote diagnosis device requests the MPU to enter the remote diagnosis mode via Ethernet;

[0131] The MPU receives a remote diagnosis request;

[0132] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0133] If the MCU and MPU are in idle state, they agree to enter the remote diagnosis mode, and the MPU status indicator switches to the remote diagnosis mode;

[0134] If the MCU or MPU is not in idle state, the remote diagnosis mode will not be entered.

[0135] After the MPU enters the remote diagnosis mode, upon receiving a request to exit the remote diagnosis mode, the MPU enters an idle state.

[0136] OTA diagnostic mode includes OTA mode status and OTA version reading status;

[0137] In the OTA mode, the vehicle controller is updated via the CAN or Ethernet channel;

[0138] The OTA reads the version status and obtains the version information of the vehicle controller through the CAN channel.

[0139] 4. OTA mode status

[0140] The OTA mode status request is received and processed by the MPU. The specific arbitration execution method is as follows:

[0141] The MPU receives an OTA mode status request;

[0142] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0143] If the MCU and MPU are in idle state, they agree to enter the OTA mode state, and the MPU status flag switches to the OTA mode state;

[0144] If the MCU or MPU is not in idle state, it will not enter OTA mode.

[0145] After the MPU enters the OTA mode state, upon receiving a request to exit the OTA mode state, the MPU enters the idle state.

[0146] 5. OTA read version status

[0147] The OTA read version status is received and processed by the MPU. The specific arbitration execution method is as follows:

[0148] The MPU receives an OTA read version status request;

[0149] The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state;

[0150] If the MCU and MPU are in idle state, they agree to enter the OTA version reading state, and the MPU status flag switches to the OTA version reading state;

[0151] If the MCU or MPU is not in the idle state, the OTA version reading state will not be entered.

[0152] After the MPU enters the OTA version reading state, the MPU enters the idle state after the preset time of the gateway reading the version.

[0153] In this embodiment, the process of OTA mode or remote diagnosis mode is as follows Figure 4As shown, the OTA component requests to enter OTA mode or remote diagnosis mode, and determines whether it is currently in remote diagnosis, DoCAN diagnosis, or DoIP diagnosis state. If so, the OTA request returns failure; otherwise, the MPU core sends a request to the diagnostic arbitration process to enter OTA mode. Request to enter OTA / remote diagnosis mode, diagnostic arbitration entry needs to further determine whether it is currently in DoIP mode or DoCAN mode. If so, it returns failure; otherwise, the current state is updated to OTA mode, and the OTA request is returned successful. Then the diagnostic arbitration process ends, and the MPU core requests the MCU core to enter the OTA mode state through the inter-core interaction SPI. The MCU core receives the OTA mode state diagnosis request from the MPU core and replies with the result. If the MCU core replies successfully, the MPU core updates the current diagnostic state to OTA mode; if the MCU core fails to reply, the OTA component request of the MPU core fails.

[0154] Figure 5 This is the process of the MPU core exiting the OTA / remote diagnosis mode. In the figure, the OTA component requests to exit the OTA mode / remote diagnosis mode. The MPU core determines whether the gateway is currently in OTA mode or remote diagnosis mode. If not, it returns a successful exit; if so, it requests the MCU to exit the OTA mode through the inter-core interaction module SPI; after the MCU core receives the exit notification from the MPU core, the MCU core processes the request and replies with the result: when the MCU core replies with a successful result, the MPU core further determines the diagnostic arbitration process and requests to exit the OTA mode. Therefore, the diagnostic arbitration process needs to determine whether it is currently in Normal / OTA mode. If so, it disconnects the TCP connection with the diagnosed node, updates the current state to normal mode, and returns success. At this time, the MPU core updates the diagnostic state to normal mode and returns a successful exit from the OTA mode / remote diagnosis; otherwise, it returns a failure to exit the OTA mode / remote diagnosis mode.

[0155] Example 2 is based on a first-come, first-served basis for diagnostic requests and a mutually exclusive diagnosis scheme. After receiving multiple diagnostic requests, the system receives at least one diagnostic request instruction, and arbitrates in combination with the current diagnostic state of the gateway to satisfy the execution order under multiple diagnostic requests and avoid diagnostic conflicts, so as to solve the problems of low diagnostic efficiency and diagnostic failure in various diagnostic scenarios in actual applications, and solves the problem that multiple diagnostic requests or devices cannot exchange data when making simultaneous diagnostic requests, thereby achieving the effect of ensuring efficient diagnosis in various diagnostic scenarios and normal data interaction between diagnostic devices and gateways.

[0156] It should be noted that the above embodiments are only for more clearly illustrating the technical solutions of the present invention. Those skilled in the art will understand that the implementation methods of the present invention are not limited to the above contents, and obvious changes, replacements or substitutions based on the above contents do not exceed the scope of the technical solutions of the present invention; other implementation methods will also fall within the scope of the present invention without departing from the concept of the present invention.

Claims

1. A vehicle-mounted central gateway diagnostic system, characterized in that: include: MCU and MPU that can exchange information with each other; The MCU receives and processes the OBD DoCAN external diagnostic device diagnostic request sent through the CAN channel of the vehicle OBD interface; The MPU receives and processes OBD DoIP external diagnostic device diagnosis requests, OTA diagnosis and remote diagnosis requests sent through the vehicle OBD interface Ethernet channel; The MCU and MPU communicate with each other through an inter-core communication mechanism, and ensure that only one diagnostic mode exists at the same time through arbitration and result synchronization.

2. The vehicle-mounted central gateway diagnostic system according to claim 1, characterized in that: The MCU comprises: a diagnostic arbitration slave module, an MCU inter-core communication module, an MCU Ethernet communication module and an MCU diagnostic communication module; The MCU inter-core communication module completes arbitration information communication with the MPU; The MCU Ethernet communication module completes Ethernet communication with the MPU; The MCU diagnostic communication module receives and processes the OBDDoCAN external diagnostic device diagnostic request sent by the external diagnostic device through the CAN channel of the vehicle OBD interface; The diagnostic arbitration slave module determines whether to execute the OBD DoCAN external diagnostic device diagnostic request.

3. The vehicle-mounted central gateway diagnostic system according to claim 1, characterized in that: The MPU includes: an OTA module, a remote diagnosis control module, a diagnosis arbitration main module, an MPU inter-core communication module, an MPU Ethernet communication module and a DoIP diagnosis module; The MPU inter-core communication module completes arbitration information communication with the MCU; The MPU Ethernet communication module completes Ethernet communication with the MCU; The diagnostic arbitration main module determines whether to execute the OBD DoIP external diagnostic device diagnostic request, OTA diagnostic request and remote diagnostic request; The OTA module receives and processes an OTA diagnostic request; The remote diagnosis control module diagnoses the vehicle controller through the CAN channel according to the remote diagnosis request; The DoIP diagnosis module receives and processes OBD DoIP external diagnostic device diagnosis requests.

4. A vehicle-mounted central gateway diagnostic method, using the vehicle-mounted central gateway system according to any one of claims 1 to 3, characterized in that: The specific method is as follows: When receiving an OBD DoCAN external diagnostic device diagnostic request, an OBD DoIP external diagnostic device diagnostic request, an OTA diagnostic request or a remote diagnostic request, the MCU and the MPU perform arbitration. The arbitration decision strategy is first come first served. The four diagnostic modes are all prioritized and mutually exclusive. If no diagnostic request is currently being executed, the diagnostic request is executed. If a diagnostic request is currently being executed, the diagnostic request is not executed.

5. The vehicle-mounted central gateway diagnostic method as claimed in claim 4, characterized in that: The OBD DoCAN external diagnostic device diagnostic request is received and processed by the MCU, and the specific arbitration execution method is as follows: The external diagnostic device requests the MCU to perform OBD DoCAN diagnostic mode through the CAN channel of the vehicle's OBD interface; MCU receives OBD DoCAN diagnostic mode request; MCU requests MPU to send status identification through SPI, MPU sends status identification, and MCU determines whether MPU and its own status identification are in idle state; If the MCU and MPU are in idle state, they agree to enter the OBD DoCAN diagnostic mode, and the MCU status indicator switches to the OBD DoCAN diagnostic mode; If the MCU or MPU is not in idle state, the OBD DoCAN diagnostic mode will not be entered.

6. The vehicle-mounted central gateway diagnostic method as claimed in claim 5, characterized in that: After the MCU enters the OBD DoCAN diagnostic mode, if no CAN message is received within the preset time, the MCU enters the idle state.

7. The vehicle-mounted central gateway diagnostic method as claimed in claim 4, characterized in that: The BD DoIP external diagnostic device diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows: The external diagnostic device requests the MPU to enter the OBD DoIP diagnostic mode through the vehicle OBD interface Ethernet channel; MPU receives OBD DoIP diagnostic mode request; The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state; If the MCU and MPU are in idle state, they agree to enter the OBD DoIP diagnostic mode, and the MPU status indicator switches to the OBD DoIP diagnostic mode; If the MCU or MPU is not in idle state, the OBD DoIP diagnostic mode will not be entered.

8. The vehicle-mounted central gateway diagnostic method as claimed in claim 7, characterized in that: After the MPU enters the OBD DoIP diagnostic mode, the activation line is not enabled or the external diagnostic device disconnects the TCP connection for more than the preset time, and the MPU enters the idle state.

9. The vehicle-mounted central gateway diagnostic method as claimed in claim 4, characterized in that: The remote diagnosis request is received and processed by the MPU, and the specific arbitration execution method is as follows: The remote diagnosis device requests the MPU to enter the remote diagnosis mode via Ethernet; The MPU receives a remote diagnosis request; The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state; If the MCU and MPU are in idle state, they agree to enter the remote diagnosis mode, and the MPU status indicator switches to the remote diagnosis mode; If the MCU or MPU is not in idle state, the remote diagnosis mode will not be entered.

10. The vehicle-mounted central gateway diagnostic method according to claim 9, characterized in that: After the MPU enters the remote diagnosis mode, upon receiving a request to exit the remote diagnosis mode, the MPU enters an idle state.

11. The vehicle-mounted central gateway diagnostic method according to claim 4, characterized in that: OTA diagnostic mode includes OTA mode status and OTA version reading status; In the OTA mode, the vehicle controller is updated via the CAN or Ethernet channel; The OTA reads the version status and obtains the version information of the vehicle controller through the CAN channel.

12. The vehicle-mounted central gateway diagnostic method according to claim 11, characterized in that: The OTA mode status request is received and processed by the MPU. The specific arbitration execution method is as follows: The MPU receives an OTA mode status request; The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state; If the MCU and MPU are in idle state, they agree to enter the OTA mode state, and the MPU status flag switches to the OTA mode state; If the MCU or MPU is not in idle state, it will not enter OTA mode.

13. The vehicle-mounted central gateway diagnostic method according to claim 12, characterized in that: After the MPU enters the OTA mode state, upon receiving a request to exit the OTA mode state, the MPU enters the idle state.

14. The vehicle-mounted central gateway diagnostic method according to claim 11, characterized in that: The OTA read version status is received and processed by the MPU. The specific arbitration execution method is as follows: The MPU receives an OTA read version status request; The MPU requests the MCU to send a status identifier through SPI, the MCU sends the status identifier, and the MPU determines whether the MCU and its own status identifier are in an idle state; If the MCU and MPU are in idle state, they agree to enter the OTA version reading state, and the MPU status flag switches to the OTA version reading state; If the MCU or MPU is not in the idle state, the OTA version reading state will not be entered.

15. The vehicle-mounted central gateway diagnostic method according to claim 14, characterized in that: After the MPU enters the OTA version reading state, the MPU enters the idle state after the preset time of the gateway reading the version.

16. A storage medium, characterized in that: A plurality of instructions are stored, and the processor loads the instructions to execute the vehicle central gateway diagnostic method described in any one of claims 4 to 15.

Citation Information

Cited By

  • Diagnostic control method of vehicle, diagnostic arbitration system and vehicle

    CN120669677A

  • Arbitration method and apparatus for vehicle fault diagnosis conflict, and vehicle and storage medium

    WO2026166201A1