Electronic Control Unit

The ECU addresses the challenge of specifying retransmission start addresses for compressed or encrypted data by incorporating unprocessed data with block location lists, ensuring uninterrupted software updates.

JP7561210B2Active Publication Date: 2024-10-03ASTEMO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2022569711
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-16
Filing Date
2021-08-31
Publication Date
2024-10-03
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

Existing ECU software update methods face challenges in specifying a retransmission start address when data is compressed or encrypted, leading to interrupted software rewriting processes.

Method used

The ECU includes unprocessed data alongside compressed and encrypted data, maintaining a list of addresses to specify the location of each data block, allowing for accurate retransmission start addresses even when data is compressed or encrypted.

Benefits of technology

Enables seamless resumption of software rewriting by accurately identifying retransmission start addresses, minimizing interruptions and ensuring efficient data transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561210000001
    Figure 0007561210000001
  • Figure 0007561210000002
    Figure 0007561210000002
  • Figure 0007561210000003
    Figure 0007561210000003
Patent Text Reader

Abstract

The purpose of the present invention is to provide technology whereby a retransmission start address can be properly identified even when update data is compressed or encrypted. In the electronic control device according to the present invention, update data includes at least one of compressed data and encrypted data and includes unprocessed data that is neither compressed nor encrypted, and the unprocessed data retains an address list that can identify the positions of data blocks included in the update data.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an electronic control device mounted on a vehicle. [Background technology]

[0002] In-vehicle electronic control devices such as ECUs (Electrical Control Units) are controlled by microcomputers (hereafter referred to as MCUs). Various functions are assigned to the MCUs, and external circuits corresponding to these functions are also provided. The ECU controls the target devices by executing control software stored in a non-volatile memory called flash ROM (Read Only Memory). In automobiles, for example, the ECU controls the fuel injection and ignition of the engine.

[0003] ECUs generally have a means for rewriting the control software written in the memory installed in the ECU, for example: (1) A method (the conventional method) in which a diagnostic tool is connected to the ECU via a wired OBD (On-Board Diagnostic) connector and data to be written to the flash ROM is sent via signals such as CAN (Controller Area Network);(2) OTA (Over-The-Air): A method in which updated data is sent to the ECU via wireless communication.

[0004] In software reprogramming via OTA, updated data may be received while the vehicle is running. In this method, data must be transferred little by little in the background so as not to affect other ongoing controls. In this case, the software reprogramming time may be long, and the process may be interrupted by factors such as the user cutting off the power supply. In such cases, there is a demand for a resume function that allows software reprogramming to be resumed from where it was interrupted.

[0005] The following Patent Document 1 describes a software rewrite resume function. In this document, after the software rewrite is interrupted, a data transfer source requests an ECU for a software rewrite start address. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] JP 2017-097576 A Summary of the Invention [Problem to be solved by the invention]

[0007] The technology described in Patent Document 1 requires that the ECU retain the position of the data block to be resent, and therefore assumes that the address in the ROM data retained by the ECU is the same as the address in the ROM data transmitted from the server, etc.

[0008] On the other hand, when rewriting ECU software, the ROM data sent may be compressed, encrypted, or both. Compressing ROM data has the advantage of contributing to shortening the communication time for software rewriting, while encryption contributes to strengthening security. However, in either case, it may be difficult to identify relative and absolute addresses compared to raw ROM data that has not been compressed or encrypted.

[0009] The present invention has been made in consideration of the above-mentioned problems, and aims to provide a technique that can appropriately identify a retransmission start address even when update data is compressed or encrypted. [Means for solving the problem]

[0010] In the electronic control device of the present invention, the update data includes at least one of compressed data or encrypted data, and also includes non-processed data that is neither compressed nor encrypted, and the non-processed data holds an address list that can identify the location of each data block included in the update data. Effect of the Invention

[0011] According to the electronic control device of the present invention, even if the update data is compressed or encrypted, the retransmission start address can be appropriately specified. [Brief description of the drawings]

