[go: up one dir, main page]

CN108334282B - Method and device for downloading program files of automobile electronic control unit - Google Patents

Method and device for downloading program files of automobile electronic control unit Download PDF

Info

Publication number
CN108334282B
CN108334282B CN201711466122.XA CN201711466122A CN108334282B CN 108334282 B CN108334282 B CN 108334282B CN 201711466122 A CN201711466122 A CN 201711466122A CN 108334282 B CN108334282 B CN 108334282B
Authority
CN
China
Prior art keywords
program file
electronic control
control unit
vehicle
downloading
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
CN201711466122.XA
Other languages
Chinese (zh)
Other versions
CN108334282A (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.)
Ningde Shidai Runzhi Software Technology Co ltd
Original Assignee
Contemporary Amperex Technology 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 Contemporary Amperex Technology Co Ltd filed Critical Contemporary Amperex Technology Co Ltd
Priority to CN201711466122.XA priority Critical patent/CN108334282B/en
Publication of CN108334282A publication Critical patent/CN108334282A/en
Application granted granted Critical
Publication of CN108334282B publication Critical patent/CN108334282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种汽车电子控制单元的程序文件下载方法和装置,涉及电子电气领域。该汽车电子控制单元的程序文件下载方法,包括:获取车载程序文件与汽车电子控制单元的闪存中的单位存储块的映射关系;下载车载程序文件至汽车电子控制单元的闪存中的单位存储块;获取中断写入单位存储块,中断写入单位存储块为车载程序文件下载过程中断时正被写入的单位存储块;基于中断写入单位存储块以及映射关系,得到车载程序文件中需要继续下载的数据部分;将车载程序文件中需要继续下载的数据部分下载至汽车电子控制单元的闪存中的单位存储块。采用本发明实施例中的技术方案能够减少出现中断情况下的车载程序文件下载所花费的时间。

Figure 201711466122

The invention provides a method and device for downloading program files of an electronic control unit of an automobile, and relates to the field of electronics and electricity. The method for downloading a program file of an automotive electronic control unit includes: obtaining the mapping relationship between the vehicle-mounted program file and the unit storage block in the flash memory of the vehicle electronic control unit; downloading the vehicle-mounted program file to the unit storage block in the flash memory of the vehicle electronic control unit; Obtain the interrupt write unit memory block, which is the unit memory block that is being written when the on-board program file download process is interrupted; based on the interrupt write unit memory block and the mapping relationship, it is obtained that the on-board program file needs to continue to be downloaded Download the data part of the vehicle program file that needs to be downloaded to the unit storage block in the flash memory of the vehicle electronic control unit. Using the technical solutions in the embodiments of the present invention can reduce the time spent in downloading the in-vehicle program files in the case of interruption.

Figure 201711466122

Description

