Brush test method, device, system and equipment of electronic controller and medium

By configuring and sending test programs and verification data in the extended diagnostic session mode of the electronic controller, the problem of unstable flash write function is solved, and the reliability and testing efficiency of the electronic controller update program are improved.

CN119002457APending Publication Date: 2024-11-22CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411091291.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When the prior art updates the program of the electronic controller, the flashing function is unstable, resulting in update errors, making it difficult to efficiently test the flashing function of the electronic controller, affecting the reliability of the update program.

Method used

By sending diagnostic session control instructions to the electronic controller to enter the extended diagnostic session mode, configuring the flash write process parameters, and sending test programs and verification data in this mode, the correlation verification data is judged to determine whether the flash write test is passed or not.

Benefits of technology

This method can reduce interference from other communication modes, improve the reliability and accuracy of flash write tests, and achieve efficient flash write tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002457A_ABST
    Figure CN119002457A_ABST
Patent Text Reader

Abstract

The invention discloses a flash test method, device, system and equipment for an electronic controller and a medium, and relates to the technical field of controller testing, and the method comprises the steps: sending a diagnosis session control instruction to the electronic controller, so as to enable the electronic controller to enter an extended diagnosis session mode; in the extended diagnosis session mode, flash process configuration parameters are sent to the electronic controller; in the extended diagnosis session mode, a test program is sent to the electronic controller according to the flashing process configuration parameters; in the extended diagnosis session mode, sending program verification data to the electronic controller, so that the electronic controller performs correlation verification on the test program according to the program verification data and obtains correlation verification data; and judging whether the electronic controller passes the flash test or not according to the correlation verification data. By controlling the electronic controller to enter the extended diagnosis session mode for testing, the interference of other communication modes can be greatly reduced, the reliability of the flash test is improved, and the flash test is efficiently and accurately realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of controller testing technology, and in particular to a flashing test method, device, system, equipment and medium for an electronic controller. Background Art

[0002] An electronic control unit (ECU) generally needs to have its program updated in order to continuously optimize the control algorithm or software function. However, updating the program of the electronic controller needs to be performed when the flashing function is normal, otherwise it will cause update errors. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a flash test method, device, system, equipment and medium for an electronic controller to efficiently test the flash function of the electronic controller, thereby improving the reliability of the electronic controller update program.

[0004] To achieve the above object, one aspect of an embodiment of the present application provides a flash test method for an electronic controller, the method comprising the following steps:

[0005] sending a diagnostic session control instruction to the electronic controller to cause the electronic controller to enter an extended diagnostic session mode;

[0006] In the extended diagnostic session mode, sending flash process configuration parameters to the electronic controller;

[0007] In the extended diagnostic session mode, sending a test program to the electronic controller according to the flash process configuration parameters;

[0008] In the extended diagnostic session mode, sending program verification data to the electronic controller, so that the electronic controller performs a correlation verification on the test program according to the program verification data and obtains the correlation verification data;

[0009] It is determined whether the electronic controller passes the flashing test according to the correlation verification data.

[0010] In some embodiments, before sending the flash process configuration parameters to the electronic controller, the method further includes the following steps:

[0011] sending a fault code disable instruction to the electronic controller to prohibit the electronic controller from setting a fault code;

[0012] A first communication control instruction is sent to the electronic controller to shut down a non-diagnostic communication service of the electronic controller.

[0013] In some embodiments, the method further comprises the following steps:

[0014] In the extended diagnostic session mode, sending a second communication control instruction to the electronic controller to enable the non-diagnostic communication service of the electronic controller;

[0015] In the extended diagnostic session mode, a clear instruction is sent to the electronic controller to enable the electronic controller to clear diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data and the correlation verification data.

[0016] In some embodiments, before sending the flash process configuration parameters to the electronic controller, the method further includes the following steps:

[0017] The diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flash times and flash type of the electronic controller are configured as the flash process configuration parameters.