[0012] [Figure 1] 1 is a configuration diagram of an electronic control unit (ECU) 1 according to a first embodiment. [Diagram 2] 13 is a schematic diagram showing how update data 3 is encrypted. FIG. [Diagram 3] FIG. 2 is a diagram showing the structure of a global header 31. [Figure 4] 11 is a flowchart illustrating a resume process in a program update. [Diagram 5] 10 is a flowchart illustrating a process in which the update data transmission unit 2 transmits the update data 4. [Figure 6] 13 is a flowchart illustrating details of S408. [Figure 7] 13 is a flowchart illustrating details of S603. [Figure 8] FIG. 11 is a configuration diagram of an ECU 1 according to a second embodiment. [Figure 9] FIG. 11 is a configuration diagram of an ECU 1 according to a third embodiment. [Figure 10] FIG. 11 is a configuration diagram of an ECU 1 according to a fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] <Embodiment 1> 1 is a configuration diagram of an electronic control unit (ECU) 1 according to a first embodiment of the present invention. The ECU 1 is mounted on a vehicle. The ECU 1 controls devices mounted on the vehicle. Examples of the in-vehicle devices include an engine, a power steering device, and a controlled brake device. The ECU 1 controls these devices by executing a control program that implements processing for controlling the in-vehicle devices.

[0014] The ECU 1 includes a microcomputer 11. The microcomputer 11 includes at least one CPU (Central Processor Unit) 12 that executes software, at least one volatile RAM (Random Access Memory) 13, at least one non-volatile memory 15 that stores programs and data, and at least one communication unit 14. The communication unit 14 is connected to an update data transmission unit 2 that is external to the ECU 1, and receives update data via the update data transmission unit 2 during a program update.

[0015] The update data transmission unit 2 may be, for example, a terminal for program update preferentially connected to a data communication connector of the vehicle, a server computer that communicates with the ECU 1 by wireless communication, or another ECU mounted on the same vehicle.

[0016] 2 is a schematic diagram showing the encryption of the update data 3. The update data 3 is data including updates of programs executed by the ECU 1. The update data 3 is transmitted from, for example, a data center to the ECU 1 by wireless communication. The update data 3 is configured as binary data stored in, for example, the non-volatile memory 15.

[0017] The update data 3 is composed of a global header 31 and one or more data blocks (data blocks 32, 33, and 3N are illustrated in FIG. 2). A data block is composed of a local header portion and a body portion (for example, data block 32 is composed of a local header 321 and a body 322). The sizes of the data blocks may be the same or different.

[0018] The body part of the data block is compressed before being sent to the ECU 1. The local header part is not compressed. A local header is added to the compressed body part. The local header and body pair are concatenated to form one piece of data, and a global header 31 is then added to create the update data 3. The local header describes additional information for the data block, and the global header describes additional information for the entire update data 3. Details of these headers will be described later.

[0019] The update data 3 is encrypted before being sent to the ECU 1 to become the update data 4. The update data 4 has encrypted data blocks (data blocks 42, 43, and 4N are shown as examples in FIG. 2). The global header 31 is added without being encrypted. In this embodiment, a block cipher is used as the encryption algorithm, but another algorithm may also be used. When a block cipher algorithm is used, the update data 4 is encrypted for each data block, and then further encrypted for each block of a certain size.

[0020] The local header may or may not be encrypted. That is, as described later, it is only necessary to specify the correspondence between each data block in the update data 4 and the storage address of each data block in the non-volatile memory 15. In other words, this correspondence may be described in the global header 31 or in each local header. In the former case, by describing the start address of each data block in the update data 4 in the global header 31, the ECU 1 can specify the correspondence between each data block in the update data 4 and the storage address in the non-volatile memory 15, so each local header may be encrypted. In the latter case, each local header describes the position of the next local header in the update data 4, and by continuing this, the position of each data block in the update data 4 is specified. The local header of a data block describes information that can specify the position (address) at which the data block should be stored in the non-volatile memory 15. This allows the ECU 1 to specify the correspondence between each data block in the update data 4 and the storage address in the non-volatile memory 15. In either case, the global header 31 is not encrypted.

[0021] The local header does not necessarily have to be placed at the beginning of the data block, and may be placed at the end of the data block, or at any position between the beginning and end. The method by which the local header specifies the position of the next data block may be to specify the beginning of the body of the next data block, or to specify the local header of the next data block (but only if the local header is placed at the beginning of the data block).