Method and device for downloading program file of automobile electronic control unit
Technical Field
The invention relates to the field of electronics and electrics, in particular to a method and a device for downloading a program file of an automobile electronic control unit.
Background
Electronic Control Units (ECUs) are widely used in vehicles. The electronic control unit can carry out operation by combining with a program stored in the electronic control unit according to the collected parameter information. And converting the operation result into a control signal, thereby realizing the overall control of the electronic control unit on the vehicle.
In order to meet various requirements of the user on the vehicle control function, the electronic control unit needs to download various programs. In the process of downloading the program file, abnormal situations such as power failure or message loss may occur. If the abnormal condition occurs, the downloading of the program file is affected, and the downloaded program file may be incomplete or wrong, so that the program file cannot run, and the function generated by the running of the program file cannot be realized. The entire program file needs to be downloaded again. Such as: if the size of the program file is 1MB, a Controller Area Network (CAN) bus is used for transmitting messages, and it is set that a frame of message is received every 10 milliseconds, and it takes about 50 to 60 minutes to completely download the program file with the size of 1 MB. It takes a long time to re-download the entire program file. Moreover, if the abnormal condition occurs many times, the whole program file needs to be downloaded again many times. The time taken for the program file download is extended.
Disclosure of Invention
The embodiment of the invention provides a method and a device for downloading a program file of an automobile electronic control unit, which can reduce the time spent on downloading a vehicle-mounted program file under the condition of interruption.
In a first aspect, an embodiment of the present invention provides a method for downloading a program file of an automotive electronic control unit, including: acquiring a mapping relation between a vehicle-mounted program file and a unit storage block in a flash memory of an automobile electronic control unit; downloading the vehicle-mounted program file to a unit storage block in a flash memory of an automobile electronic control unit; acquiring an interruption write-in unit storage block, wherein the interruption write-in unit storage block is a unit storage block which is being written in when the downloading process of the vehicle-mounted program file is interrupted; obtaining a data part which needs to be continuously downloaded in the vehicle-mounted program file based on the interrupt writing unit storage block and the mapping relation; and downloading the data part which needs to be continuously downloaded in the vehicle-mounted program file to a unit storage block in a flash memory of the automobile electronic control unit.
In a second aspect, an embodiment of the present invention provides a program file downloading device for an automotive electronic control unit, including: the mapping acquisition module is configured to acquire the mapping relation between the vehicle-mounted program file and a unit storage block in a flash memory of the automobile electronic control unit; the download module is configured to download the vehicle-mounted program file to a unit storage block in a flash memory of the automobile electronic control unit; the interrupt acquisition module is configured to acquire an interrupt writing unit storage block, and the interrupt writing unit storage block is a unit storage block which is being written when the downloading process of the vehicle-mounted program file is interrupted; the searching module is configured to obtain a data part which needs to be continuously downloaded in the vehicle-mounted program file based on the interrupt writing unit storage block and the mapping relation; and the downloading module is also configured to download the data part needing to be continuously downloaded in the vehicle-mounted program file to a unit storage block in a flash memory of the automobile electronic control unit.
The embodiment of the invention provides a method and a device for downloading a program file of an automobile electronic control unit. The method can acquire the interruption write unit storage block under the condition that the vehicle-mounted program file is downloaded to the automobile electronic control unit and download the data part which needs to be continuously downloaded due to the interruption in the vehicle-mounted program file according to the mapping relation between the vehicle-mounted program file and the unit storage block in the internal memory of the automobile electronic control unit. In the embodiment of the invention, the data part of the vehicle-mounted program file which is not effectively downloaded to the vehicle electronic control unit in the downloading process of the vehicle-mounted program file can be downloaded to the vehicle electronic control unit again. Therefore, the interruption of downloading the vehicle-mounted program file is avoided, and the whole downloading and flashing process of the vehicle-mounted program file is carried out. Thereby reducing the time taken for downloading the vehicle-mounted program file in the case of interruption.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a program file downloading method of an automotive ecu according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating the division of a unit memory block in a flash memory of an automotive ecu according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for downloading program files from an ECU of a vehicle according to another embodiment of the present invention;
FIG. 4 is a flowchart of a method for downloading program files from an ECU of a vehicle according to another embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for downloading program files from an ECU of a vehicle according to still another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a program file downloading device of an automotive ecu according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a program file downloading device of an automotive ECU according to another embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a program file downloading device of an automotive ECU according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a program file downloading device of an automotive electronic control unit according to another embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is in no way limited to any specific configuration and algorithm set forth below, but rather covers any modification, replacement or improvement of elements, components or algorithms without departing from the spirit of the invention. In the drawings and the following description, well-known structures and techniques are not shown in order to avoid unnecessarily obscuring the present invention.
The embodiment of the invention provides a program file downloading method of an automobile electronic control unit. In one example, an Electronic Control Unit (ECU) applicable to an automobile downloads an in-vehicle program file from a remote server through an in-vehicle terminal. Or, the method is applied to a scene that a vehicle-mounted terminal with a vehicle electronic control unit downloads a vehicle-mounted program file from a remote server. The vehicle-mounted terminal and the remote server can be in wireless communication connection. For example, the vehicle-mounted terminal and the remote server communicate with each other through Wireless communication technologies such as a data network, Wireless Fidelity (WiFi), bluetooth, or zigbee, so as to implement data transmission. The vehicle-mounted terminal and the automobile electronic control unit can realize data transmission through wired communication or wireless communication.
In another example, the method and the apparatus for downloading the vehicle-mounted program file provided in the embodiment of the present invention may also be applied to a wired connection between a hardware device carrying the vehicle-mounted program file and a vehicle-mounted terminal, where the vehicle-mounted program file is transmitted to the vehicle-mounted terminal, and the vehicle-mounted program file is downloaded from the vehicle-mounted terminal to an electronic control unit of a vehicle. The vehicle-mounted terminal and the automobile electronic control unit can realize data transmission through wired communication or wireless communication.
Fig. 1 is a method for downloading a program file of an automotive electronic control unit according to an embodiment of the present invention. As shown in FIG. 1, the program file downloading method of the electronic control unit of the automobile includes steps 101 to 105
In step 101, a mapping relationship between an in-vehicle program file and a unit memory block in a flash memory of an automotive electronic control unit is acquired.
The in-vehicle program file in the automotive electronic control unit is stored in the flash memory. Before downloading the vehicle-mounted program file, a unit storage block in a flash memory of the vehicle electronic control unit can be obtained, and the corresponding relation between the vehicle-mounted program file and the unit storage block can be obtained according to the size of the vehicle-mounted program file. The number of the unit memory blocks occupied by the in-vehicle program files of different sizes also differs. By the correspondence relationship between the in-vehicle program file and the unit memory block, it is possible to obtain which part of the in-vehicle program file is stored in each unit memory block.
In one example, the unit memory block may be a minimum unit of erase and write of a flash memory of the automotive electronic control unit. In another example, the unit memory block may be an integer multiple of the minimum unit of erasure of the flash memory of the automotive electronic control unit.
In one example, the in-vehicle program file may be a program file of a control application newly downloaded by the automobile, or may be an update program file of an existing control application of the automobile. Formally, the in-vehicle program file may be an s19 file or a hex file.
In step 102, the vehicle-mounted program file is downloaded to a unit memory block in a flash memory of the vehicle electronic control unit.
In one example, if the in-vehicle program file is small, the entire in-vehicle program file may be directly downloaded to a unit memory block in a flash memory of the automotive electronic control unit.
In another example, if the in-vehicle program file is large, the in-vehicle program file may be divided into a plurality of packets, and the plurality of packets may be sequentially downloaded to the unit storage blocks in the memory of the automotive electronic control unit.
In one example, the vehicle-mounted program file can be downloaded to a unit memory block in a flash memory of an automobile electronic control unit by using a wireless transmission technology, and a professional operator is not required to connect hardware equipment carrying the vehicle-mounted program file with an interface of an automobile, so that the efficiency of downloading the vehicle-mounted program file is improved. The downloading of the vehicle-mounted program file to the unit memory block in the flash memory of the automotive electronic control unit in the above embodiment may be specifically implemented by downloading the vehicle-mounted program from the remote server to the unit memory block in the flash memory of the automotive electronic control unit through the vehicle-mounted terminal. That is, the in-vehicle terminal may download the in-vehicle program file from the remote server, and the vehicle electronic control unit may download the in-vehicle program file from the in-vehicle terminal. For example, the vehicle ecu may communicate with the in-vehicle terminal through a download Protocol such as a Universal Diagnostic Service (UDS) or a Universal Measurement and Calibration Protocol (XCP).
In one example, the in-vehicle program file may also be an encrypted in-vehicle program file.
In step 103, an interrupt write unit block is acquired.
In the process of downloading the program file to the unit storage module in the flash memory of the automotive electronic control unit, an interruption situation may occur. For example, a power failure of the vehicle electronic control unit, or a loss of a message carrying the vehicle-mounted program file received by the vehicle electronic control unit may cause an interruption of the downloading process. When the downloading process is interrupted, the electronic control unit of the automobile may have downloaded part of the content of the vehicle-mounted program file, and the unit memory block written by interruption is the unit memory block which is being written when the downloading process of the vehicle-mounted program file is interrupted. And acquiring the unit storage block which is being written when the downloading process of the vehicle-mounted program file is interrupted, so as to be convenient for continuing downloading according to the interrupted unit storage block.
In step 104, a data portion that needs to be continuously downloaded in the in-vehicle program file is obtained based on the interrupted write unit storage block and the mapping relationship.
In step 101, the mapping relationship between the vehicle-mounted program file and the unit storage block in the flash memory of the electronic control unit of the automobile is obtained, so that the data portion of the vehicle-mounted program file corresponding to the unit storage block in the mapping relationship can be searched according to the mapping relationship. The data portion of the in-vehicle program file corresponding to the unit memory block for interruption of writing, and the unit memory block after the unit memory block for interruption of writing may be a data portion of the in-vehicle program file that needs to be continuously downloaded.
In step 105, the data part which needs to be downloaded continuously in the vehicle-mounted program file is downloaded to the unit memory block in the flash memory of the automobile electronic control unit.
For example, fig. 2 is a schematic diagram illustrating a division of a unit memory block in a flash memory of an automotive ecu according to an embodiment of the present invention. As shown in fig. 2, the flash memory of the automotive electronic control unit is divided into 5 unit memory blocks, which are a unit memory block 1, a unit memory block 2, a unit memory block 3, a unit memory block 4, and a unit memory block 5, respectively. Each unit block of memory may be considered a partition of the flash memory. The in-vehicle program file corresponds to a unit memory block and can be divided into a data part 1, a data part 2, a data part 3, a data part 4, and a data part 5. The data portions 1 to 5 may be combined into an entire in-vehicle program file. Wherein, data portion 1 corresponds to unit memory block 1, data portion 2 corresponds to unit memory block 2, data portion 3 corresponds to unit memory block 3, data portion 4 corresponds to unit memory block 4, and data portion 5 corresponds to unit memory block 5. If the downloading process is interrupted and the writing into the unit storage block is interrupted as the unit storage block 4, the data part 4 and the data part 5 need to be downloaded continuously.
In the embodiment of the invention, the data part of the vehicle-mounted program file which is not effectively downloaded to the vehicle electronic control unit in the downloading process of the vehicle-mounted program file can be downloaded to the vehicle electronic control unit again. Therefore, the interruption of downloading the vehicle-mounted program file is avoided, and the whole downloading and flashing process of the vehicle-mounted program file is carried out. Thereby reducing the time taken for downloading the vehicle-mounted program file in the case of interruption.
FIG. 3 is a flowchart illustrating a method for downloading a program file from an ECU of a vehicle according to another embodiment of the present invention. Fig. 3 is different from fig. 1 in that step 104 in fig. 1 can be specifically detailed as step 1041 and step 1042 in fig. 3, step 105 in fig. 1 can be specifically detailed as step 1051 and step 1052 in fig. 3, and the program file downloading method of the automotive electronic control unit in fig. 3 can further include step 106.
In step 1041, based on the interruption writing unit storage block, the data portion of the in-vehicle program file corresponding to the start address of the interruption writing unit storage block is searched in the mapping relationship.
In one example, the mapping relationship in the above-described embodiment may include a correspondence relationship of each data portion of the in-vehicle program file and the start address of each unit memory block in the flash memory of the automobile electronic control unit. If the writing interruption into the unit memory block is known, the data part needing to be continuously downloaded can be determined according to the mapping relation.
The unit memory block can be preset with an identifier, so that different unit memory blocks have different identifiers to facilitate recording and searching. The identifier of the unit memory block can be a number, and can also be the starting address of the unit memory block.
In step 1042, the data portion of the in-vehicle program file corresponding to the start address of the interrupt write unit block and the subsequent data portions are used as the data portions of the in-vehicle program file that need to be downloaded continuously.
The data portion of the in-vehicle program file corresponding to the start address of the interruption writing unit memory block may have been written to the interruption writing unit memory block, but has not been completely written. The data written into the memory block of the interruption writing unit also belongs to the data part needing to be continuously downloaded. And taking the data part of the vehicle-mounted program file corresponding to the initial address of the interrupt writing unit storage block and the subsequent data part as data parts needing to be continuously downloaded.
In step 1051, the interrupt write unit block is erased.
The unit memory block is not written completely, and the unit memory block may be the minimum erasing unit of the flash memory in the vehicle electronic control unit. The unit memory block is erased during the interruption of writing, so that data confusion is prevented when the data part needing to be continuously downloaded is written into the unit memory block.
In step 1052, the data portion that needs to be downloaded continuously in the in-vehicle program file is downloaded to the unit memory block for interruption writing and the unit memory block after the unit memory block for interruption writing.
The data portion of the in-vehicle program file which needs to be continuously downloaded includes a data portion of the in-vehicle program file corresponding to the start address of the interrupt writing unit memory block and the subsequent data portion. The data part of the vehicle-mounted program file corresponding to the start address of the unit memory block for interruption writing is written into the unit memory block for interruption writing, and the data part after the data part of the vehicle-mounted program file corresponding to the start address of the unit memory block for interruption writing also corresponds to the unit memory block after the unit memory block for interruption writing.
In step 106, the written unit block is recorded when the in-vehicle program file is downloaded to the unit block in the flash memory of the automobile electronic control unit.
In order to make it possible to acquire the interrupted write unit block more quickly, the written unit block may be recorded while the in-vehicle program file is downloaded to the unit block in the flash memory of the vehicle electronic control unit. When the interrupted write unit block is acquired, the written unit block that is recorded last may be used as the interrupted write unit block.
In one example, the unit memory blocks may be located in a program download area in a flash memory of the automotive electronic control unit. Due to the fact that the downloaded vehicle-mounted program file can be in error in the transmission process, the downloaded vehicle-mounted program file is incomplete or is in error. Therefore, after the vehicle-mounted program file is downloaded, the integrity and accuracy of the vehicle-mounted program file can be checked. The downloaded in-vehicle program file cannot be immediately written into the flash memory of the automotive electronic control unit. The program download area may be provided in the flash memory of the automotive electronic control unit such that the program download area is independent of the portion of the flash memory of the automotive electronic control unit in which the program file is run. The check for the in-vehicle program file may be performed in the program download area.
In one example, the unit memory block is also detected to be written in an interruption manner, and if the unit memory block is the first unit memory block in the flash memory of the automobile electronic control unit, the whole vehicle-mounted program file is downloaded to the unit memory block in the flash memory of the automobile electronic control unit.
And if the first storage block in the flash memory of the automobile electronic control unit is arranged in the unit storage block for interruption writing, correspondingly writing the data part of the vehicle-mounted program file corresponding to the unit storage block for interruption writing and the subsequent data part into the unit storage block after the unit storage block for interruption writing respectively.
FIG. 4 is a flowchart illustrating a method for downloading a program file from an ECU of a vehicle according to still another embodiment of the present invention. Fig. 4 is different from fig. 1 in that the program file downloading method of the electronic control unit of the automobile shown in fig. 4 may further include steps 107 to 110.
In step 107, in the process of downloading the in-vehicle program file into the automobile electronic control unit, the in-vehicle program file downloaded into the automobile electronic control unit is read back.
The vehicle-mounted program file comprises Cyclic Redundancy Check (CRC) codes. The cyclic redundancy check code included in the vehicle-mounted program file is the cyclic redundancy check code of the vehicle-mounted program file before transmission. For example, the cyclic redundancy check code may be placed in header information of the in-vehicle program file. In the process of downloading the vehicle-mounted program file, the cyclic redundancy check code can be downloaded to a first unit storage block in a flash memory of the automobile electronic control unit.
The crc is mainly used to detect or check errors that may occur after data transmission or storage. In order to avoid the incompleteness or inaccuracy of the downloaded vehicle-mounted program file, cyclic redundancy check can be performed on the downloaded vehicle-mounted program file.
In step 108, a cyclic redundancy check code for checking is generated according to the read-back vehicle-mounted program file downloaded to the vehicle electronic control unit.
And in the process of downloading the vehicle-mounted program file to a storage block of a flash memory of the automobile electronic control unit, continuously reading back the data of the downloaded vehicle-mounted program file, and calculating to obtain a cyclic redundancy check code of the read-back vehicle-mounted program file, namely a cyclic check code for checking according to the read-back vehicle-mounted program file.
In step 109, if the cyclic redundancy check code for verification does not match the cyclic redundancy check code included in the in-vehicle program file, the in-vehicle program file is downloaded again.
And if the cyclic redundancy check code for checking is inconsistent with the cyclic redundancy check code included in the vehicle-mounted program file, indicating that the downloaded vehicle-mounted program file is inconsistent with the vehicle-mounted program file before transmission. That is, the downloaded in-vehicle program file is incomplete and/or inaccurate.
If the downloaded vehicle-mounted program file is determined to be incomplete and/or inaccurate, the vehicle-mounted program file needs to be downloaded again to a unit storage block in a flash memory of the automobile electronic control unit. Furthermore, the downloaded in-vehicle program file is not written into the program operating area in the flash memory of the automotive electronic control unit. And incomplete and/or inaccurate downloaded vehicle-mounted program files can be directly deleted.
In step 110, if the cyclic redundancy check code for verification is identical to the cyclic redundancy check code included in the vehicle-mounted program file, the vehicle-mounted program file downloaded in the program download area is written in the program operation area in the flash memory of the vehicle electronic control unit.
And if the cyclic redundancy check code for checking is consistent with the cyclic redundancy check code included in the vehicle-mounted program file, the downloaded vehicle-mounted program file is consistent with the vehicle-mounted program file before transmission. That is, the downloaded in-vehicle program file is complete and accurate.
The flash memory of the vehicle electronic control unit may include a program download area and a program operation area, which are two areas independent of each other. Wherein the program operating area operates a program file currently used by the vehicle. And if the downloaded vehicle-mounted program file is determined to be complete and accurate, writing the downloaded vehicle-mounted program file into the program operation area.
In one example, if the in-vehicle program file is an update program file or the like, a portion of the program operating area in which the program file has been written needs to be occupied. The program file operated in the program operation area can be erased, and the downloaded vehicle-mounted program file is written into the program operation area. The downloaded vehicle-mounted program file can be operated in the program operation area when the vehicle needs to operate the downloaded vehicle-mounted program file.
In the embodiment of the invention, if the downloaded vehicle-mounted program file is complete and accurate, the downloaded vehicle-mounted program file is put into use, so that the downloaded vehicle-mounted program file runs in the automobile. The method and the device avoid running incomplete and/or inaccurate vehicle-mounted program files in the automobile, avoid the risk of the automobile caused by the running of wrong vehicle-mounted program files, and further improve the safety of automobile control.
FIG. 5 is a flowchart illustrating a method for downloading a program file from an ECU of a vehicle according to still another embodiment of the present invention. Fig. 5 is different from fig. 1 in that the program file downloading method of the electronic control unit of the automobile shown in fig. 5 may further include steps 111 to 114.
In step 111, a download status flag is set.
The download status flag may indicate the download status of the in-vehicle program file. The download status of the vehicle-mounted program file can be distinguished by different identifiers on the download status identifier bit. In one example, the download status of the in-vehicle program file may include a downloading status and a downloading done status. The mark on the vehicle-mounted state mark position can be characters such as numbers, letters, special characters and the like, or a character string composed of one character, or a character string composed of a plurality of characters, and is not limited herein. For example, if the flag on the download status flag bit is 0, it indicates that the terminal is in the download status; if the mark on the download state mark bit is 1, the mark is in a download completion state.
In step 112, if the download status flag is the first flag, the vehicle-mounted program file downloaded from the program download area is written into the program operation area in the flash memory of the vehicle electronic control unit.
And if the downloading state identification bit is the first identification, the vehicle-mounted program file is completely downloaded. The downloaded in-vehicle program file can be written into a program operating area in a flash memory of the automotive electronic control unit.
In one example, if the in-vehicle program file is an updated program file or the like that needs to occupy a portion of the program operation area in which the program file has been written, the program file in the program operation area may be erased and the in-vehicle program file may be written into the program operation area.
In step 113, if the download status flag is the second flag, a prompt message indicating that the downloading of the vehicle-mounted program file in the program download area is successful is sent.
And if the downloading state identification bit is the second identification, the successful downloading of the vehicle-mounted program file is indicated. But the in-vehicle program file in the program download area is not immediately written in the program execution area. But rather issues a prompt message prompting the user.
In one example, the second identifier in the embodiment of the present invention may be the same as or different from the first identifier in the above-described embodiment.
In one example, a third identifier, a fourth identifier, etc. may also be provided to indicate other download states, as well as to generate other control flows in conjunction.
The prompt message may be a display of an image or a text, or may be a voice content, and is not limited herein.
In step 114, a control instruction sent by the user is received, and it is determined whether to write the in-vehicle program file downloaded from the program download area into the program running area according to the control instruction.
After the user checks or hears the prompt message, a control instruction can be sent out, and the program file downloading device of the automobile electronic control unit receives the control instruction. The control instruction indicates whether to write the vehicle-mounted program file downloaded in the program download area into the program operation area. And if the control instruction indicates that the vehicle-mounted program file downloaded from the program downloading area is written into the program operating area, writing the vehicle-mounted program file downloaded from the program downloading area into the program operating area. And if the control instruction indicates that the vehicle-mounted program file downloaded from the program downloading area is not written into the program operating area, the vehicle-mounted program file downloaded from the program downloading area is not written into the program operating area.
For example, the in-vehicle program file is an update program file. When the updated program file is successfully downloaded to the program downloading area, a prompt message of 'the updated program file is successfully downloaded and whether the update is required to be carried out immediately' can be sent out. The user issues a control instruction indicating "update immediately" or "not update temporarily". The program file downloading device of the automobile electronic control unit receives the control instruction. And if the control instruction indicates 'update immediately', writing the vehicle-mounted program file downloaded from the program downloading area into the program operating area. And if the control command indicates 'temporarily not updating', the vehicle-mounted program file downloaded from the program downloading area is not written into the program operating area.
Fig. 6 is a schematic structural diagram of a program file downloading device 200 of an automotive ecu according to an embodiment of the present invention. As shown in fig. 6, the program file downloading apparatus 200 of the automotive electronic control unit includes a map acquisition module 201, a download module 202, an interrupt acquisition module 203, and a search module 204.
The mapping acquisition module 201 is configured to acquire a mapping relationship between the vehicle-mounted program file and a unit memory block in a flash memory of the automobile electronic control unit.
And the downloading module 202 is configured to download the vehicle-mounted program file to a unit memory block in a flash memory of the automobile electronic control unit.
And the interruption acquisition module 203 is configured to acquire an interruption writing unit storage block, wherein the interruption writing unit storage block is a unit storage block which is being written when the downloading process of the vehicle-mounted program file is interrupted.
And the searching module 204 is configured to obtain a data portion which needs to be continuously downloaded in the vehicle-mounted program file based on the interrupt writing unit storage block and the mapping relation.
And the downloading module 202 is also configured to download the data part needing to be continuously downloaded in the vehicle-mounted program file to a unit storage block in a flash memory of the automobile electronic control unit.
In the embodiment of the invention, the data part of the vehicle-mounted program file which is not effectively downloaded to the vehicle electronic control unit in the downloading process of the vehicle-mounted program file can be downloaded to the vehicle electronic control unit again. Therefore, the interruption of downloading the vehicle-mounted program file is avoided, and the whole downloading and flashing process of the vehicle-mounted program file is carried out. Thereby reducing the time taken for downloading the vehicle-mounted program file in the case of interruption.
Fig. 7 is a schematic structural diagram of a program file downloading device 200 of an automotive ecu according to another embodiment of the present invention. Fig. 7 is different from fig. 6 in that the download module 202 in fig. 6 may include the erase submodule 2021 and the write submodule 2022 in fig. 7. The program file downloading apparatus 200 of the electronic control unit for a vehicle shown in fig. 7 may further include a recording module 205.
The erase submodule 2021 is configured to erase the interrupt write unit memory block.
The writing submodule 2022 is configured to download the data portion that needs to be continuously downloaded in the in-vehicle program file to the unit storage block for interruption and the unit storage block after the unit storage block for interruption.
And a recording module 205 configured to record the written unit memory block when the in-vehicle program file is downloaded to the unit memory block in the flash memory of the automobile electronic control unit.
The download module 202 may be further configured to: when the interruption write unit memory block is the first unit memory block in the flash memory of the automobile electronic control unit, the whole vehicle-mounted program file is downloaded to the unit memory block in the flash memory of the automobile electronic control unit.
In one example, the mapping relationship includes a correspondence relationship of respective data portions of the in-vehicle program file and start addresses of respective unit memory blocks in a flash memory of the automotive electronic control unit.
In an example, the searching module 204 in the above embodiment may be specifically configured to search, based on the interruption writing unit storage block, for a data portion of the in-vehicle program file corresponding to the start address of the interruption writing unit storage block in the mapping relationship; and taking the data part of the vehicle-mounted program file corresponding to the initial address of the interrupt writing unit storage block and the subsequent data part as the data part needing to be continuously downloaded in the vehicle-mounted program file.
In one example, the unit memory block in the above embodiment is located in a program download area in a flash memory of an automotive electronic control unit.
Fig. 8 is a schematic structural diagram of a program file downloading device 200 of an automotive ecu according to another embodiment of the present invention. Fig. 8 is different from fig. 6 in that the program downloading device 200 of the electronic control unit of the automobile shown in fig. 8 may further include a read-back module 206, a check code generation module 207, and a first writing module 208.
A read-back module 206, configured to read back the vehicle-mounted program file downloaded into the vehicle electronic control unit during the process of downloading the vehicle-mounted program file into the vehicle electronic control unit, wherein the vehicle-mounted program file includes a cyclic redundancy check code;
a check code generation module 207 configured to generate a cyclic redundancy check code for checking according to the read-back vehicle-mounted program file downloaded to the unit memory block in the flash memory of the automotive electronic control unit;
the downloading module 202 is further configured to, if the cyclic redundancy check code for checking is inconsistent with the cyclic redundancy check code included in the vehicle-mounted program file, re-download the vehicle-mounted program file;
and a first writing module 208 configured to write the vehicle-mounted program file downloaded in the program downloading area into the program running area in the flash memory of the vehicle electronic control unit if the cyclic redundancy check code for verification is consistent with the cyclic redundancy check code included in the vehicle-mounted program file.
Fig. 9 is a schematic structural diagram of a program file downloading device 200 of an automotive ecu according to another embodiment of the present invention. Fig. 9 is different from fig. 6 in that the program downloading device 200 of the automotive ecu shown in fig. 9 may further include a setting module 209, a second writing module 210, an erasing module 211, a transmitting module 212, and a receiving module 213.
A setting module 209 configured to set the download status flag.
And a second writing module 210 configured to write the vehicle-mounted program file downloaded in the program downloading area into the program running area in the flash memory of the automotive electronic control unit if the download state identification bit is the first identification.
And an erasing module 211 configured to erase the program file in the program running area.
And the sending module 212 is configured to send a prompt message indicating that the vehicle-mounted program file in the program downloading area is successfully downloaded if the download state identification bit is the second identification.
And the receiving module 213 is configured to receive a control instruction sent by a user, and determine whether to write the vehicle-mounted program file downloaded from the program downloading area into the program running area according to the control instruction.
It should be clear that the embodiments in this specification are described in a progressive manner, and the same or similar parts in the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. For the device embodiments, reference may be made to the description of the method embodiments in the relevant part. The present invention is not limited to the specific steps and structures described above and shown in the drawings. Those skilled in the art may make various changes, modifications and additions or change the order between the steps after appreciating the spirit of the invention. Also, a detailed description of known process techniques is omitted herein for the sake of brevity.
The functional blocks and functional sub-blocks shown in the above structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information.