[0018] In some embodiments, in the extended diagnostic session mode, sending a test program to the electronic controller according to the flash process configuration parameters includes the following steps:

[0019] In the extended diagnostic session mode, perform the following steps:

[0020] Sending a memory driver to the electronic controller according to the flashing process configuration parameters;

[0021] Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data;

[0022] After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory;

[0023] A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

[0024] To achieve the above object, another aspect of the embodiment of the present application provides a flash writing test device for an electronic controller, the device comprising:

[0025] A session control unit, configured to send a diagnostic session control instruction to the electronic controller so as to cause the electronic controller to enter an extended diagnostic session mode;

[0026] A parameter sending unit, used for sending flashing process configuration parameters to the electronic controller in the extended diagnostic session mode;

[0027] A flash test unit, configured to send a test program to the electronic controller according to the flash process configuration parameters in the extended diagnostic session mode;

[0028] a flash verification unit, used for sending program verification data to the electronic controller in the extended diagnostic session mode, so that the electronic controller can perform a correlation verification on the test program according to the program verification data and obtain the correlation verification data;

[0029] The flashing judgment unit is used to judge whether the electronic controller passes the flashing test according to the correlation verification data.

[0030] In some embodiments, the apparatus further comprises:

[0031] a fault code disabling unit, used for sending a fault code disabling instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller, so as to prohibit the electronic controller from setting a fault code;

[0032] The communication service closing unit is used to send a first communication control instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller to close the non-diagnostic communication service of the electronic controller.

[0033] In some embodiments, the apparatus further comprises:

[0034] a communication service activation unit, configured to send a second communication control instruction to the electronic controller in the extended diagnostic session mode to activate the non-diagnostic communication service of the electronic controller;

[0035] A diagnostic information clearing unit is used to send a clearing instruction to the electronic controller in the extended diagnostic session mode so that the electronic controller clears the diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data and the correlation verification data.

[0036] In some embodiments, the apparatus further comprises:

[0037] A parameter configuration unit is used to configure the electronic controller's diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flashes, and flash type as the flash process configuration parameters before sending the flash process configuration parameters to the electronic controller.

[0038] In some embodiments, the flash test unit includes:

[0039] The flash test subunit is used to perform the following steps in the extended diagnostic session mode:

[0040] Sending a memory driver to the electronic controller according to the flashing process configuration parameters;

[0041] Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data;

[0042] After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory;

[0043] A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

[0044] To achieve the above object, another aspect of the embodiment of the present application provides a flash writing test system for an electronic controller, the system comprising: a computer, a CANoe data cable, an OBD to DB9 harness, and an electronic controller;

[0045] Wherein, the first end of the CANoe data cable is connected to the computer, the second end of the CANoe data cable is connected to the first end of the OBD to DB9 harness, and the second end of the OBD to DB9 harness is connected to the electronic controller;

[0046] The computer is used to execute the aforementioned flash writing test method for an electronic controller.

[0047] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned flash test method of an electronic controller.

[0048] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned flash writing test method of an electronic controller is implemented.

[0049] The embodiments of the present application include at least the following beneficial effects:

[0050] The present application can send a diagnostic session control instruction to the electronic controller so that the electronic controller enters the extended diagnostic session mode; in the extended diagnostic session mode, send the flash process configuration parameters to the electronic controller; in the extended diagnostic session mode, send the test program to the electronic controller according to the flash process configuration parameters; in the extended diagnostic session mode, send program verification data to the electronic controller so that the electronic controller can perform a correlation verification on the test program according to the program verification data and obtain the correlation verification data; and judge whether the electronic controller has passed the flash test according to the correlation verification data. By controlling the electronic controller to enter the extended diagnostic session mode, the interference of other communication modes can be greatly reduced and the reliability of the flash test can be improved; in the extended diagnostic session mode, the test program is sent and verified, and then the correlation verification data obtained by the verification is used to judge whether the electronic controller has passed the flash test, so that the flash test can be implemented efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0052] Figure 1 A schematic diagram of a process flow of a flash test method for an electronic controller provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of optional steps provided in an embodiment of the present application before sending the flash process configuration parameters;