[0022] 3 is a configuration diagram of the global header 31. The global header 31 has ROM information 311, a resume address 312, and an IV (Initial Vector) 313. Here, an example is shown in which the relationship between the data block and the storage address in the non-volatile memory 15 (i.e., the resume address 312) is stored in the global header 31.

[0023] The ROM information 311 is information such as the number of blocks constituting the update data 3, the size of the update data 3, and a code indicating a compression / encryption algorithm. The resume address 312 describes the correspondence relationship between the start address of each data block in the update data 3 and the address in the non-volatile memory 15 to which the data block is written. The address itself in the non-volatile memory 15 may be described, or other information capable of identifying the address in the non-volatile memory 15 may be described. The IV 313 is information required for decrypting the first encrypted data block (data block 42 in FIG. 2) in the block cipher. The ROM information 311 and the resume address 312 may be included in the local header. The IV 313 may not be included in the global header 31, but may be stored in the non-volatile memory 15 in advance.

[0024] The addresses in update data 3 described in global header 31 have the same values ​​used in update data 4 (because global header 31 is common to update data 3 and 4). Therefore, when encrypting update data 3, it is desirable not to change the size of each data block. For example, it is desirable to use an encryption algorithm that does not change the size of the data blocks. Block cipher is one example. On the other hand, if the size of each data block changes when encrypting update data 3, the change must be reflected in resume address 312.

[0025] Some or all of the information in the global header 31 is transmitted to the ECU 1 via the update data transmission unit 2 and then stored in the non-volatile memory 15. In this embodiment, when the ECU 1 receives the update data 4, the resume address 312 is stored in the non-volatile memory 15 and other information in the global header 31 is not stored. However, instead of or in addition to this, for example, the IV 313 may be stored in the non-volatile memory 15.

[0026] 4 is a flow chart for explaining the resume process in a program update. Each step in FIG. 4 will be explained below.

[0027] (Figure 4: Step S401) When the resume process starts, the update data transmission unit 2 requests the ECU 1 to transmit the transfer start address of the update data 4. The transfer start address is an address that specifies which part of the update data 4 to resend to the ECU 1 if, for example, the process of writing the update data 4 to the non-volatile memory 15 is interrupted midway. If the process is not interrupted midway, it is sufficient to specify the start address.

[0028] (Figure 4: Step S402) The CPU 12 determines whether the data block to be written first to the non-volatile memory 15 is the first data block of the update data 4. This determination can be made by referring to the written block information described later. If the first data block is about to be written, the process proceeds to S403, and if a data block other than the first data block is about to be written, the process proceeds to S404.

[0029] (Figure 4: Steps S403 and S407) The CPU 12 sets the transfer start request address to the beginning of the update data 4 (S403). The CPU 12 returns the transfer start request address to the update data transmitting unit 2 (S407).

[0030] (FIG. 4: Steps S404 to S406, S407) The CPU 12 identifies the top address of an area in the non-volatile memory 15 where writing of data blocks has not been completed according to the write-completed block information (S404). The CPU 12 identifies a corresponding address in the update data 4 according to the identified address (S405). This address becomes the resume address of the update data 4. The correspondence between the addresses in the non-volatile memory 15 and the addresses in the update data 4 may be stored in the non-volatile memory 15 in advance, for example. Alternatively, this correspondence may be held in advance in the update data transmission unit 2, and the CPU 12 may specify the address in the non-volatile memory 15 as the resume address and identify the corresponding address in the update data 4 in the update data transmission unit 2 according to the correspondence. The CPU 12 sets the resume address as a transfer start request address (S406). The CPU 12 returns the transfer start request address to the update data transmission unit 2 (S407).

[0031] (Figure 4: Step S405: Supplement) The position of a data block in the update data 4 may be specified by an address in the update data 4, or may be specified by information other than an address, such as the number of a data block. In other words, it is sufficient that at least information capable of specifying the correspondence between a data block in the update data 4 and a position in the non-volatile memory 15 can be shared between the update data transmission unit 2 and the ECU 1.

[0032] (Figure 4: Step S408) When the update data transmission unit 2 receives the transfer start request address from the ECU 1, it transmits the portion of the update data 4 following the transfer start request address to the ECU 1. The CPU 12 receives the update data 4 and writes it into the non-volatile memory 15. Details of this step will be described later.

[0033] Fig. 5 is a flowchart explaining the process in which the update data transmission unit 2 transmits the update data 4. The update data transmission unit 2 starts this flowchart when it receives a transfer start request address from the ECU 1. Each step in Fig. 5 will be explained below.

[0034] (FIG. 5: Step S501) The update data transmission unit 2 judges whether or not the transfer start request address is the first encrypted data block of the update data 4. If it is the first, the process proceeds to S502, and if it is not the first, the process proceeds to S503.

[0035] (FIG. 5: Step S502) The update data transmission unit 2 transmits the IV 313 used to decrypt the encrypted data block at the beginning of the update data 4 to the ECU 1 .

[0036] (FIG. 5: Step S503) The update data transmission unit 2 transmits to the ECU 1 another encrypted data block used to decrypt the data block of the update data 4. Typically, when encrypting a data block, the encryption is performed using the encrypted data block immediately before it. Therefore, the update data transmission unit 2 transmits to the ECU 1 the encrypted data block immediately before the data block specified by the transfer start request address.

[0037] (FIG. 5: Step S504) The update data transmission unit 2 transmits the data to the ECU 1 in order, starting from the data block specified by the transfer start request address. The ECU 1 can decode the first data block it receives using the data block received in S502 or S503. For subsequent data blocks, the ECU 1 can temporarily store the previously received data block in the RAM 13 or the like and use this data block for decoding. When using a data block other than the previously received data block for decoding, it is sufficient to temporarily store the data block used for decoding in the RAM 13 or the like.

[0038] Fig. 6 is a flowchart for explaining the details of S408. Each step in Fig. 6 will be explained below.

[0039] (Figure 6: Step S601) The communication unit 14 receives the update data 4 from the update data transmission unit 2. The CPU 12 stores the global header 31 (ROM information 311, resume address 312, IV 313) included in the update data 4 in the RAM 13 or the non-volatile memory 15.

[0040] (Figure 6: Step S602) The CPU 12 judges whether or not one or more encrypted data blocks have been received. For example, this judgment can be made based on whether or not the data received from the update data transmission unit 2 reaches the size of the encrypted data block. If one or more encrypted data blocks have been received, the process proceeds to S603, and if not, the process returns to S601 to continue receiving data.

[0041] (Figure 6: Step S603) The CPU 12 decrypts the received encrypted data block and develops the decrypted data in the RAM 13 or the non-volatile memory 15. The details of the decryption process in this step will be described later.

[0042] (Figure 6: Step S604) The CPU 12 stores the last decrypted encrypted data block in the RAM 13 or the non-volatile memory 15 for use in decrypting the next encrypted data block.

[0043] (Figure 6: Step S605) The CPU 12 judges whether the decoded data contains one or more compressed data blocks. For example, if the size of the decoded data is less than one compressed data block, it can be judged that there is no compressed data block. If no compressed data block is contained, the process returns to S601 and continues to receive data. If a compressed data block is contained, the process proceeds to S606.

[0044] (Figure 6: Step S606) The CPU 12 decompresses the compressed data block.

[0045] (Figure 6: Step S607) The CPU 12 judges whether the decompressed data reaches the write block size of the non-volatile memory 15. If it does not reach the write block size, the process returns to step S601 to continue receiving data. If it reaches the write block size, the process proceeds to S608.

[0046] (Figure 6: Steps S608 to S609) The CPU 12 writes the decompressed data to the non-volatile memory 15 (S608). The CPU 12 stores written data block information, which indicates that writing of the data block has been completed, in the non-volatile memory 15 (S609).

[0047] (Figure 6: Step S609: Supplement) The written data block information can also be used to check the consistency of the written data block. For example, the CPU 12 may use the written data block information to perform an error correction process or the like to determine whether the data block has been written normally.

[0048] Fig. 7 is a flowchart for explaining the details of S603. In this embodiment, the encryption process and the decryption process use the AES-CBC (Advanced Encryption Standard-Cipher Block Chaining) mode, but this is not limiting and other algorithms may be used. Each step of Fig. 7 will be explained below.

[0049] (Figure 7: Step S701) The CPU 12 determines whether or not the data block to be decrypted is the first encrypted data block (data block 42 in the example of FIG. 2) in the update data 4. If the first encrypted data block is to be decrypted, the process proceeds to S702, and if the second or subsequent encrypted data block is to be decrypted, the process proceeds to S704.

[0050] (FIG. 7: Step S702) The CPU 12 decrypts the first encrypted data block in the update data 4. For example, the decryption key used is the same as that used in the encryption process for generating the encrypted data block. The decryption key may be stored in the non-volatile memory 15 in advance, or may be transmitted to the ECU 1 by another secure method.

[0051] (Figure 7: Step S703) The CPU 12 can generate a plaintext block, so-called plaintext, by performing an exclusive OR (XOR) between the decrypted encrypted data block and the IV 313 stored in the non-volatile memory 15 in S408 of Fig. 4. S702 to S703 may be collectively regarded as a decryption process in a broad sense. The same applies to S704 and S705.

[0052] (FIG. 7: Step S704) The CPU 12 decrypts the second and subsequent encrypted data blocks in the update data 4. The decryption key is the same as in S702.

[0053] (Figure 7: Step S705) The CPU 12 can generate a plaintext block by taking an XOR of the decrypted encrypted data block and the encrypted data block stored in the non-volatile memory 15 in S604 of FIG.

[0054] <Embodiment 2> 8 is a configuration diagram of an ECU 1 according to a second embodiment of the present invention. When the ECU 1 receives the update data 4 from the update data transmission unit 2, the data relay ECU 5 may relay the update data 4. For example, the data relay ECU 5 is a gateway device disposed between the ECU 1 and the update data transmission unit 2, and can be mounted in the same in-vehicle network as the ECU 1. When the data relay ECU 5 receives the update data 4, it temporarily stores a copy of the data. The data relay ECU 5 does not decrypt or decompress the update data 4.

[0055] If the data relay ECU 5 has received all of the update data 4 without any problems, the update data transmission unit 2 in the first embodiment is replaced with the data relay ECU 5, and resumption can be achieved in the same manner as in the first embodiment.

[0056] If an abnormality occurs while the data relay ECU 5 is saving the update data 4, the update data 4 can be resent between the update data transmission unit 2 and the data relay ECU 5. Since the data relay ECU 5 does not decrypt or decompress the update data 4, the resend start address can simply be set to immediately after the address range that could be saved in the data relay ECU 5.

[0057] <Embodiment 3> 9 is a configuration diagram of an ECU 1 according to a third embodiment of the present invention. The update data 4 may be stored in a nonvolatile storage device such as a flash memory 17 arranged outside the microcomputer 11, instead of in the nonvolatile memory 15. In this case, the microcomputer 11 accesses the flash memory 17 via an interface such as the serial communication unit 16, and writes a data block obtained by decrypting and decompressing the update data 4.

[0058] <Fourth embodiment> Fig. 10 is a configuration diagram of an ECU 1 according to a fourth embodiment of the present invention. The present invention can also be applied when the ECU 1 includes two or more microcomputers 11 as in Fig. 10. Specifically, one of the microcomputers 11 receives the update data 4. A data block obtained from the update data 4 by decompressing and decrypting it is shared with the other microcomputers 11 via the inter-microcomputer communication unit 18.

[0059] <Summary> An ECU1 in accordance with the first to fourth embodiments is an electronic control device mounted on a vehicle, and includes a calculation unit that executes a program that implements processing for controlling equipment mounted on the vehicle, a communication unit that receives update data used to update the program, and a memory unit that stores the program, wherein the update data includes at least one of compressed data that has been compressed or encrypted data that has been encrypted, and also includes non-processed data that has not been compressed or encrypted, wherein the calculation unit extracts from the update data an update data block of the program to be written to the memory unit by at least either decompressing the compressed data or decrypting the encrypted data, wherein the non-processed data holds an address list that describes information that can identify each data block included in the update data, and when the process of writing the update data block to the memory unit is interrupted midway, the calculation unit identifies a data block in the update data that corresponds to the update data block to be rewritten according to the address list, and specifies the identified data block to re-acquire the update data. Since the resend request address information is included in the non-processed data that has not been compressed or encrypted, the resend request address can be identified without decompressing or decrypting the data, which makes it easy to resume the write process.

[0060] In such an ECU 1, the non-processed data may include a header portion at the beginning of the update data, the address list may be included in the header portion, and the calculation unit may identify a data block in the update data that corresponds to the updated data block to be rewritten by acquiring the address list from the header portion. Since the resend request addresses of each data block are collectively included in a global header, and the global header is transmitted first in the entire update data, when the write process is resumed, the resend request addresses have already been transmitted regardless of the resumed writing of any data block. Therefore, the resend request addresses can be reliably identified.

[0061] In the ECU1, the electronic control unit may further include a memory for storing the address list, and the calculation unit may store the address list obtained from the header portion in the memory when writing the updated data block to the storage unit, and when the process of writing the updated data block to the storage unit is interrupted, the calculation unit may use the address list stored in the memory to identify the data block in the update data that corresponds to the updated data block to be rewritten. Even if the interruption of the write process is caused by a power interruption, the resend request address is stored in the data flash. Therefore, the transmitted resend request address is not lost even when the power is interrupted.

[0062] In the ECU 1, the update data may be composed of one or more data blocks, the non-processed data may include a header portion at the beginning of the data block, the address list may be included in the header portion, and the calculation unit may identify a data block in the update data that corresponds to the updated data block to be rewritten by acquiring the address list from the header portion. Even if the write process of any data block is interrupted, the local header of this data block has already been transmitted, so that a resend request address can be identified.

[0063] In the ECU 1, the data block may be subjected to the compression process, and the header portion of the data block may be uncompressed. By dividing the data into a plurality of data blocks and then performing the compression process, a higher compression effect can be obtained (higher compression ratio). In addition, since a header area, which is non-processed data, is added after the compression process, the header area is not affected by the compression process.

[0064] In the ECU 1, the calculation unit may be configured to obtain the updated data block by decompressing the update data for each data block, and the calculation unit may be configured to write the update data for each updated data block to the storage unit. Since the decompression process and the write process are performed for each block, there is no need to hold a large amount of decompressed data waiting to be written, and an increase in memory load can be suppressed.

[0065] In the ECU 1, the update data may be configured by aggregating one or more of the data blocks that have been subjected to the compression process and the header portion corresponding to the data block, and the update data may be configured such that the encryption process is performed for each of the data blocks, and the header portion is not encrypted. The update data can be transmitted in a state suitable for data transfer using a data transfer tool in the vehicle maintenance factory, such as the Air, and the update data can be encrypted in a state suitable for encryption.

[0066] In the ECU 1, the update data may be subjected to the encryption process after the compression process, and the calculation unit may obtain the updated data block by decrypting and then decompressing the update data, thereby achieving a compression process that provides a higher compression effect, and then a decryption process and a decompression process that are suitable for the encrypted update data.

[0067] In the ECU 1, the update data may be composed of one or more data blocks, the incidental information of the data block may be described at the beginning, end, or between the beginning and end of the data block, and the address list may be configured to describe the beginning position of the data block or to describe the position of the incidental information arranged at the beginning of the data block. When a resend request address is located at the beginning of each data block, the necessary data can be resent and rewritten by resuming the write process from this resend request address.

[0068] In the ECU 1, the update data may include a second data block following a first data block, and the calculation unit may be configured to resume the process of writing the update data to the storage unit from the second data block if the process of writing the second data block to the storage unit is interrupted midway after writing the first data block to the storage unit. Since the write process is resumed from the second data block next to the first data block for which the write process has been completed, data transmission and writing can be minimized, and efficient write process can be performed.

[0069] In ECU1, the electronic control unit may further include a memory for storing write completion block information indicating that writing of the data block of the update data to the storage unit has been completed, and the calculation unit may be configured to store the write completion block information for the data block for which writing has been completed in the memory each time the data block of the update data is written to the storage unit, and when the write completion block information indicates that writing of the second data block to the storage unit has not been completed, the calculation unit may resume writing the update data to the storage unit from the second data block. When resuming the write process, it is possible to easily specify from which data block writing should be resumed by referring to the write completion information in the data flash.

