An ECU flashing test error detection method, device, equipment and storage medium
By using the verification logic of the host computer and message monitoring tool during the ECU flashing process, the problem of mismatch between flashing data and method was solved, thus improving the reliability and efficiency of ECU flashing.
Patent Information
- Application Number
- CN202210421900.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-04-21
AI Technical Summary
During the ECU software flashing process, mismatch between the flashing data and the flashing method can lead to ECU flashing failure or 'flash failure', affecting the testing progress. Existing technologies lack effective error detection methods.
The first verification of the flashing file is performed by the host computer, and the second verification is performed by the message monitoring tool. By comparing the results of the first and second verifications, the success or failure of the flashing is determined, thus preventing ECU flashing failure and 'flashing to death'.
By verifying the compatibility of the flashing file and flashing method in advance, ECU flashing failure or 'flashing to death' is prevented, improving the efficiency of flashing error screening and ensuring the reliability of the flashing process.
Smart Images

Figure CN114721864B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ECU data flashing, and particularly relates to an ECU flashing test error detection method and device, equipment and a storage medium. BACKGROUND
[0002] With the rapid development of automobile technology and electronic technology, modern automobile industry widely adopts electronic control technology to improve the power, economy, drivability, safety, comfort of automobiles, and reduce exhaust emission pollution. Electronic control technology is an important trend and symbol of the development of modern automobile technology. Electronic control technology is widely used in fuel injection, ignition control, intake control, emission control, fault self-diagnosis of engine, transmission system, steering and braking system of chassis, automatic transmission, vehicle body and auxiliary devices. The application of automobile electronic control technology plays an increasingly important role in modern automobile industry.
[0003] ECU (Electronic Control Unit) is the most important automobile electronic system controller at present, which is also called "driving computer" or "on-board computer". Like ordinary computers, it is composed of microprocessors (CPU), read-only memory (ROM), random access memory (RAM), input / output interface (I / O), analog-to-digital converter (A / D), and shaping, driving, etc. Large-scale integrated circuits. ECU collects the working state information of each part of the engine through temperature sensors, pressure sensors, rotation sensors, flow sensors, position sensors, oxygen sensors, knock sensors, etc., and processes and analyzes the received information. According to the control program and software data, the intake, injection and ignition of the engine are controlled to ensure the normal operation of the engine. ECU software data can be divided into multiple data areas according to the different properties of control tasks, such as component information configuration area, power parameter area, emission parameter area, fault diagnosis area, etc.
[0004] The development and debugging of automobile electronic system controller have important influence on the development of automobile electronic system. At present, for the flashing of ECU software data, the flashing protocol of UDS (Unified Diagnostic Service) is usually required for flashing.
[0005] WICAS as Weichai independent measurement calibration system, before popularizing the market, needs to be fully tested, wherein when performing software flashing function test, a kind of problem often occurs, that is, flashing data and flashing mode do not match, after the problem occurs, not only will cause ECU flashing failure, but also can cause ECU "burning", affect the test progress of later period. In order to avoid the occurrence of this kind of flashing problem, the flashing data and flashing mode need to be checked before flashing, to prevent "burning" of ECU after being flashed into ECU. SUMMARY
[0006] Therefore, the technical problem to be solved by the present application is to provide an ECU flashing test error detection method, device, equipment and storage medium, which can check the consistency of the flashing file, ensure the reliability of flashing, check the matching of the flashing file and the flashing mode, prevent ECU flashing failure and "burning", and improve the flashing error screening efficiency.
[0007] To solve the above technical problems, the technical scheme of the present application is:
[0008] In a first aspect, the present application discloses an ECU flashing test error detection method, comprising the following steps:
[0009] S10, the host computer performs data checking on the flashing file according to the first checking logic, and obtains a first checking result;
[0010] S20, running the flashing software, performing flashing operation on the flashing file, and at the same time, running the message monitoring tool, obtaining the outgoing message of the flashing file before the flashing file is flashed to ECU;
[0011] S30, the message monitoring tool performs data checking on the outgoing message according to the second checking logic, and obtains a second checking result;
[0012] S40, comparing the first checking result and the second checking result, if the second checking result is contained in the first checking result, it is determined that the flashing is successful, and if the second checking result contains other data except the first checking result, it is determined that the flashing fails.
[0013] Preferably, the first checking logic comprises directly obtaining the first start address and the first end address pre-flashed to ECU from the flashing file;
[0014] The second checking logic comprises obtaining the erase instruction from the outgoing message, screening the valid information contained in the erase instruction, and obtaining the second start address, the second end address and the second space value pre-erased to ECU from the valid information.
[0015] Preferably, the first check result comprises the first start address, the first end address, and a first space value required for generating the flashing according to the first start address and the first end address.
[0016] The second check result comprises the second start address, the second end address, and the second space value.
[0017] Preferably, in step S40, the first check result and the second check result are compared, comprising:
[0018] S41, the first start address, the first end address, the first space value, and the second start address, the second end address, and the second space value are compared respectively;
[0019] S42, an erasing area value is determined according to the second start address, the second end address, and the second space value;
[0020] S43, it is judged whether the erasing area value is in the flashing file.
[0021] Preferably, it further comprises an error prompt, and the steps are as follows:
[0022] S50, it is judged that the flashing fails, and a prompt that the flashing address and the flashing data do not match is given through the upper computer.
[0023] In a second aspect, the application discloses an ECU flashing test error detection device, comprising:
[0024] A first check module is used for data checking of a flashing file according to a first check logic, and a first check result is obtained;
[0025] An external message acquisition module is used for acquiring an external message of the flashing file before the flashing file is flashed to an ECU.
[0026] A second check module is used for data checking of the external message according to a second check logic, and a second check result is obtained;
[0027] A comparison and detection module is used for comparing the first check result and the second check result, if the second check result is contained in the first check result, it is judged that the flashing succeeds, and if the second check result contains other data except the first check result, it is judged that the flashing fails.
[0028] Preferably, it further comprises a prompt output module.
[0029] The prompt output module is used for giving a prompt that the flashing address and the flashing data do not match.
[0030] In a third aspect, the present application discloses a computer device, comprising:
[0031] at least one processor; and
[0032] a memory, the memory storing a program or instructions executable on the processor, the program or instructions being executed by the processor to implement the steps of the ECU flashing test error detection method as described in the first aspect.
[0033] In a fourth aspect, the present application discloses a computer readable storage medium, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement the steps of the ECU flashing test error detection method as described in the first aspect.
[0034] After the above technical solution is adopted, the present application has the following beneficial effects:
[0035] In the present application, by adopting the upper computer, the data of the flashing file is checked according to the first check logic to obtain a first check result; the flashing software is adopted to perform the flashing operation on the flashing file, and at the same time, the message monitoring tool is run to obtain the outgoing message of the flashing file before the flashing file is flashed to the ECU; the message monitoring tool checks the data of the outgoing message according to the second check logic to obtain a second check result. By comparing the first check result and the second check result, if the second check result is contained in the first check result, it is determined that the flashing is successful; if the second check result contains other data except the first check result, it is determined that the flashing fails.
[0036] Before the flashing file is flashed to the ECU, the present application can check and detect the flashing file in advance to prevent the flashing file from being flashed to the ECU and then causing the ECU flashing to fail or the ECU to be "flashed to death" due to the mismatch of the flashing mode, prevent the test progress in the later period from being affected, and improve the flashing error screening efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0037] The present application will be further described below in combination with the drawings and embodiments.
[0038] Figure 1 is a general flowchart of an ECU flashing test error detection method provided by an embodiment of the present application;
[0039] Figure 2 is a flowchart of an ECU flashing test error detection method provided by an embodiment of the present application;
[0040] Figure 3 is a structural schematic diagram of an ECU flashing test error detection device provided by an embodiment of the present application;
[0041] Figure 4is a structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0043] As shown in Figure 1 and Figure 2 The present application discloses an ECU flashing test error detection method, comprising the following steps:
[0044] S10, the host computer performs data verification on the flashing file according to the first verification logic, and obtains a first verification result;
[0045] S20, running the flashing software, performing the flashing operation on the flashing file, and at the same time, running the message monitoring tool, obtaining the outgoing message of the flashing file before the flashing file is flashed to the ECU;
[0046] S30, the message monitoring tool performs data verification on the outgoing message according to the second verification logic, and obtains a second verification result;
[0047] S40, comparing the first verification result and the second verification result, if the second verification result is contained in the first verification result, it is determined that the flashing is successful; if the second verification result contains other data except the first verification result, it is determined that the flashing fails.
[0048] In the present application, the first verification logic includes directly obtaining the first start address and the first end address pre-flashed to the ECU from the flashing file.
[0049] The flashing file is programmed by development software, and the programming contains the flashing instruction of the Flash area in the ECU, including the first start address and the first end address.
[0050] The second verification logic includes obtaining the erase instruction from the outgoing message, screening the valid information contained in the erase instruction, and obtaining the second start address, the second end address and the second space value pre-erased to the ECU from the valid information.
[0051] The message monitoring tool is the BUSMASTER monitoring software.
[0052] Preferably, the first verification result includes the first start address, the first end address, and the first space value required for flashing generated according to the first start address and the first end address;
[0053] The second verification result includes the second start address, the second end address and the second space value.
[0054] Preferably, in step S40, comparing the first verification result and the second verification result includes:
[0055] S41, separately comparing the first starting address, the first ending address, and the first space value with the second starting address, the second ending address, and the second space value;
[0056] S42, determining the erase area value based on the second start address, the second end address, and the second space value;
[0057] S43: Determine whether the erase area value is in the flash file.
[0058] In the present invention, both the first and second space values represent the areas of the ECU's Flash area that need to be flashed or erased. For example, if the first verification result indicates a first space value of 10 segments, this indicates that the flash file needs to erase 10 segments of the Flash area for data storage. If the second verification result indicates a second space value of 8 segments, this indicates that only 8 segments of the Flash area will be erased during the flashing process. If the 8 segments of space are contained within the 10 segments of space, the ECU flash will not fail or "flash freeze," and the flash is therefore determined to be successful. If the erased space exceeds 10 segments during the flashing process, the ECU will fail or "flash freeze," causing damage to the ECU.
[0059] Preferably, an error prompt is also included, and the steps are as follows:
[0060] S50: Determine that the flashing fails, and give a prompt through the host computer that the flashing address and the flashing data do not match.
[0061] Before the flash file is written to the ECU, the present invention can verify and detect the flash file in advance to prevent the ECU from being flashed or "flashed" due to mismatch in the flashing mode after the flash file is written to the ECU, thereby preventing the subsequent test progress from being affected and improving the efficiency of flash error screening.
[0062] like Figure 3 As shown, the present invention discloses an ECU flash test error detection device, comprising:
[0063] A first verification module 61 is configured to perform data verification on the flash file according to a first verification logic to obtain a first verification result;
[0064] The outgoing message acquisition module 62 is used to obtain the outgoing message of the flash file before the flash file is flashed to the ECU;
[0065] The second checking module 63 is configured to perform data checking on the outgoing message according to second checking logic to obtain a second checking result.
[0066] The comparison and detection module 64 is configured to compare the first checking result and the second checking result.
[0067] Preferably, the device further comprises a prompt output module 65.
[0068] The prompt output module 65 is configured to give a prompt that the flashing address and the flashing data do not match.
[0069] The ECU flashing test error detection device provided by the embodiment of the present application can realize Figure 1 The processes of the ECU flashing test error detection method in the method embodiment are not repeated here.
[0070] As shown in Figure 4 The present application discloses a computer device, comprising:
[0071] at least one processor 71; and
[0072] The memory 72 stores programs or instructions executable on the processor 71, and the programs or instructions are executed by the processor 71 to realize Figure 1 The processes of the ECU flashing test error detection method in the method embodiment are not repeated here.
[0073] The present application further discloses a computer readable storage medium, which stores programs or instructions executable by the processor to realize Figure 1 The processes of the ECU flashing test error detection method in the method embodiment are not repeated here. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0074] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the modules is merely logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. The displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0075] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place or distributed to a plurality of network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0076] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer program instructions generate the processes or functions according to the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted by the computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.
[0077] The above merely describes preferred embodiments of the present application, and is not used to limit the present application, any modification, equivalent replacement and improvement within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. An ECU flashing test error detection method, characterized in that, The method comprises the following steps: S10, the host computer performs data verification on the flashing file according to first verification logic to obtain a first verification result, wherein the first verification logic comprises directly obtaining a first start address and a first end address pre-flashed into the ECU from the flashing file; S20, running the flashing software, performing flashing operation on the flashing file, and simultaneously, running the message monitoring tool, obtaining outgoing messages of the flashing file before the flashing file is flashed into the ECU; S30, the message monitoring tool performs data verification on the outgoing messages according to second verification logic to obtain a second verification result, wherein the second verification logic comprises obtaining an erasing instruction from the outgoing messages, screening valid information contained in the erasing instruction, and obtaining a second start address, a second end address and a second space value pre-erased from the ECU from the valid information; S40, comparing the first verification result and the second verification result, if the second verification result is contained in the first verification result, determining that the flashing is successful, and if the second verification result contains other data except the first verification result, determining that the flashing fails.
2. The ECU flashing test error detection method of claim 1, wherein the first verification result comprises the first start address, the first end address, and a first space value generated according to the first start address and the first end address required for flashing; the second verification result comprises the second start address, the second end address, and the second space value.
3. The ECU flashing test error detection method of claim 2, wherein in step S40, comparing the first verification result and the second verification result comprises: S41, separately comparing the first start address, the first end address, the first space value, the second start address, the second end address, and the second space value; S42, determining an erasing region value from the second start address, the second end address, and the second space value; S43, judging whether the erasing region value is in the flashing file.
4. The ECU flashing test error detection method of claim 1, wherein, Further comprising an error prompt, and the steps are as follows: S50, determining that the flashing fails, and giving a prompt that the flashing address and the flashing data do not match through the host computer.
5. An ECU flashing test error detection device, characterized by, The device comprises: a first verification module for performing data verification on the flashing file according to first verification logic to obtain a first verification result, wherein the first verification logic comprises directly obtaining a first start address and a first end address pre-flashed into the ECU from the flashing file; an outgoing message acquisition module for obtaining outgoing messages of the flashing file before the flashing file is flashed into the ECU; A second checking module is configured to perform data checking on the outgoing message according to a second checking logic to obtain a second checking result, wherein the second checking logic comprises obtaining an erasing instruction from the outgoing message, screening valid information contained in the erasing instruction, and obtaining a second start address, a second end address and a second space value for pre-erasing the ECU from the valid information; A comparison and detection module is configured to compare the first checking result and the second checking result, and if the second checking result is contained in the first checking result, it is determined that the flashing is successful, and if the second checking result contains other data except the first checking result, it is determined that the flashing is failed.
6. The ECU flash test error detection apparatus of claim 5, wherein, Further comprising a prompt output module; The prompt output module is configured to give a prompt that the flashing address and the flashing data do not match.
7. A computer device, characterized by It comprises: At least one processor; and A memory storing programs or instructions executable on the processor, which, when executed by the processor, implement the steps of the ECU flashing test error detection method according to any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, The programs or instructions are stored on the readable storage medium, which, when executed by the processor, implement the steps of the ECU flashing test error detection method according to any one of claims 1-4.
Citation Information
Patent Citations
Data verification method and device for data flashing
CN113343314A
Program flashing method and apparatus, vehicle, and storage medium
WO2022017125A1