[0054] Figure 3 Optional step flow chart provided for embodiments of the present application;

[0055] Figure 4 A flow chart of the stages before the ECU flash test provided in the embodiment of the present application;

[0056] Figure 5 A flow chart of the stages in the ECU flash test provided in the embodiment of the present application;

[0057] Figure 6 A flow chart of the stages after the ECU flash test provided in the embodiment of the present application;

[0058] Figure 7 A schematic diagram of the structure of a flash writing test device for an electronic controller provided in an embodiment of the present application;

[0059] Figure 8An exemplary structural diagram of a flash writing test device for an electronic controller provided in an embodiment of the present application;

[0060] Fig. 9 An exemplary structural diagram of another electronic controller flash test device provided in an embodiment of the present application;

[0061] Fig.10 A schematic diagram of the structure of a flash writing test system for an electronic controller provided in an embodiment of the present application;

[0062] Fig.11 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0064] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0065] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0067] Before describing the embodiments of the present application in detail, the terms and some related technologies that may be involved in the embodiments of the present application are first described as follows:

[0068] CAN: Controller Area Network.

[0069] CANFD: CAN with Flexible Data-Rate, an improved version of CAN that can meet the demand for higher data transmission bandwidth and make up for the limitations of CAN in bandwidth and data field length.

[0070] CANoe: CAN open environment, a bus development environment that can be used for vehicle bus development and modeling, simulation, testing and development of CAN communication networks.

[0071] OBD: On-Board Diagnostics, vehicle self-diagnostic system.

[0072] DB9: A communication interface in computer hardware used to connect various devices. It can be used to connect computers and communication devices.

[0073] UDS: Unified Diagnostic Services, a diagnostic communication protocol.

[0074] DTC: Diagnostic Trouble Code, fault code.

[0075] During the process of updating the ECU program of the actual vehicle, the diagnostic instrument and the whole vehicle exchange CAN communication flashing related information according to the communication protocol followed to ensure the orderly flashing of multiple ECU programs. In recent years, with the continuous development of the vehicle industry, CAN communication flashing has generated various new testing requirements, such as vehicle pressure flashing test. The patent application with publication number CN117332778A proposes a vehicle controller file parsing method, which determines the content of the S19 format file and then flashes it into the controller chip, but the flashing test file is compatible with fewer formats and the flashing versatility is low. The patent application with publication number CN115729584A proposes an ECU flashing device and flashing method, but when implementing it, it is necessary to configure a flashing channel on the computer, and an external power supply is required to power the ECU.

[0076] The embodiments of the present application provide a flash test method, device, system, equipment and medium for an electronic controller. The technical solution of the present application includes: sending a diagnostic session control instruction to the electronic controller to make the electronic controller enter an extended diagnostic session mode; in the extended diagnostic session mode, sending a flash process configuration parameter to the electronic controller; in the extended diagnostic session mode, sending a test program to the electronic controller according to the flash process configuration parameter; in the extended diagnostic session mode, sending program verification data to the electronic controller, so that the electronic controller can perform a correlation verification on the test program according to the program verification data and obtain the correlation verification data; judging whether the electronic controller has passed the flash test according to the correlation verification data. By controlling the electronic controller to enter the extended diagnostic session mode, the interference of other communication modes can be greatly reduced and the reliability of the flash test can be improved; sending the test program and verifying it in the extended diagnostic session mode, and then judging whether the electronic controller has passed the flash test according to the correlation verification data obtained by the verification, the flash test can be implemented efficiently and accurately.

[0077] The embodiment of the present application provides a flash writing test method for an electronic controller, which relates to the field of controller testing technology. The flash writing test method for an electronic controller provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the flash writing test method for an electronic controller, etc., but is not limited to the above forms.

[0078] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0079] Reference Figure 1 , the embodiment of the present application provides a flash test method for an electronic controller, the method may include but is not limited to including S100 to S140, specifically as follows:

[0080] S100: Sending a diagnostic session control instruction to an electronic controller to enable the electronic controller to enter an extended diagnostic session mode.

[0081] By way of example, the method of this embodiment may be applied to a computer. The computer may be connected to an electronic controller via CAN communication or CADFD communication, and then send diagnostic session control instructions to the electronic controller. The electronic controller receives and responds to the diagnostic session control instructions and enters an extended diagnostic session mode.

[0082] Reference Figure 2 In order to reduce the interference of other communications in the electronic controller on the flash test, before S110, the embodiment of the present application may further include S101 and S102:

[0083] S101: Sending a fault code disabling instruction to the electronic controller to prohibit the electronic controller from setting a fault code.

[0084] It is understandable that in order to obtain accurate flash test results and reduce interference from other faults, this embodiment can send a fault code disable instruction to the electronic controller, and the electronic controller receives and responds to the fault code disable instruction, stops setting the fault code, and stops reporting the fault code.

[0085] S102: Sending a first communication control instruction to the electronic controller to shut down a non-diagnostic communication service of the electronic controller.

[0086] To further reduce interference from other communications during the flash test, this embodiment can send a first communication control instruction to the electronic controller, which receives and responds to the first communication control instruction, and then shuts down non-diagnostic communication services, retaining only communications in the extended diagnostic session mode.

[0087] Furthermore, refer to Figure 3 , the embodiment of the present application may also include:

[0088] S103: In the extended diagnostic session mode, sending a second communication control instruction to the electronic controller to enable the non-diagnostic communication service of the electronic controller.

[0089] Specifically, after turning off the non-diagnostic communication service, this embodiment sends a second communication control instruction to the electronic controller at any node in the flashing process, for example, before writing the process configuration parameters or after completing the entire flashing test process. The electronic controller receives and responds to the second communication control instruction, and then turns on the non-diagnostic communication service, that is, restores the non-diagnostic communication service.

[0090] S104: In the extended diagnostic session mode, sending a clear instruction to the electronic controller so that the electronic controller clears diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data, and the correlation verification data.

[0091] It can be understood that in order to reduce the impact of the current flash test on subsequent flash tests and improve the reliability of each flash test, the present embodiment can send a clear instruction to the electronic controller, and the electronic controller receives and responds to the clear instruction, thereby clearing the diagnostic information. The cleared diagnostic information includes at least one of the flash process configuration parameters, test programs, program verification data, and correlation verification data. The specific diagnostic information to be cleared is determined according to the node where the flash test is currently located, that is, all diagnostic information generated by the current node can be cleared.

[0092] S110: In the extended diagnostic session mode, sending flashing process configuration parameters to the electronic controller.

[0093] In order to standardize the flashing process, the present embodiment may send the flashing process configuration parameters to the electronic controller before the flashing test to improve the reliability of the flashing test.

[0094] Furthermore, before S110, the embodiment of the present application may further include:

[0095] The diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flash times and flash type of the electronic controller are configured as the flash process configuration parameters.

[0096] Taking into account that the embodiments of the present application can perform flash tests on various electronic controllers, and different electronic controllers need to match corresponding flash process configuration parameters, therefore, in order to perform a matching flash test on the electronic controller, before performing the flash test, the present embodiment can determine the flash process configuration parameters based on the flash process in the diagnostic specification of the electronic controller, and then send the flash process configuration parameters to the electronic controller to adapt the electronic controller.

[0097] S120: In the extended diagnostic session mode, sending a test program to the electronic controller according to the flashing process configuration parameters.

[0098] It is understandable that after configuring the flash process configuration parameters for the electronic controller, this embodiment can determine the file format of the test program according to the flash process configuration parameters and send the test program of the corresponding file format to the electronic controller, thereby realizing compatibility with test programs in multiple file formats.

[0099] Further, S120 may include:

[0100] In the extended diagnostic session mode, perform the following steps:

[0101] Sending a memory driver to the electronic controller according to the flashing process configuration parameters;

[0102] Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data;

[0103] After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory;

[0104] A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

[0105] Specifically, the memory driver can be used to manage and control the read and write operations of the memory, so that data can be correctly and efficiently stored and read on the internal memory of the electronic controller.

[0106] Taking into account that the memory of the electronic controller may store test programs written due to historical flash tests, that is, historical test programs, in order to avoid the influence of historical test programs on the current flash test and improve the accuracy of the current flash test, this embodiment can write a memory driver to the electronic controller and verify the memory driver. When the verification passes, an erase instruction is sent to the electronic controller. The electronic controller receives and responds to the erase instruction, and then uses the historical test program stored in the erase memory to write the current test program to the memory of the electronic controller.

[0107] As an optional implementation, in this embodiment, the memory of the electronic controller may be a Flash memory, and the memory driver may be a Flash driver, wherein the Flash memory is a non-volatile memory.

[0108] S130: In the extended diagnostic session mode, program verification data is sent to the electronic controller, so that the electronic controller performs a correlation verification on the test program according to the program verification data and obtains correlation verification data.

[0109] It can be understood that in order to determine whether the test program is correctly written into the electronic controller, this embodiment can send program verification data to the electronic controller, and the electronic controller receives and performs relevance verification on the test program based on the program verification data to obtain relevance verification data after verification.

[0110] S140: Determine whether the electronic controller passes the flashing test according to the correlation verification data.

[0111] It is understandable that in this embodiment, the correlation verification data obtained in S130 can be read, and then whether the electronic controller passes the flashing test can be determined based on the correlation verification data.

[0112] As an optional implementation, this embodiment can write the test program to the electronic controller multiple times after the first flash test passes to test the performance and accuracy of the electronic controller under frequent and multiple flashes, i.e., stress testing, and then generate a test report based on the correlation verification data.

[0113] Next, the solution of the embodiment of the present application will be introduced and explained in conjunction with specific application examples:

[0114] Specifically, the electronic controller (Electronic Control Unit, ECU) of this embodiment can be integrated into the vehicle, that is, the whole vehicle ECU, which can be referred to as ECU in this embodiment. The vehicle can be a private car, such as a sedan, SUV, MPV or pickup truck. The vehicle can also be an operating vehicle, such as a van, bus, small truck or large trailer. The vehicle can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.

[0115] Next, the flash test process of this embodiment is described:

[0116] When the ECU starts normally, the bootloader of the ECU initializes the operating environment, detects the reprogramming flag, and determines whether the APP (i.e., the test program) is valid. When there is no reprogramming requirement and the APP is valid, the bootloader loads the APP into the memory and transmits the system control instructions, and the APP runs normally. When the APP is invalid or needs to be reprogrammed, the bootloader is activated again, and the APP and related data can be relatively independent and can be reprogrammed independently. In this embodiment, the bootloader is stored in a protected memory to ensure that the ECU can always be reprogrammed, and even if there are potential errors, the reprogramming of the bootloader can be prohibited.

[0117] The ECU to be tested is taken as the target ECU. Before the flash test, the flash process configuration parameters are configured according to the diagnostic specification of the target ECU. Some example flash process configuration parameters can be referred to Table 1.

[0118] Table 1

[0119]

[0120]

[0121] The steps for configuring the flash process configuration parameters may include:

[0122] Configure the target ECU’s diagnostic request identifier, expected response identifier, and function-addressed diagnostic request identifier.

[0123] Configure the target ECU's APP.DLL file and BOOT.DLL file path.

[0124] Configure the target ECU flash file quantity and flash file path.

[0125] Configure the communication type (CAN or CANFD) for flashing the target ECU.

[0126] Configure the target ECU flash times.

[0127] Configure the target ECU flash type (single forward flash or multiple forward flash).