[0070] In the ECU 1, the calculation unit may be configured to diagnose whether or not the update data has been normally written into the storage unit according to the write-completed block information. By determining whether or not there is an abnormality in the write process, a safer write process, i.e., a program data update process, can be performed.

[0071] In the ECU1, the vehicle may be equipped with a gateway device that temporarily stores the update data and transfers the temporarily stored update data to the electronic control device, the communication unit receives the update data via the gateway device, and the calculation unit may be configured to reacquire the update data temporarily stored by the gateway device when resuming the interrupted writing process. Once the update data is stored in the gateway, communication between the update data transmission unit 2 and the vehicle is no longer necessary, so that the program data update process can be performed regardless of the communication state. Furthermore, when the writing process is resumed, the update data stored in the gateway is used, so there is no need to communicate again between the electronic terminal and the vehicle.

[0072] In the ECU 1, a first data block included in the update data is encrypted using a second data block that is included in the update data and different from the first data block, the update data includes an initialization vector used to decrypt a first encrypted data block in the update data, and the calculation unit may be configured to decrypt the second data block by acquiring both the second data block and the initialization vector when the second data block is the first encrypted data block in the update data. When writing a first encrypted block, the decryption process can be appropriately performed by also transmitting an initialization vector required for a decryption process performed before the write process.

[0073] In the ECU 1, a first data block included in the update data is encrypted using a second data block that is included in the update data and different from the first data block, the update data includes an initialization vector used to decrypt a first encrypted data block in the update data, the first data block is arranged after the second data block in the update data, and the calculation unit may be configured to decrypt the first data block by acquiring both the first data block and the second data block when decrypting the first data block. When writing a second or subsequent encrypted block, another block is required for the decryption process, so by transmitting this block as well, the decryption process can be performed appropriately.

[0074] <Modifications of the present invention> The present invention is not limited to the above-described embodiment, and includes various modified examples. For example, the above-described embodiment has been described in detail to clearly explain the present invention, and is not necessarily limited to those including all of the configurations described. In addition, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. In addition, it is possible to add, delete, or replace a part of the configuration of each embodiment with another configuration.

[0075] In the above embodiment, the data written to the non-volatile memory 15 or the flash memory 17 may remain compressed. In this case, when the CPU 12 uses the compressed data, it dynamically decompresses the data and temporarily stores it in the RAM 13, and then reads out the decompressed data from the RAM 13 and executes it.

[0076] In embodiment 4, the microcomputer 11 that first receives the update data 4 may decode the update data 4 and then transmit the decoded data to the other microcomputers 11, or the update data 4 may be transmitted as is to the other microcomputers 11 and each microcomputer 11 may decode it itself. [Explanation of symbols]

[0077] 1: ECU 11: Microcomputer 12: CPU 13: RAM 14: Communications Department 15: Non-volatile memory 16: Serial communication section 17: Flash memory 18: Microcomputer communication section 2: Update data transmission section 3: Update data 31: Global Header 321~3N1: Local header 322~3N2: Body 4: Update data 42~4N: Encrypted data block 5: Data relay ECU

Claims

1. An electronic control device mounted on a vehicle, A computing unit that executes a program that implements a process for controlling a device mounted on the vehicle; a communication unit for receiving update data used to update the program; A storage unit that stores the program; Equipped with the update data includes at least one of compressed data that has been subjected to a compression process and encrypted data that has been subjected to an encryption process, and also includes non-processed data that has not been subjected to either a compression process or an encryption process; the computing unit extracts an update data block of the program to be written to the storage unit from the update data by at least one of decompressing the compressed data or decrypting the encrypted data; The non-processing data includes an address list that describes information that can identify each data block included in the update data, when the process of writing the updated data block to the storage unit is interrupted midway, the calculation unit identifies a data block in the updated data corresponding to the updated data block to be rewritten according to the address list, and specifies the identified data block to reacquire the updated data; a first data block included in the update data is encrypted using a second data block included in the update data and different from the first data block; the computing unit decodes the update data by decoding the first data block using the second data block; When a write process of writing the decrypted first data block to the storage unit is interrupted, the calculation unit reacquires the update data including both the first data block and the second data block, and then re-decrypts the first data block using the reacquired second data block.