Claims (17)

1.一种汽车电子控制单元的程序文件下载方法,其特征在于,包括:1. a program file downloading method of an automobile electronic control unit, is characterized in that, comprises: 获取车载程序文件与汽车电子控制单元的闪存中的单位存储块的映射关系;Obtain the mapping relationship between the vehicle program file and the unit storage block in the flash memory of the vehicle electronic control unit; 下载所述车载程序文件至所述汽车电子控制单元的闪存中的单位存储块;Downloading the vehicle program file to a unit storage block in the flash memory of the vehicle electronic control unit; 获取中断写入单位存储块,所述中断写入单位存储块为所述车载程序文件下载过程中断时正被写入的单位存储块;Obtaining the interrupted write unit storage block, the interrupted write unit storage block is the unit storage block being written when the on-board program file download process is interrupted; 基于所述中断写入单位存储块以及所述映射关系,得到所述车载程序文件中需要继续下载的数据部分;Based on the interrupted writing unit storage block and the mapping relationship, obtain the data part that needs to continue to be downloaded in the on-board program file; 将所述车载程序文件中需要继续下载的数据部分下载至所述汽车电子控制单元的闪存中的单位存储块;Downloading the data part that needs to be continuously downloaded in the on-board program file to the unit storage block in the flash memory of the automobile electronic control unit; 所述单位存储块位于所述汽车电子控制单元的闪存中的程序下载区;The unit storage block is located in the program download area in the flash memory of the automotive electronic control unit; 所述汽车电子控制单元的程序文件下载方法还包括:The method for downloading program files of the automotive electronic control unit further includes: 设置下载状态标识位;Set the download status flag; 若所述下载状态标识位为第一标识,则将所述程序下载区中下载的所述车载程序文件写入所述汽车电子控制单元的闪存中的程序运行区,所述第一标识表示所述车载程序文件已下载完毕。If the download status identification bit is the first identification, write the on-board program file downloaded in the program download area into the program running area in the flash memory of the automobile electronic control unit, and the first identification indicates the The above-mentioned on-board program files have been downloaded. 2.根据权利要求1所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述映射关系包括所述车载程序文件的各个数据部分与所述汽车电子控制单元的闪存中的各个单位存储块的起始地址的对应关系。2. The method for downloading a program file of an automotive electronic control unit according to claim 1, wherein the mapping relationship comprises each data part of the in-vehicle program file and each unit in the flash memory of the automotive electronic control unit The corresponding relationship of the starting address of the storage block. 3.根据权利要求2所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述基于所述中断写入单位存储块以及所述映射关系,得到所述车载程序文件中需要继续下载的数据部分,包括:3. the program file downloading method of automobile electronic control unit according to claim 2, it is characterized in that, described based on described interrupt writing unit memory block and described mapping relation, obtain in described vehicle-mounted program file and need to continue to download the data section, including: 基于所述中断写入单位存储块,在所述映射关系中查找与所述中断写入单位存储块的起始地址对应的所述车载程序文件的数据部分;Based on the interrupted writing unit storage block, look up the data part of the on-board program file corresponding to the start address of the interrupted writing unit storage block in the mapping relationship; 将与所述中断写入单位存储块的起始地址对应的所述车载程序文件的数据部分及之后的数据部分,作为所述车载程序文件中需要继续下载的数据部分。The data part of the in-vehicle program file and the following data parts corresponding to the start address of the interrupted writing unit storage block are taken as the data part of the in-vehicle program file that needs to be continuously downloaded. 4.根据权利要求2所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述将所述车载程序文件中需要继续下载的数据部分下载至汽车电子控制单元的闪存中的单位存储块,包括:4. the program file downloading method of the automotive electronic control unit according to claim 2, is characterized in that, the unit storage in the flash memory of the automotive electronic control unit that the data part that needs to continue to be downloaded in the described in-vehicle program file is downloaded to the unit storage of the automotive electronic control unit is characterized in that blocks, including: 对所述中断写入单位存储块进行擦除;Erasing the interrupted write unit memory block; 将所述车载程序文件中需要继续下载的数据部分下载至所述中断写入单位存储块以及所述中断写入单位存储块之后的单位存储块。Download the data part of the vehicle program file that needs to be continuously downloaded to the interrupted writing unit storage block and the unit storage block after the interrupted writing unit storage block. 5.根据权利要求1所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述汽车电子控制单元的程序文件下载方法还包括:5. The method for downloading a program file of an automotive electronic control unit according to claim 1, wherein the method for downloading a program file of the automotive electronic control unit further comprises: 当所述中断写入单位存储块为所述汽车电子控制单元的闪存中的首个单位存储块时,将整个所述车载程序文件下载至所述汽车电子控制单元的闪存中的单位存储块。When the interrupted writing unit storage block is the first unit storage block in the flash memory of the vehicle electronic control unit, the entire vehicle program file is downloaded to the unit storage block in the flash memory of the vehicle electronic control unit. 6.根据权利要求1所述的程序文件下载方法,其特征在于,所述汽车电子控制单元的程序文件下载方法还包括:6. The program file downloading method according to claim 1, wherein the program file downloading method of the automotive electronic control unit further comprises: 在将所述车载程序文件下载至所述汽车电子控制单元中的过程中,回读下载至所述汽车电子控制单元中的所述车载程序文件,所述车载程序文件包括循环冗余校验码;In the process of downloading the on-board program file to the car electronic control unit, read back the on-board program file downloaded to the car electronic control unit, and the on-board program file includes a cyclic redundancy check code ; 根据回读得到的下载至所述汽车电子控制单元的闪存中的单位存储块的所述车载程序文件,生成校验用循环冗余校验码;generating a cyclic redundancy check code for verification according to the on-board program file downloaded to the unit storage block in the flash memory of the automotive electronic control unit obtained by reading back; 若所述校验用循环冗余校验码与所述车载程序文件中包括的所述循环冗余校验码不一致,则重新下载所述车载程序文件;If the CRC used for verification is inconsistent with the CRC included in the on-board program file, re-download the on-board program file; 若所述校验用循环冗余校验码与所述车载程序文件中包括的所述循环冗余校验码一致,则将所述程序下载区中下载的所述车载程序文件写入所述汽车电子控制单元的闪存中的程序运行区。If the cyclic redundancy check code for verification is consistent with the cyclic redundancy check code included in the in-vehicle program file, write the in-vehicle program file downloaded in the program download area into the The program execution area in the flash memory of the automotive electronic control unit. 7.根据权利要求1所述的汽车电子控制单元的程序文件下载方法,其特征在于,在所述将所述程序下载区中下载的所述车载程序文件写入所述汽车电子控制单元的闪存中的程序运行区之前,还包括:7 . The method for downloading a program file of an automotive electronic control unit according to claim 1 , wherein the in-vehicle program file downloaded in the program download area is written into the flash memory of the automotive electronic control unit. 8 . Before the program run area in, also include: 擦除所述的程序运行区中的程序文件。Erase the program files in the described program runtime area. 8.根据权利要求1或7所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述汽车电子控制单元的程序文件下载方法还包括:8. The method for downloading a program file of an automotive electronic control unit according to claim 1 or 7, wherein the method for downloading a program file for the automotive electronic control unit further comprises: 若所述下载状态标识位为第二标识,则发送表示所述程序下载区中的所述车载程序文件下载成功的提示消息,所述第二标识表示所述车载程序文件下载成功。If the download status identification bit is a second identification, a prompt message indicating that the on-board program file in the program download area is successfully downloaded is sent, and the second identification indicates that the on-board program file has been successfully downloaded. 9.根据权利要求8所述的汽车电子控制单元的程序文件下载方法,其特征在于,所述汽车电子控制单元的程序文件下载方法还包括:9. The method for downloading a program file of an automotive electronic control unit according to claim 8, wherein the method for downloading a program file of the automotive electronic control unit further comprises: 接收用户发送的控制指令,根据所述控制指令,确定是否将所述程序下载区中下载的所述车载程序文件写入所述程序运行区。A control instruction sent by a user is received, and according to the control instruction, it is determined whether to write the in-vehicle program file downloaded in the program download area into the program running area. 10.根据权利要求1所述的汽车电子控制单元的程序文件下载方法,其特征在于,在所述获取所述中断写入单位存储块之前,还包括:10. The method for downloading a program file of an automotive electronic control unit according to claim 1, characterized in that, before the acquiring the interrupt write unit storage block, further comprising: 在将所述车载程序文件下载至所述汽车电子控制单元的闪存中的单位存储块时,记录已写入单位存储块。When the on-board program file is downloaded to the unit memory block in the flash memory of the automobile electronic control unit, it is recorded that the unit memory block has been written. 11.一种汽车电子控制单元的程序文件下载装置,其特征在于,包括:11. A program file downloading device for an automotive electronic control unit, characterized in that, comprising: 映射获取模块,被配置为获取车载程序文件与汽车电子控制单元的闪存中的单位存储块的映射关系;The mapping acquisition module is configured to acquire the mapping relationship between the vehicle program file and the unit storage block in the flash memory of the vehicle electronic control unit; 下载模块,被配置为下载所述车载程序文件至所述汽车电子控制单元的闪存中的单位存储块;a download module, configured to download the vehicle program file to a unit storage block in the flash memory of the vehicle electronic control unit; 中断获取模块,被配置为获取中断写入单位存储块,所述中断写入单位存储块为所述车载程序文件下载过程中断时正被写入的单位存储块;An interrupt acquisition module, configured to acquire an interrupt write unit memory block, the interrupt write unit memory block is the unit memory block being written when the on-board program file download process is interrupted; 查找模块,被配置为基于所述中断写入单位存储块以及所述映射关系,得到所述车载程序文件中需要继续下载的数据部分;A search module, configured to obtain the data part that needs to continue to be downloaded in the on-board program file based on the interrupted writing unit storage block and the mapping relationship; 所述下载模块,还配置为将所述车载程序文件中需要继续下载的数据部分下载至所述汽车电子控制单元的闪存中的单位存储块;The download module is further configured to download the data part of the on-board program file that needs to be continuously downloaded to a unit storage block in the flash memory of the automobile electronic control unit; 所述单位存储块位于所述汽车电子控制单元的闪存中的程序下载区;The unit storage block is located in the program download area in the flash memory of the automotive electronic control unit; 所述汽车电子控制单元的程序文件下载装置还包括:The program file downloading device of the automobile electronic control unit also includes: 设置模块,被配置为设置下载状态标识位;The setting module is configured to set the download status flag; 第二写入模块,被配置为若所述下载状态标识位为第一标识,则将所述程序下载区中下载的所述车载程序文件写入所述汽车电子控制单元的闪存中的程序运行区,所述第一标识表示所述车载程序文件已下载完毕。The second writing module is configured to write the on-board program file downloaded in the program download area into the program running in the flash memory of the automobile electronic control unit if the download status identification bit is the first identification area, the first identifier indicates that the on-board program file has been downloaded. 12.根据权利要求11所述的汽车电子控制单元的程序文件下载装置,其特征在于,所述映射关系包括所述车载程序文件的各个数据部分与所述汽车电子控制单元的闪存中的各个单位存储块的起始地址的对应关系。12 . The program file downloading device for an automotive electronic control unit according to claim 11 , wherein the mapping relationship includes each data part of the in-vehicle program file and each unit in the flash memory of the automotive electronic control unit. 13 . The corresponding relationship of the starting address of the storage block. 13.根据权利要求12所述的汽车电子控制单元的程序文件下载装置,其特征在于,所述查找模块具体被配置为:13. The device for downloading a program file of an automotive electronic control unit according to claim 12, wherein the search module is specifically configured as: 基于所述中断写入单位存储块,在所述映射关系中查找与所述中断写入单位存储块的起始地址对应的所述车载程序文件的数据部分;Based on the interrupted writing unit storage block, look up the data part of the on-board program file corresponding to the start address of the interrupted writing unit storage block in the mapping relationship; 将与所述中断写入单位存储块的起始地址对应的所述车载程序文件的数据部分及之后的数据部分,作为所述车载程序文件中需要继续下载的数据部分。The data part of the in-vehicle program file and the following data parts corresponding to the start address of the interrupted writing unit storage block are taken as the data part of the in-vehicle program file that needs to be continuously downloaded. 14.根据权利要求12所述的汽车电子控制单元的程序文件下载装置,其特征在于,所述下载模块包括:14. The device for downloading a program file of an automotive electronic control unit according to claim 12, wherein the downloading module comprises: 擦除子模块,被配置为对所述中断写入单位存储块进行擦除;an erasing submodule, configured to erase the interrupted writing unit memory block; 写入子模块,被配置为将所述车载程序文件中需要继续下载的数据部分下载至所述中断写入单位存储块以及所述中断写入单位存储块之后的单位存储块。The writing submodule is configured to download the data part of the on-board program file that needs to be continued to be downloaded to the interrupted writing unit storage block and the unit storage block after the interrupted writing unit storage block. 15.根据权利要求11所述的汽车电子控制单元的程序文件下载装置,其特征在于,所述下载模块还被配置为:15. The device for downloading a program file of an electronic control unit of an automobile according to claim 11, wherein the downloading module is further configured as: 当所述中断写入单位存储块为所述汽车电子控制单元的闪存中的首个单位存储块时,将整个所述车载程序文件下载至所述汽车电子控制单元的闪存中的单位存储块。When the interrupted writing unit storage block is the first unit storage block in the flash memory of the vehicle electronic control unit, the entire vehicle program file is downloaded to the unit storage block in the flash memory of the vehicle electronic control unit. 16.根据权利要求11、13或14所述的程序文件下载装置,其特征在于,16. The program file downloading device according to claim 11, 13 or 14, characterized in that: 所述汽车电子控制单元的程序文件下载装置还包括:The program file downloading device of the automobile electronic control unit also includes: 回读模块,被配置为在将所述车载程序文件下载至所述汽车电子控制单元中的过程中,回读下载至所述汽车电子控制单元中的所述车载程序文件,所述车载程序文件包括循环冗余校验码;a read-back module, configured to read back the on-board program file downloaded to the automobile electronic control unit during the process of downloading the on-board program file to the automobile electronic control unit, the on-board program file Including cyclic redundancy check code; 校验码生成模块,被配置为根据回读得到的下载至所述汽车电子控制单元的闪存中的单位存储块的所述车载程序文件,生成校验用循环冗余校验码;a verification code generation module, configured to generate a cyclic redundancy check code for verification according to the on-board program file downloaded to the unit storage block in the flash memory of the automobile electronic control unit obtained by reading back; 所述下载模块,还被配置为若所述校验用循环冗余校验码与所述车载程序文件中包括的所述循环冗余校验码不一致,则重新下载所述车载程序文件;The downloading module is also configured to re-download the on-board program file if the CRC code used for verification is inconsistent with the cyclic redundancy check code included in the on-board program file; 第一写入模块,被配置为若所述校验用循环冗余校验码与所述车载程序文件中包括的所述循环冗余校验码一致,则将所述程序下载区中下载的所述车载程序文件写入所述汽车电子控制单元的闪存中的程序运行区。The first writing module is configured to, if the cyclic redundancy check code used for verification is consistent with the cyclic redundancy check code included in the on-board program file, then download the downloaded file in the program download area. The in-vehicle program file is written into the program running area in the flash memory of the automotive electronic control unit. 17.根据权利要求11所述的汽车电子控制单元的程序文件下载装置,其特征在于,所述汽车电子控制单元的程序文件下载装置还包括:17. The program file downloading device of the automotive electronic control unit according to claim 11, wherein the program file downloading device of the automotive electronic control unit further comprises: 发送模块,被配置为若所述下载状态标识位为第二标识,则发送表示所述程序下载区中的所述车载程序文件下载成功的提示消息,所述第二标识表示所述车载程序文件下载成功。The sending module is configured to send a prompt message indicating that the on-board program file in the program download area is successfully downloaded if the download status identifier is a second sign, and the second sign represents the on-board program file download successful.
CN201711466122.XA 2017-12-28 2017-12-28 Method and device for downloading program files of automobile electronic control unit Active CN108334282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711466122.XA CN108334282B (en) 2017-12-28 2017-12-28 Method and device for downloading program files of automobile electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711466122.XA CN108334282B (en) 2017-12-28 2017-12-28 Method and device for downloading program files of automobile electronic control unit