[0128] Specifically, the flash test method of this embodiment may include three stages:

[0129] Phase 1 (before ECU flash test): refer to Figure 4 According to the UDS (Unified Diagnostic Services) diagnostic communication protocol, 10 83 is sent to the ECU to make the ECU enter the extended diagnostic session mode, and then 85 82 is sent to prohibit setting DTC (fault code), and then 25 83 03 is sent to disable non-diagnostic communication services.

[0130] Phase 2 (ECU flash test phase): refer to Figure 5 According to the UDS diagnostic communication protocol, send 10 02 to the ECU to make the ECU enter the extended diagnostic session mode, then send 27 03 27 04 for security access to unlock the ECU. After the unlocking is successful, send 2E F1 98 to write the flash process configuration parameters, then send 34, 36, and 37 to download the Flash driver, then send 31 010202 to verify the Flash driver, then send 31 01FF 00 to erase the APP written in the history in the memory, then send 34, 36, and 37 to download the current test APP, then send 31 01 02 02 to verify the current test APP, and then send 31 01FF 01 to verify the correlation of the current test APP to obtain the correlation verification data.

[0131] Phase 3 (phase after ECU flash test): refer to Figure 6 According to the UDS diagnostic communication protocol, send 11 01 to the ECU to reset the ECU, then send 10 83 to enter the extended diagnostic session mode, then send 28 80 03 to start non-diagnostic communication, and then send 14FF FF FF to clear the diagnostic information.

[0132] After the flash test is completed, this embodiment can compare the diagnostic request identifier and the expected response identifier in the flash process configuration parameters with the correlation verification data obtained in stage 2 to determine whether the flash test has passed.

[0133] This embodiment can be applied to different vehicles. Different vehicles may be equipped with different ECUs. Therefore, the testing requirements of various ECUs can be met by configuring the flashing process configuration parameters. Moreover, this embodiment is also compatible with CAN communication flashing and CANFD communication flashing, and can also perform single flashing tests and (multiple) stress flashing tests on the ECU. The results of the single flashing test and the stress flashing test can be judged and a test report can be generated to improve the reliability of the ECU update program.

[0134] Reference Figure 7 The embodiment of the present application further provides a flash writing test device for an electronic controller, which can implement the flash writing test method of the electronic controller, and the device includes:

[0135] A session control unit, configured to send a diagnostic session control instruction to the electronic controller so as to cause the electronic controller to enter an extended diagnostic session mode;

[0136] A parameter sending unit, used for sending flashing process configuration parameters to the electronic controller in the extended diagnostic session mode;

[0137] A flash test unit, configured to send a test program to the electronic controller according to the flash process configuration parameters in the extended diagnostic session mode;

[0138] a flash verification unit, used for sending program verification data to the electronic controller in the extended diagnostic session mode, so that the electronic controller can perform a correlation verification on the test program according to the program verification data and obtain the correlation verification data;

[0139] The flashing judgment unit is used to judge whether the electronic controller passes the flashing test according to the correlation verification data.

[0140] Reference Figure 8 In some embodiments, the device further comprises:

[0141] a fault code disabling unit, used for sending a fault code disabling instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller, so as to prohibit the electronic controller from setting a fault code;

[0142] The communication service closing unit is used to send a first communication control instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller to close the non-diagnostic communication service of the electronic controller.

[0143] Reference Fig. 9 In some embodiments, the device further comprises:

[0144] a communication service activation unit, configured to send a second communication control instruction to the electronic controller in the extended diagnostic session mode to activate the non-diagnostic communication service of the electronic controller;

[0145] A diagnostic information clearing unit is used to send a clearing instruction to the electronic controller in the extended diagnostic session mode so that the electronic controller clears the diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data and the correlation verification data.

[0146] In some embodiments, the apparatus further comprises:

[0147] A parameter configuration unit is used to configure the electronic controller's diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flashes, and flash type as the flash process configuration parameters before sending the flash process configuration parameters to the electronic controller.

