CN110515373B - ECU data flashing method and device - Google Patents

ECU data flashing method and device Download PDF

Info

Publication number
CN110515373B
CN110515373B CN201910931380.3A CN201910931380A CN110515373B CN 110515373 B CN110515373 B CN 110515373B CN 201910931380 A CN201910931380 A CN 201910931380A CN 110515373 B CN110515373 B CN 110515373B
Authority
CN
China
Prior art keywords
ecu
flashed
bus
upper computer
flashing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910931380.3A
Other languages
Chinese (zh)
Other versions
CN110515373A (en
Inventor
王伟萧
马光伟
武志鹏
张良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weichai Power Co Ltd
Original Assignee
Weichai Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN201910931380.3A priority Critical patent/CN110515373B/en
Publication of CN110515373A publication Critical patent/CN110515373A/en
Application granted granted Critical
Publication of CN110515373B publication Critical patent/CN110515373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for flashing ECU data, comprising the following steps: under the mode of multithread flashing, distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed; the upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU; calling each bus between the upper computer and the ECU to be refreshed in parallel, and executing data refreshing operation on the region to be refreshed distributed by the buses; and returning to execute to allocate the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are allocated to the bus between the upper computer and the to-be-brushed ECU.

Description

ECU data flashing method and device
Technical Field
The invention relates to the technical field of automobiles, in particular to a method and a device for flashing ECU (electronic control unit) data.
Background
An Electronic Control Unit (ECU), also called a vehicle computer, is used to Control the behavior logic of the vehicle. With the continuous development of science and technology, in order to enable automobiles to be more electronic and automatic, a plurality of ECUs are usually carried on one automobile; for example, an electronic control automatic transmission, an active suspension system, an airbag system and the like on a vehicle are all provided with respective ECUs; and because the data volume of the ECU is complex and huge, partition management is also carried out in one ECU according to corresponding service logic.
Before the vehicle is controlled, data flashing needs to be carried out on the ECU, namely, an external data flashing tool sends data information to the ECU through a communication network (bus) to complete data writing, so that the ECU data management and updating are realized. At the present stage, the way of completing the data flashing of the ECU is as follows: and a method for sequentially flashing each ECU and each partition of each ECU by adopting a single bus. The method is long in time consumption and low in writing efficiency.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a method and an apparatus for data flashing of an ECU, which can be applied to data flashing of an engine off line of a whole plant and test flashing in a development process of the ECU and a supporting service, and an ECU supporting multi-bus parallel flashing is suitable for the scheme provided by the embodiment of the present invention.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiments of the present invention provides a method for flashing ECU data, including:
under the mode of multithread flashing, distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed; the upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU;
calling each bus between the upper computer and the ECU to be refreshed in parallel, and executing data refreshing operation on the region to be refreshed distributed by the buses; and returning to execute to allocate the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are allocated to the bus between the upper computer and the to-be-brushed ECU.
Optionally, the partition of the storage area of the ECU to be flashed includes: a program area, a calibration area and an EOL area; wherein the content of the first and second substances,
the program area is divided into a plurality of program subareas, and the calibration area is divided into a plurality of calibration subareas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written.
Optionally, for each spare bus distribution between host computer and the ECU of treating to write by brush treats the district of writing by brush, include:
and allocating the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of allocating the program subarea first, allocating the calibration subarea after the program subarea is allocated and allocating the EOL subarea after the calibration subarea is allocated.
Optionally, the method further includes:
judging whether the ECU to be flashed supports multiple bus parallel communication;
if the ECU to be flashed is judged not to support the parallel communication of various buses, the upper computer is driven to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and data flashing operation is performed on the ECU to be flashed;
if the ECU to be flashed supports the parallel communication of various buses, executing the execution of the upper computer in a multithreading flashing mode, and distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed.
Optionally, the driving the upper computer calls a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performs data flashing operation on the ECU to be flashed, including:
and driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
A second aspect of the present invention provides an apparatus for data flashing of an ECU, comprising:
the distribution unit is used for distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed in a multithreading flashing mode; the upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU;
the execution unit is used for calling each bus between the upper computer and the ECU to be flashed in parallel and executing data flashing operation on the area to be flashed distributed by the buses; the distribution unit continues to distribute the areas to be flashed for each idle bus between the upper computer and the ECU to be flashed after the flashing of the area to be flashed distributed by one bus is finished until the areas to be flashed of the ECU to be flashed are distributed to the bus between the upper computer and the ECU to be flashed.
Optionally, the partition of the storage area of the ECU to be flashed includes: a program area, a calibration area and an item end EOL area; wherein the content of the first and second substances,
the program area is divided into a plurality of program subareas, and the calibration area is divided into a plurality of calibration subareas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written.
Optionally, the allocation unit includes:
and the distribution subunit is used for distributing the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of distributing the program subarea firstly, distributing the calibration subarea after the program subarea is distributed and distributing the EOL subarea after the calibration subarea is distributed.
Optionally, the method further includes:
the judging unit is used for judging whether the ECU to be subjected to flash supports various bus parallel communications;
the driving unit is used for driving the upper computer to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode if the judgment unit judges that the ECU to be flashed does not support multiple types of bus parallel communication, and executing data flashing operation on the ECU to be flashed;
if the judgment unit judges that the ECU to be flashed supports multiple types of bus parallel communication, the allocation unit allocates the area to be flashed to each idle bus between the upper computer and the ECU to be flashed when the upper computer is in a multithreading flashing mode.
Optionally, the driving unit includes:
and the driving subunit is used for driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and executing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
Compared with the prior art, the invention has the following advantages:
under the mode of multithread flashing, distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed; the upper computer is in parallel communication with the ECU to be refreshed through a plurality of buses, a storage area partition of the ECU to be refreshed is divided into a plurality of areas to be refreshed, and an idle bus refers to a bus which is not subjected to data refreshing operation in the bus through which the upper computer is in communication with the ECU. Calling each bus between the upper computer and the ECU to be refreshed in parallel, and executing data refreshing operation on the region to be refreshed distributed by the buses; and returning to execute to allocate the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are allocated to the bus between the upper computer and the to-be-brushed ECU. Therefore, in the method provided by the embodiment of the invention, the multithreading flash mode is realized by utilizing the plurality of buses to be in communication connection with the ECU to be written, and the storage area to be written into the ECU is divided into a plurality of areas to be flashed according to actual requirements; the data flashing is carried out on the area to be flashed by adopting a multi-thread flashing mode, the data flashing speed of the ECU to be flashed is improved under the condition of multiple pipelines, and the flashing efficiency is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method for data flashing of an ECU according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for an alternative ECU data flashing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for flashing ECU data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an ECU data flashing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, the embodiment of the invention discloses an ECU data flashing method which can be applied to data flashing of off-line engines of a whole vehicle factory and test flashing in the development process of ECUs and supporting services.
The method specifically comprises the following steps:
s101, distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed in a multithreading flashing mode of the upper computer.
The upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; and the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU.
In the ECU data flashing process (also called ECU data filling), an external data flashing tool sends data information to the ECU through a communication network to complete data writing so as to realize the management and the updating of ECU data. The external data flashing tool can be an upper computer in the step, and the concrete expression of the communication network is a bus; such as CAN line, K line, LIN line, DOIP, etc.
In the method provided by the embodiment of the invention, the upper computer is in parallel communication with the ECU to be refreshed through a plurality of buses, namely the upper computer is in parallel communication connection with the ECU to be refreshed through a plurality of types of buses or a plurality of buses of the same type, so that the upper computer can input or update data of threads to the ECU to be refreshed through the plurality of buses to complete the data refreshing operation of the ECU.
It should be noted that, in the multi-thread flash mode, the ECU data flash mode is multi-managed, that is, each bus is allocated with a flash area, and the flash area is a plurality of to-be-flashed areas obtained by dividing the storage area partition of the to-be-flashed ECU.
Optionally, in a method provided by another embodiment of the present invention, partitioning a storage area of an ECU to be flashed may include: program zone, calibration zone, and End of project zone (EOL).
It should be further noted that the program area is divided into a plurality of program sub-areas, and the calibration area is divided into a plurality of calibration sub-areas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written.
In the manner of dividing each program subregion, each calibration subregion, and each EOL subregion, the program subregion, the calibration subregion, and the EOL subregion may be divided according to actual job requirements or logical classifications.
Specifically, as shown in table 1 below, the program area, the calibration area, and the EOL area are divided into a plurality of sub-areas, respectively.
TABLE 1
Figure BDA0002220411120000061
In table 1, three partitions of the storage area of the ECU are to be written: the program area, the calibration area and the EOL area are divided into a program sub-area 1 to a program sub-area n, a calibration sub-area 1 to a calibration sub-area n and an EOL sub-area 1 to an EOL sub-area n respectively; and each arbitrary sub-area is an area to be flashed.
Optionally, in the method provided by another embodiment of the present invention, the manner of allocating the area to be flushed to each idle bus between the upper computer and the ECU to be flushed may be:
and allocating the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of allocating the program subarea first, allocating the calibration subarea after the program subarea is allocated and allocating the EOL subarea after the calibration subarea is allocated.
It should be noted that whatever way of allocating the flash area is applicable to the ECU data flash in the multi-thread flash mode provided by the present invention; and the specific allocation mode needs to analyze the service logic of the ECU to be flashed so as to obtain the allocation mode suitable for the EUC to be flashed.
S102, calling each bus between the upper computer and the ECU to be flashed in parallel, and performing data flashing operation on the area to be flashed distributed by the buses.
And returning to execute to allocate the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are allocated to the bus between the upper computer and the to-be-brushed ECU.
And the upper computer is in a multithreading flash mode, each bus can be called in parallel, and the flash area to be flashed is executed with data flash by using each bus. As mentioned previously, the bus type may be a CAN line, a K line, a LIN line, a DOIP, or the like. It should be further noted that, during the actual ECU data flashing process, a plurality of buses of the same type may be used, or buses of different types may be used. For example, in terms of service function, the CAN line is the most common and compatible bus type, and CAN support the data of multiple partitions of multiple ECUs, so that in an actual multi-thread flash mode, multiple CAN lines CAN be arranged according to actual needs. Also for example, LIN lines are low-speed buses, mainly used for lighting devices; therefore, if data is refreshed on the ECU for controlling the lighting equipment, a multi-thread refreshing mode can be performed by adopting a plurality of LIN lines; on the contrary, when data is refreshed on other ECUs such as an ECU controlling an airbag system, the LIN line may not be used, and the LIN line may not be selected.
In the method provided by the embodiment of the invention, the ECU to be flashed may be N number of areas to be flashed on the partition, for example, 2000 areas to be flashed. And if the multithreading flash mode is adopted by 4 buses, each bus needs to perform data flash on a plurality of areas to be flashed. Therefore, after the flashing of the area to be flashed distributed by any bus is finished, returning to execute the step of distributing the area to be flashed to each idle bus between the upper computer and the ECU to be flashed until a plurality of areas to be flashed of the ECU to be flashed are distributed to the buses between the upper computer and the ECU to be flashed; namely, all the areas to be flashed finish data flashing through bus communication.
In the method for flashing the ECU data provided by the embodiment of the invention, the upper computer is in a multithreading flashing mode, and a region to be flashed is allocated to each idle bus between the upper computer and the ECU to be flashed. The multithreading mode means that the upper computer is in parallel communication with the ECU to be refreshed through a plurality of buses, and the region to be refreshed is a storage region partition of the ECU to be refreshed and is further divided into a plurality of sub-regions. Therefore, the system can call each bus and execute the data flashing operation on the area to be flashed which is allocated by the bus. Therefore, in the method provided by the embodiment of the invention, on one hand, a multithreading flash mode is realized by utilizing various types of buses to be in communication connection with the ECU to be written; on the other hand, the storage area partition of the ECU to be flashed is further divided into a plurality of sub-areas according to actual requirements, so that the data flashing is carried out on the plurality of areas to be flashed by adopting a multi-thread flashing mode, the data flashing speed of the ECU to be flashed is improved under multiple conditions, and the flashing efficiency is further improved.
Another embodiment of the present invention further discloses a method for flashing ECU data, as shown in fig. 2, including:
s201, judging whether the ECU to be flashed supports multiple kinds of bus parallel communication.
In the method provided by the embodiment of the invention, before the data flash is performed on the ECU to be flashed, whether the ECU to be flashed supports multiple types of bus parallel communication needs to be judged, and if so, the step S202 is executed; if not, go to step S204.
S202, if the ECU to be flashed supports the parallel communication of various buses, executing the execution of the computer in a multithread flashing mode, and distributing a region to be flashed for each idle bus between the computer and the ECU to be flashed.
S203, calling each bus between the upper computer and the ECU to be flashed in parallel, and executing data flashing operation on the area to be flashed distributed by the buses.
The specific execution content of step S202 and step S203 may refer to the content of step S101 and step S102 in the embodiment of fig. 1, and is not described herein again.
S204, if the ECU to be flashed does not support the parallel communication of various buses, driving the upper computer to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performing data flashing operation on the ECU to be flashed.
In the method provided by the embodiment of the invention, if the ECU to be flashed does not support the parallel communication of multiple buses, the ECU to be flashed can only adopt a single-threaded data flashing mode. Therefore, on the premise that the ECU to be flashed does not support the parallel communication of various buses, the upper computer is driven to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and data flashing operation is performed on the ECU to be flashed.
Optionally, in the method provided by another embodiment of the present invention, a manner in which an upper computer invokes a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performs a data flashing operation on the ECU to be flashed may include:
and driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
It should be noted that, in the single-thread flush mode, one bus may not complete data flushing to the program area, the calibration area, and the EOL area, because there may be special data that requires a special bus type for data flushing. Therefore, if the special data is encountered, a targeted bus type needs to be replaced to complete the special data writing operation. Of course, there are also situations where one bus can complete the data flash to the program, calibration, and EOL regions. However, in the multi-thread flash mode, the overall flash speed of the single-thread flash mode is not high, and the flash efficiency is low.
Therefore, under the condition that the ECU to be flashed supports multiple kinds of bus parallel communication, the data flashing is carried out on the area to be flashed of the ECU to be flashed by adopting the multi-thread flashing mode, under the condition of multiple pipelines, the data flashing speed of the ECU to be flashed is improved, and the flashing efficiency is further improved.
In correspondence with fig. 2, another embodiment of the present invention provides a flow chart of ECU data flashing, and specifically refer to fig. 3. FIG. 3 is described below:
in step S201, it is first determined whether the ECU, i.e., the ECU to be flashed, supports multiple types of bus parallel communication. And under the condition that the ECU supports multi-bus communication flash, partitioning a storage area of the ECU, and starting a multi-thread flash program mode.
Further, a region to be flashed is randomly allocated to the N buses, after the region to be flashed is allocated, a conventional diagnosis mode skip and a safe access flow are performed, and after the two conventional steps are successfully completed, data flashing can be performed on the allocated region to be flashed.
And step S203, completing the flash of the distributed area to be flashed, if the ECU to be flashed is judged to be still in the area to be flashed, returning to execute the allocation of the area to be flashed to each idle bus between the upper computer and the ECU to be flashed until the plurality of areas to be flashed of the ECU to be flashed are all allocated to the buses between the upper computer and the ECU to be flashed.
And after all the data in the area to be flashed are flashed, resetting the ECU, and completing the whole multithreading data flashing mode.
If the judgment result is that the to-be-flashed ECU does not support the parallel communication of the plurality of buses, performing data flashing on the to-be-flashed ECU in a single-thread flashing mode consistent with the step S204. The specific single-threaded flash mode synchronization step S204 will not be described herein.
Corresponding to fig. 1, an embodiment of the present invention further provides an ECU data flashing apparatus, where a specific apparatus structure diagram is shown in fig. 4, and the apparatus structure diagram includes:
the allocation unit 401 is configured to allocate a region to be flashed for each idle bus between the upper computer and the ECU to be flashed in the multi-thread flashing mode of the upper computer. The upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU.
The execution unit 402 is used for calling each bus between the upper computer and the ECU to be refreshed in parallel and executing data refreshing operation on the area to be refreshed distributed by the bus; the distribution unit continues to distribute the areas to be flashed for each idle bus between the upper computer and the ECU to be flashed after the flashing of the area to be flashed distributed by one bus is finished until the areas to be flashed of the ECU to be flashed are distributed to the bus between the upper computer and the ECU to be flashed.
In the data flashing method for the ECU provided by the embodiment of the present invention, the allocation unit 401 allocates the area to be flashed to each bus between the upper computer and the ECU to be flashed in the mode that the upper computer performs parallel communication with the ECU to be written by using a plurality of buses to complete multithread flashing. The execution unit 402 is configured to invoke each bus in parallel, and complete a data flashing operation performed in the to-be-flashed area allocated by the bus; and after the brushing of the to-be-brushed areas distributed by the buses is finished, returning to execute to distribute the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are all distributed to the buses between the upper computer and the to-be-brushed ECU. Therefore, the multi-thread flashing mode is adopted, and the multi-management effect is achieved when the ECU to be flashed carries out data flashing, so that the data flashing speed of the ECU to be flashed is improved, and the flashing efficiency is improved.
In the embodiment of the present invention, the specific execution processes of the allocation unit 401 and the execution unit 402 may refer to the contents in the method embodiment corresponding to fig. 1, and are not described herein again.
Optionally, in another embodiment of the present invention, the partition of the storage area of the ECU to be flashed includes: a program zone, a calibration zone and an item termination EOL zone.
The program area is divided into a plurality of program subareas, and the calibration area is divided into a plurality of calibration subareas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written.
Optionally, in another embodiment of the present invention, the allocating unit 401 includes:
and the distribution subunit is used for distributing the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of distributing the program subarea firstly, distributing the calibration subarea after the program subarea is distributed and distributing the EOL subarea after the calibration subarea is distributed.
In the embodiment of the present invention, the specific execution process of the allocation subunit may refer to the content in the method embodiment corresponding to fig. 1, and is not described herein again.
Another embodiment of the present invention further provides an ECU data flashing apparatus, as shown in fig. 3, in addition to the distribution unit 401 and the execution unit 402, the ECU data flashing apparatus further includes:
a judging unit 403, configured to judge whether the ECU to be flashed supports multiple types of bus parallel communication.
The driving unit 404 is configured to, if it is determined that the ECU to be flashed does not support multiple types of bus parallel communication, drive the upper computer to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and perform data flashing operation on the ECU to be flashed.
If the judgment unit judges that the ECU to be flashed supports multiple types of bus parallel communication, the allocation unit allocates the area to be flashed to each idle bus between the upper computer and the ECU to be flashed when the upper computer is in a multithreading flashing mode.
In the embodiment of the present invention, the specific implementation processes of the determining unit 403 and the driving unit 404 may refer to the contents in the method embodiment corresponding to fig. 2, which are not described herein again.
Optionally, in another embodiment of the present invention, the driving unit 404 includes:
and the driving subunit is used for driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and executing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
In the embodiment of the present invention, the specific execution process of the allocation subunit may refer to the content in the method embodiment corresponding to fig. 2, and is not described herein again.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method of ECU data flashing, comprising:
under the mode of multithread flashing, distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed; the upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the memory area partition of the ECU to be flashed comprises: the system comprises a program area, a calibration area and an item end EOL area, wherein the program area is divided into a plurality of program subareas, and the calibration area is divided into a plurality of calibration subareas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU;
calling each idle bus between the upper computer and the ECU to be refreshed in parallel, and executing data refreshing operation on the area to be refreshed distributed by the idle bus; and returning to execute to allocate the to-be-brushed areas to each idle bus between the upper computer and the to-be-brushed ECU until the to-be-brushed areas of the to-be-brushed ECU are allocated to the bus between the upper computer and the to-be-brushed ECU.
2. The method according to claim 1, wherein the allocating a region to be flashed to each free bus between the host computer and the ECU to be flashed comprises:
and allocating the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of allocating the program subarea first, allocating the calibration subarea after the program subarea is allocated and allocating the EOL subarea after the calibration subarea is allocated.
3. The method of claim 1, further comprising:
judging whether the ECU to be flashed supports multiple bus parallel communication;
if the ECU to be flashed is judged not to support the parallel communication of various buses, the upper computer is driven to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and data flashing operation is performed on the ECU to be flashed;
if the ECU to be flashed supports the parallel communication of various buses, executing the execution of the upper computer in a multithreading flashing mode, and distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed.
4. The method according to claim 3, wherein the driving the upper computer to invoke a bus between the upper computer and the ECU to be flashed in a single-threaded flashing mode to perform a data flashing operation on the ECU to be flashed includes:
and driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and performing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
5. An apparatus for ECU data flashing, comprising:
the distribution unit is used for distributing a region to be flashed for each idle bus between the upper computer and the ECU to be flashed in a multithreading flashing mode; the upper computer is in parallel communication with the ECU to be flashed through a plurality of buses; the storage area partition of the ECU to be flashed is divided into a plurality of areas to be flashed; the memory area partition of the ECU to be flashed comprises: the system comprises a program area, a calibration area and an item end EOL area, wherein the program area is divided into a plurality of program subareas, and the calibration area is divided into a plurality of calibration subareas; the EOL zone is divided into a plurality of EOL sub-zones; each program subarea, each calibration subarea and each EOL subarea are the areas to be written; the idle bus is a bus which is not subjected to data flashing operation in a bus for communicating the upper computer and the ECU;
the execution unit is used for calling each idle bus between the upper computer and the ECU to be flashed in parallel and executing data flashing operation on the area to be flashed distributed by the idle bus;
the distribution unit continues to distribute the areas to be flashed for each idle bus between the upper computer and the ECU to be flashed after the flashing of the area to be flashed distributed by one bus is finished until the areas to be flashed of the ECU to be flashed are distributed to the bus between the upper computer and the ECU to be flashed.
6. The apparatus of claim 5, wherein the allocation unit comprises:
and the distribution subunit is used for distributing the area to be flashed to each idle bus between the upper computer and the ECU to be flashed according to the sequence of distributing the program subarea firstly, distributing the calibration subarea after the program subarea is distributed and distributing the EOL subarea after the calibration subarea is distributed.
7. The apparatus of claim 5, further comprising:
the judging unit is used for judging whether the ECU to be subjected to flash supports various bus parallel communications;
the driving unit is used for driving the upper computer to call one bus between the upper computer and the ECU to be flashed in a single-thread flashing mode if the judgment unit judges that the ECU to be flashed does not support multiple types of bus parallel communication, and executing data flashing operation on the ECU to be flashed;
if the judgment unit judges that the ECU to be flashed supports multiple types of bus parallel communication, the allocation unit allocates the area to be flashed to each idle bus between the upper computer and the ECU to be flashed when the upper computer is in a multithreading flashing mode.
8. The apparatus of claim 7, wherein the drive unit comprises:
and the driving subunit is used for driving the upper computer to call a bus between the upper computer and the ECU to be flashed in a single-thread flashing mode, and executing data flashing operation on the ECU to be flashed according to the sequence of firstly flashing a program area, then flashing a calibration area and finally flashing an EOL area.
CN201910931380.3A 2019-09-29 2019-09-29 ECU data flashing method and device Active CN110515373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931380.3A CN110515373B (en) 2019-09-29 2019-09-29 ECU data flashing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931380.3A CN110515373B (en) 2019-09-29 2019-09-29 ECU data flashing method and device

Publications (2)

Publication Number Publication Date
CN110515373A CN110515373A (en) 2019-11-29
CN110515373B true CN110515373B (en) 2020-12-22

Family

ID=68632902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931380.3A Active CN110515373B (en) 2019-09-29 2019-09-29 ECU data flashing method and device

Country Status (1)

Country Link
CN (1) CN110515373B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698641B (en) * 2020-12-25 2022-10-28 潍柴动力股份有限公司 ECU data transmission method and device, vehicle-mounted control terminal and storage medium
CN114326674A (en) * 2021-12-29 2022-04-12 深圳市元征科技股份有限公司 ECU (electronic control Unit) flashing method and device, electronic equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741705A (en) * 2008-11-27 2010-06-16 华为技术有限公司 Method and device for parallel processing of routing update messages
JP5549235B2 (en) * 2010-01-20 2014-07-16 株式会社デンソー Driving assistance device
CN202453683U (en) * 2011-12-21 2012-09-26 浙江吉利汽车研究院有限公司 Automatic multi-thread off-line refreshing tool for ECU
CN104133445B (en) * 2014-07-25 2017-01-18 中国科学院等离子体物理研究所 Real-time state monitoring and data sharing method for neutral beam injector
KR101603547B1 (en) * 2014-11-06 2016-03-15 현대자동차주식회사 Calibration Memory Controlling Method and Apparatus for Vehicle Controller
CN106502749B (en) * 2016-10-27 2019-08-13 武汉奥泽电子有限公司 The method and system of program are write with a brush dipped in Chinese ink based on CAN bus multimachine
CN109828935B (en) * 2019-01-17 2021-01-05 重庆菲斯塔新能源汽车科技有限公司 Parallel flash method based on CAN FD bus

Also Published As

Publication number Publication date
CN110515373A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110515373B (en) ECU data flashing method and device
CN103246610B (en) Dynamic storage management method based on the embedded system of single type memory
CN106557427B (en) Memory management method and device for shared memory database
CN103257898A (en) Resource allocation method and system in embedded system
CN115048216A (en) Resource management scheduling method, device and equipment for artificial intelligence cluster
CN107239330A (en) The method for allocating tasks and its device of automobile open system framework operating system
US8806497B2 (en) System and method for altering the work definitions in an iterative parallel opportunistic work stealing scheduler
CN110990034A (en) ECU upgrading method and system, electronic equipment and storage medium
CN111314401B (en) Resource allocation method, device, system, terminal and computer readable storage medium
CN110069336A (en) Memory source distribution method, distributor, chip and storage device
CN104077266B (en) Many kernel operating system implementation methods and realize apparatus and system
CN101631083A (en) Device take-over method, device take-over equipment and double-control system
CN100459769C (en) Full distributive resource managing method and system
CN109660393B (en) Method and device for updating specification of cloud host
CN114780230A (en) Memory allocation method, memory deployment method and related device
CN102214147A (en) Method and device for detecting transborder memory access
CN112148481B (en) Method, system, equipment and medium for executing simulation test task
WO2024078634A1 (en) Service management method, system and apparatus, and electronic device and storage medium
CN110990318B (en) PCIe bus address expansion method, device, equipment and medium
CN104657218A (en) Multi-operation system operation method and device and terminal
CN107818014B (en) Memory allocation method and multi-core concurrent memory allocation method
CN111831406A (en) Multi-task scheduling method and device based on vehicle-mounted embedded system
CN216599654U (en) System for realizing address distribution to slave equipment through RS-485 bus
CN105512091A (en) Memory allocation method and device
CN110162483A (en) Static memory scrap cleaning method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant