Vehicle control device and program update system
阅读说明:本技术 车辆控制装置及程序更新系统 (Vehicle control device and program update system ) 是由 中原章晴 黑泽宪一 阿部雄介 于 2019-02-01 设计创作,主要内容包括:本发明做到即便在差分数据较大的情况下也实现控制程序的更新。本发明在程序更新时根据存放差分数据的车辆控制装置的区域的容量来控制接收的数据量,由此,车辆控制装置即便未存放有所有差分数据,也会利用接收到的部分数据来依序进行还原更新。(The invention realizes the update of the control program even under the condition that the difference data is large. The present invention controls the amount of received data according to the capacity of the area of the vehicle control device storing the differential data at the time of program update, whereby the vehicle control device performs restoration update in order using the received partial data even if not storing all the differential data.)
1. A vehicle control device is characterized by comprising:
a 1 st memory unit in which a rewritable program is stored;
a 2 nd memory unit for storing difference data between the program and a new program;
a receiving unit that receives data including the difference data divided into write block unit lengths of the 2 nd memory unit, a write target address of the new program, and a size of the difference data;
a determination unit configured to determine a size of the received differential data;
a write section that writes the received differential data to the address of the 2 nd memory section;
a difference restoring unit that restores the new program using the difference data and the program stored in the 2 nd memory unit; and
and a rewriting unit configured to rewrite the program in the 1 st memory unit to the new program obtained by the restoration.
2. The vehicle control apparatus according to claim 1,
and when it is determined that the differential data of the write block size of the 2 nd memory unit is received, writing the received differential data to the address of the 2 nd memory unit.
3. The vehicle control apparatus according to claim 2,
when it is determined that the differential data of the memory size of the 2 nd memory unit is received and there is the differential data that has not been received, the transmission of the differential data is suspended.
4. The vehicle control apparatus according to claim 3,
the diagnostic unit is provided to diagnose the difference data written in the 2 nd memory unit.
5. The vehicle control apparatus according to claim 4,
when the difference data stored in the 2 nd memory unit is normal and program update is permitted by a user, the difference restoring unit restores a difference using the difference data stored in the 2 nd memory unit and the program stored in the 1 st memory unit,
the rewriting section rewrites the program of the 1 st memory section into the new program.
6. The vehicle control apparatus according to claim 5,
in the presence of the differential data not received,
receiving the remaining differential data after rewriting the program obtained by the restoration,
writing the received remaining differential data to the 2 nd memory part,
in the case where the diagnosis of the written differential data is normal,
restoring a difference by the difference restoring unit using the difference data stored in the 2 nd memory unit and the program stored in the 1 st memory unit,
rewriting the program of the 1 st memory section as the new program.
7. The vehicle control apparatus according to claim 5,
the apparatus includes a timer unit configured to stop the reception of the differential data when it is detected that a predetermined time has elapsed during the reception of the differential data.
8. The vehicle control apparatus according to claim 5,
the rewriting of the program in the 1 st memory unit into the new program is performed when the ignition is OFF and the shift position of the vehicle is in the parking position.
9. A program update system is characterized by comprising:
a vehicle control device;
a program writing device connected to the vehicle control device via an in-vehicle network;
a server that distributes an update packet including the differential data of the vehicle control device to the program writing device via wireless communication; and
an input-output device that controls input and output with a user;
the vehicle control device includes:
a 1 st memory unit in which a rewritable program is stored;
a 2 nd memory unit for storing difference data between the program and a new program;
a receiving unit that receives data including the difference data divided into write block unit lengths of the 2 nd memory unit, a write target address of the new program, and a size of the difference data;
a determination unit configured to determine a size of the received differential data;
a write section that writes the received differential data to the address of the 2 nd memory section;
a difference restoring unit that restores the new program using the difference data and the program stored in the 2 nd memory unit; and
and a rewriting unit configured to rewrite the program in the 1 st memory unit to the new program obtained by the restoration.
10. The program update system of claim 9,
when a notification that the transmission of the differential data is temporarily suspended is received from the vehicle control device during the transmission of the differential data, the program writing device stores a start position of the differential data that has not been transmitted, stops the transmission of the differential data, and transmits a request for a validity diagnosis to the vehicle control device.
11. The software update system of claim 10,
when the result of the validity diagnosis of the difference data sent back from the vehicle control device is normal, the program writing device performs confirmation of whether or not the program of the vehicle control device is updated by the input/output device.
12. The software update system of claim 11,
when the determination of the availability is possible, the program writing device transmits a program update execution request including a write target address of the new program and the size of the difference data to the vehicle control device.
13. The software update system of claim 12,
when a response to the program update execution request is received from the vehicle control device, the program writing device transmits the differential data to the vehicle control device from the home position if there is the differential data that has not been transmitted.
14. The software update system of claim 9,
when a notification that the program update procedure is to be temporarily suspended because a predetermined time has elapsed is received from the vehicle control device during the transmission of the differential data, the program writing device stores the start position of the differential data that has not been transmitted and the size of the differential data that has not been transmitted, and ends the program update process.
15. A vehicle control device is characterized by comprising:
a 1 st memory unit in which a rewritable program is stored;
a 2 nd memory unit for storing difference data between the program and a new program;
a 3 rd memory unit for storing the compressed specific program;
a receiving unit that receives data including the difference data divided into write block unit lengths of the 2 nd memory unit, a write target address of the new program, and a size of the difference data;
a unit configured to determine a size of the received differential data;
a write section that writes the received differential data to the address of the 2 nd memory section;
a difference restoring unit that restores the new program using the difference data and the program stored in the 2 nd memory unit;
a rewriting unit that rewrites the program in the 1 st memory unit into the new program; and
and a decompression and restoration unit that decompresses and restores the compressed specific program and rewrites the program into the specific program.
16. The vehicle control apparatus according to claim 15,
a diagnosis unit for diagnosing the new program restored,
the decompression and restoration unit decompresses and restores the specific program stored in the 3 rd memory unit based on the result of the diagnosis, and rewrites the program in the 1 st memory unit into the specific program.
Technical Field
The present invention relates to a vehicle control device and a program update system.
Background
The vehicle control device includes a computing unit (for example, a microcomputer) that executes a control program for controlling the operation of the vehicle, and a rewritable nonvolatile memory such as a flash rom (read Only memory) in which the control program for the computing unit is stored.
Conventionally, such a vehicle Control device is reprogrammed by connecting a PC (Personal Computer) or a vehicle-mounted writing device as a writing tool to a vehicle-mounted Control device (ECU: Electric Control Unit) via a low-speed CAN (Controller Area Network), and writing the whole new program into a FlashROM of the ECU while dividing and transmitting the new program. Thus, there is a problem in that time required for writing is consumed.
In contrast, a reprogramming method based on a difference has been proposed in order to shorten the update time compared to the conventional method.
Disclosure of Invention
Problems to be solved by the invention
In the above patent document, it is necessary to download and store all differences between programs before and after updating in a memory of a receiving apparatus. However, the memory capacity of the vehicle control device is generally small, and it is difficult to sufficiently secure a memory area for program update. If the design is performed in consideration of a sufficient memory required for downloading all the differences, the capacity increases and the cost of parts increases. In addition, it is difficult to know the magnitude of the difference in future software updates at the software design stage, and it is difficult to obtain an appropriate memory capacity.
Therefore, the present invention realizes the update of the program even when the difference data is large.
Means for solving the problems
A vehicle control device according to the present invention includes: a 1 st memory unit in which a rewritable program is stored; a 2 nd memory unit for storing difference data between the program and a new program; a receiving unit that receives data including the difference data divided into write block unit lengths of the 2 nd memory unit, a write target address of the new program, and a size of the difference data; a determination unit configured to determine a size of the received differential data; a write section that writes the received differential data to the address of the 2 nd memory section; a difference restoring unit that restores the new program using the difference data and the program stored in the 2 nd memory unit; and a rewriting unit configured to rewrite the program in the 1 st memory unit to the new program obtained by the restoration.
ADVANTAGEOUS EFFECTS OF INVENTION
According to the above-described means, the program is updated even when the difference data is large.
Drawings
Fig. 1 is a configuration diagram of a program update system including a vehicle control device according to an embodiment of the present invention.
Fig. 2 is a configuration diagram of an in-vehicle network system provided in a vehicle.
Fig. 3 is a functional block diagram of the vehicle control device.
Fig. 4 shows an example of the structure of the FlashROM of the vehicle control device.
Fig. 5 is a functional block diagram of an update program.
Fig. 6 is a reprogramming sequence diagram of the vehicle control device according to the embodiment of the present invention.
Fig. 7 is a reprogramming sequence chart of the vehicle control device in the case where the difference data is larger than the 2 nd area.
Fig. 8A is a sequence diagram of differential data storage processing.
Fig. 8B is a sequence diagram of differential data storage processing.
Fig. 9 is a flowchart of the differential data storage processing.
Fig. 10 is a flowchart of the adequacy diagnosis process.
Fig. 11 shows an example of a user permission screen.
Fig. 12 is a functional block diagram of differential update.
Fig. 13 is a flowchart of the difference update process.
Fig. 14 shows an example of the sequence with the update time limit.
Fig. 15 is a functional block diagram of a vehicle control device according to
Fig. 16 is a functional block diagram of a vehicle control device according to
Detailed Description
<
Next, a program update system according to an embodiment of the present invention will be described with reference to the drawings.
Fig. 1 is a configuration diagram of a program update system according to an embodiment of the present invention. The program update system includes a
Fig. 2 is a configuration diagram of an in-vehicle network system provided in the
The
The
The HMI (Human-Machine Interface) 14 is constituted by, for example, various display liquid crystal display devices embedded in the center of the instrument panel of the
Fig. 3 is a configuration diagram of the
The
The
Fig. 4 is a diagram showing the internal structure of the
The
Fig. 5 is a diagram showing a functional configuration of the update program D10. The update program D10 has functions of a communication unit 501, an overwriting unit 503, a diagnosis unit 504, a differential restoration unit 505, and a reception size determination unit 502. The communication unit 501 communicates with the
Fig. 6 is a sequence example showing the flow of the entire update process. When the control software of the
In addition to the ACC state, the timing of execution of the difference data storage process (S604) and the software update process (S606) may be immediately after the completion of the update data download process S602 or at a predetermined time.
Fig. 7 shows an example of the sequence of the entire update process flow in the case where the data size of the difference data D13 is larger than the storage size of the 2
The procedure up to the registration process of the update data D13 with the
When the power switch of the vehicle is turned OFF, the vehicle is shifted from the power ON state to the ACC state S701, or the like, the update subject ECU receives the differential data D13 from the
Next, a screen for confirming whether or not the execution program D11 is permitted to be updated is displayed (S703). If the user permits, the program update process to the target
Next, a more detailed procedure will be described with respect to the differential data storing process and the updating process (S702 to S706).
Fig. 8A is a sequence diagram showing the flow of the differential data storage processing executed between the
Here, the 2
Next, the
Here, the operation of the differential data receiving and storing process S802 will be described with reference to fig. 5 and 9. When the
First, the differential data received by the communication unit 501 is stored in the RAM 113(S901), and the received differential data is subjected to size determination by the reception size determination 502 (S902 to S904). In step S902, it is determined whether the received data size is a data size amount that can be received at one time. In step S903, it is determined whether or not the received data is 1Block data. Finally, in step S904, it is determined whether the received data size is smaller than the 2 nd area size. Every time the reception data is accumulated by 1Block amount, the updating program D10 writes the data stored in the RAM to the FlashROM through the rewriting unit 503 (S910), and sends an acceptance response to receive the next reception data (S909). Here, when it is determined in step S904 that the received data size is equal to or larger than the 2 nd area size, the update program D10 transmits a standby response to the
Next, the operation of the validity diagnosis S803 will be described with reference to fig. 5 and 10. When the
First, in step S1001, information associated with the diagnosis request M806 received by the communication unit 501 is stored as a variable. Here, the sum of the differential data transmitted by the
In fig. 8A, a series of sequences of the differential data storing processing performed in the differential data storing processing a S702 is described, and when it can be confirmed that the differential data is normally stored in the 2
The
Fig. 8B shows a processing procedure after the user' S update permission confirmation is obtained in step S703. The sequence is composed of 3 steps S704, S705, and S706. The following description will be made separately.
Step S704 is a sequence diagram showing the flow of the update process a executed between the
First, the
In the update execution process S804, the difference data stored in the 2
Step S705 is a sequence diagram showing the flow of the differential data storage processing b. This processing is processing for receiving the differential data D13' that cannot be stored in the differential data storage processing a S702 from the
The final step S706 is a sequence diagram showing the flow of the update process b. The difference data D13' stored in the 2
Next, the operation of the update execution process S804 will be described with reference to fig. 12 and 13. When the
First, the difference generation/reduction unit will be explained. The difference generation unit searches the old program in the difference extraction process and the like to find a partial command sequence similar to that of the new program, and substitutes a short code for the partial command sequence and appends the partial command sequence to the copy instruction. On the other hand, in the case where a similar partial command sequence is not found, the partial command sequence is attached to the additional instruction. The column of the copy instruction and the additional instruction is the differential data. As described above, the difference data is not a result of subtracting the old program from the new program, but is composed of a sequence of a copy command, an additional command, and the like obtained by replacing a similar partial command sequence with a short code.
The operation of the update execution process S804 based on the difference will be described in view of the above preparation.
First, the difference reduction unit 505 reads out a difference command from the difference data D13 in the 2
Further, the countermeasure for determining a new program abnormality in the validity diagnosis will be described in
In the present embodiment, consider the following: if a series of software updates takes a long time, the conventional processing of the vehicle is affected. Furthermore, the following possibilities are also considered: when the software update time becomes long and the time until the power of the vehicle is turned OFF becomes long and the ACC state continues for a long time, the battery is drained by a corresponding increase in battery consumption, and the vehicle cannot be driven in the worst case. As a method for solving such a problem, it is considered to set a time limit for 1 implementable software update process. If the update is not completed within the limited time, the processing is temporarily stopped in the middle, and the update is performed from the next execution time to the next execution time. This can solve the above-described problem.
As an embodiment for solving the above-described problem, a sequence example in the case where a timer-based forcible interruption function is provided in the
< embodiment 1: conclusion
As described above, at the time of program update, the amount of data transmitted by the gateway is controlled according to the capacity of the area of the vehicle control device storing the differential data, whereby the vehicle control device can perform the restoration and program update in order using the received partial data even if not storing all the differential data. Therefore, it is possible to provide a vehicle control device that can achieve differential update even when a memory for receiving differential data cannot be sufficiently secured, and as a result, the memory area of the vehicle control device can be designed to be small.
<
In the update of the difference-based program described in
Fig. 15 is a configuration diagram of a
Fig. 16 is a diagram showing a functional configuration of an update program D10 according to
The decompression unit 506 is provided as a means for decompressing the compressed data D14 described earlier.
The difference is restored by the difference restoring means 505 that receives the difference data stored in the 1
Then, the specific program is operated, whereby the
< embodiment 2: conclusion
As described above, the
< relating to the modification example >
The present invention includes various modifications, and is not limited to the above embodiments. For example, the above embodiments are described in detail to explain the present invention in an easily understandable manner, and are not necessarily limited to all configurations described above. Note that a part of the structure of one embodiment may be replaced with the structure of another embodiment, or the structure of one embodiment may be added to the structure of another embodiment. Further, addition, deletion, and replacement of another configuration may be performed on a part of the configuration of each embodiment.
In
In
The
In the update sequence, the latest version of the control program is usually written, but it is also possible to perform an update with a control program of a degraded version for many reasons. In this case, the updated version of the control program becomes a degraded version of the control program. That is, the updated version of the control program refers to the control program written in the previous update sequence.
The above-described configurations, functions, processing units, processing methods, and the like may be partially implemented in hardware by designing them with an integrated circuit, for example. The above-described configurations, functions, and the like may be realized by software by a processor interpreting and executing a program for realizing the functions. Information such as programs, tables, and files for realizing the respective functions may be stored in a memory, a hard disk, a recording device such as ssd (solid State drive), or a recording medium such as an IC card, an SD card, or a DVD.
According to the above embodiments and combinations of the embodiments, the difference data having the size corresponding to the memory capacity of the vehicle control device is downloaded, and the update based on the difference is performed. By repeating this operation, even when the difference data is large, all control programs are updated. That is, even if the memory for storing the difference data is small, the difference update can be realized, and as a result, the capacity of the difference data storage area (2 nd memory unit) of the vehicle control device can be designed to be small, and the effect of cost reduction can be obtained.
Description of the symbols
1 vehicle
2 Server
3 internet line
4 radio base station
5 update package
11 vehicle control device
1122 guide block
1123
1124
1125 th 3 rd region
12 gateway
13 vehicle network
14 HMI
D10 updating program
D11 execution program
D13 differential data
D14 particular version of compressed data.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:用以存取异质存储器组件的存储器虚拟化