[0148] In some embodiments, the flash test unit includes:

[0149] The flash test subunit is used to perform the following steps in the extended diagnostic session mode:

[0150] Sending a memory driver to the electronic controller according to the flashing process configuration parameters;

[0151] Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data;

[0152] After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory;

[0153] A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

[0154] Reference Fig.10 , the embodiment of the present application also provides a flash writing test system for an electronic controller, the system comprising: a computer, a CANoe data cable, an OBD to DB9 wiring harness and an electronic controller;

[0155] Wherein, the first end of the CANoe data cable is connected to the computer, the second end of the CANoe data cable is connected to the first end of the OBD to DB9 harness, and the second end of the OBD to DB9 harness is connected to the electronic controller;

[0156] The computer is used to execute the aforementioned flash writing test method for an electronic controller.

[0157] For example, the computer of this embodiment may be a laptop computer, the electronic controller may be a vehicle ECU, and the construction process of the system of this embodiment may include:

[0158] First, connect the first end of the CANoe data cable to the USB port of the laptop, connect the OBD end of the OBD to DB9 harness to the standard OBD port of the vehicle, and then connect the DB9 end of the OBD to DB9 harness to the second end of the CANoe data cable. The system of this embodiment does not require an external power supply, and the construction method is simple.

[0159] The flash test process of the system in this embodiment includes:

[0160] According to the corresponding configuration parameters of the flashing process of different ECUs, first configure the diagnostic request identifier, expected response identifier, and functional addressing diagnostic request identifier of the ECU; then select CAN communication or CANFD communication for the ECU; then select the supported flashing file format as S19 or HEX according to the ECU download file format; before the stress test, the number of flashing times in the flashing process configuration parameters can be configured as a single flashing, and after the single test passes, the number of flashing times can be changed to multiple flashings, that is, stress testing; after the flashing test is completed, the test report can be generated through the pre-set test report button.

[0161] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0162] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the flash writing test method of the electronic controller when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0163] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0164] See also Fig.11 , Fig.11 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0165] The processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0166] The memory 1102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1102 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1102, and the processor 1101 calls and executes the flash writing test method of the electronic controller of the embodiment of this application;

[0167] Input / output interface 1103, used to implement information input and output;

[0168] The communication interface 1104 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0169] A bus 1105 that transmits information between various components of the device (e.g., the processor 1101, the memory 1102, the input / output interface 1103, and the communication interface 1104);

[0170] The processor 1101 , the memory 1102 , the input / output interface 1103 and the communication interface 1104 are connected to each other in communication within the device via the bus 1105 .

[0171] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the flash writing test method of the above-mentioned electronic controller.

[0172] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0173] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0174] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0175] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0176] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0178] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0179] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0180] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0181] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0182] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0183] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0184] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A flash test method for an electronic controller, characterized in that: The method comprises the following steps: sending a diagnostic session control instruction to the electronic controller to cause the electronic controller to enter an extended diagnostic session mode; In the extended diagnostic session mode, sending flash process configuration parameters to the electronic controller; In the extended diagnostic session mode, sending a test program to the electronic controller according to the flash process configuration parameters; In the extended diagnostic session mode, sending program verification data to the electronic controller, so that the electronic controller performs a correlation verification on the test program according to the program verification data and obtains the correlation verification data; It is determined whether the electronic controller passes the flashing test according to the correlation verification data.

2. The flash test method of an electronic controller according to claim 1, characterized in that: Before sending the flashing process configuration parameters to the electronic controller, the method further includes the following steps: sending a fault code disable instruction to the electronic controller to prohibit the electronic controller from setting a fault code; A first communication control instruction is sent to the electronic controller to shut down a non-diagnostic communication service of the electronic controller.

3. The flash writing test method of an electronic controller according to claim 2, characterized in that: The method further comprises the following steps: In the extended diagnostic session mode, sending a second communication control instruction to the electronic controller to enable the non-diagnostic communication service of the electronic controller; In the extended diagnostic session mode, a clear instruction is sent to the electronic controller to enable the electronic controller to clear diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data and the correlation verification data.