Publications (2)

Publication Number Publication Date
CN108334282A CN108334282A (en) 2018-07-27
CN108334282B true CN108334282B (en) 2021-07-09

Family

ID=62923876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711466122.XA Active CN108334282B (en) 2017-12-28 2017-12-28 Method and device for downloading program files of automobile electronic control unit

Country Status (1)

Country Link
CN (1) CN108334282B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487740A (en) * 2002-09-30 2004-04-07 北京中视联数字系统有限公司 Software downloading method in digital TV broadcast
CN1687899A (en) * 2005-06-15 2005-10-26 大唐微电子技术有限公司 Method, system and module for dynamically downloading application program to subscriber identity module
CN101253468A (en) * 2005-08-03 2008-08-27 桑迪士克股份有限公司 Method and system for dual mode access of a memory device
CN101546250A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 System for realizing breakpoint continuous transmission of mobile storage equipment
CN101546321A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 Breakpoint continuous transmission method of mobile storage equipment
CN101546251A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 Mobile storage equipment with breakpoint continuous transmission
CN103095529A (en) * 2013-01-09 2013-05-08 华为技术有限公司 Method and device for detecting engine device, firewall and network transmission file
CN103812944A (en) * 2014-02-26 2014-05-21 安徽安凯汽车股份有限公司 Remote update system and method for electric automobile ECU
CN104281469A (en) * 2014-08-26 2015-01-14 东风电子科技股份有限公司 Method and system for realizing refreshing and writing of ECU (Electronic Control Unit) program
CN105183515A (en) * 2015-09-02 2015-12-23 深圳一电科技有限公司 Cloud deck firmware updating method and device
CN105743945A (en) * 2014-12-10 2016-07-06 广州市动景计算机科技有限公司 Method and system for downloading files on the basis of switching download sources
CN105808285A (en) * 2015-01-21 2016-07-27 福特全球技术公司 Vehicle control update methods and systems
CN105930193A (en) * 2016-05-05 2016-09-07 国网重庆市电力公司电力科学研究院 Operating system based energy meter software online upgrade method and system
CN106775778A (en) * 2017-02-06 2017-05-31 山东鲁能智能技术有限公司 Embedded program exploitation Program updates recognition methods and system
CN107229493A (en) * 2017-05-18 2017-10-03 宁德时代新能源科技股份有限公司 Program updating method and device
CN107291516A (en) * 2017-07-12 2017-10-24 珠海格力电器股份有限公司 Firmware upgrading method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562112B2 (en) * 2001-07-06 2009-07-14 Intel Corporation Method and apparatus for peer-to-peer services for efficient transfer of information between networks
US20110197004A1 (en) * 2010-02-05 2011-08-11 Serebrin Benjamin C Processor Configured to Virtualize Guest Local Interrupt Controller

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487740A (en) * 2002-09-30 2004-04-07 北京中视联数字系统有限公司 Software downloading method in digital TV broadcast
CN1687899A (en) * 2005-06-15 2005-10-26 大唐微电子技术有限公司 Method, system and module for dynamically downloading application program to subscriber identity module
CN101253468A (en) * 2005-08-03 2008-08-27 桑迪士克股份有限公司 Method and system for dual mode access of a memory device
CN101546250A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 System for realizing breakpoint continuous transmission of mobile storage equipment
CN101546321A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 Breakpoint continuous transmission method of mobile storage equipment
CN101546251A (en) * 2008-03-28 2009-09-30 北京爱国者存储科技有限责任公司 Mobile storage equipment with breakpoint continuous transmission
CN103095529A (en) * 2013-01-09 2013-05-08 华为技术有限公司 Method and device for detecting engine device, firewall and network transmission file
CN103812944A (en) * 2014-02-26 2014-05-21 安徽安凯汽车股份有限公司 Remote update system and method for electric automobile ECU
CN104281469A (en) * 2014-08-26 2015-01-14 东风电子科技股份有限公司 Method and system for realizing refreshing and writing of ECU (Electronic Control Unit) program
CN105743945A (en) * 2014-12-10 2016-07-06 广州市动景计算机科技有限公司 Method and system for downloading files on the basis of switching download sources
CN105808285A (en) * 2015-01-21 2016-07-27 福特全球技术公司 Vehicle control update methods and systems
CN105183515A (en) * 2015-09-02 2015-12-23 深圳一电科技有限公司 Cloud deck firmware updating method and device
CN105930193A (en) * 2016-05-05 2016-09-07 国网重庆市电力公司电力科学研究院 Operating system based energy meter software online upgrade method and system
CN106775778A (en) * 2017-02-06 2017-05-31 山东鲁能智能技术有限公司 Embedded program exploitation Program updates recognition methods and system
CN107229493A (en) * 2017-05-18 2017-10-03 宁德时代新能源科技股份有限公司 Program updating method and device
CN107291516A (en) * 2017-07-12 2017-10-24 珠海格力电器股份有限公司 Firmware upgrading method and system

