Commercial vehicle multi-ECU data polling transmission method
Through the multi-ECU data polling and transmission method for commercial vehicles, the polling mechanism is used to establish a session with multiple ECUs at the same time, which solves the problem of excessive sequential flushing time when a commercial vehicle is equipped with multiple ECUs, and realizes synchronous data transmission and flushing of multiple ECUs, improving the efficiency of the vehicle production line.
Patent Information
- Application Number
- CN202310503344.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-05-06
AI Technical Summary
When a commercial vehicle is equipped with multiple ECUs, the prior art time to write ECU data in sequence is too long, resulting in the vehicle production line rhythm that cannot be met.
The multi-ECU data polling transmission method for commercial vehicles is adopted. By polling the main process, the session is established simultaneously with multiple ECUs on a CAN bus, the bus resources are maximized and the overall flushing time of multiple ECUs is reduced.
The synchronous data transmission and writing of multiple ECUs is realized, which saves time compared to the sequential writing of the existing technology, improves the efficiency of ECU data writing, and meets the rhythm requirements of the entire vehicle production line.
Smart Images

Figure CN116582391B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automobile manufacturing, and in particular to a method for polling and transmitting data of multiple ECUs of a commercial vehicle. Background Art
[0002] The electrical network architecture of commercial vehicles is gradually developing towards domain control. Compared with the current electrical architecture based on electronic control functional units, the development of domain controller technology requires a higher degree of independent integration and innovation capabilities for OEMs. It is necessary to integrate multiple functional components into one controller. From the hardware design to the software development of the controller, designers need to shift from the original copycat approach, that is, suppliers provide products and OEMs do the matching, to independent development.
[0003] On the other hand, due to the technological development of domain controllers and the increase in independently designed and developed controllers, from the perspective of software security, the software filling and ECU data flashing of controllers will gradually be transferred from multiple suppliers to OEMs. OEMs need to continuously improve their capabilities in ECU data transmission and flashing.
[0004] In the existing technology, there are two main technical solutions for flashing the vehicle ECU data of commercial vehicles. One is flashing the vehicle link, and the other is flashing the parts link. Specifically:
[0005] The principle of vehicle flashing is the most common practice, that is, to complete the ECU data flashing in the vehicle production stage. The vehicle flashing method requires all ECU data corresponding to a single vehicle to be configured at the production line end, and a special tool is used to establish a physical connection with the vehicle diagnostic interface or ECU port, and then trigger the flashing program to complete the transmission and flashing of ECU data. This type of data transmission and flashing generally adopts a sequential method, that is, after flashing ECU1, flashing ECU2 until ECU n This method is very intuitive and easy to think of. Its advantage is that the process logic is simple, but its disadvantages are:
[0006] Since the flashing of the whole vehicle is completed on the vehicle production line, the allowable ECU flashing time for each vehicle is limited by the production line rhythm, that is, the flashing time of a single vehicle cannot exceed the production line rhythm. Therefore, as more and more electronic control systems are installed on the whole vehicle, the cumulative time for sequentially flashing multiple ECUs will inevitably exceed the vehicle production line rhythm.
[0007] The principle of flashing at the parts stage is also very simple: that is, all ECU data is flashed at the ECU parts production stage. It is suitable for the whole vehicle order production method. After the order is successfully matched, all ECU data corresponding to a single vehicle will be generated, and the ECU data will be flashed at the ECU program filling stage, including the vehicle configuration differentiation data, and then the ECU encapsulated with complete data will be matched and installed with the corresponding vehicle at the vehicle assembly stage. The advantage of this approach is distributed processing, which divides the flashing stage into the parts manufacturing stage; the disadvantages of flashing at the parts stage are as follows:
[0008] In the case of flashing of parts, the parts provided by ECU suppliers are mostly general hardware and mass-produced. This link cannot yet determine the type of vehicle to be installed and the vehicle configuration difference data. Therefore, this flashing mode has very high requirements on the timing of logistics adjustment. It is difficult to apply to commercial vehicle products with a high rate of ECU hardware commonality and limited independent production resources. As a result, the production models of most domestic commercial vehicle companies do not support this flashing mode.
[0009] To sum up, what is needed now is an ECU flashing method that can improve work efficiency while flashing the entire vehicle. Summary of the invention
[0010] In view of the above problems, the present invention provides a method for polling and transmitting data of multiple ECUs of commercial vehicles, which aims to maximize the utilization of bus resources, reduce the overall writing time of multiple ECUs, improve the efficiency of ECU data writing, and solve the problem that the time for sequentially writing ECU data is too long when the whole commercial vehicle is equipped with multiple ECUs; it realizes synchronous data transmission and writing of multiple ECUs, which saves time compared with the prior art in which each ECU writes sequentially in turn.
[0011] To solve the above problems, the technical solution provided by the present invention is:
[0012] A commercial vehicle multi-ECU data polling transmission method, including a polling main process and multiple ECU flashing processes;
[0013] Each of the ECU flashing processes is composed of a plurality of sub-processes connected in sequence, and each sub-process is marked with a manually preset priority;
[0014] In each of the ECU flashing processes, the files transferred, parsed, and flashed all come from a complete data file;
[0015] The polling main process includes the following steps:
[0016] S100. Send a communication connection request to each ECU flash process at the same time;
[0017] S200. Waiting for and receiving the returned sub-process completion information; each sub-process completion information corresponds to the completion status of a sub-process;
[0018] S300. Start timing; then check whether there is a sub-process waiting to be executed; then perform the following operations based on the query results:
[0019] If there is a sub-process waiting to be executed, the sub-process with the highest priority value is selected and executed; then S400 is executed;
[0020] If there is no sub-process waiting to be executed, and the timing has not exceeded the manually preset upper limit threshold of the waiting delay, then return and execute S300 again from the beginning;
[0021] If there is no sub-process waiting to be executed, and the timing exceeds the manually preset upper limit threshold of the waiting delay, the next sub-process connected in sequence with the sub-process corresponding to the sub-process completion information received and returned in S200 is executed; and then S400 is executed;
[0022] S400. Check whether there is any unfinished sub-process at present; then perform the following operations according to the query result:
[0023] If there is currently an unfinished sub-process, return and execute S200 again from the beginning;
[0024] If there is no unfinished sub-process at present, execute S500;
[0025] S500. End the main process of this commercial vehicle multi-ECU data polling transmission.
[0026] Preferably, the ECU flashing process includes a data flashing and reset request sub-process, a data reading and comparison sub-process, a data area erasing sub-process, a data verification and reset request sub-process, and a data flashing and reset request sub-process; wherein:
[0027] The data writing and reset request sub-process includes a first data writing and reset request sub-process, a second data writing and reset request sub-process, and a third data writing and reset request sub-process;
[0028] The data reading and comparing sub-process comprises a first data reading and comparing sub-process, a second data reading and comparing sub-process, and a third data reading and comparing sub-process;
[0029] The sub-process completion information includes data writing and reset request sub-process completion information, data writing and reset request sub-process failure information, ECU writing process success information, ECU writing process failure information, data area erasing sub-process completion information, data area erasing sub-process failure information, data verification and reset request sub-process completion information, data verification and reset request sub-process failure information, data reading and comparison sub-process completion information, data reading and comparison sub-process failure information;
[0030] The complete data file is composed of a plurality of ECU data files packaged together; the ECU data file includes the type of ECU, CAN channel number, CAN communication rate, and data content to be flashed.
[0031] Preferably, the first data flushing and reset request sub-process comprises the following steps:
[0032] Saa100 receives the communication connection request;
[0033] Saa200. Request to enter VIN flash mode;
[0034] Saa300. After Saa200 is completed, flash the VIN;
[0035] Saa400. Request to enter vehicle parameter flashing mode;
[0036] Saa500. After Saa400 is completed, rewrite the vehicle parameters;
[0037] Saa600. Send a reset request;
[0038] Saa700. Send the data flushing and reset request sub-process completion information.
[0039] Preferably, the first data reading and comparison sub-process comprises the following steps:
[0040] Sab100. Request to enter VIN reading mode;
[0041] Sab200. After Sab100 is completed, read the VIN;
[0042] Sab300. Request to enter vehicle parameter reading mode;
[0043] Sab400. After Sab300 is completed, read the vehicle parameters;
[0044] Sab500. Compare the written VIN with the read VIN, and then compare the written vehicle parameters with the read vehicle parameters; perform the following operations according to the comparison results:
[0045] If the VIN is the same as the read VIN, and the written vehicle parameters are the same as the read vehicle parameters, the ECU flashing process is terminated, and the ECU flashing process success information is returned;
[0046] If the VIN is not the same as the read VIN, or the written vehicle parameters are not the same as the read vehicle parameters, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
[0047] Preferably, the data area erasing sub-process comprises the following steps:
[0048] Sba100 receives the communication connection request;
[0049] Sba200. Request to enter program flash mode;
[0050] Sba300. After Sba200 is completed, erase the data area;
[0051] Sba400. Sends the data area erasing sub-process completion information.
[0052] Preferably, the data verification and reset request sub-process comprises the following steps:
[0053] Sbb100. Transmit data;
[0054] Sbb200. Verification data;
[0055] Sbb300 sends the reset request;
[0056] Sbb400. Send the data verification and reset request sub-process completion information.
[0057] Preferably, the data flushing and reset request sub-process comprises the following steps:
[0058] Sbc100. Request to enter the VIN flash mode;
[0059] Sbc200. After Sbc100 is completed, the VIN;
[0060] Sbc300 sends the reset request;
[0061] Sbc400. Sends the data flushing and reset request sub-process completion information.
[0062] Preferably, the second data reading and comparison sub-process comprises the following steps:
[0063] Sbd100. Request to enter the VIN reading mode;
[0064] Sbd200. After Sbd100 is completed, read the VIN;
[0065] Sbd300. Compare the written VIN with the read VIN; perform the following operations based on the comparison result:
[0066] If the VIN is the same as the read VIN, the ECU flashing process ends and returns information indicating success of the ECU flashing process;
[0067] If the VIN is not the same as the read VIN, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
[0068] Preferably, the third data flushing and reset request sub-process comprises the following steps:
[0069] Sca100. Receive the communication connection request;
[0070] Sca200. Read original parameters;
[0071] Sca300. Request to enter vehicle parameter flashing mode;
[0072] Sca400. Flash the vehicle parameters;
[0073] Sca500. Send parameter write command;
[0074] Sca600. Send the reset request;
[0075] Sca700. Send the data flushing and reset request sub-process completion information.
[0076] Preferably, the third data reading and comparison sub-process comprises the following steps:
[0077] Scb100. Read the vehicle parameters;
[0078] Scb200. Compare the written vehicle data with the read vehicle data; perform the following operations according to the comparison results:
[0079] If the vehicle data is the same as the read vehicle data, the ECU flashing process is terminated and the ECU flashing process success information is returned;
[0080] If the whole vehicle data is not the same as the read whole vehicle data, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
[0081] Compared with the prior art, the present invention has the following advantages:
[0082] 1. Since the present invention adopts a polling mechanism established by the host computer program to simultaneously establish a session mode for multiple ECUs on a CAN bus of a commercial vehicle, when one ECU session is in the waiting time of the data flashing process, it enters the session of another ECU in advance, thereby maximizing the use of bus resources, reducing the overall flashing time of multiple ECUs, and improving the ECU data flashing efficiency, solving the problem of too long time for sequentially flashing ECU data when the current commercial vehicle is equipped with multiple ECUs;
[0083] 2. Since the present invention adopts a new ECU data transmission strategy, based on the embedded system software, a polling mechanism is used to simultaneously establish communication with multiple ECUs on a CAN bus, thereby realizing multi-ECU synchronous data transmission and flashing, which saves time compared to the prior art in which each ECU flashes sequentially in turn. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 It is a flow chart of the main polling process of the present invention;
[0085] Figure 2 It is a timing diagram of multi-ECU polling data transmission and flashing performed by the method of the present invention in a comparative experiment of a specific embodiment of the present invention;
[0086] Figure 3 This is a timing diagram of multi-ECU sequential data transmission and flashing using the prior art in a comparative experiment of a specific embodiment of the present invention. DETAILED DESCRIPTION
[0087] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0088] It should be noted in advance that this specific embodiment includes a polling main program and three ECU flashing processes, the purpose of which is to dynamically allocate system resources for each ECU flashing process to ensure maximum conservation of system resources.
[0089] The specific principles are as follows:
[0090] The present invention adopts a polling mechanism to simultaneously establish and maintain communication with multiple ECUs on a CAN bus.
[0091] In order to achieve the above purpose, the custom-developed ECU flash tool hardware adopts a 32-bit microprocessor and supports multiple CAN interfaces.
[0092] After the flashing program is started, the embedded system software uses a polling mechanism to send communication establishment requests to multiple ECUs on a bus, and then enters the next step of the process according to the communication protocol for the ECU that responds first, and so on. The polling mechanism ensures that all ECUs maintain communication and ensures that the ECU that receives the response first enters the next step first until each ECU completes the complete process of data transmission and flashing.
[0093] It should be further explained that during the whole process, multiple ECUs remain connected to the host computer, realizing synchronous flashing of multiple ECUs. This saves the waiting time for response, ECU reset waiting time, ECU storage area erase waiting time, ECU data write to storage area waiting time and specific waiting time in the flashing protocol compared to flashing each ECU in turn. This mechanism maximizes the use of bus resources, reduces the overall flashing time of multiple ECUs, improves the data flashing efficiency of the entire vehicle, and meets the rhythm requirements of the entire vehicle production line.
[0094] A commercial vehicle multi-ECU data polling transmission method includes a polling main process, an engine ECU flashing process, a post-processing ECU flashing process, and a vehicle ECU flashing process; the engine ECU flashing process, the post-processing ECU flashing process, and the vehicle ECU flashing process are respectively composed of a plurality of sub-processes arranged in sequence, and each sub-process is calibrated with an artificially preset priority.
[0095] In this specific embodiment, the priority of the first data flush and reset request sub-process is 6; the priority of the first data read and comparison sub-process is 5; the priority of the data area erase sub-process is 3; the priority of the data verification and reset request sub-process is 3; the priority of the data flush and reset request sub-process is 3; the priority of the second data read and comparison sub-process is 3; the priority of the third data flush and reset request sub-process is 6; the priority of the third data read and comparison sub-process is 2.
[0096] The engine ECU flashing process is composed of a first data flashing and reset request sub-process and a first data reading and comparison sub-process in sequence;
[0097] In this specific embodiment, the first data write and reset request sub-process includes the following steps:
[0098] Saa100 receives a communication connection request.
[0099] Saa200. Request to enter VIN flash mode.
[0100] Saa300. After Saa200 is completed, flash the VIN.
[0101] Saa400. Request to enter vehicle parameter flashing mode.
[0102] Saa500. After Saa400 is completed, rewrite the vehicle parameters.
[0103] Saa600. Send reset request.
[0104] Saa700. Send the first data flash and reset request sub-process completion information.
[0105] In this specific embodiment, the first data reading and comparison sub-process includes the following steps:
[0106] Sab100. Request to enter VIN read mode.
[0107] Sab200. After Sab100 is completed, read the VIN.
[0108] Sab300. Request to enter vehicle parameter reading mode.
[0109] Sab400. After Sab300 is completed, read the vehicle parameters.
[0110] Sab500. Compare the written VIN with the read VIN, and then compare the written vehicle parameters with the read vehicle parameters; perform the following operations based on the comparison results:
[0111] If the VIN is the same as the read VIN, and the written vehicle parameters are the same as the read vehicle parameters, the engine ECU flashing process ends and the engine ECU flashing process success information is returned.
[0112] If the VIN is different from the read VIN, or the written vehicle parameters are different from the read vehicle parameters, the engine ECU flashing process ends and the engine ECU flashing process failure information is returned.
[0113] The post-processing ECU flashing process is composed of a data area erasing sub-process, a data verification and reset request sub-process, a data flashing and reset request sub-process, and a second data reading and comparison sub-process in sequence;
[0114] In this specific embodiment, the data area erasing sub-process includes the following steps:
[0115] Sba100. Receive a communication connection request.
[0116] Sba200. Request to enter process flash mode.
[0117] Sba300. After Sba200 is completed, erase the data area.
[0118] Sba400. Send data area erase sub-process completion information.
[0119] In this specific embodiment, the data verification and reset request sub-process includes the following steps:
[0120] Sbb100. Transmit data.
[0121] Sbb200. Verification data.
[0122] Sbb300. Send reset request.
[0123] Sbb400. Send data verification and reset request sub-process completion information.
[0124] In this specific embodiment, the data flushing and reset request sub-process includes the following steps:
[0125] Sbc100. Request to enter VIN flash mode.
[0126] SBC200. After SBC100 is completed, VIN.
[0127] Sbc300. Send reset request.
[0128] Sbc400. Sends data flush and reset request sub-process completion information.
[0129] In this specific embodiment, the second data reading and comparison sub-process includes the following steps:
[0130] Sbd100. Request to enter VIN read mode.
[0131] Sbd200. After Sbd100 is completed, read VIN.
[0132] Sbd300. Compare the written VIN with the read VIN; perform the following operations based on the comparison results:
[0133] If the VIN is the same as the read VIN, the post-processing ECU flashing process ends and the post-processing ECU flashing process success information is returned.
[0134] If the VIN is not the same as the read VIN, the post-processing ECU flashing process ends and the post-processing ECU flashing process failure information is returned.
[0135] The vehicle ECU flashing process is composed of the third data flashing and reset request sub-process and the third data reading and comparison sub-process in sequence.
[0136] In this specific embodiment, the third data flushing and reset request sub-process includes the following steps:
[0137] Sca100. Receive a communication connection request.
[0138] Sca200. Read original parameters.
[0139] Sca300. Request to enter vehicle parameter flashing mode.
[0140] Sca400. Flash the whole vehicle parameters.
[0141] Sca500. Send parameter write command.
[0142] Sca600. Send reset request.
[0143] Sca700. Send the third data flash and reset request sub-process completion information.
[0144] In this specific embodiment, the third data reading and comparison sub-process includes the following steps:
[0145] Scb100. Read vehicle parameters.
[0146] Scb200. Compare the written vehicle data with the read vehicle data; perform the following operations based on the comparison results:
[0147] If the vehicle data is the same as the read vehicle data, the vehicle ECU flashing process ends and the vehicle ECU flashing process success information is returned.
[0148] If the vehicle data is different from the read vehicle data, the vehicle ECU flashing process ends and the vehicle ECU flashing process failure information is returned.
[0149] In the engine ECU flashing process, post-processing ECU flashing process, and vehicle ECU flashing process, the files transmitted, parsed, and flashed all come from a complete data file; the complete data file is composed of multiple ECU data files packaged together; the ECU data file contains the ECU type, CAN channel number, CAN communication rate, and data content that needs to be flashed.
[0150] It should be noted that the ECU data file is the file that is ultimately passed to the flashing program for parsing and flashing. This solution is for multiple ECUs on a CAN bus, and the same program calls a complete data file to complete the synchronous data transmission of multiple ECUs. This data file is packaged according to a specific format based on multiple ECU data files, and the content includes the ECU type, CAN channel number, CAN communication rate, and the data content that needs to be flashed.
[0151] like Figure 1 As shown in the figure, the main polling process includes the following steps:
[0152] S100. Send a communication connection request to the engine ECU flashing process, the post-processing ECU flashing process, and the vehicle ECU flashing process at the same time.
[0153] S200. Wait for and receive the returned sub-process completion information; the sub-process completion information includes data flash and reset request sub-process completion information, data flash and reset request sub-process failure information, ECU flash process success information, ECU flash process failure information, data area erase sub-process completion information, data area erase sub-process failure information, data verification and reset request sub-process completion information, data verification and reset request sub-process failure information, data read and compare sub-process completion information, data read and compare sub-process failure information; each sub-process completion information corresponds to the completion status of a sub-process.
[0154] S300. Start timing; then check whether there is a sub-process waiting to be executed; then perform the following operations based on the query results:
[0155] If there is a sub-process waiting to be executed, the sub-process with the largest priority value is selected and executed; then S400 is executed.
[0156] If there is no sub-process waiting to be executed, and the timing has not exceeded the manually preset upper limit threshold of the waiting delay, the process returns and executes S300 again from the beginning.
[0157] If there is no sub-process waiting to be executed and the count is not lower than the manually preset upper limit threshold of the waiting delay, the next sub-process connected in sequence with the sub-process corresponding to the sub-process completion information returned in S200 is executed; then S400 is executed.
[0158] S400. Check whether there is any unfinished sub-process at present; then perform the following operations according to the query result:
[0159] If there is an unfinished sub-process at present, the process returns and executes S200 again from the beginning.
[0160] If there is no unfinished sub-process at present, S500 is executed.
[0161] S500. End the main process of this commercial vehicle multi-ECU data polling transmission.
[0162] In order to demonstrate the technical effect of the present invention, this specific embodiment also includes the entire process of a polling main process; multi-ECU polling flashing is that the flashing tool simultaneously maintains sessions with multiple ECUs on a CAN bus without any influence on each other, and the total flashing time is less than the cumulative time of sequential flashing of multiple ECUs. Figure 2 As shown:
[0163] It should be noted in advance that the following is a polling main process in an experiment, the purpose of which is to demonstrate the technical effects produced by the method of the present invention, especially the principle of logical jump; due to different actual working conditions, each time this method is used, the jump paths between sub-processes will be different, but they are all within the scope of the method of the present invention.
[0164] It should be further explained that this comparative test was conducted on a commercial vehicle model with a total of 12 electronic control systems as the background.
[0165] Initially, the system sends communication connection requests to the engine ECU flash process, the post-processing ECU flash process, and the vehicle ECU flash process at the same time; the first data flash and reset request sub-process is completed first, and the first data flash and reset request sub-process completion information is sent back; then the system starts timing; the waiting delay upper limit threshold between the first data flash and reset request sub-process and the first data read and compare sub-process is set to 5 seconds; therefore, within these 5 seconds, the first data read and compare sub-process does not participate in requesting resources.
[0166] Then, after querying, it is found that the only sub-process currently waiting to be executed is the data area erasing sub-process, so the execution of the data area erasing sub-process is directly started.
[0167] After the data area erase sub-process is completed, the data area erase sub-process completion information is sent back; then, since there is no waiting delay upper limit threshold between the data area erase sub-process and its subsequent sub-process in the post-processing ECU flash process - the data verification and reset request sub-process, the data verification and reset request sub-process also has to participate in the competition for resources at this time; therefore, the priority of the data verification and reset request sub-process is compared with another sub-process waiting to be executed - the third data flash and reset request sub-process; the priority of the data area erase sub-process is 3, and the priority of the third data flash and reset request sub-process is 6, so the third data flash and reset request sub-process is executed first.
[0168] After the third data write and reset request sub-process is completed, the third data write and reset request sub-process completion information is sent back; then the waiting delay upper limit threshold between the third data write and reset request sub-process completion information and its subsequent sub-process in the vehicle ECU write process-the third data read and compare sub-process is set to 3 seconds; therefore, within these 3 seconds, the third data read and compare sub-process does not participate in requesting resources; and at this time, the waiting delay upper limit threshold of 5 seconds between the first data write and reset request sub-process and the first data read and compare sub-process has not yet arrived, so the sub-process waiting to be executed is the data verification and reset request sub-process; therefore, the system starts to execute the data verification and reset request sub-process.
[0169] After the data check and reset request sub-process is completed, the data check and reset request sub-process completion information is sent back; then the waiting delay upper limit threshold between the data check and reset request sub-process and its subsequent sub-process in the post-processing ECU flash process-the data flash and reset request sub-process is set to 3 seconds; therefore, within these 3 seconds, the data flash and reset request sub-process does not participate in requesting resources; and at this time, the waiting delay upper limit threshold of 5 seconds between the first data flash and reset request sub-process and the first data read and compare sub-process has not yet arrived, so the sub-process waiting to be executed is the third data read and compare sub-process; therefore, the system starts to execute the third data read and compare sub-process.
[0170] The third data reading and comparison sub-process is successfully completed, and the success information of the vehicle ECU flashing process is sent back; at this point, the vehicle ECU flashing process is completed; and at this time, the waiting delay upper limit threshold of 5 seconds between the first data flashing and reset request sub-process and the first data reading and comparison sub-process has not yet arrived, so the sub-process waiting to be executed is the data flashing and reset request sub-process; then the system starts to execute the data flashing and reset request sub-process.
[0171] After the data write and reset request sub-process is completed, the data write and reset request sub-process is sent back; then the waiting delay upper limit threshold between the data write and reset request sub-process and its subsequent sub-process in the post-processing ECU write process-the second data read and comparison sub-process is set to 3 seconds; at this time, the waiting delay upper limit threshold of 5 seconds between the first data write and reset request sub-process and the first data read and comparison sub-process has arrived, and the priority of the first data read and comparison sub-process is 5, and the priority of the second data read and comparison sub-process is 3, so the first data read and comparison sub-process is started at this time.
[0172] After the first data reading and comparison sub-process is completed, the engine ECU flashing process success information is sent back; at this point, the engine ECU flashing process is completed; currently the only sub-process waiting to be executed is the second data reading and comparison sub-process; therefore, the second data reading and comparison sub-process is started.
[0173] After the second data reading and comparison sub-process is completed, the success information of the post-processing ECU flashing process is sent back; at this point, the post-processing ECU flashing process is completed, and there are no more sub-processes to be processed, so the polling main process is also completed, and this flashing work is completed.
[0174] It should be noted that for delayed waiting, in the post-processing ECU flashing process, after the flashing program sends the "erase data area" command, the post-processing ECU returns a waiting command to tell the flashing program that the post-processing ECU is in the process of erasing, please wait. At this time, the flashing program can use the waiting time to process the flashing process of other ECUs.
[0175] It should be further explained that for the delayed waiting, after the ECU completes the data flashing, the flashing program sends a reset command, and after the ECU returns the reset response, it takes 3-5 seconds for the ECU to start restarting. At this time, the flashing program can handle the flashing process of other ECUs.
[0176] In order to further demonstrate the improvement of the technical effect of the present invention over the prior art, this specific embodiment also compares the specific situation of the above experiment with the multi-ECU sequential data transmission and flashing process using the prior art, as follows:
[0177] The existing technology adopts a serial process, that is, the order of each action is strictly stipulated, and even if the system resources are idle, they will not be released, so its efficiency is very low.
[0178] A typical multi-ECU sequential data transmission and flashing process according to the existing technology is as follows: Figure 3 As shown in the figure, the conventional flashing method is: for multiple ECUs on a bus, the flashing is carried out sequentially, and the flashing of the next ECU is carried out after the flashing of one ECU is completed. The total flashing time is the sum of the flashing time of a single ECU. Taking the engine ECU, post-processing ECU, and vehicle ECU (VECU) as an example, the data transmission and flashing timing of sequential flashing are as follows:
[0179] First, execute the engine ECU flashing process, which specifically includes the following steps:
[0180] Sd100. Send a communication connection request.
[0181] Sd101. Request to enter VIN flash mode.
[0182] Sd102. Flash VIN.
[0183] Sd103. Request to enter vehicle parameter flashing mode.
[0184] Sd104. Flash the vehicle parameters.
[0185] Sd105. Send reset request
[0186] Sd106. Delay 3 seconds and wait for restart.
[0187] Sd107. Request to enter VIN read mode.
[0188] Sd108. Read VIN.
[0189] Sd109. Request to enter vehicle parameter reading mode.
[0190] Sd110. Read vehicle parameters.
[0191] Sd111. Perform write data comparison and read data comparison.
[0192] Then the post-processing ECU flashing process is executed, which specifically includes the following steps: Sd200. Send a communication connection request.
[0193] Sd201. Request to enter program flash mode.
[0194] Sd202. Erase data area.
[0195] Sd203. Transmit data.
[0196] Sd204. Verify data.
[0197] Sd205. Send a reset request.
[0198] Sd206. Delay 3 seconds and wait for restart.
[0199] Sd207. Request to enter VIN flash mode.
[0200] Sd208. Flash VIN.
[0201] Sd209. Send a reset request.
[0202] Sd210. Delay 3 seconds to wait for restart.
[0203] Sd211. Request to enter VIN read mode.
[0204] Sd212. Read VIN.
[0205] Sd213. Perform write data comparison and read data comparison.
[0206] Finally, execute the VECU flashing process, which specifically includes the following steps: Sd300. Send a communication connection request.
[0207] Sd301. Read the original data.
[0208] Sd302. Request to enter vehicle parameter flashing mode.
[0209] Sd303. Flash the whole vehicle parameters.
[0210] Sd304. Send parameter write command.
[0211] Sd305. Send a reset request.
[0212] Sd306. Delay 3 seconds and wait for restart.
[0213] Sd307. Read vehicle parameters.
[0214] Sd308. Perform write data comparison and read data comparison.
[0215] In this comparative test, the experimental object used was a model in production of the applicant Dongfeng Commercial Vehicle Co., Ltd.; this model was equipped with a total of 12 types of ECUs that required data flashing.
[0216] It should be noted that the method in this specific embodiment describes the situation of flashing data for three types of ECUs, and these three types of ECUs are involved in all vehicle models; the number of ECUs to be flashed for vehicle models in actual production will be greater than three; but no matter how many types of ECUs to be flashed there are, the method of the present invention is universal, and the expected technical effect improvement can be achieved by simply following the process of the present invention.
[0217] It should be further explained that in order to strictly control the experimental variables to meet the requirements of the double-blind test, this comparison uses the existing technology and the method of the present invention to randomly alternate flashing 10 times each; the experimental object is the same vehicle; and the system parameters of the vehicle are reset after each experiment; and after each experiment, including but not limited to power and ambient temperature, are precisely adjusted to ensure that the variables not participating in the experiment are strictly consistent.
[0218] As shown in Table 1, the time records for sequential flashing of all ECUs are arranged according to the prior art:
[0219] Table 1. Statistics of sequential flashing time of electronic control system
[0220]
[0221]
[0222] It can be seen from Table 1 that the cumulative flash writing time using the existing technology is 168 seconds.
[0223] In contrast, by adopting the method of the present invention, a polling transmission mechanism for multi-ECU data is implemented in this specific embodiment and data flashing is completed. Theoretically, the overall flashing time of the vehicle model can be shortened to about 134 seconds, reducing the flashing time by 20%.
[0224] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0225] The disclosed embodiments are described above to enable any person skilled in the art to implement or use the present invention. Various modifications of these embodiments are obvious to those skilled in the art, and the general principles defined herein may also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.
[0226] The above description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
[0227] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A commercial vehicle multi-ECU data polling transmission method, characterized in that: Includes polling main process and multiple ECU flashing processes; Each of the ECU flashing processes is composed of a plurality of sub-processes connected in sequence, and each sub-process is marked with a manually preset priority; In each of the ECU flashing processes, the files transferred, parsed, and flashed all come from a complete data file; The polling main process includes the following steps: S100. Send a communication connection request to each ECU flash process at the same time; S200. Waiting for and receiving the returned sub-process completion information; each sub-process completion information corresponds to the completion status of a sub-process; S300. Start timing; then check whether there is a sub-process waiting to be executed; then perform the following operations based on the query results: If there is a sub-process waiting to be executed, the sub-process with the highest priority value is selected and executed; then S400 is executed; If there is no sub-process waiting to be executed, and the timing has not exceeded the manually preset upper limit threshold of the waiting delay, then return and execute S300 again from the beginning; If there is no sub-process waiting to be executed, and the timing exceeds the manually preset upper limit threshold of the waiting delay, the next sub-process connected in sequence with the sub-process corresponding to the sub-process completion information received and returned in S200 is executed; and then S400 is executed; S400. Check whether there is any unfinished sub-process at present; then perform the following operations according to the query result: If there is currently an unfinished sub-process, return and execute S200 again from the beginning; If there is no unfinished sub-process at present, execute S500; S500. End the main process of this commercial vehicle multi-ECU data polling transmission.
2. The commercial vehicle multi-ECU data polling transmission method according to claim 1 is characterized in that: The ECU flashing process includes a data flashing and reset request sub-process, a data reading and comparison sub-process, a data area erasing sub-process, a data verification and reset request sub-process, and a data flashing and reset request sub-process; wherein: The data writing and reset request sub-process includes a first data writing and reset request sub-process, a second data writing and reset request sub-process, and a third data writing and reset request sub-process; The data reading and comparing sub-process comprises a first data reading and comparing sub-process, a second data reading and comparing sub-process, and a third data reading and comparing sub-process; The sub-process completion information includes data writing and reset request sub-process completion information, data writing and reset request sub-process failure information, ECU writing process success information, ECU writing process failure information, data area erasing sub-process completion information, data area erasing sub-process failure information, data verification and reset request sub-process completion information, data verification and reset request sub-process failure information, data reading and comparison sub-process completion information, data reading and comparison sub-process failure information; The complete data file is composed of a plurality of ECU data files packaged together; the ECU data file includes the type of ECU, CAN channel number, CAN communication rate, and data content to be flashed.
3. The commercial vehicle multi-ECU data polling transmission method according to claim 2 is characterized in that: The first data flushing and reset request sub-process comprises the following steps: Saa100 receives the communication connection request; Saa200. Request to enter VIN flash mode; Saa300. After Saa200 is completed, flash the VIN; Saa400. Request to enter vehicle parameter flashing mode; Saa500. After Saa400 is completed, rewrite the vehicle parameters; Saa600. Send a reset request; Saa700. Send the data flushing and reset request sub-process completion information.
4. The commercial vehicle multi-ECU data polling transmission method according to claim 3 is characterized in that: The first data reading and comparison sub-process comprises the following steps: Sab100. Request to enter VIN reading mode; Sab200. After Sab100 is completed, read the VIN; Sab300. Request to enter vehicle parameter reading mode; Sab400. After Sab300 is completed, read the vehicle parameters; Sab500. Compare the written VIN with the read VIN, and then compare the written vehicle parameters with the read vehicle parameters; perform the following operations according to the comparison results: If the VIN is the same as the read VIN, and the written vehicle parameters are the same as the read vehicle parameters, the ECU flashing process is terminated, and the ECU flashing process success information is returned; If the VIN is not the same as the read VIN, or the written vehicle parameters are not the same as the read vehicle parameters, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
5. The commercial vehicle multi-ECU data polling transmission method according to claim 4 is characterized in that: The data area erasing sub-process comprises the following steps: Sba100 receives the communication connection request; Sba200. Request to enter program flash mode; Sba300. After Sba200 is completed, erase the data area; Sba400. Sends the data area erasing sub-process completion information.
6. The commercial vehicle multi-ECU data polling transmission method according to claim 5 is characterized in that: The data verification and reset request sub-process comprises the following steps: Sbb100. Transmit data; Sbb200. Verification data; Sbb300 sends the reset request; Sbb400. Send the data verification and reset request sub-process completion information.
7. The commercial vehicle multi-ECU data polling transmission method according to claim 6 is characterized in that: The data writing and reset request sub-process includes the following steps: Sbc100. Request to enter the VIN flash mode; Sbc200. After Sbc100 is completed, the VIN; Sbc300 sends the reset request; Sbc400. Sends the data flushing and reset request sub-process completion information.
8. The commercial vehicle multi-ECU data polling transmission method according to claim 7 is characterized in that: The second data reading and comparison sub-process comprises the following steps: Sbd100. Request to enter the VIN reading mode; Sbd200. After Sbd100 is completed, read the VIN; Sbd300. Compare the written VIN with the read VIN; perform the following operations based on the comparison result: If the VIN is the same as the read VIN, the ECU flashing process ends and returns information indicating success of the ECU flashing process; If the VIN is not the same as the read VIN, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
9. The commercial vehicle multi-ECU data polling transmission method according to claim 8, characterized in that: The third data writing and reset request sub-process comprises the following steps: Sca100. Receive the communication connection request; Sca200. Read original parameters; Sca300. Request to enter vehicle parameter flashing mode; Sca400. Flash the vehicle parameters; Sca500. Send parameter write command; Sca600. Send the reset request; Sca700. Send the data flushing and reset request sub-process completion information.
10. The commercial vehicle multi-ECU data polling transmission method according to claim 9, characterized in that: The third data reading and comparison sub-process comprises the following steps: Scb100. Read the vehicle parameters; Scb200. Compare the written vehicle data with the read vehicle data; perform the following operations based on the comparison results: If the vehicle data is the same as the read vehicle data, the ECU flashing process is terminated and the ECU flashing process success information is returned; If the whole vehicle data is not the same as the read whole vehicle data, the ECU flashing process is terminated and the ECU flashing process failure information is returned.
Citation Information
Patent Citations
New energy vehicle control module remote programming method
CN108810082A
Method and system for upgrading vehicle control unit based on diagnostic instrument
CN113347248A