1. An electronic control device comprising:

2. the non-processed data includes a header portion at the beginning of the update data, the address list is included in the header portion; The calculation unit acquires the address list from the header portion to identify a data block in the update data that corresponds to the update data block to be rewritten.

2. The electronic control device according to claim 1.

3. The electronic control device further includes a memory for storing the address list; the calculation unit stores the address list obtained from the header portion in the memory when writing the updated data block to the storage unit; When the process of writing the update data block to the storage unit is interrupted, the calculation unit uses the address list stored in the memory to identify a data block in the update data that corresponds to the update data block to be rewritten.

3. The electronic control device according to claim 2.

4. The update data is composed of one or more data blocks, the unprocessed data includes a header portion at the beginning of the data block; the address list is included in the header portion; The calculation unit acquires the address list from the header portion to identify a data block in the update data that corresponds to the update data block to be rewritten.

2. The electronic control device according to claim 1.

5. The data block has been subjected to the compression process, The header portion of the data block is not compressed.

5. The electronic control device according to claim 4.

6. The computing unit obtains the updated data block by decompressing the update data for each data block, The calculation unit writes the update data to the storage unit for each update data block.

6. The electronic control device according to claim 5.

7. the update data is configured by aggregating one or more of the data blocks that have been subjected to the compression process and the header portions corresponding to the data blocks, the update data is encrypted for each data block, The header portion is not encrypted.

6. The electronic control device according to claim 5.

8. the update data is subjected to the compression processing and then the encryption processing, The computing unit obtains the updated data block by decrypting and then decompressing the updated data.

6. The electronic control device according to claim 5.

9. The update data is composed of one or more data blocks, the additional information of the data block is written at the beginning, end, or between the beginning and end of the data block; The address list describes the beginning position of the data block, or describes the position of the additional information arranged at the beginning of the data block.

2. The electronic control device according to claim 1.

10. the update data includes the first data block followed by the second data block, When the process of writing the second data block to the storage unit is interrupted after the first data block is written to the storage unit, the calculation unit resumes the process of writing the update data to the storage unit from the second data block.

2. The electronic control device according to claim 1.

11. the electronic control device further includes a memory that stores write completion block information indicating that writing of the data block of the update data to the storage unit has been completed; the calculation unit stores the write-completed block information relating to the data block that has been written into the memory each time the calculation unit writes the data block of the update data into the storage unit; When the write-completed block information indicates that writing of the second data block to the storage unit has not been completed, the calculation unit resumes the process of writing the update data to the storage unit from the second data block.

11. The electronic control device according to claim 10.

12. The computing unit diagnoses whether or not the update data has been normally written into the storage unit according to the write-completed block information.

12. The electronic control device according to claim 11.

13. the vehicle is equipped with a gateway device that temporarily stores the update data and transfers the temporarily stored update data to the electronic control device, The communication unit receives the update data via the gateway device, When the interrupted writing process is resumed, the calculation unit reacquires the update data temporarily stored in the gateway device.

2. The electronic control device according to claim 1.

14. The update data includes an initialization vector used to decrypt a first encrypted data block in the update data, The computing unit decrypts the second data block by obtaining the second data block together with the initialization vector if the second data block is a first encrypted data block in the update data.

2. The electronic control device according to claim 1.

15. The update data includes an initialization vector used to decrypt a first encrypted data block in the update data, the first data block is located after the second data block in the update data; When the calculation unit decodes the first data block, the calculation unit obtains the first data block and the second data block together to decode the first data block.

2. The electronic control device according to claim 1.

Citation Information

Patent Citations

  • Packaging method of upgrade package and upgrading method thereof

    CN108170455A

  • Control unit for automobile

    JP2006298261A

  • Rewrite system

    JP2017097576A

  • Compressed Firmware Update

    JP2019519829A

  • Encryption and decryption device

    JP2020187184A