4. The flash test method of an electronic controller according to claim 1, characterized in that: Before sending the flashing process configuration parameters to the electronic controller, the method further includes the following steps: The diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flash times and flash type of the electronic controller are configured as the flash process configuration parameters.

5. The flash writing test method of an electronic controller according to claim 1, characterized in that: The sending of the test program to the electronic controller according to the flashing process configuration parameters in the extended diagnostic session mode comprises the following steps: In the extended diagnostic session mode, perform the following steps: Sending a memory driver to the electronic controller according to the flashing process configuration parameters; Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data; After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory; A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

6. A flash writing test device for an electronic controller, characterized in that: The device comprises: A session control unit, configured to send a diagnostic session control instruction to the electronic controller so as to cause the electronic controller to enter an extended diagnostic session mode; A parameter sending unit, used for sending flashing process configuration parameters to the electronic controller in the extended diagnostic session mode; A flash test unit, configured to send a test program to the electronic controller according to the flash process configuration parameters in the extended diagnostic session mode; a flash verification unit, used for sending program verification data to the electronic controller in the extended diagnostic session mode, so that the electronic controller can perform a correlation verification on the test program according to the program verification data and obtain the correlation verification data; The flashing judgment unit is used to judge whether the electronic controller passes the flashing test according to the correlation verification data.

7. The flash writing test device for an electronic controller according to claim 6, characterized in that: The device also includes: a fault code disabling unit, used for sending a fault code disabling instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller, so as to prohibit the electronic controller from setting a fault code; The communication service closing unit is used to send a first communication control instruction to the electronic controller before sending the flash process configuration parameters to the electronic controller to close the non-diagnostic communication service of the electronic controller.

8. The flash writing test device for an electronic controller according to claim 7, characterized in that: The device also includes: a communication service activation unit, configured to send a second communication control instruction to the electronic controller in the extended diagnostic session mode to activate the non-diagnostic communication service of the electronic controller; A diagnostic information clearing unit is used to send a clearing instruction to the electronic controller in the extended diagnostic session mode so that the electronic controller clears the diagnostic information; wherein the diagnostic information includes at least one of the flash process configuration parameters, the test program, the program verification data and the correlation verification data.

9. The flash writing test device for an electronic controller according to claim 6, characterized in that: The device also includes: A parameter configuration unit is used to configure the electronic controller's diagnostic request identifier, expected response identifier, functional addressing diagnostic request identifier, communication type, flash file format, flash file path, number of flash files, number of flashes, and flash type as the flash process configuration parameters before sending the flash process configuration parameters to the electronic controller.

10. The flash writing test device for an electronic controller according to claim 6, characterized in that: The flash writing test unit comprises: The flash test subunit is used to perform the following steps in the extended diagnostic session mode: Sending a memory driver to the electronic controller according to the flashing process configuration parameters; Sending drive verification data to the electronic controller, so that the electronic controller verifies the memory driver program according to the drive verification data; After the memory driving program passes the verification, an erase instruction is sent to the electronic controller so that the electronic controller erases the historical test program stored in the memory; A current test program is sent to the electronic controller so that the electronic controller stores the current test program in the memory.

11. A flash writing test system for an electronic controller, characterized in that: The system includes: a computer, a CANoe data cable, an OBD to DB9 wiring harness and an electronic controller; Wherein, the first end of the CANoe data cable is connected to the computer, the second end of the CANoe data cable is connected to the first end of the OBD to DB9 harness, and the second end of the OBD to DB9 harness is connected to the electronic controller; The computer is used to execute the flash test method of an electronic controller as described in any one of claims 1 to 5.

12. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements a flash writing test method for an electronic controller as claimed in any one of claims 1 to 5 when executing the computer program.

13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a flash test method for an electronic controller as claimed in any one of claims 1 to 5 is implemented.