Also Published As

Publication number Publication date
CN108334282A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
US10162625B2 (en) Vehicle control storage methods and systems
CN112286170B (en) Vehicle ECU (electronic control Unit) flashing method, device and equipment and storage medium
JP4722194B2 (en) Rewriting system for vehicles
CN103631609A (en) Method and system for refreshing vehicle-mounted ECU application program
US20050071839A1 (en) Communication terminal and communication network for partially updating software, software update method, and software creation device and method therefor
CN108279916A (en) Electronic control unit program updating method and device
EP3324299A1 (en) System and method for reprogramming ecu devices (electronic control units) in vehicles, via digital radio
CN103439961B (en) Automobile electronic control unit diagnostic function test method and system
CN108475222A (en) Vehicle-mounted updating device, more new system and update processing routine
CN107229493A (en) Program updating method and device
CN114840241A (en) Data processing method and related equipment
JP2009264770A (en) Vehicle diagnostic system, vehicle diagnostic terminal, information server device, and vehicle diagnostic method
US12190092B2 (en) Control device and terminal device
CN112860466A (en) Vehicle-mounted entertainment system restart fault diagnosis method and system
CN104423993B (en) The update method of vehicle electronics software, more new terminal and automobile electronic system
CN118069188A (en) Electronic device and program updating system
CN107102849B (en) Method and apparatus for file replacement with periodic ignition switch off
CN108241514A (en) Vehicle-mounted program updating method and device
CN109597634A (en) The method, apparatus and vehicle of more new vehicle ECU
CN115934125A (en) Vehicle body control method and vehicle body controller
TWI707573B (en) Apparatus for adding data to blockchain, data verification apparatus, and data verification method
CN112052032A (en) Brush writing method and device for electronic control unit
CN108334282B (en) Method and device for downloading program files of automobile electronic control unit
WO2025161499A1 (en) Ecu firmware upgrade method, apparatus, and system, vehicle, and storage medium
CN114764336A (en) PeakCAN-based automobile ECU (electronic control Unit) flashing method and device, vehicle-mounted terminal and 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
TR01 Transfer of patent right

Effective date of registration: 20220120

Address after: 352100 science and technology building, No. 2, Xingang Road, Zhangwan Town, Jiaocheng District, Ningde City, Fujian Province

Patentee after: Ningde Shidai Runzhi Software Technology Co.,Ltd.

Address before: 352100 Xingang Road, Zhangwan Town, Jiaocheng District, Ningde, Fujian 1

Patentee before: Contemporary Amperex Technology Co.,Ltd.

TR01 Transfer of patent right