Electronic control device and system, matching determination method and recording medium
By arranging a matching determination unit in the vehicle electronic control device to determine the matching of the differential data and restore the updated data, the problem of writing differential data is solved and the reliability and safety of program rewriting are improved.
Patent Information
- Application Number
- CN201980052896.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-12
- Filing Date
- 2019-08-07
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-08-07
AI Technical Summary
During the program rewriting process of the vehicle electronic control device, restoration and writing based on irregular differential data may cause malfunctions in the vehicle control and diagnostic operations, and it is difficult for the existing technology to effectively determine the matching of the differential data, resulting in program Reliability and security of overwrites are affected.
By providing a matching determination unit in the electronic control device, the first determination information associated with the stored data and the second determination information associated with the differential data are used to determine whether the differential data matches the data storage area, and is used when it is determined that they match. Differential data is restored and updated data is written to ensure the accuracy and safety of program rewriting.
It realizes the proper execution of program rewriting of differential data in the vehicle electronic control device, improves the reliability and safety of program rewriting, and avoids vehicle control and diagnosis problems caused by irregular differential data.
Smart Images

Figure CN112543913B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on Japanese application No. 2018-151421 filed on August 10, 2018 and Japanese application No. 2019-129963 filed on July 12, 2019, and the contents thereof are cited herein. Technical Field
[0003] The present disclosure relates to an electronic control device, an electronic control system for a vehicle, a method for determining the consistency of differential data, and a program for determining the consistency of differential data. Background Art
[0004] In recent years, along with the diversification of vehicle control such as driving assistance functions and automatic driving functions, the scale of programs such as vehicle control and diagnosis of the electronic control unit (hereinafter referred to as ECU (Electronic Control Unit)) mounted on the vehicle has become larger and larger. In addition, along with version upgrades based on functional improvements, etc., there are more and more opportunities to rewrite (recompile) ECU programs. On the other hand, along with the development of communication networks, etc., the technology of networked cars is also becoming increasingly popular. Based on such a situation, for example, the following technology is proposed in Patent Document 1: A vehicle main device as a relay device is provided on the vehicle side, and the vehicle main device distributes the update data received from the central device wirelessly to the rewrite object ECU, thereby rewriting the program of the rewrite object ECU using OTA (Over The Air).
[0005] Patent Document 1: Japanese Patent No. 6216730
[0006] Patent document 1 discloses extracting the difference between the programs before and after rewriting and applying the difference. The rewriting target ECU restores the new program based on the difference data received from the vehicle main device and the old program stored in the memory, and writes the restored new program into the non-volatile memory. In this case, if the new program restored based on the irregular difference data is written into the non-volatile memory in the rewriting target ECU, there is a concern that the vehicle control, diagnosis and other operations may be malfunctioning. Summary of the invention
[0007] The present disclosure has been made in view of the above circumstances, and an object thereof is to provide an electronic control device, a vehicle electronic control system, a method for determining the consistency of differential data, and a program for determining the consistency of differential data that can appropriately execute rewriting of a program using differential data.
[0008] According to one aspect of the present disclosure, a differential data acquisition unit acquires data for rewriting a data storage area of an electronic control device, namely, differential data representing the difference between old data and new data. A matching determination unit determines whether the differential data matches the data storage area or the storage data based on first determination information related to the storage data stored in the data storage area and second determination information acquired in a manner associated with the differential data. If the matching determination unit determines that the matching of the differential data is positive, the update data restoration unit uses the differential data and the storage data to restore new data, namely, the update data. If the data writing unit restores the update data by the update data restoration unit, the restored update data is written to the data storage area.
[0009] The consistency of the differential data is determined, and if the consistency of the differential data is determined to be positive, the update data is restored using the differential data and the stored data, and the restored update data is written in. The program can be rewritten appropriately using the differential data. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above-mentioned purpose and other purposes, features and advantages of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings.
[0011] Figure 1 It is a diagram showing the overall structure of one embodiment.
[0012] Figure 2 This is a diagram showing the electrical structure of CGW.
[0013] Figure 3 It is a diagram showing the electrical structure of DCM.
[0014] Figure 4 It is a diagram showing the electrical structure of the ECU.
[0015] Figure 5 This is a diagram showing how to connect the power cord.
[0016] Figure 6 This is a diagram showing a method of packaging re-editing data and distribution specification data.
[0017] Figure 7 This is a diagram showing rewriting specification data for DCM.
[0018] Figure 8 This is a diagram showing rewriting specification data for CGW.
[0019] Fig. 9 This is a diagram showing distribution specification data.
[0020] Fig.10 It is a diagram showing the way of unpacking a distribution data packet.
[0021] Fig.11 This is a diagram showing a normal operation of the embedded single-sided independent memory.
[0022] Fig.12 This is a diagram showing the manner of rewriting operation in an embedded single-sided independent memory.
[0023] Fig.13 This is a diagram showing the normal operation of the download-type single-sided independent storage.
[0024] Fig.14 This is a diagram showing the manner of rewriting operation in a download-type single-sided individual memory.
[0025] Fig.15 This is a diagram showing a normal operation mode in the embedded single-sided suspend memory.
[0026] Fig.16 This is a diagram showing the manner of rewriting operation in the embedded single-sided suspend memory.
[0027] Fig.17 This is a diagram showing the normal operation of a download-type single-sided suspend memory.
[0028] Fig.18 This is a diagram showing the manner of rewriting operation in a download-type single-sided suspend memory.
[0029] Fig.19 This is a diagram showing a normal operation of the embedded double-sided memory.
[0030] Fig. 20 This is a diagram showing the manner of rewriting operation in the embedded double-sided memory.
[0031] Fig.21 This is a diagram showing a normal operation mode in a download-type double-sided memory.
[0032] Fig. 22 This is a diagram showing the manner of rewriting operation in a download-type double-sided memory.
[0033] Fig.23 This is a diagram showing a method of rewriting an application program.
[0034] Fig.24 This is a diagram showing a method of rewriting an application program.
[0035] Fig.25 This is a diagram showing a method of rewriting an application program.
[0036] Fig.26 This is a timing diagram showing how the application is rewritten by power control.
[0037] Fig. 27 This is a timing diagram showing how the application is rewritten by power control.
[0038] Fig.28 This is a timing diagram showing a method of rewriting an application program by self-maintaining the power supply.
[0039] Fig.29 This is a timing diagram showing a method of rewriting an application program by self-maintaining the power supply.
[0040] Fig.30 It is a diagram showing the stages.
[0041] Fig.31 This is a diagram showing a normal screen.
[0042] Fig.32 This figure shows a screen when an event notification is generated.
[0043] Fig.33 This figure shows a screen when an event is notified.
[0044] Fig.34 This is a diagram showing a screen when downloading is approved.
[0045] Fig.35 This is a diagram showing a screen when downloading is approved.
[0046] Fig.36 This is a diagram showing a screen during download execution.
[0047] Fig.37 This is a diagram showing a screen during download execution.
[0048] Fig.38 This figure shows the screen when downloading is completed.
[0049] Fig.39 This is a diagram showing a screen when installation is approved.
[0050] Fig.40 This is a diagram showing a screen when installation is approved.
[0051] Fig.41 This figure shows the screen during installation execution.
[0052] Fig.42 This figure shows the screen during installation execution.
[0053] Fig.43 This figure shows a screen when activating consent.
[0054] Fig.44 This is a diagram showing a screen when IG is turned on.
[0055] Fig.45This is a diagram showing a screen when confirming an operation.
[0056] Fig.46 This is a diagram showing a screen when confirming an operation.
[0057] Fig.47 This is a functional block diagram of the central device.
[0058] Fig.48 It is the functional block diagram of DCM.
[0059] Fig.49 This is a functional block diagram of CGW.
[0060] Fig.50 This is a functional block diagram of CGW.
[0061] Fig.51 It is the functional block diagram of ECU.
[0062] Fig.52 This is a functional block diagram of an in-vehicle display.
[0063] Fig.53 This is a functional block diagram of a transmission determination unit for distributing data packets.
[0064] Fig.54 This is a flowchart showing the transmission determination process of a distribution packet.
[0065] Fig.55 This is a functional block diagram of a download determination unit for a distribution data package.
[0066] Fig.56 This is a flowchart showing the download determination process of the distribution package.
[0067] Fig.57 This is a functional block diagram of a transfer determination unit for write data.
[0068] Fig.58 Detailed description of the flowchart of the write data transfer determination process.
[0069] Fig.59 This is a functional block diagram of a write data acquisition determination unit.
[0070] Fig.60 Detailed description of the flowchart of the write data acquisition and determination process.
[0071] Fig.61 This is a functional block diagram of the instruction determination unit implemented.
[0072] Fig.62 This is a flowchart showing the installation instruction determination process.
[0073] Fig.63 It is a diagram showing the method of indicating installation.
[0074] Fig.64 It is a diagram showing the method of indicating installation.
[0075] Fig.65 is a diagram showing how random values are generated.
[0076] Fig.66 This is a functional block diagram of the secure access key management unit.
[0077] Fig.67 is a flowchart showing the process of generating a secure access key.
[0078] Fig.68 is a diagram showing how to generate a secure access key.
[0079] Fig.69 Detailed description of the flowchart of the secure access key erasure process.
[0080] Fig.70 This is a diagram showing the flow of processing related to verification of written data.
[0081] Fig.71 This is a functional block diagram of the verification unit for write data.
[0082] Fig.72 : is a flowchart showing the verification process of written data.
[0083] Fig.73 This is a diagram showing a method of distributing the processing related to verification of written data.
[0084] Fig.74 This is a diagram showing a method of distributing the processing related to verification of written data.
[0085] Fig.75 This is a diagram showing a method of distributing the processing related to verification of written data.
[0086] Fig.76 This is a diagram showing a method of distributing the processing related to verification of written data.
[0087] Fig.77 This is a diagram showing the flow of verification of written data and rewriting of an application program.
[0088] Fig.78 This is a diagram showing the flow of verification of written data and rewriting of an application program.
[0089] Fig.79 This is a functional block diagram of the data storage surface information transmission control unit.
[0090] Fig.80 This is a flowchart showing the transmission control process of data storage surface information.
[0091] Fig.81 This is a sequence diagram showing a method of notifying double-sided rewriting information.
[0092] Fig.82 This is a functional block diagram of a power management unit that is not an object of rewriting.
[0093] Fig.83 This is a flowchart showing the power management process for non-rewrite targets.
[0094] Fig.84 This is a diagram showing the transition between the start state, the stop state, and the sleep state.
[0095] Fig.85 This is a diagram showing the transition between the start state, the stop state, and the sleep state.
[0096] Fig.86 This is a diagram showing how to connect the power cord.
[0097] Fig.87 This is a flowchart showing the process of monitoring the remaining battery level.
[0098] Fig.88 This is a functional block diagram of the file transfer control unit.
[0099] Fig.89 This is a flowchart showing the file transfer control process.
[0100] Fig.90 A diagram showing the method of transferring documents.
[0101] Fig.91 A diagram showing the method of transferring documents.
[0102] Fig.92 This is a diagram showing the split files and written files.
[0103] Fig.93 It is a diagram showing the way in which CGW sends a transmission request to DCM.
[0104] Fig.94 It is a diagram showing the way in which CGW sends a transmission request to DCM.
[0105] Fig.95 This is a diagram showing the manner in which the CGW distributes write data to the rewrite target ECU.
[0106] Fig.96 This is a diagram showing the manner in which the CGW distributes write data to the rewrite target ECU.
[0107] Fig.97 This is a diagram showing the manner in which the CGW distributes write data to the rewrite target ECU.
[0108] Fig.98 This is a diagram showing how the ECU is connected.
[0109] Fig.99 This is a functional block diagram of a distribution control unit that writes data.
[0110] Fig.100 is a diagram showing a bus load table.
[0111] Fig.101 This is a diagram showing a table to which the rewriting target ECU belongs.
[0112] Fig.102 Detailed description of the flow chart showing the distribution control process of write data.
[0113] Fig.103 It is a diagram showing a method of distributing write data.
[0114] Fig.104 It is a diagram showing a method of distributing write data.
[0115] Fig.105 This is a diagram showing a method of distributing and writing data while a vehicle is traveling.
[0116] Fig.106 This is a diagram showing a method of distributing and writing data during parking.
[0117] Fig.107 It is a graph showing the distribution amount of write data.
[0118] Fig.108 It is a graph showing the distribution amount of write data.
[0119] Fig.109 This is a functional block diagram of an activation request instruction unit.
[0120] Fig.110 Detailed description of the flowchart of the activation request instruction process.
[0121] Fig.111 It is a diagram showing a method of instructing an activation request.
[0122] Fig.112 This is a functional block diagram of the activated execution control unit.
[0123] Fig.113 : is a flowchart showing the rewriting process.
[0124] Fig.114 is a flowchart showing an activated execution control process.
[0125] Fig.115 This is a functional block diagram of the grouping unit of the rewriting object.
[0126] Fig.116 This is a flowchart showing the group management process of the rewriting object.
[0127] Fig.117 This is a flowchart showing the group management process of the rewriting object.
[0128] Fig.118 This is a diagram showing a method of grouping rewrite objects.
[0129] Fig.119 This is a functional block diagram of a rollback execution control unit.
[0130] Fig.120 This is a flowchart showing the process of determining the rollback method.
[0131] Fig.121 : is a flowchart showing the determination process of the cancellation request.
[0132] Fig.122 : is a flowchart showing the determination process of the cancellation request.
[0133] Fig.123 : is a flowchart showing the determination process of the cancellation request.
[0134] Fig.124 : is a flowchart showing the determination process of the cancellation request.
[0135] Fig.125 : is a flowchart showing the determination process of the cancellation request.
[0136] Fig.126 is a diagram showing how a rollback is performed.
[0137] Fig.127 is a diagram showing how a rollback is performed.
[0138] Fig.128 is a diagram showing how a rollback is performed.
[0139] Fig.129 is a diagram showing how a rollback is performed.
[0140] Fig.130 is a diagram showing how a rollback is performed.
[0141] Fig.131 This is a functional block diagram of a display control unit for rewriting the progress status.
[0142] Fig.132 This is a flowchart of a display control process showing a rewriting progress status.
[0143] Fig.133 This is a flowchart of a display control process showing a rewriting progress status.
[0144] Fig.134 This is a diagram showing a screen showing the progress of rewriting.
[0145] Fig.135 This is a diagram showing a screen showing the progress of rewriting.
[0146] Fig.136 This is a diagram showing a screen showing the progress of rewriting.
[0147] Fig.137 This is a diagram showing a screen showing the progress of rewriting.
[0148] Fig.138 This is a diagram showing a screen showing the progress of rewriting.
[0149] Fig.139 It is a graph showing the transition displayed by the progress graph.
[0150] Fig.140 It is a graph showing the transition displayed by the progress graph.
[0151] Fig.141 It is a graph showing the transition displayed by the progress graph.
[0152] Fig.142 It is a graph showing the transition displayed by the progress graph.
[0153] Fig.143 This is a diagram showing a screen showing the progress of rewriting.
[0154] Fig.144 This is a functional block of the difference data consistency determination unit.
[0155] Fig.145 This is a flowchart showing the matching determination process of difference data.
[0156] Fig.146 This is a diagram showing a method of determining the consistency of differential data.
[0157] Fig.147 This is a diagram showing a method of determining the consistency of differential data.
[0158] Fig.148 This is a functional block diagram of the rewritten execution control unit.
[0159] Fig.149 This is a flowchart showing normal operation processing.
[0160] Fig.150 This is a flowchart showing the rewriting operation process.
[0161] Fig.151 It is a flowchart showing the information notification processing.
[0162] Fig.152 This is a flowchart showing the verification process of the rewritten program.
[0163] Fig.153 This is a diagram showing the method of sending identification information and writing data.
[0164] Fig.154 This is a diagram showing the method of sending identification information and writing data.
[0165] Fig.155 This is a flowchart showing the installation instruction processing.
[0166] Fig.156 This is a functional block diagram of the session establishment unit.
[0167] Fig.157 This is a diagram showing the structure of a program.
[0168] Fig.158 It is a graph representing state transitions.
[0169] Fig.159 It is a graph representing state transitions.
[0170] Fig.160 It is a graph representing state transitions.
[0171] Fig.161 It is a diagram showing the mediation of a conversation.
[0172] Fig.162 It is a diagram showing the mediation of a conversation.
[0173] Fig.163 This is a flowchart showing the state transition management process in the first state.
[0174] Fig.164 This is a flowchart showing the state transition management process in the first state.
[0175] Fig.165 This is a flowchart showing the state transition management process in the first state.
[0176] Fig.166 : is a flowchart showing the state transition management process of the second state.
[0177] Fig.167 : is a flowchart showing the state transition management process of the second state.
[0178] Fig.168 This is a diagram showing the structure of a program.
[0179] Fig.169 It is a graph representing state transitions.
[0180] Fig.170This is a functional block diagram of a retry point determination unit.
[0181] Fig.171 This is a diagram showing the structure of a flash memory.
[0182] Fig.172 This is a flowchart showing the process of setting the process flag.
[0183] Fig.173 This is a flowchart showing the determination process of the processing flag.
[0184] Fig.174 This is a flowchart showing the determination process of the processing flag.
[0185] Fig.175 This is a functional block diagram of the synchronization control unit in the progress state.
[0186] Fig.176 This is a functional block diagram of the synchronization control unit in the progress state.
[0187] Fig.177 This is a diagram showing a method of transmitting and receiving a progress status signal.
[0188] Fig.178 : is a flowchart showing the progress status of the synchronous control process.
[0189] Fig.179 : is a flowchart showing the progress status of the synchronous control process.
[0190] Fig.180 This is a flowchart showing the display process of the progress status.
[0191] Fig.181 This is a functional block diagram of a transmission control unit for display control information.
[0192] Fig.182 This is a flowchart showing the transmission control processing of display control information.
[0193] Fig.183 This is a functional block diagram of a receiving control unit for display control information.
[0194] Fig.184 This is a flowchart showing the reception control processing of display control information.
[0195] Fig.185 This is a diagram showing information included in the distribution specification data.
[0196] Fig.186 This is a functional block diagram of a screen display control unit for progress display.
[0197] Fig.187 This is a diagram showing rewriting specification data.
[0198] Fig.188 This figure shows the screen when the menu is selected.
[0199] Fig.189 This is a diagram showing a screen displayed when a user makes a selection.
[0200] Fig.190 This is a diagram showing a screen when a user registers.
[0201] Fig.191 This is a flowchart showing screen display control processing for progress display.
[0202] Fig.192 This is a flowchart showing screen display control processing for progress display.
[0203] Fig.193 is a diagram representing a message frame.
[0204] Fig.194 This figure shows a screen when activating consent.
[0205] Fig.195 This is a diagram showing the setting of whether or not to display an item.
[0206] Fig.196 This is a diagram showing the setting of whether or not to display an item.
[0207] Fig.197 This figure shows a screen when activating consent.
[0208] Fig.198 It is a diagram showing a method of data communication.
[0209] Fig.199 This is a diagram showing a message frame when an activity is notified.
[0210] Fig.200 This is a diagram showing a message frame when downloading is approved.
[0211] Fig.201 This is a diagram showing a message frame when installation is agreed.
[0212] Fig.202 This is a diagram showing a message frame when activating consent.
[0213] Fig.203 This is a diagram showing the transition of the screen.
[0214] Fig.204 This figure shows a screen when an event notification is generated.
[0215] Fig.205 This is a diagram showing a screen when downloading is approved.
[0216] Fig.206 This is a diagram showing a screen when downloading is approved.
[0217] Fig.207 This is a diagram showing a screen during download execution.
[0218] Fig.208 This figure shows the screen when downloading is completed.
[0219] Fig.209 This is a diagram showing a screen when installation is approved.
[0220] Fig.210 This figure shows a screen when activating consent.
[0221] Fig.211 This is a functional block diagram of the report control unit for program update.
[0222] Fig.212 Detailed description of the flowchart of the program update report control process.
[0223] Fig.213 It is a diagram showing the reporting method of the indicator.
[0224] Fig.214 This is a diagram showing the transition of the reporting method when the rewriting target is a double-sided memory.
[0225] Fig.215 This is a diagram showing the transition of the reporting method when the rewriting target is a single-sided hang memory.
[0226] Fig.216 This is a diagram showing the transition of the reporting method when the rewriting target is a single-sided independent memory.
[0227] Fig.217 It is a diagram showing the connection method.
[0228] Fig.218 This is a functional module of the execution control unit for self-power retention in the CGW.
[0229] Fig.219 This is a functional module of the execution control unit that maintains power supply in the ECU.
[0230] Fig.220 This is a flowchart showing the execution control process of self-power-supply retention in the CGW.
[0231] Fig.221 This is a flowchart showing the execution control process of the power supply self-maintaining in the ECU.
[0232] Fig.222 This is a diagram showing the period during which the power supply needs to be self-maintained.
[0233] Fig.223 This is an overall sequence diagram showing the method of rewriting an application.
[0234] Fig.224 This is an overall sequence diagram showing the method of rewriting an application.
[0235] Fig.225 This is an overall sequence diagram showing the method of rewriting an application.
[0236] Fig.226 This is an overall sequence diagram showing the method of rewriting an application.
[0237] Fig.227 This is an overall sequence diagram showing the method of rewriting an application.
[0238] Fig.228 This is an overall sequence diagram showing the method of rewriting an application.
[0239] Fig.229 This is an overall sequence diagram showing the method of rewriting an application.
[0240] Fig.230 This is an overall sequence diagram showing the method of rewriting an application.
[0241] Fig.231 This is an overall sequence diagram showing the method of rewriting an application.
[0242] Fig.232 This is an overall sequence diagram showing the method of rewriting an application.
[0243] Fig.233 This is an overall sequence diagram showing the method of rewriting an application.
[0244] Fig.234 It is a diagram showing the overall configuration of the vehicle information communication system in the first embodiment.
[0245] Fig.235 This is a diagram showing the electrical structure of CGW.
[0246] Fig.236 It is a diagram showing the electrical structure of the ECU.
[0247] Fig.237 This is a diagram showing how to connect the power cord.
[0248] Fig.238 This is a diagram showing a method of packaging re-editing data and distribution specification data.
[0249] Fig.239 It is a diagram showing the way of unpacking a distribution data packet.
[0250] Fig.240 This is a diagram showing, in the form of a block diagram, a portion of the center device that is mainly related to each function of the server.
[0251] Fig.241 This is a graphic diagram showing the flow of processing in the center device.
[0252] Fig.242 FIG. 2 is a diagram showing an example of vehicle configuration information registered in the configuration information DB.
[0253] Fig.243 This is a diagram showing an example of the program and data registered in the ECU reprogramming data DB.
[0254] Fig.244 This is a diagram showing an example of specification data registered in the ECU metadata DB.
[0255] Fig.245 FIG. 2 is a diagram showing an example of the configuration information of a vehicle registered in the individual vehicle information DB.
[0256] Fig.246 This is a diagram showing an example of distribution package data registered in the package DB.
[0257] Fig.247 This is a diagram showing an example of activity data registered in the activity DB.
[0258] Fig.248 This is a flowchart showing a process of generating a program and data to be registered in the ECU reprogramming data DB.
[0259] Fig.249 This is a flowchart showing an example of a process for generating specification data registered in the ECU metadata DB.
[0260] Fig.250 This is a diagram showing an example of specification data.
[0261] Fig.251 is a diagram showing an example of a bus load table.
[0262] Fig.252 This is a flowchart showing the process of generating a distribution package registered in the package DB.
[0263] Fig.253 A diagram that graphically represents the contents of a packet file.
[0264] Fig.254 This is a sequence diagram showing the flow of processing executed between the center device and the vehicle-side system in the second embodiment.
[0265] Fig.255 This is a flowchart showing the processing performed by the center device.
[0266] Fig.256It is represented in a graphical form. Fig.248 FIG. 2 is a diagram showing the contents of processing performed in steps D6 and D7 of the flowchart shown in FIG.
[0267] Fig.257 This is a flowchart showing a process when a hash value is transmitted from the vehicle-side system to the center device.
[0268] Fig.258 This is a sequence diagram showing the flow of processing executed between the center device and the vehicle-side system in the third embodiment.
[0269] Fig.259 This is a flowchart showing the processing performed by the center device.
[0270] Fig.260 This is a sequence diagram showing a state in which the center device notifies each of the EV vehicle and the combination vehicle via SMS.
[0271] Fig.261 This is a sequence diagram showing the flow of processing executed between the center device and the vehicle-side system in the fourth embodiment.
[0272] Fig.262 This is a diagram graphically showing the processing performed among the supplier, the center device, and the vehicle-side system in the fifth embodiment.
[0273] Fig.263 This is a sequence diagram (part 1) showing the flow of processing performed between a supplier, a center device, and a vehicle-side system.
[0274] Fig.264 This is a sequence diagram (part 2) showing the flow of processing performed between the supplier, the center device, and the vehicle-side system.
[0275] Fig.265 This is a sequence diagram (part 3) showing the flow of processing performed between the supplier, the center device, and the vehicle-side system.
[0276] Fig.266 This is a modification (No. 1) of the first embodiment, and is a diagram showing the data format of a packet DB in a case where a plurality of packets are associated with one activity.
[0277] Fig.267 This is a diagram showing the data format of the activity DB in the case where a plurality of data packets are associated with one activity.
[0278] Fig.268 When generating specification data by group Fig.242 Quite a picture.
[0279] Fig.269 Is the case when the distribution data packets are generated by group and Fig.245Quite a picture.
[0280] Fig.270 This is a variation (part 2) of the first embodiment, and is a diagram showing the processing contents of the packet generation tool. DETAILED DESCRIPTION
[0281] Hereinafter, an embodiment will be described with reference to the accompanying drawings. A vehicle program rewriting system (equivalent to a vehicle electronic control system) is a system capable of rewriting applications such as vehicle control and diagnosis mounted on an electronic control unit (hereinafter referred to as ECU (Electronic Control Unit)) via OTA (Over The Air). In this embodiment, the case of rewriting an application via wired or wireless communication is described, but it can also be applied to, for example, rewriting map data used in a map application, control parameters used in an ECU, and data used in various applications via wired or wireless communication.
[0282] Rewriting of applications by wire includes not only obtaining applications from outside the vehicle via wires and rewriting them, but also obtaining various data used when executing applications from outside the vehicle via wires and rewriting them. Rewriting of applications by wireless includes not only obtaining applications from outside the vehicle via wireless and rewriting them, but also obtaining various data used when executing applications from outside the vehicle via wireless and rewriting them.
[0283] like Figure 1 As shown, the vehicle program rewriting system 1 includes a central device 3 on the communication network 2 side, a vehicle-side system 4 on the vehicle side, and a display terminal 5. The communication network 2 is composed of a mobile communication network such as a 4G line, the Internet, WiFi (Wireless Fidelity) (registered trademark), etc. In addition, in this embodiment, the configuration of the vehicle side is mainly described, and the configuration of the central device 3 is described in detail. Figures 234 to 270 Described in detail in.
[0284] The display terminal 5 is a terminal having a function of accepting operation input from a user and a function of displaying various screens, and is, for example, a mobile terminal 6 such as a smartphone or a tablet that a user can carry, and a vehicle-mounted display 7 disposed in the vehicle compartment. If the mobile terminal 6 is within the communication range of the mobile communication network, it can communicate data with the center device 3 via the communication network 2. The vehicle-mounted display 7 is connected to the vehicle-side system 4 and may also be a configuration having a navigation function. In addition, the vehicle-mounted display 7 may be a vehicle-mounted display ECU having the function of an ECU, or may have a function of controlling display on a center display, an instrument display, etc.
[0285] If the user is outside the vehicle and within the communication range of the mobile communication network, the user can confirm various screens related to the rewriting of the application through the mobile terminal 6 while performing operation input and performing procedures related to the rewriting of the application. The user can confirm various screens related to the rewriting of the application through the vehicle display 7 while performing operation input and performing procedures related to the rewriting of the application in the vehicle. That is, the user can use the mobile terminal 6 and the vehicle display 7 separately outside the vehicle and inside the vehicle to perform procedures related to the rewriting of the application.
[0286] The center device 3 manages the program update function on the communication network 2 side in the vehicle program rewriting system 1 and functions as an OTA center. The center device 3 includes a file server 8, a web server 9, and a management server 10. Each server 8 to 10 is configured to be able to communicate data with each other. That is, the center device 3 includes a plurality of servers having different functions.
[0287] The file server 8 is a server that manages files of the application distributed from the center device 3 to the vehicle-side system 4. The file server 8 manages update data (hereinafter also referred to as reprogram-data, write data) provided by a supplier or the like that provides the application distributed from the center device 3 to the vehicle-side system 4, distribution specification data provided by an OEM (Original Equipment Manufacturer), and vehicle status acquired from the vehicle-side system 4. The file server 8 can perform data communication with the vehicle-side system 4 via the communication network 2, and when a download request for a distribution data package is generated, the file server 8 sends a distribution data package in which the reprogram-data and the distribution specification data are packaged into one file to the vehicle-side system 4.
[0288] The web server 9 is a server that manages web page information. The web server 9 transmits web page data managed by itself in response to a request from a web browser provided in the mobile terminal 6 or the like. The management server 10 is a server that manages personal information of users registered in the application rewriting service, the application rewriting history of each vehicle, and the like.
[0289] The vehicle-side system 4 has a main device 11 (equivalent to a vehicle main device). The main device 11 has a DCM (Data Communication Module) 12 (equivalent to an on-board communication device) and a CGW (Central GateWay) 13 (equivalent to a vehicle gateway device). The DCM 12 and the CGW 13 are connected via a first bus 14 so as to be able to perform data communication. The DCM 12 performs data communication with the center device 3 via the communication network 2. When the DCM 12 downloads a distribution data package from the file server 8, the DCM 12 extracts the write data from the downloaded distribution data package and transmits the extracted write data to the CGW 13.
[0290] CGW13 has a data relay function. If the write data is obtained from DCM12, the CGW13 instructs the rewrite target ECU, which is the rewrite target of the application, to write the obtained write data and distributes the write data to the rewrite target ECU. In addition, if the writing of the write data is completed in the rewrite target ECU and the rewrite of the application is completed, CGW13 instructs the rewrite target ECU to effectively activate the application after the rewrite is completed.
[0291] The host device 11 manages the program update function on the vehicle side in the vehicle program rewriting system 1 and functions as an OTA host. Figure 1 In the example, the DCM12 and the on-board display 7 are connected to the same first bus 14, but the DCM12 and the on-board display 7 may be connected to different buses. In addition, the CGW13 may have a part or all of the functions of the DCM12, or the DCM12 may have a part or all of the functions of the CGW13. That is, in the main device 11, the function sharing of the DCM12 and the CGW13 may be arbitrarily configured. The main device 11 may be composed of two ECUs of the DCM12 and the CGW13, or may be composed of a comprehensive ECU having the functions of the DCM12 and the CGW13.
[0292] In addition to the first bus 14 , the CGW 13 is connected to a second bus 15 , a third bus 16 , a fourth bus 17 , and a fifth bus 18 as in-vehicle buses. Various ECUs 19 are connected via the buses 15 to 17 , and a power management ECU 20 is connected via the bus 18 .
[0293] The second bus 15 is, for example, a bus of a vehicle body system network. The ECU 19 connected to the second bus 15 is an ECU that controls the vehicle body system. The ECU that controls the vehicle body system is, for example, a door ECU that controls locking / unlocking of doors, an instrument ECU that controls display on an instrument display, an air conditioning ECU that controls driving of an air conditioner, a window ECU that controls opening and closing of windows, a security ECU that is driven for vehicle theft prevention, and the like.
[0294] The third bus 16 is, for example, a bus of a driving system network. The ECU 19 connected to the third bus 16 is an ECU that controls the driving system. The ECU that controls the driving system is, for example, an engine ECU that controls the driving of an engine, a brake ECU that controls the driving of a brake, an ECT (Electronic Controlled Transmission) ECU that controls the driving of an automatic transmission, a power steering ECU that controls the driving of a power steering, and the like.
[0295] The fourth bus 17 is, for example, a bus of a multimedia system network. The ECU 19 connected to the fourth bus 17 is an ECU that controls the multimedia system. The ECU that controls the multimedia system is, for example, a navigation ECU for controlling a navigation system, an ETC ECU that controls an electronic toll collection system (ETC (Electronic Toll Collection System, a registered trademark)), etc. Buses 15 to 17 may also be buses of systems other than the bus of a body system network, a bus of a driving system network, and a bus of a multimedia system network. In addition, the number of buses and the number of ECUs 19 are not limited to the illustrated configuration. The power management ECU 20 is an ECU that manages the power supplied to the DCM 12, CGW 13, various ECUs 19, etc.
[0296] The sixth bus 21 is connected to the CGW 13 as a bus outside the vehicle. The sixth bus 21 is connected to a DLC (Data Link Coupler) connector 22 that can be detachably connected to a tool 23 (equivalent to a service tool). The buses 14 to 18 inside the vehicle and the bus 21 outside the vehicle are composed of, for example, a CAN (Controller Area Network, a registered trademark) bus, and the CGW 13 performs data communication with the DCM 12, various ECUs 19, and the tool 23 based on the CAN data communication standard and the diagnostic communication standard (UDS (Unified Diagnosis Services): ISO14229). In addition, the DCM 12 and the CGW 13 may be connected via Ethernet, or the DLC connector 22 and the CGW 13 may be connected via Ethernet.
[0297] If the rewrite target ECU 19 receives the write data from the CGW 13, it writes the received write data into a flash memory (equivalent to a non-volatile memory) to rewrite the application. In the above configuration, the CGW 13 functions as a reprogramming master that distributes the write data to the rewrite target ECU 19 if it receives a write data acquisition request from the rewrite target ECU 19. The rewrite target ECU 19 functions as a reprogramming slave that writes the received write data into a flash memory to rewrite the application if it receives the write data from the CGW 13.
[0298] As a method of rewriting an application, there is a method of rewriting by wire and a method of rewriting by wireless. The so-called method of rewriting an application by wire refers to a method of rewriting the rewriting object ECU19 using an application obtained from the outside of the vehicle via wire. Specifically, if the tool 23 is connected to the DLC connector 22, the tool 23 transmits the write data to the CGW13. The CGW13 acts as a gateway, sends a wired rewrite request to the rewriting object ECU19, instructs the rewriting object ECU19 to write (install) the write data, and distributes the write data transmitted from the tool 23 to the rewriting object ECU19. Distributing the write data to the rewriting object ECU19 is to relay the write data.
[0299] The so-called method of rewriting the application program by wireless means a method of rewriting the rewriting target ECU 19 using the application program obtained from the outside of the vehicle via wireless. Specifically, when the DCM 12 downloads the distribution data package from the file server 8, it extracts the write data from the downloaded distribution data package and transmits the write data to the CGW 13. The CGW 13 functions as a rewriting tool, instructs the rewriting target ECU 19 to write (install) the write data, and distributes the write data transmitted from the DCM 12 to the rewriting target ECU 19.
[0300] As a method of diagnosing ECU19, there are a method of diagnosing by wire and a method of diagnosing by wireless. The so-called method of diagnosing by wire refers to a method of diagnosing ECU19 from outside the vehicle via wire. Specifically, if the tool 23 is connected to the DLC connector 22, the tool 23 transmits a diagnostic request to CGW13. CGW13 functions as a gateway, sends a diagnostic request to the diagnosis target ECU19, and distributes the diagnostic command transmitted from the tool 23 to the diagnosis target ECU19. The diagnosis target ECU19 performs a diagnostic process corresponding to the diagnostic command received from CGW13.
[0301] The so-called wireless diagnosis method refers to a method of diagnosing the ECU 19 from outside the vehicle via wireless. Specifically, if a diagnostic command is sent from the center device 3 to the DCM 12 as a diagnostic request, the DCM 12 transmits the diagnostic command to the CGW 13. The CGW 13 functions as a gateway and distributes the diagnostic command as a diagnostic request to the diagnosis target ECU 19. The diagnosis target ECU performs a diagnostic process corresponding to the diagnostic command received from the CGW 13.
[0302] like Figure 2 As shown, CGW13 has a microcomputer (hereinafter referred to as microcomputer) 24, a data transmission circuit 25, a power supply circuit 26, and a power supply detection circuit 27 as electrical functional modules. Microcomputer 24 has CPU (Central Processing Unit) 24a, ROM (Read Only Memory) 24b, RAM (Random Access Memory) 24c, and flash memory 24d. Flash memory 24d contains a secure area where information cannot be read from the outside of CGW13. Microcomputer 24 executes various control programs stored in non-transitional physical storage media to perform various processes and control the operation of CGW13.
[0303] The data transmission circuit 25 controls data communication based on the CAN data communication standard and the diagnostic communication standard with the buses 14 to 18 and 21. The power supply circuit 26 inputs a battery power supply (hereinafter referred to as +B power supply), an accessory power supply (hereinafter referred to as ACC power supply), and an ignition power supply (hereinafter referred to as IG power supply). The power supply detection circuit 27 detects the voltage value of the +B power supply, the voltage value of the ACC power supply, and the voltage value of the IG power supply input by the power supply circuit 26, and compares these detected voltage values with a predetermined voltage threshold value, and outputs the comparison result to the microcomputer 24. The microcomputer 24 determines whether the +B power supply, the ACC power supply, and the IG power supply supplied from the outside to the CGW 13 are normal or abnormal based on the comparison result input from the power supply detection circuit 27.
[0304] like Figure 3 As shown, the DCM 12 includes a microcomputer 28, a wireless circuit 29, a data transmission circuit 30, a power supply circuit 31, and a power supply detection circuit 32 as electrical functional modules. The microcomputer 28 includes a CPU 28a, a ROM 28b, a RAM 28c, and a flash memory 28d. The flash memory 28d includes a secure area where information cannot be read from the outside of the DCM 12. The microcomputer 28 executes various control programs stored in a non-transitory physical storage medium to perform various processes and control the operation of the DCM 12. A flash memory for storing data downloaded from the center device 3 may also be configured in the CGW 13.
[0305] The wireless circuit 29 controls data communication with the center device 3 via the communication network 2. The data transmission circuit 30 controls data communication with the bus 14 in accordance with the CAN data communication standard. The power supply circuit 31 inputs +B power supply, ACC power supply, and IG power supply. The power supply detection circuit 32 detects the voltage value of the +B power supply, the voltage value of the ACC power supply, and the voltage value of the IG power supply input by the power supply circuit 31, and compares these detected voltage values with a predetermined voltage threshold value, and outputs the comparison result to the microcomputer 28. The microcomputer 28 determines whether the +B power supply, ACC power supply, and IG power supply supplied from the outside to the DCM 12 are normal or abnormal based on the comparison result input from the power supply detection circuit 32.
[0306] In addition, the DCM 12 has a vehicle position detection function for detecting the vehicle position by, for example, GPS (Global Positioning System). The flash memory 28d of the DCM 12 has a sufficient memory capacity to store the distribution data packet downloaded from the center device 3, and has a larger memory capacity than the flash memory 24d of the CGW 13. That is, since the flash memory 28d of the DCM 12 has a sufficient memory capacity, even if the flash memory 24d of the CGW 13 does not have a sufficient memory capacity, the host device 11 can download the distribution data packet from the center device 3 and store the downloaded distribution data packet in the DCM 12.
[0307] like Figure 4 As shown, the ECU 19 includes a microcomputer 33, a data transmission circuit 34, a power supply circuit 35, and a power supply detection circuit 36 as electrical function modules. The microcomputer 33 includes a CPU 28a, a ROM 28b, a RAM 33c, and a flash memory 28d. The flash memory 28d includes a secure area from which information cannot be read from the outside of the ECU 19. The microcomputer 33 executes various control programs stored in a non-transitional physical storage medium to perform various processes and control the operation of the ECU 19.
[0308] The data transmission circuit 34 controls data communication with the buses 15 to 17 in accordance with the CAN data communication standard. The power supply circuit 35 inputs +B power supply, ACC power supply, and IG power supply. The power supply detection circuit 36 detects the voltage value of the +B power supply, the voltage value of the ACC power supply, and the voltage value of the IG power supply input by the power supply circuit 35, and compares these detected voltage values with a predetermined voltage threshold value, and outputs the comparison result to the microcomputer 33. The microcomputer 33 determines whether the +B power supply, ACC power supply, and IG power supply supplied from the outside to the ECU 19 are normal or abnormal based on the comparison result input from the power supply detection circuit 27. In addition, the ECU 19 is basically the same in structure except that the loads such as sensors and actuators connected to the ECU 19 are different.
[0309] The vehicle-mounted display 7 has Figure 4 The power management ECU 20 has the same configuration as the ECU 19 shown in FIG. Figure 4 The power management ECU 20 is connected to be able to perform data communication with a power control circuit 43 described later.
[0310] like Figure 5 As shown, the power management ECU 20, CGW 13, and ECU 19 are connected to the +B power line 37, the ACC power line 38, and the IG power line 39 as power supply lines. The +B power line 37 is connected to the positive electrode of the vehicle battery 40. The ACC power line 38 is connected to the positive electrode of the vehicle battery 40 via the ACC switch 41. If the user performs an ACC operation, the ACC switch 41 is switched from off to on, and the output voltage of the vehicle battery 40 is applied to the ACC power line 38. If, for example, the vehicle is a type in which the key is inserted into the insertion port, the ACC operation is an operation of inserting the key into the insertion port and turning it from the "OFF" position to the "ACC" position. If the vehicle is a type in which the start button is pressed, the ACC operation is an operation of pressing the start button once.
[0311] The IG power supply line 39 is connected to the positive electrode of the vehicle battery 40 via the IG switch 42. When the user performs the IG operation, the IG switch 42 is switched from off to on, and the output voltage of the vehicle battery 40 is applied to the IG power supply line 39. For example, if it is a vehicle of the type where the key is inserted into the insertion port, the IG operation is an operation of inserting the key into the insertion port and turning it from the "OFF" position to the "ON" position. If it is a vehicle of the type where the start button is pressed, the IG operation is an operation of pressing the start button twice. The negative electrode of the vehicle battery 40 is grounded.
[0312] When both the ACC switch 41 and the IG switch 42 are turned off, only the +B power is supplied to the vehicle-side system 4. The state in which only the +B power is supplied to the vehicle-side system 4 is referred to as the +B power state. When the ACC switch 41 is turned on and the IG switch 42 is turned off, the ACC power and the +B power are supplied to the vehicle-side system 4. The state in which the ACC power and the +B power are supplied to the vehicle-side system 4 is referred to as the ACC power state. When both the ACC switch 41 and the IG switch 42 are turned on, the +B power, the ACC power, and the IG power are supplied to the vehicle-side system 4. The state in which the +B power, the ACC power, and the IG power are supplied to the vehicle-side system 4 is referred to as the IG power state. In addition, in addition to the above-mentioned power states, a power state in which a power suitable for wireless program updates is provided is also considered.
[0313] For ECU19, the startup conditions vary depending on the power state, and it is divided into +B power system ECU started in +B power state, ACC system ECU started in ACC power state, and IG system ECU started in IG power state. For example, ECU19 driven for purposes such as vehicle anti-theft is classified as +B power system ECU. For example, ECU19 driven for purposes such as audio and other non-driving systems is classified as ACC system ECU. For example, ECU19 driven for purposes such as engine control and other driving systems is classified as IG system ECU.
[0314] The +B power system ECU is configured to be connected to the +B power line 37, the ACC power line 38, and the IG power line 39. The +B power line 37 is selected in the +B power state, the ACC power line 38 is selected in the ACC power state, and the IG power line 39 is selected in the IG power state. The ACC system ECU is configured to be connected to the ACC power line 38 and the IG power line 39. The ACC power line 38 is selected in the ACC power state, and the IG power line 39 is selected in the IG power state. The IG system ECU is connected to the IG power line 39.
[0315] CGW13 causes ECU19, the destination of the start request, to transfer from the sleep state to the start state by sending a start request to ECU19 in the sleep state. In addition, CGW13 causes ECU19, the destination of the sleep request, to transfer from the start state to the sleep state by sending a sleep request to ECU19 in the start state. CGW13 can transfer a specific ECU19 to the start state or the sleep state by, for example, making the waveform of the transmission signal sent to buses 15 to 17 different. That is, the start request waveform and the sleep request waveform are predetermined for each ECU19. If ECU19 receives a start request waveform suitable for itself, it transfers from the sleep state to the start state. If it receives a sleep request waveform suitable for itself from CGW13, it transfers from the start state to the sleep state.
[0316] For example, when ECU (ID1) and ECU (ID2) are in the startup state, CGW13 transmits the first waveform, thereby causing ECU (ID1) to transition from the startup state to the sleep state, and keeping ECU (ID2) in the startup state. In addition, when ECU (ID1) and ECU (ID2) are in the startup state, CGW13 transmits the second waveform, thereby keeping ECU (ID1) in the startup state, and causing ECU (ID2) to transition from the startup state to the sleep state.
[0317] The power control circuit 43 is connected in parallel with the ACC switch 41 and the IG switch 42. The CGW 13 sends a power control request to the power management ECU 20, so that the power management ECU 20 controls the power control circuit 43. That is, the CGW 13 connects the ACC power line 38, the IG power line 39, and the positive electrode of the vehicle battery 40 inside the power control circuit 43 by sending a power start request as a power control request to the power management ECU 20. In this state, even if the ACC switch 41 and the IG switch 42 are turned off, the ACC power and the IG power are supplied to the vehicle-side system 4. In addition, the CGW 13 disconnects the ACC power line 38, the IG power line 39 and the positive electrode of the vehicle battery 40 inside the power control circuit 43 by sending a power stop request as a power control request to the power management ECU 20.
[0318] DCM12, CGW13, ECU19, and power management ECU20 each have a power self-holding circuit, and have a power self-holding function for holding the power supply from the vehicle battery 40. That is, regarding DCM12, CGW13, ECU19, and power management ECU20, if the vehicle power supply is switched from the ACC power supply or the IG power supply to the +B power supply when in the start state, it does not immediately shift from the start state to the stop state or the sleep state after the switching, but uses the power supply from the vehicle battery 40 to continue the start state for a predetermined time (for example, several minutes) to self-hold the driving power. DCM12, CGW13, ECU19, and power management ECU20 shift from the start state to the stop state or the sleep state after a predetermined time has passed after the vehicle power supply is switched from the ACC power supply or the IG power supply to the +B power supply. For example, if it is the ECU19 of the engine control system, the power self-holding function is activated after the vehicle power supply is switched from the ACC power supply or the IG power supply to the +B power supply, so that various data related to the engine control acquired during the vehicle driving are stored as logs.
[0319] Next, the distribution data packet distributed from the center device 3 to the main device 11 will be described. Figure 6 As shown, in the vehicle program rewriting system 1, rewriting data is generated based on the write data provided by the supplier as the application provider and the rewriting specification data (equivalent to the specification data) provided by the OEM. The rewriting specification data can also be generated in the center device 3. The write data provided by the supplier includes differential data equivalent to the difference between the old application and the new application and total data equivalent to the entire new application. The differential data and the total data can also be compressed by a known data compression technology. Figure 6In the example, differential data is provided from suppliers A to C as write data, and recoded data is generated based on the encrypted differential data and authenticator of ECU (ID1) provided by supplier A, the encrypted differential data and authenticator of ECU (ID2) provided by supplier B, the encrypted differential data and authenticator of ECU (ID3) provided by supplier C, and the rewrite specification data provided by the OEM.
[0320] The authenticator is data assigned to each written data in order to verify the integrity of the differential data, and is generated, for example, based on the ECU (ID), key information associated with the ECU (ID), and the differential data. Here, in the case where the rewrite of the application is canceled midway, the written data for writing back (rolling back) to the old version can also be included in the recompilation data.
[0321] The rewrite specification data provided by the OEM includes information that can identify the rewrite target ECU 19, information that can identify the rewrite order when there are multiple rewrite target ECUs 19, information that can identify the rollback method described later, etc. as information related to the rewrite of the application. The rewrite specification data is data that defines the actions related to the rewrite in the DCM 12, CGW 13, rewrite target ECU 19, etc. The rewrite specification data is divided into DCM rewrite specification data used by the DCM 12 and CGW rewrite specification data used by the CGW 13.
[0322] like Figure 7 As shown, the rewrite specification data used by DCM includes specification data information and ECU information. The specification data information includes address information and file name. The ECU information includes address information corresponding to the number of rewrite object ECUs 19, which is referenced when sending the update program (write data) of each rewrite object ECU 19 to CGW 13. Specifically, the ECU information includes at least an ID (ECU (ID)) for identifying the ECU, a reference address when obtaining the update program (update program acquisition address), an update program size, a reference address when obtaining the rollback program (rollback program acquisition address), and a rollback program size. The rollback program is a program (write data) used to return the application to the original version when the rewrite of the application is canceled midway.
[0323] like Figure 8As shown, the rewrite specification data used by CGW includes group information, bus load table, battery load, vehicle status during rewrite, and ECU information. In addition to these, the rewrite specification data used by CGW may also include rewrite step information, display scene information, etc. The group information is information indicating the group to which the rewrite object ECU19 belongs and the rewrite order. For example, as the first group of information, it is stipulated that the content of the application is rewritten in the order of ECU (ID1), ECU (ID2), and ECU (ID3). As the second group of information, it is stipulated that the content of the application is rewritten in the order of ECU (ID4), ECU (ID5), and ECU (ID6). The bus load table is described later. Fig.100 The table shown will be described in detail later. The battery load is information indicating the lower limit value of the remaining battery level of the vehicle battery 40 that can be allowed in the vehicle. The vehicle state at the time of rewriting is information indicating the state of the vehicle under which rewriting is performed.
[0324] ECU information is information related to the rewrite object ECU19, and includes at least ECU_ID (equivalent to device identification information), connection bus (equivalent to bus identification information), connection power supply, security access key information, memory type, rewrite method, power self-retention time, rewrite surface information, update program version, update program acquisition address, update program size, rollback program version, rollback program acquisition address, rollback program size, and write data type.
[0325] The connection bus indicates the bus to which ECU19 is connected. The connection power source indicates the power line to which ECU19 is connected. The security access key information indicates the key information used for authentication of CGW13 accessing the rewrite object ECU19, including a random value or unique information, a key mode, and a decryption operation mode. The memory type indicates whether the memory mounted on the rewrite object ECU19 is a single-sided separate memory, a single-sided suspended memory (also called a pseudo-double-sided memory), or a double-sided memory. The rewrite method indicates whether it is a rewrite based on power self-retention or a rewrite based on power control. The power self-retention time indicates the time for which the power self-retention continues when the rewrite method is a rewrite based on power self-retention. The rewrite surface information indicates which surface is the operating surface and which surface is the non-operating surface. The operating surface is also called the startup surface, and the non-operating surface is also called the rewrite surface.
[0326] The update program version indicates the version of the update program. The update program acquisition address indicates the address of the update program. The update program size indicates the data size of the update program. The rollback program version indicates the version of the rollback program. The rollback program acquisition address indicates the address of the rollback program. The rollback program size indicates the data size of the rollback program. The write data type indicates whether the write data is differential data or all data. In addition to this information, the rewrite specification data can also include information uniquely defined by the system.
[0327] If the DCM12 obtains the rewrite specification data for the DCM, it will analyze the rewrite specification data for the DCM. If the DCM12 analyzes the rewrite specification data for the DCM, it will control the rewrite operation such as obtaining the write data from the address storing the update program of the rewrite target ECU19 and transmitting the obtained write data to the CGW13.
[0328] If the CGW 13 obtains the rewrite specification data for the CGW, it will analyze the rewrite specification data for the CGW. If the CGW 13 analyzes the rewrite specification data for the CGW, it will control the rewrite-related actions such as requesting the DCM 12 to transmit a predetermined amount of the update program of the rewrite target ECU 19 or distributing the write data to the rewrite target ECU 19 in a specified order according to the analysis result.
[0329] The above-mentioned re-editing data is registered in the file server 8, and the distribution specification data provided by the OEM is also registered. The distribution specification data provided by the OEM is data that defines the actions involved in the display of various screens in the display terminal 5. Fig. 9 As shown, the distribution specification data includes language information, display sentences, data packet information, image data, display mode, display control program, etc.
[0330] When the display terminal 5 obtains the distribution specification data from the CGW 13, it analyzes the obtained distribution specification data and controls the display of various screens according to the analysis results. For example, the display terminal 5 displays the display sentence obtained from the distribution specification data on the display frame stored in advance, or executes the display control program obtained from the distribution specification data. In addition to this information, the distribution specification data can also include information uniquely defined by the system.
[0331] If the file server 8 has registered the re-edited data and the distribution specification data, it will encrypt the registered re-edited data and generate a distribution data packet storing a data packet authenticator for authenticating the data packet, the encrypted re-edited data, and the distribution specification data. The authenticator is data given to verify the integrity of the re-edited data and the distribution specification data, and is generated, for example, based on the key information associated with the CGW 13, the re-edited data, and the distribution specification data. If the file server 8 receives a download request for the distribution data packet from the outside, it will send the distribution data packet to the DCM 12. In addition, Figure 6 In the example, the file server 8 generates a distribution data packet storing the re-edited data and the distribution specification data, and sends the re-edited data and the distribution specification data to the DCM 12 as one file at the same time, but the re-edited data and the distribution specification data may be sent as different files to the DCM 12. That is, the file server 8 may first send the distribution specification data to the DCM 12, and then send the re-edited data to the DCM 12. In this case, the distribution specification data and the re-edited data may be given an authentication code respectively.
[0332] like Fig.10 As shown, if DCM12 downloads a distribution data package from the file server 8, it uses the data package authenticator stored in the downloaded distribution data package to verify the integrity of the encrypted re-edited data. If the verification result is positive, DCM12 decrypts the encrypted re-edited data. If DCM12 decrypts the encrypted re-edited data, it unpacks the decrypted re-edited data and extracts it by dividing it into the encrypted differential data and authenticator, the re-write specification data for DCM, and the re-write specification data for CGW. Fig.10 In the figure, an example is given of extracting the encrypted differential data and authenticator of ECU (ID1), the encrypted differential data and authenticator of ECU (ID2), the encrypted differential data and authenticator of ECU (ID3), the rewrite specification data for DCM, and the rewrite specification data for CGW.
[0333] Next, refer to Figures 11 to 22 The flash memory 33d of the ECU 19 is described. The flash memory 33d of the ECU 19 is divided into a single-sided independent memory having a flash memory surface on one side, a single-sided suspended memory having flash memory surfaces on two pseudo sides, and a double-sided memory having flash memory surfaces on two substantial sides according to the memory structure. Hereinafter, the ECU 19 equipped with a single-sided independent memory is referred to as a single-sided independent memory ECU, the ECU 19 equipped with a single-sided suspended memory is referred to as a single-sided suspended memory ECU, and the ECU 19 equipped with a double-sided memory is referred to as a double-sided memory ECU.
[0334] Single-sided independent memory is a structure with a flash memory surface on one side, so there is no concept of an operating surface and a non-operating surface, and the application cannot be rewritten while the application is being executed. On the other hand, single-sided suspended memory and double-sided memory are structures with flash memory surfaces on two sides, so there is a concept of an operating surface and a non-operating surface, and the application on the non-operating surface can be rewritten while the application on the operating surface is being executed. Double-sided memory is a structure with flash memory surfaces on two completely separated sides, so the application can be rewritten at any time, such as when the vehicle is running. Single-sided suspended memory is a structure in which a single-sided independent memory is divided into two sides in a pseudo manner, and the timing when it can be read and written normally is limited. The application cannot be rewritten while the vehicle is running, but the application can be rewritten when the vehicle is parked with the IG power disconnected.
[0335] In addition, the single-sided independent memory, the single-sided suspended memory, and the double-sided memory are respectively divided into a reprogramming firmware embedded type (hereinafter referred to as an embedded type) in which the reprogramming firmware is embedded and a reprogramming firmware download type (hereinafter referred to as a download type) in which the reprogramming firmware is downloaded from the outside. The reprogramming firmware is firmware for rewriting the application program.
[0336] Hereinafter, the configuration of each flash memory will be described in sequence.
[0337] (A) Single-sided separate memory
[0338] (A-1) Embedded single-sided memory
[0339] Reference Fig.11 as well as Fig.12 The embedded single-sided independent memory is described. The embedded single-sided independent memory has a differential engine work area, an application area, and a boot program area. The application area is configured with version information, parameter data, application, firmware, and a normal time vector table. The boot area is configured with a boot program, a progress status point 2, a progress status point 1, startup determination information, wireless reprogramming firmware, wired reprogramming firmware, a startup determination program, and a boot time vector table.
[0340] like Fig.11 As shown, when executing normal operation of application processing such as vehicle control processing and diagnosis processing, the microcomputer 33 executes the startup determination program, searches for the start address by referring to the boot-time vector table and the normal-time vector table, and executes the specified address of the application program.
[0341] When executing the rewriting operation of the rewriting process of the application program, the microcomputer 33 performs wireless or wired firmware reprogramming without executing the application program. Fig.12 Indicates the action of rewriting the application using differential data as an update program. Fig.12As shown, the microcomputer 33 temporarily stores the application as old data in the difference engine work area. The microcomputer 33 reads out the old data temporarily stored in the difference engine work area, and restores new data based on the read old data and the difference data stored in the RAM 33c through the difference engine included in the embedded recompiled firmware. When the microcomputer 33 generates new data based on the old data and the difference data, it writes the new data to a predetermined address of the memory to rewrite the application.
[0342] (A-2) Download type single-sided independent storage
[0343] Reference Fig.13 as well as Fig.14 The download type single-sided independent storage is described below. The download type is different from the above-mentioned embedded type in that the wireless reprogramming firmware or wired reprogramming firmware is downloaded from the outside, and after the application is rewritten, the wireless reprogramming firmware or wired reprogramming firmware is deleted. When the application is updated wirelessly, the wireless reprogramming firmware or wired reprogramming firmware is previously stored in the storage device, for example, Figure 6 The reprogramming data shown includes wireless reprogramming firmware executed by each ECU 19. The ECU 19 receives the wireless reprogramming firmware for its own ECU from the CGW 13, and stores the received wireless reprogramming firmware for its own ECU in the RAM.
[0344] like Fig.13 As shown, when executing normal operations of application processing such as vehicle control processing and diagnosis processing, the microcomputer 33 executes the startup determination program in the same way as the embedded type, searches for the start address by referring to the boot-time vector table and the normal-time vector table, and executes the specified address of the application program.
[0345] like Fig.14 As shown in FIG. 1 , when the microcomputer 33 performs the rewriting operation of the rewriting process of the application program, the application program is temporarily stored in the difference engine work area as old data. The microcomputer 33 reads out the old data temporarily stored in the difference engine work area, and restores new data based on the read old data and the difference data stored in the RAM 33c by the difference engine included in the recompiled firmware downloaded from the outside. When the microcomputer 33 generates new data based on the old data and the difference data, the new data is written to rewrite the application program.
[0346] (B) Single-sided suspend memory
[0347] (B-1) Embedded Single-sided Suspended Memory
[0348] Reference Fig.15 as well as Fig.16The embedded single-sided suspend memory is described. The embedded single-sided suspend memory has a differential engine working area, an application area, and a boot program area. The reprogrammed firmware for program update is configured in the boot program area in the same manner as the single-sided independent memory, and is not the object of program update. The application area, which is the object of program update, has an A side and a B side in a pseudo manner, and version information, an application, and a normal vector table are respectively configured on the A side and the B side. The boot area is configured with a boot program, reprogrammed firmware, a reprogrammed vector table, a startup side determination function, startup side determination information, and a boot time vector table.
[0349] like Fig.15 As shown, when the microcomputer 33 performs normal operations such as vehicle control processing, diagnostic processing, and other application processing, it executes the boot program and uses the startup surface determination function to determine which of the A and B surfaces is the application surface based on the startup surface determination information of the A and B surfaces. If the microcomputer 33 determines that the A surface is set as the application surface, it searches for the starting address with reference to the normal time vector table of the A surface and executes the application program of the A surface. Similarly, if the microcomputer 33 determines that the B surface is set as the application surface, it searches for the starting address with reference to the normal time vector table of the B surface and executes the application program of the B surface. In addition, Fig.15 In the embodiment, the reprogrammed firmware is arranged in the boot program area, but the reprogrammed firmware may also be an object of program update and arranged in respective areas of the A side or the B side.
[0350] like Fig.16 As shown, when the microcomputer 33 performs the rewrite operation of the non-operating surface application, the non-operating surface application is temporarily saved as old data in the differential engine working area. The microcomputer 33 reads the old data temporarily saved in the differential engine working area, and restores new data based on the read old data and the differential data stored in RAM 33c through the differential engine in the embedded recompiled firmware. If the microcomputer 33 generates new data based on the old data and the differential data, the new data is written to the non-operating surface to rewrite the non-operating surface application. Fig.16 , the case where surface A is an operating surface and surface B is a non-operating surface is illustrated.
[0351] (B-2) Download type single-sided suspend memory
[0352] Reference Fig.17 as well as Fig.18 The download type single-sided suspend memory is described below. The download type is different from the above-mentioned embedded type in that the re-compiled firmware and the re-compiled vector table are downloaded from the outside and deleted after the application is rewritten.
[0353] like Fig.17As shown, when the microcomputer 33 performs normal operations such as vehicle control processing and diagnostic processing, the microcomputer 33 executes the boot program in the same manner as the embedded type, and determines the newness and oldness of each startup surface determination information of the A surface and the B surface through the startup surface determination function, and determines which of the A surface and the B surface is the operating surface. If the microcomputer 33 determines that the A surface is set as the operating surface, it searches for the start address by referring to the normal time vector table of the A surface, and executes the application program of the A surface. Similarly, if the microcomputer 33 determines that the B surface is set as the operating surface, it searches for the start address by referring to the normal time vector table of the B surface, and executes the application program of the B surface.
[0354] like Fig.18 As shown in FIG. 1 , when the microcomputer 33 performs the rewriting operation of the application program rewriting process, the non-operating application program is temporarily saved as old data in the differential engine working area. The microcomputer 33 reads the old data temporarily saved in the differential engine working area, and restores new data based on the read old data and the differential data stored in the RAM 33c through the differential engine in the recompiled firmware downloaded from the outside. If the microcomputer 33 generates new data based on the old data and the differential data, the new data is written to rewrite the application program. Fig.18 In FIG. 1 , the case where the A side is the operating side and the B side is the non-operating side is illustrated. In this way, in the single-sided suspend memory, the application program on the A side can be executed while the application program on the B side is rewritten in the background.
[0355] (C) Double-sided storage
[0356] (C-1) Embedded double-sided memory
[0357] Reference Fig.19 as well as Fig. 20 The embedded double-sided memory is described. The embedded single-sided independent memory has an application area and a rewrite program area on the A side, an application area and a rewrite program area on the B side, and a boot program area. In the boot area, the boot program is configured to be non-rewritable. The boot program includes a boot exchange function and a boot time vector table. Version information, parameter data, application programs, firmware, and a normal time vector table are configured in each application area. A program for controlling rewriting, reprogramming progress management information 2, reprogramming progress management information 1, startup side determination information, wireless reprogramming firmware, wired reprogramming firmware, and a boot time vector table are configured in each rewrite program area. A boot program, a boot exchange function, and a boot time vector table are configured in the boot area.
[0358] like Fig.19As shown, the microcomputer 33 executes the boot program when executing the normal operation of the application processing such as the vehicle control processing and the diagnosis processing and when executing the rewriting operation of the rewriting processing of the application program of the non-operation surface, and determines the new and old by the boot exchange function based on the startup surface determination information of the A surface and the B surface, and determines which surface of the A surface and the B surface is the operation surface. If the microcomputer 33 determines that the A surface is set as the operation surface, the start address is searched by referring to the boot-time vector table of the A surface and the normal-time vector table of the A surface, and the application program of the A surface is executed. Similarly, if the microcomputer 33 determines that the B surface is set as the operation surface, the start address is searched by referring to the boot-time vector table of the B surface and the normal-time vector table of the B surface, and the application program of the B surface is executed.
[0359] like Fig. 20 As shown, when the microcomputer 33 performs the rewriting action of the rewriting processing of the application program on the non-operating surface, the application program on the non-operating surface is temporarily saved as old data in the differential engine working area. The microcomputer 33 reads the old data temporarily saved in the differential engine working area, and restores the new data based on the read old data and the differential data stored in the RAM 33c through the differential engine in the embedded recompilation firmware. If the microcomputer 33 generates new data based on the old data and the differential data, the new data is written to the non-operating surface to rewrite the application program on the non-operating surface. In addition, the old data temporarily saved in the differential engine working area can take either the application program on the operating surface or the application program on the non-operating surface as the object. At this time, when the application program on the operating surface is taken as the object, the data on the non-operating surface is eliminated before the new data is written. Here, when the recompiled data obtained from the outside of the vehicle is not differential data but all data (full data), the obtained recompiled data is written to the non-operating surface as new data. Fig. 20 In the example, the case where the A side is the operating side and the B side is the non-operating side is shown. In addition, the old data temporarily saved in the differential engine working area can be the application program of the operating side or the application program of the non-operating side. When it is necessary to match the execution address of the application program, the application program of the non-operating side is saved as the old data.
[0360] (C-2) Download type double-sided memory
[0361] Reference Fig.21 as well as Fig. 22 The downloadable double-sided memory is described below. The downloadable type is different from the above-mentioned embedded type in that the wireless reprogramming firmware and the wired reprogramming firmware are downloaded from the outside, and after the application program is rewritten, the wireless reprogramming firmware and the wired reprogramming firmware are deleted.
[0362] like Fig.21As shown, when the microcomputer 33 performs normal operations such as vehicle control processing and diagnostic processing, and when performing rewriting operations of rewriting processing of applications on non-operating surfaces, it executes the boot program in the same way as the embedded type, determines the new and old information based on the startup surface determination information of each surface A and surface B through the boot exchange function, and determines which surface of surface A and surface B is the operating surface, and executes the application on the operating surface to perform application processing.
[0363] like Fig. 22 As shown, when the microcomputer 33 performs the rewriting action of the application rewriting process, the application on the non-operating side is temporarily saved as old data in the differential engine working area. The microcomputer 33 reads the old data temporarily saved in the differential engine working area, and restores the new data based on the read old data and the differential data stored in RAM 33c through the recompilation firmware downloaded from the outside. If the microcomputer 33 generates new data based on the old data and the differential data, it writes the new data to the non-operating side to rewrite the application on the non-operating side. In addition, the old data temporarily saved in the differential engine working area can take either the application on the operating side or the application on the non-operating side as the object. At this time, when the application on the operating side is taken as the object, the data on the non-operating side is eliminated before the new data is written. Here, when the recompiled data obtained from the outside of the vehicle is not differential data but all data (full data), the obtained recompiled data is written as new data to the non-operating side. Fig. 22 In the example, the case where side A is the operating side and side B is the non-operating side is shown. In addition, the old data temporarily saved in the differential engine working area can be the target of both the application on the operating side and the application on the non-operating side. In this way, in the double-sided memory, the application on side A can be executed in the background while the application on side B is being rewritten.
[0364] As described above, in either the embedded type or the download type, an application program and a rewriting program for rewriting the application program are arranged in each application area. Fig. 20 as well as Fig. 22 In the example, an application program is shown as a reprogramming target, but a rewriting program may be used as a reprogramming target. In addition, if it is desired that the rewriting program cannot be rewritten, the rewriting program may be placed in the boot area. A program for wired rewriting may be placed in the boot area so that, for example, rewriting by wire via the tool 23 can be reliably performed in a dealer or the like.
[0365] Next, refer to Figure 23 to Figure 25The overall sequence of rewriting the application is described. In addition, here, the case where the user operates the mobile terminal 6 as the display terminal 5 to rewrite the application while parking is described, but the case where the user operates the vehicle-mounted display 7 to rewrite the application while parking is the same. The distribution data packet sent from the center device 3 to the DCM12 stores write data for more than one rewrite target ECU19. That is, in the distribution data packet, if there is one rewrite target ECU19, one write data for the one rewrite target ECU19 is stored, and if there are multiple rewrite target ECU19, multiple write data for each of the multiple rewrite target ECU19 is stored. Here, there are two rewrite target ECU19, and the two rewrite target ECU19 are referred to as rewrite target ECU (ID1) and rewrite target ECU (ID2). In addition, ECU19 other than the rewrite target ECU (ID1) and the rewrite target ECU (ID2) is referred to as other ECUs.
[0366] If the rewrite target ECU (ID1) and the rewrite target ECU (ID2) each determine that they have received a request to send a version notification signal, for example, from the main device 11, they determine that the condition for sending the version notification signal is met. If the condition for sending the version notification signal is met, the rewrite target ECU (ID1) sends a version notification signal including the version information of the application stored in itself and the ECU (ID) that can identify itself to the main device 11. If the main device 11 receives the version notification signal from the rewrite target ECU (ID1), it sends the received version notification signal to the center device 3. Similarly, if the condition for sending the version notification signal is met, the rewrite target ECU (ID2) sends a version notification signal including the version of the application stored in itself and the ECU (ID) that can identify itself to the main device 11. If the main device 11 receives the version notification signal from the rewrite target ECU (ID2), it sends the received version notification signal to the center device 3.
[0367] When the center device 3 receives the version notification signal from the rewrite target ECU (ID1) and the rewrite target ECU (ID2), it determines the version of the application program and the ECU (ID) included in the received version notification signal, and determines whether there is write data to be distributed to the rewrite target ECU 19 that is the source of the version notification signal. The center device 3 determines the current application program version of the rewrite target ECU 19 based on the version notification signal received from the rewrite target, and compares the current application program version with the latest version being managed.
[0368] If the version determined by the version notification signal is the same as the latest version being managed, the center device 3 determines that there is no write data to be distributed to the rewrite target ECU 19 that is the source of the version notification signal, and there is no need to update the application program stored in the rewrite target ECU 19. On the other hand, if the version determined by the version notification signal is a value lower than the latest version being managed, the center device 3 determines that there is write data to be distributed to the rewrite target ECU 19 that is the source of the version notification signal, and there is a need to update the application program stored in the rewrite target ECU 19.
[0369] If the center device 3 determines that the application stored in the rewrite target ECU 19 needs to be updated, the mobile terminal 6 is notified of the need for updating. If the mobile terminal 6 is notified of the need for updating, the mobile terminal 6 displays a distribution screen (A1). The distribution screen is the same as the activity notification screen described later. The user can confirm the need for updating through the distribution screen displayed on the mobile terminal 6 and can choose whether to update.
[0370] When the user selects the subject of updating in the mobile terminal 6 (A2), the mobile terminal 6 notifies the center device 3 of the download request of the distribution package. When notified of the download request of the distribution package by the mobile terminal 6, the center device 3 transmits the distribution package to the host device 11.
[0371] When the master device 11 downloads the distribution data package from the center device 3, the master device 11 starts the data package authentication process (B1) for the downloaded distribution data package. The master device 11 authenticates the distribution data package, and when the data package authentication process is completed, the write data extraction process is started (B2). The master device 11 extracts the write data from the distribution data package, and when the write data extraction process is completed, a download completion notification signal is sent to the center device 3.
[0372] When the center device 3 receives the download completion notification signal from the host device 11, it notifies the mobile terminal 6 of the download completion. When the download completion is notified from the center device 3, the mobile terminal 6 displays a download completion notification screen (A3). The user can confirm the download completion through the download completion notification screen displayed on the mobile terminal 6, and can set the rewrite start time of the application on the vehicle side.
[0373] If the user sets the rewrite start time of the vehicle-side application in the mobile terminal 6 (A4), the mobile terminal 6 notifies the center device 3 of the rewrite start time. If the rewrite start time is notified from the mobile terminal 6, the center device 3 stores the rewrite start time set by the user as the set start time. If the current time reaches the set start time (A5), the center device 3 sends a rewrite instruction signal to the host device 11.
[0374] When receiving the rewrite instruction signal from the center device 3, the host device 11 sends a power start request to the power management ECU 20 to shift the rewrite target ECU (ID1), rewrite target ECU (ID2), and other ECUs from the stop state or sleep state to the start state (X1).
[0375] The main device 11 starts distributing write data to the rewrite target ECU (ID1) and instructs the rewrite target ECU (ID1) to write the write data. The rewrite target ECU (ID1) starts receiving write data from the main device 11. If the write data is instructed to be written, the write data is started and the program rewrite process (C1) is started. If the rewrite target ECU (ID1) completes receiving the write data from the main device 11, the write data is completed, and the program rewrite process is completed, a rewrite completion notification signal is sent to the main device 11.
[0376] When the master device 11 receives a rewrite completion notification signal from the rewrite target ECU (ID1), it starts distributing write data to the rewrite target ECU (ID2) and instructs the rewrite target ECU (ID2) to write the write data. The rewrite target ECU (ID2) starts receiving write data from the master device 11, and when instructed to write write data, it starts writing write data and starts the program rewrite process (D1). When the rewrite target ECU (ID2) completes receiving write data from the master device 11, completes writing write data, and completes the program rewrite process, it sends a rewrite completion notification signal to the master device 11. When the master device 11 receives a rewrite completion notification signal from the rewrite target ECU (ID2), it sends the rewrite completion notification signal to the center device 3.
[0377] When the center device 3 receives the rewrite completion notification signal from the host device 11, it notifies the mobile terminal 6 of the completion of the rewrite of the application. When the center device 3 notifies the completion of the rewrite of the application, the mobile terminal 6 displays a rewrite completion notification screen (A6). The user can confirm that the rewrite of the application is completed through the rewrite completion notification screen displayed on the mobile terminal 6, and can set the synchronization execution as active.
[0378] If the user sets the synchronization implementation (A7) in the mobile terminal 6, that is, the user sets the consent for the activation of the new program, the mobile terminal 6 notifies the center device 3 of the synchronization implementation. If the synchronization implementation is notified from the mobile terminal 6, the center device 3 sends a synchronization switching instruction signal to the main device 11. If the main device 11 receives the synchronization switching instruction signal from the center device 3, it distributes the received synchronization switching instruction signal to the rewrite target ECU (ID1) and the rewrite target ECU (ID2).
[0379] When the rewrite target ECU (ID1) and the rewrite target ECU (ID2) receive the synchronous switching instruction signal from the main device 11, they start the program switching process (C2, D2) of switching the application to be started next time from the old application to the new application. When the rewrite target ECU (ID1) and the rewrite target ECU (ID2) complete the program switching process, they send a switching completion notification signal to the main device 11.
[0380] When the main device 11 receives a switching completion notification signal from the rewrite target ECU (ID1) and the rewrite target ECU (ID2), it distributes a version read signal to the rewrite target ECU (ID1) and the rewrite target ECU (ID2). When the rewrite target ECU (ID1) and the rewrite target ECU (ID2) receive a version read signal from the main device 11, they read the version (C3, D3) of the application to be used later, and send a latest version notification signal including the read version to the main device 11. The main device 11 checks the software version or rolls back as needed by receiving the version notification signal from the rewrite target ECU (ID1) and the rewrite target ECU (ID2).
[0381] If the main device 11 receives a version notification signal from the rewrite object ECU (ID1) and the rewrite object ECU (ID2), it sends a power stop request to the power management ECU 20, causing the rewrite object ECU (ID1), the rewrite object ECU (ID2), and other ECUs to transfer from the start state to the stop state or the sleep state (X2).
[0382] The main device 11 transmits the latest version notification signal to the center device 3. When the center device 3 receives the latest version notification signal from the main device 11, it determines the latest version of the application program of the rewriting target ECU (ID1) and the rewriting target ECU (ID2) according to the received latest version notification signal, and notifies the determined latest version to the mobile terminal 6. When the mobile terminal 6 is notified of the latest version from the center device 3, a latest version notification screen (A8) indicating the notified latest version is displayed on the mobile terminal 6. The user can confirm the latest version through the latest version notification screen displayed on the mobile terminal 6, and can confirm that the activation is completed.
[0383] Next, refer to Figure 26 to Figure 29The timing chart of the operation of the DCM 12, CGW 13, and the rewrite target ECU 19 when the application is rewritten is described. In addition, here, the case where the application of the double-sided memory ECU is rewritten while the IG switch 42 is turned on by the user, that is, the vehicle can be driven, and the case where the application of the single-sided suspended memory ECU and the single-sided independent memory ECU is rewritten while the vehicle is parked after the IG switch 42 is turned off by the user. In addition, the case where the application is rewritten by power supply control and the case where the application is rewritten by power supply self-maintenance are described.
[0384] (I) Rewriting applications through power control
[0385] Reference Fig.26 as well as Fig. 27 The case of rewriting the application program by power control is described. Rewriting the application program by power control means a configuration in which the rewriting operation is controlled by switching the power supply without using a power self-holding circuit. When the user switches the IG switch from OFF to ON and the vehicle power supply is switched from +B power supply to IG power supply, the DCM 12, CGW 13, double-sided memory ECU, single-sided suspended memory ECU, and single-sided separate memory ECU each start normal operation (t1).
[0386] When the download start is notified from the center device 3, the DCM 12 switches from the normal operation to the download operation and starts downloading the distribution package from the center device 3 (t2). The DCM 12 can download the distribution package in the background while performing the normal operation. When the DCM 12 completes downloading the distribution package from the center device 3, it returns from the download operation to the normal operation (t3).
[0387] When the rewrite instruction signal (installation instruction signal) is notified from the center device 3 or CGW 13, the DCM 12 shifts from the normal operation to the data transmission / center communication operation and starts the data transmission / center communication operation (t4). That is, the DCM 12 extracts the write data from the distribution data packet, starts to transmit the write data to the CGW 13, obtains the progress status of the rewrite from the CGW 13, and starts to notify the center device 3 of the progress status of the rewrite.
[0388] When CGW13 starts to obtain write data from DCM12, it transfers from normal operation to reprogramming main operation, starts reprogramming main operation, starts distributing write data to double-sided memory ECU, and instructs writing of write data. When double-sided memory ECU starts to receive write data from CGW13, it starts programming phase (hereinafter also referred to as installation phase) in normal operation. That is, double-sided memory ECU installs application in the background while performing normal operation. Double-sided memory ECU starts writing received write data to flash memory and starts rewriting application.
[0389] During the rewriting of the application in the double-sided memory ECU, if the user switches the IG switch from on to off and the vehicle power is switched from IG power to +B power, DCM12 interrupts the data transmission / center communication action, CGW13 interrupts the reprogramming main action, the double-sided memory ECU interrupts the installation phase, and the rewriting of the application is interrupted (t5).
[0390] Then, when the user switches the IG switch from OFF to ON and the vehicle power is switched from +B power to IG power, the DCM 12 restarts the data transmission / center communication operation, the CGW 13 restarts the reprogramming main operation, the double-sided memory ECU restarts the installation phase, and restarts the application rewriting (t6). That is, when the user switches the IG switch from ON to OFF and the vehicle power is switched from IG power to +B power, and then when the user switches the IG switch from OFF to ON and the vehicle power is switched from +B power to IG power, the double-sided memory ECU repeats the interruption and restart of the application rewriting (t7, t8) every time a trip occurs.
[0391] When the double-sided memory ECU completes writing of the write data and rewriting of the application, the installation phase ends and the system shifts from normal operation to waiting for activation. That is, when the double-sided memory ECU is not in the activation phase, it does not start the new side (side B) on which the application is rewritten, but keeps starting the old side (side A) (t9).
[0392] After the user switches the IG switch from on to off and the vehicle power is switched from IG power to +B power (t10), if the double-sided memory ECU completes the rewriting of the application at this time, CGW13 sends a power startup request to the power management ECU20. If the vehicle power is switched from +B power to IG power by sending the power startup request to the power management ECU20 through CGW13, the DCM12 starts the data transmission / center communication action again, and CGW13 starts the reprogramming main action again, and starts distributing the write data to the single-sided suspended memory ECU and the single-sided independent memory ECU. If the single-sided suspended memory ECU and the single-sided independent memory ECU start receiving the write data from CGW13, they transfer from the normal action to the boot process, and start the installation phase in the boot process (t11). That is, the single-sided suspended memory ECU and the single-sided independent memory ECU are not installed in parallel with the normal action, but are installed in the boot process in which the application is not operated.
[0393] If a single-sided suspended memory ECU starts rewriting of an application, the rewriting of the application is interrupted if the IG switch 42 is switched from off to on by user operation before the rewriting of the application is completed. The single-sided suspended memory ECU does not restore the non-operating side (side B) that interrupted the rewriting of the application, but restores the operating side (side A) as the startup side. If a single-sided independent memory ECU starts rewriting of an application, the rewriting of the application is continued even if the IG switch 42 is switched from off to on by user operation before the rewriting of the application is completed. This is because for a single-sided independent memory ECU, if the rewriting of the application is interrupted in the middle, it cannot be restored to normal operation. It is preferred to invalidate the IG switch 42 operation performed by the user after the rewriting of the application of the single-sided independent memory ECU is started and before the rewriting of the application is completed.
[0394] If the single-sided suspended memory ECU completes writing of the write data and rewriting of the application, the installation phase ends in the boot process and the boot process is transferred to the waiting activation phase. That is, the single-sided suspended memory ECU does not start the new side (side B) on which the application is rewritten when the activation phase is not in progress, and keeps starting the old side (side A). If the single-sided independent memory ECU completes writing of the write data and rewriting of the application, the installation phase ends in the boot process and the boot process is waiting for activation (t12).
[0395] When the power management ECU 20 switches the vehicle power supply from the IG power supply to the +B power supply according to the activation instruction from the CGW 13, the double-sided memory ECU and the single-sided suspended memory ECU switch from the old side to the new side, start on the new side, and start the post-programming phase (hereinafter also referred to as the activation phase) during the startup of the new side. The single-sided independent memory ECU starts to restart, and the activation phase (t13, t14) starts during the restart after the installation is completed. During the activation, confirmation of correct startup with the new program and notification of version information to the CGW 13 are performed.
[0396] If activation is completed, the power management ECU 20 switches the vehicle power from the IG power supply to the +B power supply according to the activation completion instruction from the CGW 13, and the DCM 12 shifts from the data transmission / center communication action to the sleep / stop action and starts the sleep / stop action. The CGW 13 shifts from the reprogramming master action to the sleep / stop action and starts the sleep / stop action. The dual-side memory ECU, the single-side suspended memory ECU, and the single-side separate memory ECU shift from the new side start to the sleep / stop action (t15).
[0397] Afterwards, if the user switches the IG switch from off to on and the vehicle power is switched from +B power to IG power, the double-sided memory ECU and the single-sided suspended memory ECU respectively use the new side (B side) as the startup side and start the new application, and the single-sided independent memory ECU starts the new application (t16).
[0398] (II) Rewriting the application program by self-maintaining the power supply
[0399] Reference Fig.28 as well as Fig.29 The case of rewriting the application program by power self-holding is described. Rewriting the application program by power self-holding refers to a configuration in which the rewriting operation is controlled by a power self-holding circuit. When the user switches the IG switch from OFF to ON and the vehicle power is switched from +B power to IG power, the DCM 12, CGW 13, double-sided memory ECU, single-sided suspended memory ECU, and single-sided separate memory ECU each start normal operation (t21).
[0400] When the center device 3 notifies the start of downloading, that is, when notified of an update based on a new program, the DCM 12 shifts from normal operation to downloading operation and starts downloading the distribution package from the center device 3 (t22). When the DCM 12 completes downloading the distribution package from the center device 3, it returns from the downloading operation to normal operation (t23).
[0401] When the rewrite instruction signal (installation instruction signal) is notified from the center device 3 or CGW 13, the DCM 12 shifts from the normal operation to the data transmission / center communication operation and starts the data transmission / center communication operation (t24). That is, the DCM 12 extracts the write data from the distribution data packet, starts to transmit the write data to the CGW 13, obtains the progress status of the rewrite from the CGW 13, and starts to notify the center device 3 of the progress status of the rewrite.
[0402] When CGW13 starts to obtain write data from DCM12, it transfers from normal operation to reprogramming main operation, starts reprogramming main operation, starts distributing write data to double-sided memory ECU, and instructs writing of write data. When double-sided memory ECU starts to receive write data from CGW13, it starts programming phase (hereinafter also referred to as installation phase) in normal operation. That is, double-sided memory ECU installs application in the background while performing normal operation. Double-sided memory ECU starts writing received write data to flash memory and starts rewriting application.
[0403] During the rewriting of the application program in the double-sided memory ECU, if the user switches the IG switch from on to off and the vehicle power is switched from the IG power supply to the +B power supply (t25), then immediately after the vehicle power supply is switched from the IG power supply to the +B power supply, the DCM 12 continues the data transmission / center communication operation, the CGW 13 continues the reprogramming main operation, and the double-sided memory ECU continues the installation phase and continues the rewriting of the application program. If a predetermined time, i.e., a self-holding period, has passed since the vehicle power supply was switched from the IG power supply to the +B power supply, the DCM 12 interrupts the data transmission / center communication operation, the CGW 13 interrupts the reprogramming main operation, and the double-sided memory ECU interrupts the installation phase and interrupts the rewriting of the application program (t26). That is, the installation is continued by the power supply from the vehicle battery 40 until a predetermined time has passed since the IG switch 42 was turned off.
[0404] After that, when the user switches the IG switch from OFF to ON and the vehicle power is switched from +B power to IG power, the DCM 12 restarts the data transmission / center communication operation, the CGW 13 restarts the reprogramming main operation, the double-sided memory ECU restarts the installation phase, and restarts the application rewriting (t27). That is, when the user switches the IG switch from ON to OFF and the vehicle power is switched from IG power to +B power, and then the user switches the IG switch from OFF to ON and the vehicle power is switched from +B power to IG power, the double-sided memory ECU repeats the interruption and restart of the application rewriting (t28 to t30) every time a disconnection occurs. However, before the self-holding period has passed since the vehicle power is switched from IG power to +B power, the DCM 12 continues the data transmission / center communication operation, the CGW 13 continues the reprogramming main operation, the double-sided memory ECU continues the installation phase, and continues the application rewriting.
[0405] When the double-sided memory ECU completes writing of the write data and rewriting of the application, the installation phase ends and the system shifts from normal operation to waiting for activation. That is, when the double-sided memory ECU is not in the activation phase, it does not start the new side (side B) on which the application is rewritten, but keeps starting the old side (side A) (t31).
[0406] If the user switches the IG switch from on to off and the vehicle power is switched from IG power to +B power, the application is rewritten in the double-sided memory ECU at this moment, and the single-sided suspended memory ECU and the single-sided separate memory ECU are respectively transferred from normal operation to boot processing, and the boot processing is started, and the installation phase (t32) is started in the boot processing.
[0407] When the single-side suspended memory ECU and the independent memory ECU have completed writing the written data and rewriting the application respectively, the installation phase is ended in the boot process (t33). When the power startup request is sent to the power management ECU 20 through the CGW 13 and the vehicle power is switched from +B power to IG power, the DCM 12 starts the data transmission / center communication action again (t34).
[0408] When the single-sided suspended memory ECU completes writing of the write data and rewriting of the application, it transfers from the boot process to the waiting for activation. That is, when the activation phase is not in progress, the single-sided suspended memory ECU does not start the new side (side B) on which the application is rewritten, but keeps starting the old side (side A). When the single-sided independent memory ECU completes writing of the write data and rewriting of the application, it ends the installation phase in the boot process and becomes waiting for activation (t35).
[0409] When the power management ECU 20 switches the vehicle power from the IG power supply to the +B power supply according to the activation instruction from the CGW 13, the double-sided memory ECU and the single-sided suspended memory ECU are switched from the old side to the new side, and are started on the new side, and the activation phase begins during the startup of the new side. The single-sided independent memory ECU starts to restart, and the activation phase begins during the restart after the installation is completed (t36, t37).
[0410] If activation is completed, the power management ECU 20 switches the vehicle power from the IG power supply to the +B power supply according to the activation completion instruction from the CGW 13, and the DCM 12 shifts from the data transmission / center communication action to the sleep / stop action and starts the sleep / stop action. The CGW 13 shifts from the reprogramming master action to the sleep / stop action and starts the sleep / stop action. The dual-side memory ECU, the single-side suspended memory ECU, and the single-side separate memory ECU shift from the new side start to the sleep / stop action (t38).
[0411] After this, if the user switches the IG switch from off to on and the vehicle power is switched from +B power to IG power, the double-sided memory ECU and the single-sided suspended memory ECU respectively use the new side (B side) as the startup side and start the new application, and the single-sided single memory ECU starts the new application (t39).
[0412] Before downloading the distribution data packet from the center device 3 and distributing it to the rewrite target ECU 19 to write the data, the CGW 13 performs the following checks. Before downloading the distribution data packet from the center device 3, the CGW 13 checks the radio wave environment, the remaining battery level of the vehicle battery 40, and the memory capacity of the DCM 12 so that the download can be performed normally. Before distributing the data packet to the rewrite target ECU 19 to write the data, the CGW 13 performs intrusion sensor detection, vehicle lock detection, curtain detection, and IG disconnection detection as a check of the human environment to avoid making the installation environment unstable. As a check of whether the rewrite target ECU 19 can write, the CGW 13 performs version and abnormality checks so that the distribution of the written data can be performed normally. In addition, as a check of the written data distributed to the rewrite target ECU 19, the CGW 13 performs tampering checks, access authentication, version checks, etc. before starting installation, communication interruption checks, abnormality checks, etc. during the execution of installation, and version checks, integrity checks, DTC (Diagnostic Trouble Code) checks, etc. after the installation is completed.
[0413] Next, refer to Figures 30 to 46 The screen displayed by the display terminal 5 is described. Fig.30 As shown, in the configuration of rewriting the application of the rewriting target ECU 19 through OTA, there are stages of activity notification, download, installation, and activation. Activity notification refers to the notification of program update. For example, the main device 11 downloads and distributes specification data when the central device 3 determines that there is an update of the application. The display terminal 5 displays a screen in each stage as the rewriting of the application progresses. In addition, here, the screen displayed by the vehicle-mounted display 7 is explained.
[0414] like Fig.31 As shown, CGW13 displays a navigation screen 501 such as a well-known route guidance screen as one of the navigation functions on the vehicle-mounted display 7 in a normal state before the event notification. Fig.32 As shown, the CGW 13 displays an event notification icon 501a indicating the occurrence of an event notification at the lower right of the navigation screen 501. The user can recognize the occurrence of an event notification related to the update of the application by confirming the display of the event notification icon 501a.
[0415] If the user operates the activity notification icon 501a from this state, Fig.33As shown, CGW13 causes the activity notification screen 502 to pop up and display on the navigation screen 501. In addition, CGW13 is not limited to causing the activity notification screen 502 to pop up and display, and other display methods may also be used. In the activity notification screen 502, CGW13 notifies the user of the generation of the activity notification by, for example, displaying a guide that "there is a software update that can be used", and displays a "Confirm" button 502a and a "Later" button 502b, waiting for the user's operation. In this case, the user can enter the next screen for starting to rewrite the application by operating the "Confirm" button 502a. In addition, when the user operates the "Later" button 502b, CGW13 eliminates the pop-up display of the activity notification screen 502 and returns to Fig.32 The screen shown displays the event notification icon 501a.
[0416] If the user operates the "Confirm" button 502a from this state, Fig.34 As shown, CGW13 switches the display from navigation screen 501 to download consent screen 503, and displays download consent screen 503 on the vehicle-mounted display 7. In download consent screen 503, CGW13 notifies the user of the activity ID and update name, and displays "download start" button 503a, "detailed confirmation" button 503b, and "return" button 503c, waiting for the user's operation. In this case, the user can start downloading by operating "download start" button 503a, display the details of downloading by operating "detailed confirmation" button 503b, and refuse downloading and return to the previous screen by displaying "return" button 503c. When "return" button 503c is operated, the user can enter the screen for starting downloading by operating activity notification icon 501a.
[0417] If the user operates the "Details Confirmation" button 503b from the state where the download consent screen 503 is displayed, Fig.35 As shown, CGW13 switches the display content of the download consent screen 503 so that the download details are displayed on the vehicle-mounted display 7. As the download details, CGW13 uses the received distribution specification data to display the update content, the time required for the update, the restrictions on the vehicle functions accompanying the update, etc. In addition, when the user operates the "download start" button 503a, CGW13 starts downloading the distribution data package via DCM12. In parallel with the start of the download of the distribution data package, as shown in FIG. Fig.36 As shown, CGW 13 switches the display from download consent screen 503 to navigation screen 501, displays navigation screen 501 again on vehicle-mounted display 7, and displays download in progress icon 501b indicating that download is in progress at the lower right of navigation screen 501. The user can understand that download of the distribution data package is in progress by confirming the display of download in progress icon 501b.
[0418] If the user operates the downloading execution icon 501b from this state, Fig.37 As shown, the CGW 13 switches the display from the navigation screen 501 to the download execution screen 504, and displays the download execution screen 504 on the vehicle-mounted display 7. The CGW 13 notifies the user that the download is being executed in the download execution screen 504, and displays a "detailed confirmation" button 504a, a "return" button 504b, and a "cancel" button 504c, waiting for the user's operation. In this case, the user can display the details of the download execution by operating the "detailed confirmation" button 504a, and can interrupt the download by operating the "cancel" button 504c.
[0419] If CGW13 completes the download, Fig.38 As shown, a download completion notification screen 505 is popped up and displayed on the navigation screen 501. In the download completion notification screen 505, the CGW 13 displays a message such as "Download completed. Software update is available" to notify the user of the completion of the download, and displays a "Confirm" button 505a and a "Later" button 505b to wait for the user's operation. In this case, the user can enter the screen for starting the installation by operating the "Confirm" button 505a.
[0420] If the user operates the "Confirm" button 505a from this state, Fig.39 As shown, CGW13 switches the display from the navigation screen 501 to the installation consent screen 506, and displays the installation consent screen 506 on the vehicle-mounted display 7. In the installation consent screen 506, CGW13 notifies the user of the required time, restrictions and schedule settings related to the installation, and displays the "Update Now" button 506a, the "Update by Appointment" button 506b, and the "Return" button 506c, waiting for the user's operation. In this case, the user can start the installation immediately by operating the "Update Now" button 506a. In addition, the user can start the installation in a scheduled manner by setting the time when the installation is desired to be performed and operating the "Update by Appointment" button 506b. In addition, the user can refuse the installation and return to the previous screen by operating the "Return" button 506c. When the "Return" button 506c is operated, the user can enter the screen for starting the installation by operating the download execution icon 501b.
[0421] If the user operates the "Update Now" button 506a from this state, Fig.40 As shown, the CGW 13 switches the display content of the installation approval screen 506 to display the details of the installation on the vehicle-mounted display 7. In the installation approval screen 506, the CGW 13 notifies the user that the installation request is accepted and the installation is started.
[0422] If CGW13 starts to install, Fig.41 As shown, the display is switched from the installation consent screen 506 to the navigation screen 501, the navigation screen 501 is displayed again on the vehicle-mounted display 7, and the installation execution icon 501c indicating that the installation is being executed is displayed at the lower right of the navigation screen 501. The user can understand that the installation is being executed by confirming the display of the installation execution icon 501c.
[0423] If the user operates the installation execution icon 501c from this state, Fig.42 As shown, the CGW 13 switches the display from the navigation screen 501 to the installation execution screen 507, and displays the installation execution screen 507 on the vehicle-mounted display 7. The CGW 13 notifies the user that the installation is being executed on the installation execution screen 507. The CGW 13 may also display the remaining time required for the installation and the progress percentage on the installation execution screen 507, for example.
[0424] If CGW13 is installed, Fig.43 As shown, the display is switched from the navigation screen 501 to the activation consent screen 508, and the activation consent screen 508 is displayed on the vehicle-mounted display 7. In the activation consent screen 508, CGW13 notifies the user of the content of the activation, and displays the "Back" button 508a and the "OK" button 508b, waiting for the user's operation. In this case, the user can refuse the activation and return to the previous screen by operating the "Back" button 508a. In addition, the user can agree to the activation by operating the "OK" button 508b. In addition, when the "Back" button 508a is operated, the user can enter the screen for executing the activation by operating the installation execution icon 501c. In addition, regarding these displays and consents, they can also be omitted without displaying according to the user's settings and the scene of the program.
[0425] If the user turns on the IG power supply after the user operates the "OK" button 508b, Fig.44 As shown, the CGW 13 causes the activation completion notification screen 509 to be displayed as a pop-up on the navigation screen 501. The CGW 13 displays, for example, a message stating "Software update completed" on the activation completion notification screen 509 to notify the user of the completion of the activation, and displays an "OK" button 509a and a "Details confirmation" button 509b to wait for the user's operation. In this case, the user can eliminate the pop-up display of the activation completion notification screen 509 by operating the "OK" button 509a, and can display the details of the activation completion by operating the "Details confirmation" button 509b.
[0426] If the user operates the "OK" button 509a from this state, Fig.45As shown, the CGW 13 switches the display from the navigation screen 501 to the confirmation operation screen 510, and displays the confirmation operation screen 510 on the vehicle-mounted display 7. The CGW 13 notifies the user of the completion of activation in the confirmation operation screen 510, and displays a "detailed confirmation" button 510a and an "OK" button 510b, waiting for the user's operation. In this case, the user can display the details of the completion of activation by operating the "detailed confirmation" button 510a.
[0427] If the user operates the "detailed confirmation" button 510a from this state, Fig.46 As shown, CGW13 switches the display content of the confirmation operation screen 510, and displays the details of activation completion on the vehicle-mounted display 7. CGW13 displays the functions added and changed by the update as update details, and displays an "OK" button 510b. CGW13 determines that the user has confirmed the completion of the software update based on the user operating the "OK" buttons 509a and 510b.
[0428] As described above, the vehicle-side system 4 controls each action stage such as activity notification, download, installation, activation, and update completion, and prompts the user with a display that matches each action stage. In addition, in the above description, the CGW 13 controls the display, but the vehicle-mounted display 7 may receive the action stage from the CGW 13, distribute the specification data, and display it.
[0429] Next, refer to Figure 47 to Figure 233 The characteristic processing performed by the vehicle program rewriting system 1 will be described. The vehicle program rewriting system 1 performs the characteristic processing shown below.
[0430] (1) Distribution Packet Transmission Decision Processing
[0431] (2) Download determination process of distribution data package
[0432] (3) Transfer determination processing of write data
[0433] (4) Write Data Acquisition and Determination Process
[0434] (5) Installation instruction determination process
[0435] (6) Management of security access keys
[0436] (7) Verification of written data
[0437] (8) Data storage information transmission control processing
[0438] (9) Power management processing for non-rewrite targets
[0439] (10) File transfer control processing
[0440] (11) Distribution Control Processing of Write Data
[0441] (12) Activation Request Instruction Processing
[0442] (13) Activated execution control processing
[0443] (14) Group management processing of rewriting objects
[0444] (15) Rollback execution control processing
[0445] (16) Rewriting progress status display control processing
[0446] (17) Matching determination of differential data
[0447] (18) Rewritten execution control processing
[0448] (19) Session Establishment Process
[0449] (20) Determination and processing of retesting
[0450] (21) Synchronous Control Processing of Progress Status
[0451] (22) Display control information transmission control processing
[0452] (23) Receiving and controlling display control information
[0453] (24) Screen display control processing for progress display
[0454] (25) Report control processing for program updates
[0455] (26) Execution control processing of power supply self-holding
[0456] The center device 3 , DCM 12 , CGW 13 , ECU 19 , and the onboard display 7 each include the following functional blocks as a configuration for performing the characteristic processing (1) to (26) described above.
[0457] like Fig.47As shown, the center device 3 has a distribution packet transmission unit 51. When the distribution packet transmission unit 51 receives a download request for a distribution packet from the DCM 12, it transmits the distribution packet to the DCM 12. As a configuration for performing characteristic processing, in addition to the above configuration, the center device 3 further has a distribution packet transmission determination unit 52, a progress status synchronization control unit 53, a display control information transmission control unit 54, and a write data selection unit 55 (equivalent to an update data selection unit). When the write data selection unit 55 (equivalent to an update data selection unit) receives data storage surface information from the host device 11, it selects write data suitable for the non-operation surface based on the software version and the operation surface determined based on the received data storage surface information. That is, the distribution packet transmission unit 51 transmits the distribution packet including the write data selected by the write data selection unit 55 to the DCM 12. The functional modules for performing characteristic processing will be described later.
[0458] like Fig.48 As shown, the DCM 12 includes a download request sending unit 61, a distribution package downloading unit 62, a write data extracting unit 63, a write data transmitting unit 64, a rewrite specification data extracting unit 65, and a rewrite specification data transmitting unit 66. The download request sending unit 61 sends a download request of a distribution package to the center device 3. The distribution package downloading unit 62 downloads the distribution package from the center device 3. When the distribution package is downloaded from the center device 3 by the distribution package downloading unit 62, the write data extracting unit 63 extracts the write data from the downloaded distribution package.
[0459] If the write data extractor 63 extracts the write data from the distribution data packet, the write data transferor 64 transfers the extracted write data to the CGW 13. If the distribution data packet is downloaded from the center device 3 by the distribution data packet downloader 62, the rewrite specification data extractor 65 extracts the rewrite specification data from the downloaded distribution data packet. If the rewrite specification data extractor 56 extracts the rewrite specification data from the distribution data packet, the rewrite specification data transferor 66 transfers the extracted rewrite specification data to the CGW 13. As a configuration for performing characteristic processing, in addition to the above configuration, the DCM 12 further includes a distribution data packet download determination unit 67 and a write data transmission determination unit 68. The functional modules for performing characteristic processing will be described later.
[0460] like Fig.49 as well as Fig.50As shown, CGW13 has an acquisition request sending unit 71, a write data acquisition unit 72 (equivalent to an update data storage unit), a write data distribution unit 73 (equivalent to an update data distribution unit), a rewrite specification data acquisition unit 74, and a rewrite specification data analysis unit 75. The write data acquisition unit 72 acquires the write data from the DCM12 by transmitting the write data from the DCM12. If the write data is acquired by the write data acquisition unit 72, when it becomes the distribution time of the write data, the write data distribution unit 73 distributes the acquired write data to the rewrite object ECU19. The rewrite specification data acquisition unit 74 acquires the rewrite specification data from the DCM12 by transmitting the rewrite specification data from the DCM12. If the rewrite specification data is acquired by the rewrite specification data acquisition unit 74, the rewrite specification data analysis unit 75 analyzes the acquired rewrite specification data.
[0461] As components for performing characteristic processing, in addition to the above components, the CGW 13 further includes a write data acquisition determination unit 76, an installation instruction determination unit 77, a security access key management unit 78, a write data verification unit 79, a data storage surface information transmission control unit 80, a non-rewrite object power management unit 81, a file transfer control unit 82, a write data distribution control unit 83, an activation request instruction unit 84, a rewrite object group management unit 85, a rollback execution control unit 86, a rewrite progress status display control unit 87, a progress status synchronization control unit 88, a display control information reception control unit 89, a progress display screen display control unit 90, a program update report control unit 91, and a power self-maintaining execution control unit 92. The functional blocks for performing characteristic processing will be described later.
[0462] like Fig.51 As shown, ECU19 has a write data receiving unit 101 and a program rewriting unit 102. The write data receiving unit 101 receives write data from CGW13. If the write data is received from CGW13 by the write data receiving unit 101, the program rewriting unit 102 writes the received write data into the flash memory to rewrite the application program. As a structure for performing characteristic processing, in addition to the above-mentioned structure, ECU19 also has a matching determination unit 103 for differential data, a rewriting execution control unit 104, a session establishment unit 105, a retry point determination unit 106, an activated execution control unit 107, and a power self-maintaining execution control unit 108. The functional modules for performing characteristic processing will be described later.
[0463] like Fig.52 As shown, the in-vehicle display 7 includes a distribution specification data reception control unit 111. The distribution specification data reception control unit 111 controls reception of distribution specification data.
[0464] Hereinafter, each of the above-mentioned processes (1) to (26) will be described in sequence.
[0465] (1) Distribution package transmission determination processing, (2) Distribution package download determination processing
[0466] Reference Fig.53 as well as Fig.54 The following describes the distribution packet transmission determination processing in the center device 3. Fig.55 as well as Fig.56 The download determination process of the distribution package in the host device 11 will be described.
[0467] like Fig.53 As shown, the center device 3 includes a software information acquisition unit 52a, an update presence determination unit 52b, an update suitability determination unit 52c, and an activity information transmission unit 52d in the transmission determination unit 52 of the distribution data packet. The software information acquisition unit 52a acquires the software information of each ECU 19 from the vehicle side. Specifically, the software information acquisition unit 52a acquires ECU configuration information including software information such as version and writing surface and hardware information from the vehicle side. The software information acquisition unit 52a can also acquire vehicle status information such as fault code, anti-theft alarm function setting, and license agreement information from the vehicle side together with these ECU configuration information.
[0468] If the software information is acquired by the software information acquisition unit 52a, the update existence determination unit 52b determines whether there is update data for the vehicle based on the acquired software information. That is, the update existence determination unit 52b compares the version of the acquired software information with the version of the latest software information managed by itself, determines whether the two are consistent, and determines whether there is update data for the vehicle. If the update existence determination unit 52b determines that the two are consistent, it determines that there is no update data for the vehicle, and if it determines that the two are inconsistent, it determines that there is update data for the vehicle.
[0469] If the update existence determination unit 52b determines that there is update data for the vehicle, the update suitability determination unit 52c determines whether the vehicle state is a state suitable for an update of a program or the like using a distribution data package. Specifically, the update suitability determination unit 52c determines whether a license agreement is established, whether the vehicle position is within a specified range pre-registered by the user, whether the setting of the vehicle alarm function is enabled, whether the fault information of the ECU 19 is generated, and whether the vehicle state is a state suitable for downloading a distribution data package. That is, the update suitability determination unit 52c determines whether the vehicle is likely to be updated against the user's intention, and whether the vehicle is likely to fail in installation after downloading even if the download is successful.
[0470] If the update suitability determination unit 52c determines that the license agreement is established, the vehicle position is within the specified range pre-registered by the user, the setting of the vehicle alarm function is enabled, and no fault information of the ECU 19 is generated, the vehicle state is determined to be a state suitable for updating the program or the like using the distribution package. If the update suitability determination unit 52c determines that the license agreement is not established, the vehicle position is not within the specified range pre-registered by the user, the setting of the vehicle alarm function is not enabled, and no fault information of the ECU 19 is generated, the vehicle state is determined to be a state not suitable for updating the program or the like using the distribution package.
[0471] If the update suitability determination unit 52c determines that the vehicle state is a state suitable for updating the program or the like using the distribution package, the event information transmission unit 52d transmits the event information to the host device 11. If the update suitability determination unit 52c determines that the vehicle state is not a state suitable for updating the program or the like using the distribution package, the event information transmission unit 52d does not transmit the event information to the host device 11. The event information transmission unit 52d stores information about the vehicle for which the event information has not been transmitted to the host device 11 in advance by making the above determination. In addition, the information about the vehicle for which the event information has not been transmitted to the host device 11 may be displayed in the center device 3.
[0472] Next, refer to Fig.54 The following describes the operation of the distribution packet transmission determination unit 52 in the center device 3. The center device 3 executes a distribution packet transmission determination program to perform distribution packet transmission determination processing.
[0473] When the center device 3 starts the transmission determination process of the distribution data packet, it acquires software information from the vehicle side (S101, equivalent to the software information acquisition step). That is, the center device 3 determines whether there is a software update for the vehicle. Based on the acquired software information, the center device 3 determines whether there is update data for the vehicle (S102, equivalent to the update existence determination step). If the center device 3 determines that there is update data for the vehicle (S102: Yes), it determines whether the vehicle state is a state suitable for updating the program, etc. using the distribution data packet (S103, equivalent to the update suitability determination step). If the center device 3 determines that the vehicle state is a state suitable for updating the program, etc. using the distribution data packet (S103: Yes), it sends the activity information to the main device 11 (S104, equivalent to the activity information sending step), and ends the transmission determination process of the distribution data packet.
[0474] If the center device 3 determines that there is no update data for the vehicle (S102: No), the center device 3 sends a message that the distribution package is not sent to the main device 11, that is, the message that there is no update of the application program (S105), and ends the distribution package sending judgment process. If the center device 3 determines that the vehicle state is not a state suitable for updating the program etc. using the distribution package (S103: No), the center device 3 sends a message that it is not suitable for updating the program etc. and the reason thereof to the main device 11 (S106), and ends the distribution package sending judgment process. In this case, the main device 11 displays the message that it is not suitable for updating the program etc. and the reason thereof on the vehicle-mounted display 7. For example, if the license agreement is not established, the main device 11 displays, for example, "The program cannot be updated because the license is invalid. Please consult the dealer." on the vehicle-mounted display 7. In this way, the reason why the message that it is not suitable for updating the program etc. can be presented to the user, and appropriate information can be presented to the user.
[0475] As described above, the center device 3 can determine whether the state is suitable for updating the program or the like using the distribution packet by performing the distribution packet transmission determination process before transmitting the distribution packet to the main device 11 and before transmitting the activity information. Furthermore, the center device 3 can transmit the activity information to the main device 11 in order to transmit the distribution packet to the main device 11 only when it is determined that the state is suitable for updating the program or the like using the distribution packet.
[0476] In the case of an update of a program or the like suitable for using a distribution package, the center device 3 can send the event information to the host device 11 when the license agreement is established, the vehicle position is within a predetermined range pre-registered by the user, the setting of the vehicle's alarm function is enabled, and the failure information of the ECU 19 is not generated. That is, the center device 3 can avoid sending the event information to the host device 11 when the license agreement is not established, the vehicle position is outside a predetermined range such as a location far from the home, the setting of the vehicle's alarm function is disabled, or the failure information of the ECU 19 is generated. In this way, the center device 3 can prevent the event information from being sent to the host device 11 for a vehicle that may be updated against the user's intention or a vehicle that may fail in installation even if the download is successful.
[0477] Furthermore, the center device 3 may perform a distribution packet transmission determination process during the transmission of the distribution packet. In this case, if the center device 3 determines that the vehicle state is a state suitable for updating the program or the like using the distribution packet during the transmission of the distribution packet, the transmission of the distribution packet will be continued, but if the center device 3 determines that the vehicle state is not a state suitable for updating the program or the like using the distribution packet during the transmission of the distribution packet, the transmission of the distribution packet will be interrupted. That is, if, for example, failure information of the ECU 19 is generated during the transmission of the distribution packet, the center device 3 interrupts the transmission of the distribution packet.
[0478] Next, the processing of the host device 11 which receives the event information transmitted from the center device 3 will be described. Fig.55 as well as Fig.56 The download determination process of the distribution packet in the main device 11 is described. The vehicle program rewriting system 1 performs the download determination process of the distribution packet in the main device 11. The above-mentioned (1) distribution packet transmission determination process is a determination process performed by the center device 3 in the activity notification phase before the download phase, but the download determination process of the distribution packet is a determination process performed by the main device 11 in the download phase. In addition, in this embodiment, the case where the DCM 12 in the main device 11 performs the download determination process of the distribution packet is described, but the CGW 13 may have the function of the DCM 12, so that the CGW 13 performs the download determination process of the distribution packet.
[0479] like Fig.55 As shown in FIG. 1 , the DCM 12 includes an event information receiving unit 67a, a downloadable determination unit 67b, and a download execution unit 67c in the download determination unit 67 of the distribution data package. The event information receiving unit 67a receives event information from the center device 3. In addition, if event information is received from the center device 3, the event information is displayed. Fig.32 The event notification icon 501a is shown. If the event information receiving unit 67a receives the event information, the downloadable determination unit 67b determines whether the vehicle state is a state in which the distribution data package can be downloaded. That is, the downloadable determination unit 67b determines whether the radio wave environment for communicating with the center device 3 is good, whether the battery remaining capacity of the vehicle battery 40 is greater than a prescribed capacity, and whether the free capacity of the memory of the DCM 12 is greater than a prescribed capacity, and determines whether the vehicle state is a state in which the distribution data package can be downloaded.
[0480] If the downloadable determination unit 67b determines that the radio wave environment is good, the battery remaining capacity of the vehicle battery 40 is greater than the prescribed capacity, and the memory free capacity of the DCM 12 is greater than the prescribed capacity, the vehicle state is determined to be a state in which the distribution data package can be downloaded. If the downloadable determination unit 67b determines that at least any one of the radio wave environment is not good, the battery remaining capacity of the vehicle battery 40 is not greater than the prescribed capacity, and the memory free capacity of the DCM 12 is not greater than the prescribed capacity, the vehicle state is determined not to be a state in which the distribution data package can be downloaded.
[0481] In this way, the downloadable determination unit 67b determines whether there is a possibility that the download cannot be completed normally. Fig.34 as well as Fig.35 The downloadable determination unit 67b makes a determination based on the condition that the user has operated the "download start" button 503a in the download consent screen 503 shown. In addition, the downloadable determination unit 67b may also be configured to determine the determination items in the center device 3. That is, the downloadable determination unit 67b determines that the download is possible when, for example, the setting of the alarm function of the vehicle is enabled or the failure information of the ECU 19 is not generated.
[0482] If the downloadable determination unit 67b determines that the vehicle state is a state in which the distribution package can be downloaded, the download execution unit 67c downloads the distribution package from the center device 3. That is, the download execution unit 67c executes the download of the distribution package after confirming that the download can be completed normally.
[0483] If the downloadable determination unit 67b determines that the vehicle state is not a state in which the distribution package can be downloaded, the download execution unit 67c does not download the distribution package from the center device 3. That is, the download execution unit 67c does not execute the download of the distribution package when there is a possibility that the download cannot be completed normally. In this case, the download execution unit 67c instructs the on-vehicle display 7 to display a pop-up screen indicating that the download cannot be started and the reason why it cannot be started on the navigation screen 501.
[0484] Next, refer to Fig.56 The following describes the operation of the distribution package download determination unit 67 in the host device 11. The host device 11 executes a distribution package download determination program to perform distribution package download determination processing.
[0485] When the main device 11 starts the download determination process of the distribution package, it receives the activity information from the center device 3 (S201, equivalent to the activity information receiving step). The main device 11 determines whether the vehicle state is a state in which the distribution package can be downloaded (S202, equivalent to the downloadable determination step). If the main device 11 determines that the vehicle state is a state in which the distribution package can be downloaded (S202: Yes), the distribution package corresponding to the activity is downloaded from the center device 3 (S203, equivalent to the download execution step), and the download determination process of the distribution package is terminated. If the main device 11 determines that the vehicle state is not a state in which the distribution package can be downloaded (S202: No), the distribution package is not downloaded from the center device 3, and the download determination process of the distribution package is terminated.
[0486] As described above, the host device 11 can determine whether the vehicle state is a state in which the distribution package can be downloaded by performing the distribution package download determination process before downloading the distribution package from the center device 3. Furthermore, the host device 11 can download the distribution package only when the vehicle state is a state in which the distribution package can be downloaded.
[0487] As a case suitable for downloading the distribution data package, when the radio wave environment is good, the remaining battery capacity of the vehicle battery 40 is greater than or equal to a prescribed capacity, and the free memory capacity of the DCM 12 is greater than or equal to a prescribed capacity, the main device 11 can download the distribution data package from the center device 3. That is, it is possible to avoid a situation where the distribution data package is downloaded from the center device 3 when the radio wave environment is not good, the remaining battery capacity of the vehicle battery 40 is less than or equal to a prescribed capacity, or the free memory capacity of the DCM 12 is less than or equal to a prescribed capacity.
[0488] In addition, the main device 11 may perform a download determination process of the distribution packet during the download of the distribution packet. In this case, if the main device 11 determines that the vehicle state is a state in which the distribution packet can be downloaded during the download of the distribution packet, the distribution packet will continue to be downloaded from the center device 3, but if the main device 11 determines that the vehicle state is not a state in which the distribution packet can be downloaded during the download of the distribution packet, the download of the distribution packet from the center device 3 will be interrupted. That is, if, for example, the radio wave environment is not good, the battery remaining capacity of the vehicle battery 40 is less than a prescribed capacity, or the memory free capacity of the DCM 12 is less than a prescribed capacity during the download of the distribution packet, the main device 11 interrupts the download of the distribution packet.
[0489] In this way, by determining in the center device 3 whether it is a vehicle that may receive an update contrary to the user's intention or a vehicle that may fail in installation, and determining in the main device 11 whether there is a possibility of download failure, it is possible to suppress the sending of useless activity information or distribution data packets from the center device 3 to the main device 11.
[0490] The center device 3 has the following configurations. It includes: a software information acquisition unit 52a for acquiring software information of the electronic control device from the vehicle side; an update presence / absence determination unit 52b for determining whether there is update data for the vehicle based on the software information acquired by the software information acquisition unit; an update suitability determination unit 52c for determining whether the vehicle state is suitable for update when the update presence / absence determination unit determines that there is update data; and an activity information sending unit 52d for sending activity information related to update to the vehicle main device when the update suitability determination unit determines that the vehicle state is suitable for update.
[0491] The main device 11 has the following configurations: an activity information receiving unit 67a for receiving activity information from a central device; a downloadability determination unit 67b for determining whether the vehicle state is a state in which a distribution package can be downloaded when the activity information receiving unit receives the activity information; and a download execution unit 67c for downloading a distribution package from the central device when the downloadability determination unit determines that the vehicle state is a state in which a distribution package can be downloaded.
[0492] (3) Write data transmission determination process, (4) Write data acquisition determination process, (5) Installation instruction determination process
[0493] Reference Fig.57 as well as Fig.58 For an explanation of the write data transfer determination process, refer to Fig.59 as well as Fig.60 For an explanation of the write data acquisition and determination process, refer to Figure 61 to Figure 64 The installation instruction determination process will be described. The vehicle program rewriting system 1 performs a write data transmission determination process in the DCM 12. Here, it is assumed that the distribution packet sent from the center device 3 to the DCM 12 is depacketized and the write data is extracted from the distribution packet.
[0494] like Fig.57As shown, the DCM 12 includes an acquisition request receiving unit 68a and a communication status determining unit 68b in the write data transmission determination unit 68. The acquisition request receiving unit 68a receives an acquisition request for write data from the CGW 13. When the acquisition request for write data is received by the acquisition request receiving unit 68a, the communication status determining unit 68b determines the state of data communication between the center device 3 and the DCM 12, for example, when the transmission availability determination flag preset by the user is a first specified value. The transmission availability determination flag is 1 (first specified value) when the specified condition is checked at the time of installation, and is 0 (second specified value) when the check is omitted. The write data transmission unit 64 transmits the write data to the CGW 13 on the condition that the communication status determining unit 68b determines that the data communication between the center device 3 and the DCM 12 is in a connected state.
[0495] Next, refer to Fig.58 The function of the write data transmission determination unit 68 in the DCM 12 will be described. The DCM 12 executes a write data transmission determination program to perform write data transmission determination processing. Here, the processing when the CGW 13 requests the DCM 12 to obtain write data in response to the installation instruction from the center device 3 will be described.
[0496] If DCM12 determines that it has received a request to obtain write data from CGW13, it starts a write data transmission determination process. If DCM12 starts a write data transmission determination process, it determines a transmission availability determination flag (S301, S302). If DCM12 determines that the transmission availability determination flag is a first specified value (S301: Yes), it determines the state of data communication between the center device 3 and itself (S303). If DCM12 determines that the data communication between the center device 3 and itself is in a connected state (S303: Yes), it transmits the write data to CGW13 (S304) and ends the write data transmission determination process. If DCM12 determines that the data communication between the center device 3 and itself is not in a connected state but in an interrupted state (S303: No), it does not transmit the write data to CGW13 and ends the write data transmission determination process.
[0497] When the DCM 12 determines that the transfer determination flag is the second predetermined value ( S302 : YES), it transfers the write data to the CGW 13 without determining the state of data communication between the center device 3 and itself, and ends the write data transfer determination process.
[0498] As described above, the DCM 12 performs a write data transmission determination process before transmitting the write data to the CGW 13, and determines the state of data communication between the center device 3 and itself when the transmission availability determination flag is the first predetermined value. If the DCM 12 determines that the data communication is in a connected state, it starts the transmission of the write data. If it determines that the data communication is in an interrupted state, it does not start the transmission of the write data and waits. When data communication with the center device 3 is possible, the write data can be transmitted to the CGW 13, and installation can be performed in the rewrite target ECU 19.
[0499] For example, when there are multiple ECUs 19 to be rewritten and the installation takes time, the progress of the installation can be notified from the vehicle-mounted system 4 to the center device 3, and the progress can be displayed one by one on the mobile terminal 6. In addition, the DCM 12 can also perform a transmission determination process of the write data during the transmission of the write data. In this case, if the DCM 12 determines that the data communication is in a connected state during the transmission of the write data, the transmission of the write data is continued, but if the DCM 12 determines that the data communication is in an interrupted state during the transmission of the write data, the transmission of the write data is interrupted.
[0500] Next, the acquisition determination process of write data will be described. The vehicle program rewriting system 1 performs the acquisition determination process of write data in the CGW 13. The above-mentioned (3) write data transmission determination process is the determination process performed by the DCM 12 during the installation phase, and the acquisition determination process of write data is the determination process performed by the CGW 13 during the same installation phase.
[0501] like Fig.59 As shown, CGW13 has an event generation determination unit 76a and a communication status determination unit 76b in the acquisition determination unit 76 for writing data. The event generation determination unit 76a determines the generation of an event of an acquisition request for writing data (installation instruction) from the center device 3. If the event generation determination unit 76a determines that an event of an acquisition request for writing data has occurred, the communication status determination unit 76b determines the state of data communication between the center device 3 and the DCM12, for example, when the acquisition possibility determination flag preset by the user is a first specified value. The acquisition possibility determination flag is, for example, 1 (first specified value) when a specified condition is checked during installation, and is 0 (second specified value) when the check is omitted. Here, the event generation determination unit 76a may also determine the generation of an event based on the user's instruction for installation, for example, if the user's instruction operation for installation is accepted through the vehicle-mounted display 7 (refer to Fig.39 ) is notified, it is determined to be an event that generates a request to obtain write data.
[0502] Next, refer to Fig.60The following describes the operation of the write data acquisition determination unit 76 in the CGW 13. The CGW 13 executes a write data acquisition determination program to perform a write data acquisition determination process.
[0503] If the CGW13 determines that an event of a write data acquisition request has occurred, the write data acquisition determination process is started. If the CGW13 starts the write data acquisition determination process, it determines the acquisition possibility determination flag (S401, S402). If the CGW13 determines that the acquisition possibility determination flag is the first specified value (S401: Yes), it determines the state of data communication between the center device 3 and the DCM12 (S403). If the CGW13 determines that the data communication between the center device 3 and the DCM12 is connected (S403: Yes), it sends a write data acquisition request to the DCM12 (S404) and ends the write data acquisition determination process. After that, if the write data is transmitted from the DCM12, the CGW13 distributes the transmitted write data to the rewrite target ECU19. If the CGW13 determines that the data communication between the center device 3 and the DCM12 is not connected but interrupted (S403: No), it does not send a write data acquisition request to the DCM12 and ends the write data acquisition determination process.
[0504] When the CGW 13 determines that the acquisition possibility determination flag is the second predetermined value ( S402 : YES), it transmits a write data acquisition request to the DCM 12 without determining the state of data communication between the center device 3 and the DCM 12 , and ends the write data acquisition determination process.
[0505] As described above, the CGW 13 performs the write data acquisition determination process before acquiring the write data from the DCM 12, and determines the state of data communication between the center device 3 and the DCM 12 when the acquisition possibility determination flag is the first predetermined value. If the CGW 13 determines that the data communication is in the connected state, it starts acquiring the write data, and if it determines that the data communication is in the interrupted state, it does not start acquiring the write data and waits. When communication with the center device 3 is possible, the write data can be acquired from the DCM 12, and installation can be performed in the rewrite target ECU 19.
[0506] For example, when there are multiple ECUs 19 to be rewritten and the installation takes time, the progress of the installation can be notified from the vehicle-mounted system 4 to the center device 3, and the progress can be displayed one by one on the mobile terminal 6. In addition, the CGW 13 can also perform a write data acquisition determination process during the acquisition of the write data. In this case, if it is determined that the data communication is in a connected state during the acquisition of the write data, the CGW 13 continues to acquire the write data, but if it is determined that the data communication is in a disconnected state during the acquisition of the write data, the CGW 13 interrupts the acquisition of the write data.
[0507] Next, the acquisition and determination of the above-mentioned write data will be described in more detail. The acquisition of write data is one of the processes related to installation. Figure 61 to Figure 64 The following describes the installation instruction determination process. The vehicle program rewriting system 1 performs the installation instruction determination process in the CGW 13. The above-mentioned (1) distribution data packet transmission determination process and (2) distribution data packet download determination process are determination processes performed in the download phase, (3) write data transmission determination process and (4) write data acquisition determination process are processes performed in the installation phase after the download is completed, and (5) installation instruction determination process is a process performed in the installation phase and the activation phase. Here, it is assumed that the distribution data packet is downloaded to the DCM 12 and as Fig.10 As shown, the write data (update data, difference data) to the write target ECU 19 is in an unpacked state.
[0508] like Fig.61 As shown, the CGW 13 includes an installation condition determination unit 77a, an installation instruction unit 77b, a vehicle state information acquisition unit 77c, an activation condition determination unit 77d, and an activation instruction unit 77e in the installation instruction determination unit 77. The installation condition determination unit 77a determines whether the first condition, the second condition, the third condition, the fourth condition, and the fifth condition are satisfied. The first condition is a condition that the user consent related to the installation is obtained. The user consent related to the installation is indicated, for example, in Fig.39 The user's consent operation for installation in the screen shown (for example, pressing the "Update Now" button 506a) is shown. Alternatively, the process from downloading to activation may be considered as one update, which is the user's consent operation for updating.
[0509] The second condition is that the CGW 13 can communicate data with the center device 3. The third condition is that the vehicle state is such that it can be installed. The fourth condition is such that the rewrite target ECU 19 can be installed. Here, the fourth condition includes not only that the rewrite target ECU 19 of the installation object can be installed, but also that the rewrite target ECU 19 that cooperates with the rewrite target ECU 19 of the installation object can be installed. The fifth condition is that the written data is normal data. Here, normal data includes data suitable for the rewrite target ECU 19, data that has not been tampered with, etc.
[0510] If the installation condition determination unit 77a determines that all of the first condition, the second condition, the third condition, the fourth condition, and the fifth condition are satisfied, the installation instruction unit 77b instructs the rewrite target ECU 19 to install the application. That is, if the installation condition determination unit 77a determines that the user consent related to the installation is obtained, the CGW 13 can communicate data with the center device 3, the vehicle state is a state in which the installation is possible, the rewrite target ECU 19 is a state in which the installation is possible, and the write data is normal data, the installation instruction unit 77b instructs the rewrite target ECU 19 to install the application. Specifically, the installation instruction unit 77b obtains the write data from the DCM 12 and transmits the obtained write data to the rewrite target ECU 19. If the installation condition determination unit 77a determines that at least one of the first condition, the second condition, the third condition, the fourth condition, and the fifth condition is not satisfied, the installation instruction unit 77b does not instruct the rewrite target ECU 19 to install the application and waits, or notifies the user of the fact that the installation cannot be started and the reason.
[0511] The vehicle state information acquisition unit 77c acquires the vehicle state information from the center device 3. The activation condition determination unit 77d determines whether the sixth condition, the seventh condition, and the eighth condition are satisfied when the application is installed in all the rewrite target ECUs 19. The sixth condition is a condition that the user consent related to activation is obtained. The user consent related to activation indicates that, for example, Fig.43 The user consents to the activation operation (e.g., pressing the "OK" button 508b) in the screen shown. Alternatively, the process from downloading to activation may be considered as one update, which is the user's consent to the update operation. The seventh condition is that the vehicle state is in a state that can be activated. The eighth condition is that the rewrite target ECU 19 is in a state that can be activated.
[0512] If the activation condition determination unit 77d determines that the sixth condition, the seventh condition, and the eighth condition are all met, the activation instruction unit 77e instructs the rewrite object ECU 19 to activate the application. The specific content will be described in the instruction processing of the activation request (12) described later. That is, if the activation condition determination unit 77d determines that the user consent related to the activation has been obtained, the vehicle state is in an activation-capable state, and the rewrite object ECU 19 is in an activation-capable state, the activation instruction unit 77e instructs the rewrite object ECU 19 to activate the application. By performing the activation, the update program written to the rewrite object ECU 19 is validated. If the activation condition determination unit 77d determines that at least any one of the sixth condition, the seventh condition, and the eighth condition is not met, the activation instruction unit 77e does not instruct the rewrite object ECU 19 to activate the application and waits, or prompts the user with the subject and reason why the activation cannot be started.
[0513] Next, refer to Figure 62 to Figure 64 The following describes the role of the installation instruction determination unit 77 in the CGW 13. The CGW 13 executes an installation instruction determination program to perform an installation instruction determination process.
[0514] When the CGW 13 starts the instruction determination process for installation, it determines whether the first condition is satisfied and whether the user consent related to the installation is obtained (S501, which corresponds to a part of the installation condition determination step). When the CGW 13 determines that the user consent related to the installation is obtained (S501: Yes), it determines whether the second condition is satisfied and whether data communication with the center device 3 is possible (S502, which corresponds to a part of the installation condition determination step). The CGW 13 determines whether data communication with the center device 3 is possible based on the communication radio wave status in the DCM 12.
[0515] If the CGW 13 determines that it is able to communicate data with the center device 3 (S502: Yes), it determines whether the third condition is satisfied and whether the vehicle state is ready for installation (S503, which corresponds to a part of the installation condition determination step). As the vehicle state, the CGW 13 determines whether the battery remaining capacity of the vehicle battery 40 is above a specified capacity, whether the vehicle is in a parked state (IG disconnected state) when the memory structure of the rewrite target ECU 19 is a single-sided memory, etc., to determine whether the vehicle state is ready for installation. These vehicle state conditions can also be configured by referring to the received rewrite specification data (refer to Figure 8 ). CGW13 determines that the vehicle state is installable when, for example, the remaining battery level of the vehicle battery 40 is greater than the specified capacity specified by the rewrite specification data and matches the vehicle state specified by the rewrite specification data (only the parking state is possible, or only the driving state is possible, or both the parking state and the driving state are possible).
[0516] If the CGW13 determines that the vehicle state is installable (S503: Yes), it determines whether the fourth condition is satisfied and determines whether the rewrite target ECU19 is installable (S504, equivalent to a part of the installation condition determination step). For example, when the rewrite target ECU19 does not generate a fault code and the security access to the rewrite target ECU19 is successful, the CGW13 determines that the rewrite target ECU19 is installable. Here, in addition to confirming the generation of the fault code for the rewrite target ECU19 that writes the write data, the ECU19 that cooperates with the rewrite target ECU19 is also confirmed. That is, the CGW13 determines whether a fault code is generated not only for the rewrite target ECU19, but also for the ECU19 that cooperates with the rewrite target ECU19.
[0517] If CGW13 determines that the rewrite object ECU19 can be installed (S504: Yes), it determines whether the fifth condition is met and determines whether the written data is normal data (S505, equivalent to a part of the installation condition determination step). CGW13 determines that the written data is normal data when the written data matches the writing surface (non-operation surface) of the rewrite object ECU19 and the verification result of the integrity of the written data is normal. If CGW13 determines that the written data is normal data (S505: Yes), it instructs the rewrite object ECU19 to install the application (S506, equivalent to the installation instruction step). In this way, CGW13 will satisfy the first condition as a condition and make determinations on the second condition and thereafter. In addition, CGW13 finally makes a determination on the fifth condition. If CGW13 determines that all the first to fifth conditions are met, it instructs the rewrite object ECU19 to install the application.
[0518] On the other hand, if the CGW 13 determines that the user consent related to the installation has not been obtained (S501: No), determines that data communication with the center device 3 cannot be performed (S502: No), determines that the vehicle state is not installable (S503: No), determines that the rewrite target ECU 19 is not installable (S504: No), and determines that the written data is not normal data (S505: No), then the CGW 13 does not instruct the rewrite target ECU 19 to install the application. In addition, in the above-mentioned processing, the configuration of the condition that the user consent related to the installation is determined before the other conditions is described, but the configuration that the determination is made after the other conditions may also be made.
[0519] If the CGW 13 instructs the rewrite target ECU 19 to install the application, the write data is distributed to the rewrite target ECU 19 (S507), and it is determined whether the installation is completed (S508). If the CGW 13 determines that the installation is completed (S508: Yes), it determines whether the sixth condition is met, and determines whether the user consent related to activation is obtained (S509). If the CGW 13 determines that the user consent related to activation is obtained (S509: Yes), it determines whether the seventh condition is met, and determines whether the vehicle state is a state that can be activated (S510).
[0520] If the CGW 13 determines that the vehicle state is a state in which activation is possible (S510: Yes), it determines whether the eighth condition is satisfied, and determines whether the rewrite target ECU 19 is in a state in which activation is possible (S511). If the CGW 13 determines that the rewrite target ECU 19 is in a state in which activation is possible (S511: Yes), it instructs the rewrite target ECU 19 to activate (S512). In this way, if the CGW 13 determines that all the sixth to eighth conditions are satisfied, it instructs the rewrite target ECU 19 to activate.
[0521] In addition, when there are multiple ECUs 19 to be rewritten, the CGW 13 can instruct the installation separately or together. In the case where the ECUs 19 to be rewritten are ECU (ID1) and ECU (ID2), the CGW 13 can instruct the installation separately. Fig.63 As shown, CGW13 determines whether the installation condition is met for ECU (ID1). If CGW13 determines that the installation condition is met for ECU (ID1), it instructs ECU (ID1) to install. Next, CGW13 determines whether the installation condition is met for ECU (ID2). Here, as the installation condition, CGW13 can determine whether the fourth condition and the fifth condition are met for ECU (ID2). If CGW13 determines that the installation condition is met for ECU (ID2), it instructs ECU (ID2) to install.
[0522] In the case where the rewriting target ECU 19 is ECU (ID1) and ECU (ID2), in the method of instructing installation together, as shown in FIG. Fig.64 As shown, CGW13 determines whether the installation conditions are met for ECU (ID1). That is, CGW13 determines the first to third conditions, and the fourth and fifth conditions regarding ECU (ID1). If CGW13 determines that the installation conditions are met for ECU (ID1), it determines whether the installation conditions are met for ECU (ID2). That is, CGW13 determines the fourth and fifth conditions regarding ECU (ID2). If the installation conditions are met for ECU (ID2), CGW13 instructs ECU (ID1) and ECU (ID2) to install. For example, CGW13 transmits rewrite data to ECU (ID1) and transmits rewrite data to ECU (ID2) at the same time in parallel. In this way, CGW13 determines the first to third conditions, and the fourth and fifth conditions regarding all rewrite object ECUs in a manner that instructs installation together. Moreover, CGW13 instructs installation after all these conditions are met.
[0523] As described above, the CGW 13 performs the installation instruction determination process before instructing the rewrite target ECU 19 to install the application program, and thus instructs the rewrite target ECU 19 to install the application program if it is determined that the first condition that the user's consent related to the installation is obtained, the second condition that data communication with the center device 3 is possible, the third condition that the vehicle state is in the state in which the installation is possible, the fourth condition that the rewrite target ECU 19 is in the state in which the installation is possible, and the fifth condition that the written data is normal data are all satisfied. The installation instruction can be appropriately instructed to the rewrite target ECU 19.
[0524] (6) Management of security access keys
[0525] Reference Figure 65 to Figure 69The management process of the security access key is explained. The security access key refers to the key for device authentication when CGW13 accesses the rewrite object ECU19 before installing the write data. The vehicle program rewriting system 1 performs management processing of the security access key in CGW13. Here, the explanation is based on the premise that CGW13 is in a state where it can obtain the write data from DCM12 through the above-mentioned (3) write data transmission determination process or (4) write data acquisition determination process. Device authentication using the security access key is equivalent to the fourth condition (step S505) in the above-mentioned (5) installation instruction determination process.
[0526] When CGW13 distributes the write data to the rewrite target ECU19, it is necessary to use the security access key between CGW13 and the rewrite target ECU19 for secure access (device authentication). In this case, there is a method in which CGW13 requests the rewrite target ECU19 to generate a random value, obtains the random value generated by the rewrite target ECU19 from the rewrite target ECU19, and calculates the obtained random value to generate a security access key. However, in such a method, if a random value is obtained from the rewrite target ECU19 when the application is not rewritten, the security access key can also be maintained, so there may be a risk of leakage of the security access key.
[0527] In addition, if the random value obtained from the rewrite target ECU 19 is sent to the center device 3 in the CGW 13, and the center device 3 calculates the random value and generates a secure access key, the secure access key does not need to be retained, so the risk of leakage of the secure access key can be reduced. However, in the configuration in which the center device 3 calculates the random value, the waiting time until the rewrite target ECU 19 obtains the random value from the center device 3 is long, and it is difficult to meet the time regulation of the diagnostic communication. In view of such a situation, in this embodiment, the following configuration is adopted.
[0528] like Fig.65 As shown, the supplier uses the encryption / decryption key of the security access key to encrypt the security access key of each rewrite target ECU19 to generate a random value. The random value mentioned here includes a value different from the value used in the past and a value the same as the value used in the past, which refers to a random value. The random value is an encrypted security access key. The supplier provides the generated random value together with the reprogramming data. The security access key, the encryption / decryption key of the security access key, and the random value are unique keys for each ECU19.
[0529] If the random value is provided from the supplier together with the reprogramming data, the OEM will establish a correspondence between the provided random value and the ECU (ID) identifying the ECU 19 and store it in Figure 8The OEM also stores the key mode and decryption operation mode required for decrypting the random value in the rewrite specification data for CGW. As the key mode, the shared key / public key method, the key length, etc. are stored, and as the decryption operation mode, the type of algorithm used for the decryption operation is stored. If the random value, the key mode, and the decryption operation mode are stored in the rewrite specification data for CGW, the OEM provides the rewrite specification data for CGW storing the random value together with the reprogramming data to the center device 3. The information provided by the supplier is stored in the ECU reprogramming data DB and ECU metadata DB described later.
[0530] If rewrite specification data (rewrite specification data for DCM and rewrite specification data for CGW) are provided from the OEM together with the reprogramming data, the center device 3 sends a distribution packet including the provided rewrite specification data and the reprogramming data to the host device 11. In the host device 11, the DCM 12 downloads the distribution packet from the center device 3 and transmits the rewrite specification data and the write data to the CGW 13.
[0531] like Fig.66 As shown, the CGW 13 includes a secure area 78a (equivalent to a decryption key storage unit), a random value extraction unit 78b (equivalent to a key derivation value extraction unit), a key mode extraction unit 78c, a decryption operation mode extraction unit 78d, a key generation unit 78e, a secure access execution unit 78f, a session transfer request unit 78g, and a key elimination unit 78h in a secure access key management unit 78. The secure area 78a cannot read information from the outside of the ECU 19, and is configured with an encryption / decryption key and a decryption operation algorithm for the secure access key. The random value extraction unit 78b extracts a random value (key derivation value) included in the rewrite specification data from the analysis result of the rewrite specification data for the CGW. The random value is an encrypted value that establishes a correspondence relationship with the ECU (ID) of the rewrite target ECU 19.
[0532] The encryption pattern extraction unit 78c extracts the encryption pattern included in the rewrite specification data from the analysis result of the rewrite specification data for CGW. The decryption operation pattern extraction unit 78d extracts the decryption operation pattern included in the rewrite specification data from the analysis result of the rewrite specification data for CGW.
[0533] When the random value is extracted by the random value extraction unit 78b, the key generation unit 78e searches the secure area 78a, and decrypts the extracted random value using the decryption key corresponding to the ECU (ID) from the decryption key bundle of the secure access key configured in the secure area 78a, thereby generating a secure access key. In this case, the key generation unit 78e uses the decryption key determined by the key mode extracted by the key mode extraction unit 78c, and decrypts the key derived value according to the decryption operation method determined by the decryption operation mode extracted by the decryption operation mode extraction unit 78d. That is, a plurality of key modes and a plurality of decryption operation modes are prepared, and the key mode and the decryption operation mode are specified by the rewrite specification data for the CGW, so that the key generation unit 78e generates a secure access key using the key mode and the decryption operation mode.
[0534] If the key generation unit 78e generates a security access key, the security access execution unit 78f uses the generated security access key to execute security access to the rewrite target ECU 19. Specifically, the security access execution unit 78f sends encrypted data, such as ECU (ID) encrypted using the security access key, to request access to the rewrite target ECU 19. If the rewrite target ECU 19 receives the encrypted data, it decrypts the received encrypted data using the security access key it holds. In addition, the rewrite target ECU 19 compares the decrypted data generated by the decryption with its own ECU (ID), and permits access to itself if the two are consistent, and does not permit access to itself if the two are inconsistent.
[0535] The session transfer request unit 78g requests transfer to the rewrite session. After transferring from the default session to the rewrite session, the secure access execution unit 78f executes secure access. In addition, it is also possible to perform secure access after transferring to a session other than the default session (for example, a diagnostic session), and then transfer to the rewrite session. The key erasure unit 78h erases the secure access key generated by the key generation unit 78e after the secure access execution unit 78f executes secure access to the rewrite target ECU 19 and the rewrite of the application program of the rewrite target ECU 19 is completed.
[0536] Next, refer to Figure 67 to Figure 69 The role of the secure access key management unit 78 in the CGW 13 is described. The CGW 13 executes the secure access key management program and performs secure access key management processing. As secure access key management processing, the CGW 13 performs secure access key generation processing and secure access key deletion processing. The following describes each processing in turn.
[0537] (6-1) Generation of secure access key
[0538] If CGW13 starts the process of generating a secure access key, it parses the rewrite specification data obtained from DCM12 (S601, equivalent to the rewrite specification data parsing step), and extracts the random value, key mode, and decryption operation mode from the rewrite specification data used by CGW (S602, equivalent to the key derivation value extraction step).
[0539] CGW13 retrieves the secure area 78a, and uses the decryption key corresponding to the ECU (ID) from the decryption key bundle of the secure access key configured in the secure area 78a to decrypt the random value extracted from the rewrite specification data for the CGW, thereby generating a secure access key (S603, equivalent to the key generation step).
[0540] like Fig.68 As shown, CGW13 generates a secure access key based on the rewrite specification data for CGW. CGW13 makes a session transfer request to the rewrite session where write data can be written (S604), and uses the secure access key to perform secure access to the rewrite target ECU19 (S605). If CGW13 completes the execution of secure access, it distributes the write data to the rewrite target ECU19 (S606) and makes a session maintenance request (S607). If CGW13 determines that the installation is completed (S608: Yes), the generation process of the secure access key is terminated.
[0541] (6-2) Deletion of secure access keys
[0542] When the CGW 13 starts the secure access key erasure process, it determines whether the rewriting of the application program of the rewriting target ECU 19 is completed (S611). When the CGW 13 determines that the rewriting of the application program of the rewriting target ECU 19 is completed (S611: Yes), it erases the secure access key generated by executing the secure access key generation process (S612), and ends the secure access key erasure process.
[0543] As described above, the CGW 13 performs the management process of the security access key, thereby extracting the random value corresponding to the rewrite target ECU 19 from the analysis result of the rewrite specification data, decrypting the random value using the decryption key corresponding to the rewrite target ECU 19 stored in the secure area 78a, and generating the security access key. By generating the security access key in the CGW 13 without acquiring the security access key from the outside, the risk of leakage of the security access key can be reduced, and the secure access to the rewrite target ECU 19 can be appropriately performed.
[0544] In addition, it is preferred that CGW13 generates a security access key before installing each write data when there are multiple ECUs19 to be rewritten. That is, it is preferred that: if the ECUs19 to be rewritten are ECU (ID1), ECU (ID2), and ECU (ID3), CGW13 performs the following steps in the order of generating a security access key for ECU (ID1), installing write data to ECU (ID1), generating a security access key for ECU (ID2), installing write data to ECU (ID2), generating a security access key for ECU (ID3), and installing write data to ECU (ID3). For example, Fig.63 As shown, CGW13 performs a secure access process as a process to determine whether the installation condition of ECU (ID1) is satisfied, and when the access is normally permitted, instructs ECU (ID1) to install. Then, CGW13 performs a secure access process as a process to determine whether the installation condition of ECU (ID2) is satisfied, and when the access is normally permitted, instructs ECU (ID2) to install.
[0545] In addition, if the ECU 19 to be rewritten is allowed to access itself through the CGW 13 through security access, it will release the security access by receiving the session transfer request from the CGW 13, and the write data will be able to be written to the flash memory. Fig.155 The "rewrite session transfer request" in the second state shown. If the rewrite target ECU19 does not receive a session transfer request from CGW13 within a specified time (for example, 5 seconds) from the permission of access to itself, it will time out, lock the security access, and not accept the reception of the session transfer request. If CGW13 does not send a session transfer request to the rewrite target ECU19 within a specified time from the permission of access to the rewrite target ECU19, it is necessary to send a session maintenance request to the rewrite target ECU19 to keep the rewrite target ECU19 from timing out and send the session transfer request to the rewrite target ECU19.
[0546] In addition, for example, in the middle of rewriting, the version 1.0 application is written to the operating surface and the version 2.0 application is written to the non-operating surface by canceling the operation. If an activity notification to version 2.0 is generated from this state, it is only necessary to activate it without installation, so the security access processing can also be omitted.
[0547] (7) Verification of written data
[0548] Reference Figures 70 to 78The verification process of written data will be described. The vehicle program rewriting system 1 performs the verification process of written data in the CGW 13. The CGW 13 may perform the verification process of written data described in this embodiment before obtaining access permission in the above-mentioned (6) secure access key management process or after obtaining access permission.
[0549] like Fig.70 As shown, if the supplier or OEM generates write data, a data verification value calculation algorithm is applied to the generated write data to generate a data verification value. Here, the write data can be a new program to be updated or differential data from an old program to a new program. The supplier or OEM generates an authenticator by encrypting the data verification value using a prescribed key (key value), and registers the write data and the authenticator in a corresponding relationship in the center device 3. Specifically, these data are stored in the re-edited data DB described later for each ECU 19. In addition, the center device 3 generates a distribution data packet including the write data and the authenticator, and stores it in the data packet DB.
[0550] If a download request of a distribution data packet is generated from the host device 11, the center device 3 sends a distribution data packet including write data and an authenticator to the host device 11 according to the download request. In this case, the write data sent from the center device 3 to the host device 11 is ciphertext, and the authenticator sent from the center device 3 to the host device 11 is also ciphertext. In addition, the authenticator sent from the center device 3 to the host device 11 may also be plaintext. In the case where the authenticator sent from the center device 3 to the host device 11 is plaintext, the decryption process described later is not required.
[0551] If the main device 11 downloads the distribution data packet from the central device 3, it extracts the write data of the rewrite object ECU 19 from the downloaded distribution data packet, and verifies the validity of the write data before distributing the write data to the rewrite object ECU 19. That is, the main device 11 performs decryption processing, first verification value calculation processing, second verification value calculation processing, comparison processing, and judgment processing in sequence to verify the write data. The decryption processing is the process of decrypting the authenticator sent in ciphertext. The first verification value calculation processing is the process of calculating the first data verification value as the expected value based on the decrypted authenticator using the key (key value). The second verification value calculation processing is the process of calculating the second data verification value based on the write data using the data verification value calculation algorithm. The comparison processing is the process of comparing the first data verification value and the second data verification value. The judgment processing is the process of determining the validity of the write data based on the comparison result of the comparison processing.
[0552] like Fig.71As shown, the CGW 13 includes a writable determination unit 79a, a processing execution request unit 79b, a processing result acquisition unit 79c, and a verification unit 79d in the verification unit 79 for writing data. The writable determination unit 79a determines whether the writing of the write data can be performed in the rewrite object ECU 19. If the writable determination unit 69a determines that the writing of the write data can be performed in the rewrite object ECU 19, the processing execution request unit 79b notifies the DCM 12 of the processing execution request and requests the DCM 12 to execute the processing. The processing execution request unit 68b notifies the DCM 12 of the processing execution request of at least one of the decryption processing, the first verification value calculation processing, the second verification value calculation processing, the comparison processing, and the determination processing. The processing result acquisition unit 68c acquires the processing result from the DCM 12 by being notified of the processing result from the DCM 12. If the processing result acquisition unit 68c acquires the processing result, the verification unit 79d verifies the write data using the processing result. That is, in the above-described configuration, the CGW 13 corresponds to a first device and a first functional unit, and the DCM 12 corresponds to a second device and a second functional unit.
[0553] Next, refer to Figure 72 to Figure 77 The following describes the role of the write data verification unit 79 in the CGW 13. The CGW 13 executes a write data verification program to perform a write data verification process.
[0554] When CGW13 starts the verification process of the written data, it notifies DCM12 of the process execution request and requests DCM12 to execute the process (S701, equivalent to the process execution request step). CGW13 notifies DCM12 of the process execution request of at least any one of the above-mentioned decryption process, first verification value calculation process, second verification value calculation process, comparison process, and determination process. When CGW13 obtains the process result from DCM12 (S702, equivalent to the process result acquisition step), it verifies the written data using the obtained process result (S703, equivalent to the verification step).
[0555] The following are some examples of how CGW 13 notifies DCM 12 of a processing execution request. Fig.73In the example, CGW13 notifies DCM12 of the processing execution request of the decryption process, the first verification value calculation process, and the second verification value calculation process. If DCM12 is notified of the processing execution request of the decryption process, the first verification value calculation process, and the second verification value calculation process from CGW13, it will sequentially perform the decryption process, the first verification value calculation process, and the second verification value calculation process. DCM12 performs the processing result notification process, and notifies CGW13 of the first data verification value calculated by the first verification value calculation process and the second data verification value calculated by the second verification value calculation process as the processing result. If CGW13 performs the processing result acquisition process and obtains the first data verification value and the second data verification value from DCM12, it will use the first data verification value and the second data verification value to perform the comparison process and the judgment process in sequence. CGW13 verifies the write data based on whether the judgment result of the judgment process is positive. In this example, DCM12 maintains the key used to calculate the first data verification value.
[0556] exist Fig.74 In the example, CGW13 notifies DCM12 of the processing execution request of the decryption processing and the second verification value calculation processing. If DCM12 is notified of the processing execution request of the decryption processing and the second verification value calculation processing from CGW13, it will sequentially perform the decryption processing and the second verification value calculation processing, and notify CGW13 of the second data verification value calculated by the second verification value calculation processing. If CGW13 performs the processing result acquisition processing and obtains the second data verification value from DCM12, it will perform the first verification value calculation processing, and use the first data verification value calculated by the first verification value calculation processing and the second data verification value to perform the comparison processing and the determination processing in sequence. CGW13 verifies the write data based on whether the determination result of the determination processing is positive. In this example, CGW13 maintains the key used to calculate the first data verification value.
[0557] exist Fig.75 In the example, CGW13 notifies DCM12 of the execution request of the decryption process, the first verification value calculation process, the second verification value calculation process, and the comparison process. If DCM12 is notified of the execution request of the decryption process, the first verification value calculation process, the second verification value calculation process, and the comparison process from CGW13, it will sequentially execute the decryption process, the first verification value calculation process, the second verification value calculation process, and the comparison process. DCM12 executes the processing result notification process and notifies CGW13 of the comparison result of the comparison process as the processing result. If CGW13 executes the processing result acquisition process and obtains the comparison result from DCM12, it will execute the determination process using the comparison result. CGW13 verifies the write data based on whether the determination result of the determination process is positive. In this example, DCM12 maintains the key used to calculate the first data verification value.
[0558] exist Fig.76 In the example, CGW13 notifies DCM12 of the processing execution request of the decryption process, the first verification value calculation process, the second verification value calculation process, the comparison process, and the determination process. If DCM12 is notified of the processing execution request of the decryption process, the first verification value calculation process, the second verification value calculation process, the comparison process, and the determination process from CGW13, it will sequentially execute the decryption process, the first verification value calculation process, the second verification value calculation process, the comparison process, and the determination process. DCM12 executes the processing result notification process and notifies CGW13 of the determination result of the determination process as the processing result. If CGW13 executes the processing result acquisition process and acquires the processing result from DCM12, it will verify the write data based on whether the determination result represented by the processing result is positive. In this example, DCM12 maintains the key for calculating the first data verification value.
[0559] When there are multiple ECUs 19 to be rewritten, CGW 13 performs verification processing of written data for multiple ECUs 19 as follows. When there are multiple ECUs 19 to be rewritten, CGW 13 can verify written data for multiple ECUs 19 together or independently.
[0560] In a method of verifying written data for a plurality of rewrite target ECUs 19 at once, for example, Fig.77 As shown, CGW13 verifies the write data of ECU (ID1), the write data of ECU (ID2), and the write data of ECU (ID3) together, distributes the write data of ECU (ID1) to the write target ECU (ID1), distributes the write data of ECU (ID2) to the write target ECU (ID2), and distributes the write data of ECU (ID3) to the write target ECU (ID3). In this case, by verifying the write data of multiple rewrite target ECUs 19 together, the time required from the start of the verification of the write data of multiple rewrite target ECUs 19 to the completion of the rewrite of the program can be shortened. That is, compared with the configuration of independently verifying the write data of multiple rewrite target ECUs 19, the time required from the start of the verification of the write data of multiple rewrite target ECUs 19 to the completion of the rewrite of the program can be shortened.
[0561] In a method of independently verifying the written data for a plurality of rewrite target ECUs 19, for example, Fig.78As shown, CGW13 verifies the write data of ECU (ID1), distributes the write data of ECU (ID1) to the write target ECU (ID1), verifies the write data of ECU (ID2), distributes the write data of ECU (ID2) to the write target ECU (ID2), verifies the write data of ECU (ID3), and distributes the write data of ECU (ID3) to the write target ECU (ID2). In this case, by verifying the write data before distributing the write data, illegal access can be avoided and reliability can be improved. That is, in the structure of verifying the write data for multiple rewrite target ECUs 19 together, the time from completing the verification according to the rewrite order to distributing the write data varies according to the rewrite order. If the time from completing the verification to distributing the write data becomes longer, there is a concern that tampering caused by illegal access may occur during the period. However, by verifying the write data immediately before distributing the write data, such a situation can be avoided.
[0562] As described above, the CGW 13 performs verification processing of the written data, so that the DCM 12 that downloads the distribution data packet from the center device 3 executes at least a part of the processing related to the verification of the written data. In the CGW 13 and the rewrite target ECU 19, even if the area for storing the written data cannot be ensured or the calculation program for verification cannot be installed, the written data can be properly verified before writing the written data to the rewrite target ECU 19.
[0563] exist Fig.74 In the illustrated configuration in which the CGW 13 performs the first verification value calculation processing, the CGW 13 holds the key (key value) and performs the verification processing without sending the key to the DCM 12, so that the security can be improved compared with the configuration in which the DCM 12 performs the first verification value calculation processing. In addition, when there are multiple rewrite target ECUs 19, the first verification value calculation processing can be performed using a shared key (key value) shared by the multiple rewrite target ECUs 19, or the first verification value calculation processing can be performed using a separate key (key value) different for each of the multiple rewrite target ECUs 19.
[0564] In addition, the above example illustrates a configuration in which CGW13 notifies DCM12 of a processing execution request. However, in a case where, for example, the processing load in DCM12 increases and interferes with the original processing, an ECU other than a navigation device or an ECU other than the rewrite object ECU19 may be used instead of DCM12 to notify the processing execution request to the navigation device or the ECU other than the rewrite object ECU19. In addition, in a case where DCM12 and CGW13 are integrated, the processing execution request may be requested to its own processing execution unit when it is possible to handle the processing without interfering with the original processing. For example, it may be performed between different software components within the same ECU. In addition, the above configuration may be applied to the main unit 11 configured as an integrated ECU having the functions of DCM12 and CGW13. For example, in Figure 73 to Figure 76 In the embodiment, the processing function in the CGW 13 is used as the first functional unit, the processing function in the DCM 12 is used as the second functional unit, the processing execution request is notified from the first functional unit to the second functional unit, and the execution result is returned from the second functional unit to the first functional unit. In the main device 11 configured as an integrated ECU, when the processing load increases and hinders communication processing and relay processing, the processing execution request may be notified to ECUs other than the navigation device and the rewriting target ECU 19 instead of the second functional unit.
[0565] In addition, the data verification value may be calculated as one value for the entire application or as multiple values for each module of the application. If the written data is all data, it can be used in integrity verification after the written data is completed.
[0566] In addition, with respect to secure access, which is a method of verifying whether CGW13 and the rewrite object ECU19 can also be connected, the verification of write data includes the concepts that the central device 3, which is the distribution destination of the write data, is regular (connection based on TLS communication, mutual authentication), the communication path for downloading the write data from the central device 3 is regular (communication path hiding, encryption), the write data downloaded from the central device 3 has not been tampered with (tampering detection), and the write data downloaded from the central device 3 cannot be tampered with (encryption).
[0567] In addition, the data written when rewriting a new program has been described, but the same applies to the data written when rolling back when writing back to an old program. In this case, the CGW 13 may verify the data written when rolling back is downloaded from the center device 3, or may verify the data written immediately before distributing the rollback data to the rewriting target ECU 19 by generating a write cancellation request.
[0568] (8) Data storage information transmission control processing
[0569] Reference Figure 79 to Figure 81The transmission control process of the data storage surface information will be described. The vehicle program rewriting system 1 performs the transmission control process of the data storage surface information in the CGW 13 .
[0570] like Fig.79 As shown, the CGW 13 includes a data storage surface information acquisition unit 80a, a data storage surface information transmission unit 80b, a rewriting method determination unit 80c, and a rewriting method instruction unit 80d in the data storage surface information transmission control unit 80. The data storage surface information acquisition unit 80a acquires information related to hardware and software from each ECU 19 as ECU configuration information. Specifically, in the case of a double-sided memory ECU having data storage surfaces on multiple surfaces and a single-sided suspended memory ECU, the software ID including the version information of each data storage surface and the information capable of identifying the operating surface are acquired as double-sided rewriting information (hereinafter referred to as surface information).
[0571] When the data storage surface information acquiring unit 80a acquires the ECU configuration information including the surface information, the data storage surface information transmitting unit 80b transmits the acquired surface information from the DCM 12 to the center device 3 as one of the ECU configuration information. The data storage surface information transmitting unit 80b may transmit the ECU configuration information to the center device 3 every time the IG switch 42 is switched on and off, or may transmit the ECU configuration information to the center device 3 in response to a request from the center device 3. In addition, the data storage surface information transmitting unit 80b may transmit the ECU configuration including the surface information not only to the double-sided memory ECU and the single-sided suspended memory ECU but also to the single-sided independent memory ECU.
[0572] The rewriting method determination unit 80c determines the rewriting method based on the analysis result of the rewriting specification data used by CGW13. The rewriting method indicates the power switching method during installation in the rewriting object ECU19. If the rewriting method is determined by the rewriting method determination unit 80c, the rewriting method indication unit 80d instructs the rewriting object ECU19 to rewrite the application based on the determined rewriting method. That is, if the rewriting method determination unit 80c determines the rewriting method based on power self-retention, the rewriting method indication unit 80d instructs the rewriting object ECU19 to rewrite the application based on power self-retention. If the rewriting method determination unit 80c determines the rewriting method based on power control, the rewriting method indication unit 80d instructs the rewriting object ECU19 to rewrite the application based on power control without using power self-retention.
[0573] Next, refer to Fig.80 as well as Fig.81 The following describes the role of the data storage plane information transmission control unit 80 in the CGW 13. The CGW 13 executes a data storage plane information transmission control program to perform a data storage plane information transmission control process.
[0574] When CGW13 starts the data storage surface information transmission control process, it sends the ECU structure information request including the surface information to all ECU19 (S801), and obtains the ECU structure information including the surface information from all ECU19 (S802, equivalent to the data storage surface information acquisition step). When CGW13 obtains the ECU structure information from each rewrite target ECU19, it sends the obtained ECU structure information to DCM12 (S803, equivalent to the data storage surface information transmission step), and waits to obtain the write data and rewrite specification data from DCM12 (S804). Here, CGW13 can also obtain the surface information, etc. only from the determined rewrite target ECU19 when the rewrite target ECU19 is determined in advance.
[0575] When the DCM 12 receives the ECU configuration information from the CGW 13, it temporarily stores the received ECU configuration information, and when it is time to send (upload) the ECU configuration information to the center device 3, it sends the ECU configuration information to the center device 3. When the center device 3 receives the ECU configuration information from the DCM 12, it stores and analyzes the received ECU configuration information.
[0576] The center device 3 determines the version of the application program of each surface of each ECU 19 as the transmission source of the surface information and which surface is the operating surface, and determines the version of the application program suitable for the two surfaces determined and the write data for the operating surface (equivalent to the update data selection step). For example, when surface A is the operating surface and the application program stored in the operating surface is version 2.0, and surface B is the non-operating surface and the application program stored in the non-operating surface is version 1.0, the center device 3 determines the write data of version 3.0 for surface B as the write data. When the write data is differential data, the center device 3 determines the differential data updated from version 1.0 to version 3.0. When the write data is determined, the center device 3 sends a distribution packet including the determined write data and the rewrite specification data to the DCM 12 (equivalent to the distribution packet sending step).
[0577] The central device 3 can statically select the distribution data packet to be sent to the DCM 12, or can dynamically generate it. In the case of statically selecting the distribution data packet to be sent to the DCM 12, the central device 3 manages a plurality of distribution data packets storing write data, selects write data suitable for the non-operation surface, selects a distribution data packet storing the selected write data from the plurality of distribution data packets, and sends it to the DCM 12. In the case of dynamically generating the distribution data packet to be sent to the DCM 12, if the write data suitable for the non-operation surface is determined, the central device 3 generates a distribution data packet storing the determined write data and sends it to the DCM 12.
[0578] When the DCM 12 downloads the distribution package from the center device 3 , it extracts the write data and the rewrite specification data from the downloaded distribution package, and transmits the extracted write data and rewrite specification data to the CGW 13 .
[0579] When the CGW 13 determines that the write data and the rewrite specification data are acquired from the DCM 12 (S804: YES), it analyzes the acquired rewrite specification data (S805), and determines the rewrite method for the rewrite target ECU 19 based on the analysis result of the rewrite specification data (S806, S807).
[0580] If the CGW 13 determines that the rewriting method is rewriting based on power self-maintenance (S806: Yes), it will send a write data acquisition request to the DCM 12 based on the vehicle state that can be installed, obtain the write data from the DCM 12, distribute the acquired write data to the rewriting object ECU 19, and end the data storage surface information transmission control processing through the power self-maintenance rewriting application (S808). The method of rewriting the application through power self-maintenance is as follows: Fig.28 as well as Fig.29 This is described in (ii) the case of rewriting the application program by self-maintaining the power supply.
[0581] If the CGW 13 determines that the rewriting method is rewriting based on power control (S807: Yes), it sends a write data acquisition request to the DCM 12 under the condition that the vehicle is parked, acquires the write data from the DCM 12, distributes the acquired write data to the rewriting target ECU 19, rewrites the application program through power control (S809), and ends the data storage surface information transmission control process. The method of rewriting the application program through power control is as follows: Fig.26 as well as Fig. 27 This is described in (i) the case of rewriting the application program through power control.
[0582] As described above, the CGW 13 notifies the center device 3 of the ECU configuration information including the surface information by performing the transmission control process of the data storage surface information, and downloads the distribution data packet including the write data suitable for the ECU configuration information from the center device 3 to the DCM 12. The CGW 13 obtains the write data suitable for the surface information from the DCM 12, and distributes the write data to the rewrite target ECU 19. When the ECU 19 equipped with a flash memory having data storage surfaces on two surfaces is the rewrite target, the application program can be appropriately rewritten.
[0583] In addition, as a method for the center device 3 to distribute the distribution data packet, there are the first distribution method to the third distribution method shown below. In the first distribution method, the center device 3 distributes a distribution data packet storing, for example, version 2.0 write data for the A side and version 2.0 write data for the B side. The DCM 12 extracts the version 2.0 write data for the A side and the version 2.0 write data for the B side from the distribution data packet downloaded from the center device 3, and transmits the extracted write data to the CGW 13. When the version 2.0 write data for the A side and the version 2.0 write data for the B side are transmitted from the DCM 12, the CGW 13 selects one of them and distributes it to the rewrite target ECU 19. That is, the write data corresponding to each data storage side is included in the distribution data packet, and the rewrite data suitable for the rewrite target ECU 19 is selected in the main device 11.
[0584] In the second distribution method, the center device 3 selects and distributes, for example, a distribution data packet storing version 2.0 write data for the A surface or a distribution data packet storing version 2.0 write data for the B surface. The DCM 12 extracts the write data from the distribution data packet downloaded from the center device 3 and transmits the extracted write data to the CGW 13. The CGW 13 distributes the write data transmitted from the DCM 12 to the rewrite target ECU 19. That is, based on the surface information uploaded from the DCM 12, the center device 3 selects the configuration of the distribution data packet including the write data for the non-operation surface.
[0585] In the third distribution method, the center device 3 distributes a distribution packet storing version 2.0 write data shared by the A side and the B side, for example. The DCM 12 extracts the version 2.0 write data shared by the A side and the B side from the distribution packet downloaded from the center device 3, and transmits the extracted write data to the CGW 13. The CGW 13 distributes the version 2.0 write data shared by the A side and the B side transmitted from the DCM 12 to the rewrite target ECU 19. When the rewrite target ECU 19 receives the version 2.0 write data shared by the A side and the B side from the CGW 13, it writes the received write data to either the A side or the B side. In this case, when the application program is executed in the rewrite target ECU 19, the address resolution function of the microcomputer is brought into play, so that the write data is properly operated regardless of whether the write data is written to the A side or the B side. That is, the microcomputer of the write target ECU 19 resolves the difference in execution address accompanying the difference in the side, so that the center device 3 and the host device 11 can operate without knowing the side.
[0586] The ECU configuration information including the surface information sent from CGW 13 to the center device 3 via DCM 12 may include vehicle identification information, system identification information, ECU identification information, usage environment information, etc. in addition to the versions of the two-surface applications and information that can identify the application surface.
[0587] The vehicle identification information is unique information for identifying the vehicle of the distribution destination of the distribution data packet, such as VIN (Vehicle Identification Number). In vehicles that comply with OBD (On-board diagnostics) regulations, VIN can be used according to the provisions of OBD regulations, but in vehicles that do not comply with OBD regulations, such as EV vehicles, VIN cannot be used, so individual vehicle identification information can be used instead of VIN.
[0588] The system identification information is unique information for identifying which reprogramming system it is. CGW13 can wirelessly rewrite a system that can perform wired rewriting using diagnostic communication managed by itself, but cannot wirelessly rewrite other independent systems. That is, this is because it is a system that uses a mechanism for updating programs acquired via wires to update programs acquired via wireless. Therefore, in the center device 3, it is necessary to determine which distribution data packet is distributed to which system, and by using the system identification information, it is possible to manage which system is installed in the vehicle. By determining the system identification information, the center device 3 can determine the rewriting method for each system, the rewriting order when multiple systems are rewritten, and the like.
[0589] ECU identification information is unique information for identifying the rewrite target ECU 19, and includes information for uniquely identifying the rewrite ECU and the software version and hardware version of the application written into the rewrite target ECU 19. ECU identification information is also equivalent to the ECU product number. In the case of writing the latest software using all data, it can also be only the hardware version. In addition, it is also possible to define information such as the specification version and the configuration version that can identify the application, and it is also possible to define the microcomputer ID, the sub-microcomputer ID, the flash memory ID, the software sub-version, the software grandchild version, etc.
[0590] The use environment information is unique information for identifying the environment in which the user uses the vehicle. The use environment information is sent from the CGW 13 to the center device 3 via the DCM 12, so that the center device 3 can distribute applications suitable for the environment in which the user uses the vehicle. For example, an application that enhances acceleration is distributed to a user who likes rapid acceleration from a stop, and an application that enhances eco-driving despite poor acceleration performance is distributed to a user who likes eco-driving. Applications suitable for the environment in which the user uses the vehicle can be distributed.
[0591] In addition, the above description is about the case where the microcomputer of the rewrite target ECU 19 is equipped with a flash memory, but when the microcomputer of the rewrite target ECU 19 is connected to an external memory, the external memory and the double-sided memory are treated equally, and the write area of the external memory is divided into two to write the write data. In the case where the microcomputer of the rewrite target ECU 19 is equipped with a flash memory and is connected to an external memory, there is also a case where the program stored in the external memory is temporarily copied (photocopied) to the memory of the microcomputer. Because there is also a case where the external memory is generally used as a storage area for the action log of the ECU, it is preferred to interrupt the storage of the action log when the writing of the write data to the external memory is started, and restart the storage of the action log when the writing of the write data to the external memory is completed.
[0592] This is not limited to the case of rewriting an application. For example, data such as map data that has the nature of being updated one by one also has concepts such as double-sidedness and version, so the same applies to the case of rewriting map data.
[0593] (9) Power management processing for non-rewrite targets
[0594] Reference Figure 82 to Figure 87 The power management process of the non-rewriting target ECU 19 is described. The vehicle program rewriting system 1 performs the power management process of the non-rewriting target ECU 19 in the CGW 13. In the present embodiment, it is assumed that the download of the distribution data packet is completed by the DCM 12, the CGW 13 obtains the rewriting specification data, and the CGW 13 distributes the write data to the rewriting target ECU 19 in the vehicle parking state. When the CGW 13 distributes the write data to the rewriting target ECU 19, the IG power is turned on to the power management ECU 20, so that all ECUs 19 are in the startup state.
[0595] like Fig.82 As shown, the CGW 13 includes a rewrite target determination unit 81a, an installable determination unit 81b, a state transition control unit 81c, and a rewrite order determination unit 81d in the power management unit 81 of the non-rewrite target ECU 19. The rewrite target determination unit 81a determines the rewrite target ECU 19 and the non-rewrite target ECU 19 based on the analysis result of the rewrite specification data. The installable determination unit 81b determines whether the rewrite target ECU 19 can be installed.
[0596] The state transition control unit 81c can transfer the state of ECU19, so that the ECU19 in the stopped state or the sleeping state is transferred to the started state (awakened state), or the ECU19 in the started state is transferred to the stopped state or the sleeping state. In addition, the state transition control unit 81c transfers the ECU19 in the normal operation state to the power saving operation state, or transfers the ECU19 in the power saving operation state to the normal operation state. If it is determined by the installable determination unit 81b that it can be installed, the state transition control unit 81c controls at least one or more non-rewrite target ECU19 to the stopped state, the sleeping state or the power saving operation state. The rewrite order determination unit 81d determines the rewrite order of the rewrite target ECU19 based on the analysis result of the rewrite specification data.
[0597] Next, refer to Figure 83 to Figure 87 The function of the power management unit 81 of the non-rewriting target ECU 19 in the CGW 13 will be described. The CGW 13 executes the non-rewriting target power management program and performs the non-rewriting target power management process. Here, the case where the CGW 13 activates all the management target ECUs 19 will be described.
[0598] When the CGW 13 starts the power management process of the non-rewriting target ECU 19, the rewriting target ECU 19 and the non-rewriting target ECU 19 are determined based on the analysis result of the rewriting specification data for the CGW (S901), and the rewriting order of one or more rewriting target ECUs 19 is determined based on the analysis result of the rewriting specification data (S902). The CGW 13 determines whether the writing of write data can be performed (S903, which corresponds to the writable determination step). If it is determined that the writing of write data can be performed (S903: Yes), a power off request (stop request) is sent to the non-rewriting target ECU 19 of the ACC system and the non-rewriting target ECU 19 of the IG system, so that the non-rewriting target ECU 19 of the ACC system and the non-rewriting target ECU 19 of the IG system are transferred from the start state to the stop state (S904, which corresponds to the state transfer control step).
[0599] CGW13 determines whether the power disconnection request has been sent to all compliant ECU19 (S905). If it is determined that the power disconnection request has been sent to all compliant ECU19 (S905: Yes), a sleep request is sent to the non-rewrite object ECU19 of the +B power system, so that the non-rewrite object ECU19 of the +B power system is transferred from the startup state to the sleep state (S906, equivalent to the state transfer control step).
[0600] The CGW 13 determines whether the sleep request has been sent to all the corresponding ECUs 19 (S907). If it is determined that the sleep request has been sent to all the corresponding ECUs 19 (S907: Yes), it determines whether the rewriting of the application program has been completed for all the rewriting target ECUs 19 (S908). If the CGW 13 determines that the rewriting of the application program has been completed for all the rewriting target ECUs 19 (S908: Yes), the power management processing of the non-rewriting target ECUs 19 is terminated. If the CGW 13 determines that the rewriting of the application program has not been completed for all the rewriting target ECUs 19 (S908: No), it returns to step S904 and repeats step S904 and subsequent steps.
[0601] When there are multiple ECUs 19 to be rewritten, the CGW 13 may transfer the states of the multiple ECUs 19 to be rewritten independently or may transfer the states of the multiple ECUs 19 to be rewritten together. Fig.83 , the processing of CGW 13 sending a power off request or a sleep request to the non-rewriting target ECU 19 is shown. Fig.84 as well as Fig.85 In the following, a case where the power supply management process for the rewrite target ECU 19 is performed in addition to the power supply management process for the non-rewrite target ECU 19 will be described.
[0602] First, use Fig.84 The following describes a case where the CGW 13 independently transfers the states of a plurality of rewrite target ECUs 19. Fig.84 As shown, the case where, for example, the rewrite object ECU19 is ECU (ID1), ECU (ID2), and ECU (ID3), and the rewrite object ECU19 specified by ECU (ID1), ECU (ID2), and ECU (ID3) is rewritten in the order of rewriting from morning to night while parked is described.
[0603] CGW13 causes ECU (ID1), ECU (ID2), and ECU (ID3) to all be transferred from a stopped state or a sleeping state to a started state. CGW13 keeps the first rewritten ECU (ID1) in a started state, transfers ECU (ID2) and ECU (ID3) from a started state to a stopped state or a sleeping state, and distributes the written data to ECU (ID1). If CGW13 completes the distribution of written data to ECU (ID1), it transfers ECU (ID1) from a started state to a stopped state or a sleeping state, transfers the second rewritten ECU (ID2) from a stopped state or a sleeping state to a started state, keeps ECU (ID3) in a stopped state or a sleeping state, and distributes the written data to ECU (ID2).
[0604] If CGW13 completes the distribution of write data to ECU (ID2), ECU (ID1) is kept in a stopped state or a sleep state, ECU (ID2) is transferred from a start state to a stopped state or a sleep state, and the third rewritten ECU (ID3) is transferred from a stop state or a sleep state to a start state, and the write data is distributed to ECU (ID3). If CGW13 completes the distribution of write data to ECU (ID3), ECU (ID1) and ECU (ID2) are kept in a stopped state or a sleep state, and ECU (ID3) is transferred from a start state to a stopped state or a sleep state. In this way, CGW13 controls only the ECU19 currently being rewritten among the multiple rewrite object ECU19 to be in the start state.
[0605] Next, use Fig.85 The following describes a case where the CGW 13 transfers the states of a plurality of rewrite target ECUs 19 at once. Fig.85 As shown, the case where, for example, the rewrite object ECU19 is ECU (ID1), ECU (ID2), and ECU (ID3), and the rewrite object ECU19 specified by ECU (ID1), ECU (ID2), and ECU (ID3) is rewritten in the order of rewriting from morning to night while parked is described.
[0606] CGW13 causes ECU (ID1), ECU (ID2), and ECU (ID3) to transfer from a stopped state or a sleeping state to a started state. CGW13 keeps ECU (ID1), ECU (ID2), and ECU (ID3) in the started state and distributes the write data to ECU (ID1). If CGW13 completes the distribution of the write data to ECU (ID1), it distributes the write data to ECU (ID2). If CGW13 completes the distribution of the write data to ECU (ID2), it distributes the write data to ECU (ID3). If CGW13 completes the distribution of the write data to ECU (ID3), it causes ECU (ID1), ECU (ID2), and ECU (ID3) to transfer from a started state to a stopped state or a sleeping state. In this way, CGW13 controls all multiple rewrite object ECUs 19 to be in the started state until the installation is completed. Here, CGW13 can also distribute the write data to ECU (ID1), ECU (ID2), and ECU (ID3) simultaneously and in parallel.
[0607] When the rewriting target ECU 19 rewrites the application program while the vehicle is parked, the supply voltage to the rewriting target ECU 19 is not necessarily stable, so there is a concern that the vehicle battery 40 may run out of battery power during the rewriting of the application program. In particular, if there are multiple rewriting target ECUs 19, the time required to rewrite the application program becomes longer, so the possibility of the vehicle battery 40 running out of battery power during the rewriting of the application program increases. In this regard, by making the non-rewriting target ECU 19 stop or sleep as described above, the situation of insufficient battery remaining in the vehicle battery 40 during the rewriting of the program can be prevented in advance. In addition, by making the ECU 19 that is not currently being rewritten in the rewriting target ECU 19 stop or sleep, power consumption can be further suppressed.
[0608] The above describes the case where the application program of the rewrite target ECU 19 is rewritten while the vehicle is parked. The following describes the case where the application program of the rewrite target ECU 19 is rewritten while the vehicle is running. When the application program of the rewrite target ECU 19 is rewritten while the vehicle is running, the supply voltage to the rewrite target ECU 19 is stable, so there is no need to worry about the vehicle battery 40 running out of power during the rewriting of the application program. However, there is a possibility that the battery power of the vehicle battery 40 is low. In such a case, it is preferable to transfer the ECU 19 that does not need to be operated to a stopped state or a sleep state while the vehicle is running. Fig.86 As shown, in the case where the ECU 44 that does not need to be operated during vehicle driving is connected to the +B power line 37 but is not connected to the ACC power line 38 and the IG power line 39, the CGW 13 transfers the ECU 44 that does not need to be operated during vehicle driving from the start state to the stop state or the sleep state. The ECU 44 is, for example, an ECU with anti-theft functions. That is, the CGW 13 transfers the ECU 44 that does not need to be operated and is not the object of rewriting to the stop state or the sleep state while all the ECUs 19 are in the start state during vehicle driving. In this way, the increase in power consumption accompanying the installation during vehicle driving can be suppressed.
[0609] In addition, the CGW 13 monitors the remaining battery level of the vehicle battery 40 and performs the above-mentioned power management process for the non-rewriting target. Fig.87 The monitoring process of the remaining battery capacity is described below. If the CGW 13 starts the monitoring process of the remaining battery capacity, the remaining battery capacity is monitored during the distribution of the write data to the rewrite target ECU 19 (S911), and it is determined whether the remaining battery capacity is greater than the first prescribed capacity, or the remaining battery capacity is less than the first prescribed capacity and greater than the second prescribed capacity, or the remaining battery capacity is less than the second prescribed capacity (S912 to S914).
[0610] If the CGW13 determines that the remaining battery level is greater than the first specified capacity (S912: Yes), the non-rewrite target ECU19 is kept in the startup state and the distribution of write data to the rewrite target ECU19 is continued (S915). If the CGW13 determines that the remaining battery level is less than the first specified capacity and greater than the second specified capacity (S913: Yes), the ECUs in the non-rewrite target ECU19 that do not need to be operated during driving are transferred to the stop state or the sleep state, and the distribution of write data to the rewrite target ECU19 is continued (S916). If the CGW13 determines that the remaining battery level is less than the second specified capacity (S914: Yes), it determines whether the rewrite can be interrupted (S917).
[0611] If the CGW 13 determines that the rewriting can be interrupted (S917: Yes), the distribution of the write data is interrupted (S918). If the CGW 13 determines that the rewriting cannot be interrupted (S917: No), all ECUs that can be transferred to the stop state or sleep state among the non-rewriting target ECUs 19 are transferred to the stop state or sleep state (S919).
[0612] The CGW 13 determines whether the rewriting is completed (S920). If it is determined that the rewriting is not completed (S920: No), the process returns to step S911 and repeats step S911 and subsequent steps. If it is determined that the rewriting is completed (S920: Yes), the CGW 13 causes the rewriting target ECU 19 in the stopped state or the sleep state to be transferred to the start state (S921), and the battery remaining amount monitoring process is terminated. Here, the values of the first specified capacity and the second specified capacity may be pre-existing in the CGW 13, or the values specified by the rewriting specification data may be used.
[0613] In addition, CGW13 may exclude ECU19 having a specific function such as an alarm function from being transferred to a stopped state or a sleep state in step S919, and transfer non-rewrite target ECU19 other than ECU19 having a specific function from a started state to a stopped state or a sleep state. CGW13 may also set non-rewrite target ECU19 other than ECU19 that can communicate with the rewrite target ECU19 to a stopped state or a sleep state when it is possible to perform application control in the rewrite target ECU19 rewriting the application program. When all ECU19 are in a stopped state or a sleep state, and if the rewrite condition is satisfied, such as when the vehicle position becomes a specified position or the current time becomes a specified time, CGW13 may also transfer the rewrite target ECU19 from a stopped state or a sleep state to a started state.
[0614] CGW13 can also group the rewrite object ECU19 or the non-rewrite object ECU19 based on any one of the starting power supply (+B power supply system ECU, ACC system ECU, IG system ECU), domain group (body system, driving system, multimedia system), and synchronization timing, and make the rewrite object ECU19 start up in groups, or make the non-rewrite object ECU19 stop or sleep in groups.
[0615] In addition, the CGW 13 may also be configured to perform power control on a bus basis. That is, if all ECUs 19 connected to a specific bus are determined to be non-rewrite target ECUs 19, the CGW 13 may also switch all non-rewrite target ECUs 19 connected to the specific bus to a stop state or a sleep state by disconnecting the power supply of the specific bus.
[0616] As described above, the CGW 13 performs power management processing on the non-rewriting target, and if it is determined that the rewriting target ECU 19 can be installed, at least one non-rewriting target ECU 19 is placed in a stop state, a sleep state, or a power saving operation state. It is possible to prevent the battery remaining in the vehicle battery 40 from becoming insufficient during the rewriting of the application. In addition, by placing the non-rewriting target ECU 19 in a stop state, a sleep state, or a power saving operation state, it is possible to suppress an increase in communication load.
[0617] (10) File transfer control processing
[0618] Reference Figures 88 to 97 The file transfer control process will be described. The vehicle program rewriting system 1 performs file transfer control processing in the CGW 13. This embodiment is a process for sending rewriting data held in the DCM 12 (equivalent to the first device) to the rewriting target ECU 19 (equivalent to the third device) via the CGW 13 (equivalent to the second device).
[0619] like Fig.88 As shown, the CGW 13 includes a transmission target file determination unit 82a, a first data size determination unit 82b, an acquisition information determination unit 82c, a second data size determination unit 82d, and a split file transmission request unit 82e in the file transmission control unit 82. The transmission target file determination unit 82a determines the file including the write data written to the rewrite target ECU 19 as the transmission target file using the analysis result of the rewrite specification data. For example, when the rewrite target ECU 19 is ECU (ID1), ECU (ID2), and ECU (ID3), the transmission target file determination unit 82a determines the file including the write data written to the rewrite target ECU 19 as the transmission target file. Figure 8The rewrite specification data for CGW shown in the figure acquires the ECU information of ECU (ID1), ECU (ID2) and ECU (ID3), and determines the file including the write data as the transmission object file based on the acquired ECU information. As the transmission object file, the address and index when acquiring the file can be determined, and the file name of the file can also be determined.
[0620] If the transmission object file is determined by the transmission object file determination unit 82a, the first data size determination unit 82b determines the first data size for acquiring the transmission object file. If the transmission object file is determined by the transmission object file determination unit 82a, the acquisition information determination unit 82c determines the address as the acquisition information for acquiring the transmission object file. In addition, in the present embodiment, the address is determined as the acquisition information for acquiring the transmission object file, but if it is the acquisition information for acquiring the transmission object file, it is not limited to the address, and it can also be a file name, ECU (ID), etc. The second data size determination unit 82d determines the second data size for distributing write data to the rewrite object ECU19. That is, the first data size is the data transmission size from DCM12 to CGW13, and the second data size is the data transmission size from CGW13 to the rewrite object ECU19.
[0621] When the address is determined by the acquisition information determination unit 82c and the first data size is determined by the first data size determination unit 82b, the divided file transfer request unit 82e specifies the address and the first data size to the DCM 12 and requests the DCM 12 to transfer the divided files. For example, when the data size of the write file to be distributed to the ECU (ID1) is 1M bytes, the divided file transfer request unit 82e requests to transfer the write data in 1k bytes from the address 0x10000000.
[0622] Next, refer to Figures 89 to 97 The following describes the role of the file transfer control unit 82 in the CGW 13. The CGW 13 executes a file transfer control program to perform file transfer control processing.
[0623] If CGW13 determines that it has received the depacketization completion notification signal from DCM12, it will start the file transfer control process. Fig.10 As shown, the distribution data packet file is divided into the data for each ECU and the processing of each rewriting specification data. When CGW13 starts the file transmission control processing, it sends a specified address to DCM12 (S1001). When DCM12 receives the specified address from CGW13, it uses the reception of the specified address as an opportunity to transmit the rewriting specification data for CGW to CGW13. CGW13 obtains the rewriting specification data for CGW by receiving the rewriting specification data for CGW from DCM12 (S1002).
[0624] If CGW13 obtains the rewrite specification data for CGW from DCM12, it parses the rewrite specification data for CGW (S1003), and determines the transmission object file based on the parsing result of the rewrite specification data (S1004, equivalent to the transmission object file determination step). CGW13 determines the address corresponding to the transmission object file (S1005, equivalent to the acquisition information determination step), and determines the first data size corresponding to the transmission object file (S1006, equivalent to the first data size determination step). CGW13 sends the determined address and data size to DCM12 according to the provisions of SID (Service Identifier) 35, specifies the address and data size for the memory area, and requests DCM12 to transmit the split file (S1007).
[0625] When receiving the address and data size from CGW13, DCM12 analyzes the rewrite specification data for DCM and transmits the file corresponding to the address and data size as a split file to CGW13. CGW13 obtains the split file by receiving the split file from DCM12 (S1008). In this case, CGW13 may store the acquired file in RAM and then in flash memory.
[0626] CGW13 determines whether the acquisition of all the split files that should be acquired has been completed (S1009). For example, when the data volume of the write file to be distributed to ECU (ID1) is 1M bytes, CGW13 acquires split files of each 1k bytes, repeats the acquisition of split files of each 1k bytes, and determines whether the acquisition of 1M bytes of data has been completed. If CGW13 determines that the acquisition of all the split files that should be acquired has not been completed (S1009: "No"), it returns to step S1004 and repeats the steps after step S1004. If CGW13 determines that the acquisition of all the files that should be acquired has been completed (S1009: "Yes"), the file transmission control processing ends. In addition, when there are multiple ECUs 19 to be rewritten, CGW13 repeats the above-mentioned file transmission control processing for each ECU 19 to be rewritten.
[0627] That is, for example, when the rewrite target ECU 19 is ECU (ID1), ECU (ID2), and ECU (ID3), if CGW 13 completes the distribution of write data to ECU (ID1), it performs file transfer control processing on ECU (ID2), and if it completes the distribution of write data to ECU (ID2), it performs file transfer control processing on ECU (ID3). In addition, CGW 13 may perform transfer control processing on multiple rewrite target ECUs 19 in sequence or in parallel.
[0628] exist Fig.90 In the figure, it is shown that in the memory of DCM12, for example, the write data file of ECU (ID1) is stored at addresses "1000" to "3999", the write data file of ECU (ID2) is stored at addresses "4000" to "6999", and the write data file of ECU (ID3) is stored at addresses "7000" to "7999".
[0629] In this case, if Fig.91 As shown, if CGW13 receives the unpacking completion notification signal from DCM12, it sends the address "0000" to DCM12 and obtains the rewrite specification data from DCM12. That is, if DCM12 determines that the reception of the address "0000" is a request to obtain the rewrite data for CGW, it sends the rewrite specification data for CGW to CGW13. CGW13 specifies ECU (ID1) as the transmission object of the write data, specifies the address "1000" and the data size "1k bytes", and obtains from DCM12 a split file containing the write data of ECU (ID1) stored at addresses "1000" to "1999". If CGW13 obtains the split file from DCM12, it distributes the write data contained in the split file to ECU (ID1).
[0630] CGW13 then similarly specifies ECU (ID1) as the transmission target of the write data, specifies the address "2000" and the data size "1k byte", and obtains the split file containing the write data of ECU (ID1) stored at addresses "2000" to "2999" from DCM12. If CGW13 obtains the split file from DCM12, it distributes the write data contained in the split file to ECU (ID1). Until the writing of the write data to ECU (ID1) is completed, CGW13 repeatedly obtains the split file from DCM12 in 1k byte increments, and repeatedly distributes the write data contained in the split file to ECU (ID1). That is, if CGW13 obtains 1k byte of write data from DCM12, it sends the 1k byte of write data to the rewrite target ECU19, and if the sending to the rewrite target ECU19 is completed, it obtains the next 1k byte of write data from DCM12. CGW13 repeats these processes until the writing is completed.
[0631] If the writing of the write data is completed normally in ECU (ID1), CGW13 designates ECU (ID2) as the transmission target of the write data, designates the address "4000" and the data size "1k byte", and obtains the split file containing the write data of ECU (ID2) stored at the addresses "4000" to "4999" from DCM12. If CGW13 obtains the split file from DCM12, it distributes the write data contained in the split file to ECU (ID2).
[0632] If the writing of the write data is completed normally in ECU (ID2), CGW13 designates ECU (ID3) as the transmission target of the write data, designates the address "7000" and the data size "1k byte", and obtains the split file containing the write data of ECU (ID2) stored at the addresses "7000" to "7999" from DCM12. If CGW13 obtains the split file from DCM12, it distributes the write data contained in the split file to ECU (ID2).
[0633] As described above, CGW13 determines the transfer target file based on the analysis result of the rewriting specification data by performing the file transfer control process, and determines the address and data size corresponding to the transfer target file. CGW13 specifies the address and data size to DCM12, requests DCM12 to transfer the split files obtained by splitting the transfer target file, and obtains the split files from DCM12. As a result, the write data can be distributed to ECU19 while using the memory of DCM12 to store the write data with a large capacity. That is, there is no need to prepare a memory for storing files with a large capacity in CGW13, and the memory capacity of CGW13 can be reduced.
[0634] Here, the relationship between the data volume of the split file transmitted from the DCM 12 to the CGW 13 and the data volume of the write file distributed from the CGW 13 to the rewrite target ECU 19 will be described. Fig.92 As shown, the case where the data size of the divided file transmitted from DCM12 to CGW13 is 1k bytes is described, but the relationship between the data size of the divided file transmitted from DCM12 to CGW13 and the data size of the write file distributed from CGW13 to the rewrite target ECU19 can also be arbitrary.
[0635] That is, for example, if the rewrite target ECU 19 adopts a specification of receiving write data in 4k bytes for reasons of CAN communication, the CGW 13 distributes the data amount of the write file to the rewrite target ECU 19 in units of 4k bytes. In this case, if the data amount of the split file transmitted from the DCM 12 to the CGW 13 is 1k bytes, the CGW 13 distributes 4k bytes to the rewrite target ECU 19 after acquiring four split files from the DCM 12. That is, the data amount of the split file transmitted from the DCM 12 to the CGW 13 is smaller than the data amount of the write file distributed from the CGW 13 to the rewrite target ECU 19. In such a relationship, in the CGW 13, it is possible to suppress the increase in memory capacity and to acquire split files from the DCM 12 and distribute write data to the rewrite target ECU 19 in parallel.
[0636] That is, if the data volume of the split file transmitted from DCM12 to CGW13 is 4k bytes, in order to obtain the split file from DCM12 in parallel and distribute the write data to the rewrite target ECU19, the memory capacity of CGW13 needs to be 8k bytes. By making the data volume of the split file transmitted from DCM12 to CGW13 1k bytes, it is possible to obtain the split file from DCM12 in parallel and distribute the write data to the rewrite target ECU19 without making the memory capacity of CGW13 8k bytes. For example, it is ensured in advance that the memory capacity of CGW13 is 5k bytes, CGW13 distributes the 4k bytes obtained from DCM12 to the rewrite target ECU19, and obtains the next 1k byte from DCM12. Moreover, after completing the distribution of 4k bytes to the rewrite target ECU19, CGW13 further obtains the next 1k byte from DCM12.
[0637] On the other hand, if, for example, the rewrite target ECU 19 adopts a specification of receiving write data in 128 bytes due to CAN communication reasons, the CGW 13 distributes the write data to the rewrite target ECU 19 in 128 bytes. In this case, if the data volume of the split file transmitted from the DCM 12 to the CGW 13 is 1k bytes, the CGW 13 distributes the write data to the rewrite target ECU 19 in 128 bytes after obtaining one split file from the DCM 12. That is, the data volume of the split file transmitted from the DCM 12 to the CGW 13 is larger than the data volume of the write file distributed from the CGW 13 to the rewrite target ECU 19. For example, the memory capacity of the CGW 13 is ensured to be 2k bytes in advance, and the CGW 13 distributes the 1k bytes obtained from the DCM 12 to the rewrite target ECU 19 in units of 128 bytes, and obtains the next 1k bytes from the DCM 12. Moreover, after the CGW 13 completes the distribution of 128 bytes × 8 times to the rewrite target ECU 19, it further obtains the next 1k bytes from the DCM 12.
[0638] In this way, the data size of the divided file transmitted from the DCM 12 to the CGW 13 can be set to a fixed value (e.g., 1 kbyte), and the data size of the write file distributed from the CGW 13 to the rewrite target ECU 19 can be set to a variable value according to the specification of the rewrite target ECU 19. The CGW 13 can also determine the data size distributed to the rewrite target ECU 19, for example, using the data transmission size of each ECU specified by the rewrite specification data.
[0639] CGW13 sends a transfer request to DCM12 to request the DCM12 to transfer the divided files, but there are a first request method and a second request method as a method of requesting the DCM12 to transfer the divided files. If the rewrite target ECU19 completes the reception of the write data, it sends a reception completion notification indicating that the reception of the write data has been completed to CGW13. If the writing of the write data has been completed, it sends a write completion notification indicating that the writing of the write data has been completed to CGW13.
[0640] use Fig.93 The first distribution method is described. If CGW13 obtains a split file from DCM12, it distributes the obtained split file to the rewrite target ECU19 as write data. If the rewrite target ECU19 completes receiving the write data, it sends a reception completion notification to CGW13 and starts writing the write data. If CGW13 receives a reception completion notification of the write data from the rewrite target ECU19, it sends a transmission request to DCM12 to request DCM12 to transmit the next split file. If CGW13 obtains the next split file from DCM12, it distributes the obtained next split file to the rewrite target ECU19 as write data.
[0641] Thus, in the first distribution method, CGW13 obtains the next write data from DCM12 and distributes it to the rewrite target ECU19 without waiting for the write data of the rewrite target ECU19 to be written. Therefore, in the first distribution method, in CGW13, if the rewrite target ECU19 has not completed the writing of the write data, even if the next split file is obtained from DCM12 and the next write data is distributed to the rewrite target ECU19, the rewrite target ECU19 may not receive the next write data. However, if the rewrite target ECU19 completes the writing of the write data, the next split file can be quickly obtained from DCM12 and the next write data can be quickly distributed to the rewrite target ECU19.
[0642] use Fig.94The second distribution method is described. If CGW13 obtains a split file from DCM12, it distributes the obtained split file to the rewrite object ECU19 as write data. If the rewrite object ECU19 completes the reception of the write data, it sends a reception completion notification to CGW13 and starts the write processing of the write data. If the rewrite object ECU19 completes the writing, it sends a write completion notification to CGW13. If CGW13 receives the write completion notification from the rewrite object ECU19, it sends a transfer request to DCM12 and requests DCM12 to transfer the next split file. If CGW13 obtains the next split file from DCM12, it distributes the obtained next split file to the rewrite object ECU19 as write data.
[0643] Thus, in the second distribution method, after waiting for the completion of writing of the write data of the rewrite target ECU 19, the CGW 13 obtains the next write data from the DCM 12 and distributes it to the rewrite target ECU 19. Therefore, in the second distribution method, it takes time for the CGW 13 to obtain the next split file from the DCM 12, and the DCM 12 can be requested to transfer the split file when the rewrite target ECU 19 has completed writing the write data. Therefore, if the next split file is obtained from the DCM 12 and the next write data is distributed to the rewrite target ECU 19, the next write data can be reliably distributed to the rewrite target ECU 19.
[0644] In addition, CGW13 distributes the write data to the rewrite target ECU19 through SID34, 36, 37. As a method of distributing the write data to the rewrite target ECU19, there are a first distribution method and a second distribution method. In the first distribution method, if Fig.95 As shown in FIG. 1 , CGW 13 divides the write data to be distributed into segments according to a specified data amount (e.g., 1 kbyte) and distributes the data. Fig.96 As shown in FIG. 1 , CGW 13 does not divide the write data to be distributed but distributes it uniformly. CGW 13 selects either the first distribution method or the second distribution method through SID 34 initially distributed to the rewrite target ECU 19. Fig.97 As shown in FIG. 1 , CGW 13 receives ACK (SID 74) for SID 37 that was last distributed to rewrite target ECU 19, thereby confirming that the write data of rewrite target ECU 19 has been received. ACK for SID 37 is equivalent to Fig.93 and Fig.94That is, in the first distribution method, when CGW 13 receives ACK for the last distribution of SID 37 to rewrite target ECU 19, it increments the address of the next write data by 1, and simultaneously distributes the next write data to rewrite target ECU 19, further acquires the next write data from DCM 12.
[0645] In addition, in the rewriting specification data for DCM, the address and the file are associated. However, as a method of associating the address and the file, for example, a folder structure may be designed to store the specification data in folder 1, store file 1 in folder 2, and store file 2 in folder 3 for management, or the files may be managed in the order of the file names. Fig.10 In the unpacking shown, the rewrite specification data for DCM and the rewrite specification data for CGW are stored in folder 1, the authenticator and differential data of ECU (ID1) are stored in folder 2, and the authenticator and differential data of ECU (ID2) are stored in folder 3 for management.
[0646] In addition, when the distribution of write data to the rewrite target ECU 19 is interrupted due to some reason such as communication interruption, the CGW 13 obtains information that can identify the address where the write data has been completed from the rewrite target ECU 19, and requests the DCM 12 to transmit the split file containing the write data from the time when the write is not completed. Alternatively, the CGW 13 may request the DCM 12 to transmit the split file containing the write data from the beginning.
[0647] As described above, when CGW13 determines a file including write data to be written to the rewrite target ECU19 as a transfer target file by performing file transfer control processing, determines an address and a first data size for acquiring the transfer target file, requests DCM12 to transfer the split files, and transfers the split files from DCM12, the write data is distributed to the rewrite target ECU. The write data can be efficiently transferred from DCM12 to CGW13 and distributed from CGW13 to the rewrite target ECU19.
[0648] (11) Distribution Control Processing of Write Data
[0649] Reference Figures 98 to 108 Vehicle program rewriting system 1 performs write data distribution control processing in CGW 13. CGW 13 sends write data to ECU 19 via a bus in the vehicle, and therefore performs write data distribution control processing so that the bus load does not become too high during write data distribution.
[0650] like Fig.98As shown, it is assumed that the +B power system ECU, the ACC system ECU, and the IG system ECU are connected to the same bus. In this case, in the +B power state, only the +B power system ECU is started, and the ACC system ECU and the IG system ECU are stopped, so only the vehicle control data of the +B power system ECU is transmitted to the bus. In the ACC power state, the +B power system ECU and the ACC system ECU are started, and the IG system ECU is stopped, so the vehicle control data of the +B power system ECU and the ACC system ECU are transmitted to the bus. In the IG power state, the +B power system ECU, the ACC system ECU, and the IG system ECU are started, so the vehicle control data of the +B power system ECU, the ACC system ECU, and the IG system ECU are transmitted to the bus. That is, the transmission amount of the vehicle control data is in the order of the IG power state, the ACC power state, and the +B power state.
[0651] like Fig.99 As shown, the CGW 13 includes a first correspondence determination unit 83a, a second correspondence determination unit 83b, a transfer allowance determination unit 83c, a distribution frequency determination unit 83d, a bus load measurement unit 83e, and a distribution control unit 83f in the distribution control unit 83 for writing data.
[0652] The first correspondence determination unit 83a determines a first correspondence indicating a relationship between a power supply state and a transfer allowance of a bus based on the analysis result of the rewriting specification data, and determines Fig.100 The bus load table shown in the figure. The transmission allowance refers to the value of the transmission load that can send and receive data without causing data conflicts or delays. The bus load table is a table that shows the correspondence between the power supply state and the transmission allowance of the bus, and is defined for each bus. The transmission allowance is the total transmission amount of vehicle control data and write data that can be transmitted relative to the maximum transmission allowance.
[0653] exist Fig.100 In the example, the transmission allowance of the first bus is "80%" relative to the maximum transmission allowance, so CGW13 allows "50%" of the maximum transmission allowance as the transmission allowance for vehicle control data, and allows "30%" of the maximum transmission allowance as the transmission allowance for write data in the IG power state. In addition, for the first bus, CGW13 allows "30%" of the maximum transmission allowance as the transmission allowance for vehicle control data, and allows "50%" of the maximum transmission allowance as the transmission allowance for write data in the ACC power state. In addition, for the first bus, CGW13 allows "20%" of the maximum transmission allowance as the transmission allowance for vehicle control data, and allows "60%" of the maximum transmission allowance as the transmission allowance for write data in the +B power state. As Fig.100 As shown, the second bus and the third bus are also defined in the same manner.
[0654] The second correspondence determination unit 83b determines the second correspondence indicating the relationship between the bus to which the rewriting target ECU 19 belongs and the power supply system based on the analysis result of the rewriting specification data, and determines Fig.101 The rewriting target ECU affiliation table is a table showing the buses and power supply systems to which the rewriting target ECU 19 belongs.
[0655] exist Fig.101 In the example of , CGW13 connects the first rewrite target ECU19 to the first bus, and starts it in any of the +B power state, ACC power state, and IG power state, so the first rewrite target ECU19 is determined as the +B power system ECU. In addition, CGW13 connects the second rewrite target ECU19 to the second bus, stops it in the +B power state, but starts it in the ACC power state and the IG power state, so the second rewrite target ECU19 is determined as the ACC system ECU. In addition, CGW13 connects the third rewrite target ECU19 to the third bus, stops it in the +B power state and the ACC power state, but starts it in the IG power state, so the third rewrite target ECU19 is determined as the IG system ECU.
[0656] CGW13 use Figure 8 The data of "connect bus" and "connect power supply" in the rewrite specification data shown above can be used to determine which bus and power supply system the rewrite target ECU 19 is connected to. In addition, if these information can be determined, they do not necessarily need to be stored in the form of a table.
[0657] The transmission allowance determination unit 83c determines the transmission allowance of the bus to which the rewriting target ECU 19 belongs, that is, the transmission allowance corresponding to the power state of the vehicle when the program is updated, based on the determination results of the first correspondence relationship and the determination results of the second correspondence relationship. Specifically, the transmission allowance determination unit 83c uses the second correspondence relationship, that is, the rewriting target ECU belonging table, to determine the bus to which the rewriting target ECU 19 belongs, and uses the first correspondence relationship, that is, the bus load table, to determine the transmission allowance for each power state for the determined bus.
[0658] The distribution frequency determination unit 83d determines the distribution frequency of write data corresponding to the power state at the time of installation by using the correspondence between the predetermined power state and the distribution frequency of write data. Specifically, the distribution frequency determination unit 83d uses the bus load table to determine the transmission allowance allocated for the distribution of write data among the transmission allowances determined by the transmission allowance determination unit 83c, and determines the distribution frequency of write data. For example, the distribution frequency determination unit 83d determines that the bus to which the rewrite object ECU 19 belongs is the first bus, the power state at the time of installation is the IG power state, the transmission allowance is determined to be "80%", and the transmission allowance allocated for the distribution of write data is determined to be "30%", thereby determining the distribution frequency of write data. The transmission allowance allocated for the distribution of write data is equivalent to the transmission restriction information.
[0659] The bus load measuring unit 83e measures the bus load of the bus to which the rewriting target ECU 19 belongs. The bus load measuring unit 83e measures the bus load by, for example, counting the number of frames or bits received per unit time. The distribution control unit 83f controls the distribution of write data according to the distribution frequency determined by the distribution frequency determination unit 83d.
[0660] Next, refer to Figures 102 to 108 The following describes the role of the write data distribution control unit 83 in the CGW 13. The CGW 13 executes a write data distribution control program to perform a write data distribution control process.
[0661] If CGW13 receives the unpacking completion notification signal from DCM12, it starts the distribution control process of write data. CGW13 obtains the rewrite specification data for CGW from DCM12 (S1101), and determines the bus load table and the rewrite object ECU belonging table (S1102) based on the rewrite specification data for CGW. CGW13 determines the bus to which the rewrite object ECU19 belongs based on the rewrite object ECU belonging table (S1103). CGW13 determines the transmission allowance corresponding to the bus to which the rewrite object ECU19 belongs, that is, the power state of the vehicle when updating, based on the bus load table. Moreover, CGW13 determines the distribution frequency of write data in consideration of the determined transmission allowance (S1104, equivalent to the distribution frequency determination step). For example, for the first rewrite object ECU19, i.e., ECU (ID1), when distributing write data while the vehicle is driving, CGW13 refers to the transmission allowance of the first bus under the IG power state. Fig.100In the example, the transmission allowance of the first bus in the IG power state is "80%", of which "50%" of the vehicle control data is allowed to be transmitted, and "30%" of the write data is allowed to be transmitted. In addition, the transmission allowance is ultimately a value used to represent an example, and the numerical value is set within the allowable range of the applicable communication specification.
[0662] Since the specification of CAN at 500 [kbps] is about 250 [μs] per frame, if four interruptions occur within 1 second, four frames are generated and the bus load is 100%. CGW13 determines the distribution frequency of write data by determining the interruptions generated on the bus. CGW13 starts measuring the number of frames received per unit time, starts measuring the bus load (S1105), determines whether the measured bus load exceeds the transmission allowable amount (S1106), and sets the distribution interval. The distribution interval refers to the time interval from distributing write data to the rewrite object ECU19 in CGW13, receiving the write completion notification (ACK) from the rewrite object ECU19, to sending the next write data to the rewrite object ECU19.
[0663] If the CGW 13 determines that the measured bus load does not exceed the transmission allowance (S1106: No), the distribution interval of the write data is set to the preset shortest interval, such as Fig.103 As shown, the distribution of write data to the rewrite target ECU 19 begins (S1107, equivalent to the distribution control step). That is, CGW 13 sets the distribution interval of one frame on CAN to the shortest interval set in advance, and starts distributing write data to the rewrite target ECU 19. In addition, one frame on CAN contains write data with a data amount of 8 bytes. In addition, one frame on CAN FD (CAN with Flexible Data-Rate: CAN with flexible data rate) contains write data with a data amount of 64 bytes.
[0664] On the other hand, if CGW13 determines that the measured bus load exceeds the transmission allowance (S1106: "Yes"), it calculates the interval at which the bus load does not exceed the transmission allowance (S1108), and sets the distribution interval of the write data to the calculated interval, such as Fig.104 As shown, distribution of write data to the rewrite target ECU 19 starts (S1109, corresponding to a distribution control step).
[0665] For example, in the IG power state, the CGW 13 determines whether the bus load exceeds the transmission allowance, that is, "80%", for the first bus. If it is determined that the bus load does not exceed the transmission allowance, the CGW 13 sets the distribution interval T1 in which the transmission allowance of the write data is "30%". Fig.100As shown in the bus load table, CGW13 uses the transmission allowance of write data in the first bus, i.e. "30%", in the IG power state to set the distribution interval T1. CGW13 sets the distribution interval T1 to be the maximum allowed transmission amount. In addition, CGW13 can also measure the bus load by converging the measurement object on the frame of the write data, and determine whether the bus load based on the write data exceeds the transmission allowance of "30%". If CGW13 determines that the bus load exceeds the transmission allowance, it changes the distribution interval T2 (>T1) in which the bus load does not exceed the transmission allowance according to the amount by which the bus load exceeds the transmission allowance. In this way, after obtaining the write data from DCM12, CGW13 waits until the set distribution interval is reached, and then distributes the write data to the rewrite object ECU19.
[0666] If CGW13 starts distributing write data to the rewrite target ECU19, it determines whether the distribution of write data to the rewrite target ECU19 is completed, and continuously determines whether the measured bus load exceeds the transmission allowance (S1110, S1011). If CGW13 determines that the measured bus load does not exceed the transmission allowance (S1111: "No"), the distribution interval of write data is set to the pre-set shortest interval, and the distribution interval of write data to the rewrite target ECU19 is changed (S1112). On the other hand, if CGW13 determines that the measured bus load exceeds the transmission allowance (S1111: "Yes"), the interval at which the bus load does not exceed the transmission allowance is calculated (S1113), the distribution interval of write data is set to the calculated interval, and the distribution interval of write data to the rewrite target ECU19 is changed (S1114).
[0667] If the CGW 13 determines that the distribution of the write data to the rewrite target ECU 19 is completed (S1110: "Yes"), it stops measuring the number of frames received per unit time, stops measuring the bus load (S1115), and ends the distribution control process of the write data. Here, when there are multiple rewrite target ECUs 19, the CGW 13 performs the distribution control process of the write data for installation to all rewrite target ECUs 19.
[0668] As described above, CGW 13 performs distribution control processing of write data, uses the correspondence between the predetermined power state and the distribution frequency of write data, determines the distribution frequency of write data to the rewrite target ECU 19, and controls the distribution of write data according to the distribution frequency. It is possible to suppress data conflicts and delays during installation. In addition, the distribution of write data can coexist without interfering with the distribution of vehicle control data in the same bus.
[0669] In addition, in the above, the configuration of determining the bus load table based on the analysis result of the rewrite specification data in CGW 13 is exemplified, but the configuration of pre-saving the bus load table is also possible. In addition, in CGW 13, the configuration of determining the rewrite target ECU belonging table based on the analysis result of the rewrite specification data is exemplified, but the configuration of pre-saving the rewrite target ECU belonging table is also possible.
[0670] It is also possible to make the amount of data written to be distributed relatively small when the vehicle is in a running power state, and to make the amount of data written to be distributed relatively large when the vehicle is in a parked power state. Fig.105 As shown, when the IG power is turned on while the vehicle is running, CGW13 sends CAN frames through the IG system ECU, ACC system ECU, and +B power system ECU, so that the transmission volume of application data such as vehicle control and diagnosis is relatively large, so the distribution volume of write data is relatively small. Fig.106 As shown in FIG. 1 , when the IG power supply is disconnected during parking, CGW 13 makes the transmission amount of application data such as vehicle control and diagnosis relatively small and the distribution amount of write data relatively large by sending CAN frames only by the +B power supply system ECU. That is, CGW 13 adjusts the distribution amount of write data within the idle capacity that does not hinder the transmission of application data such as vehicle control and diagnosis.
[0671] In addition, you can also Fig.107 As shown, in CGW13, when an event frame is sent from the rewrite object ECU19, the frequency of interruptions is increased by receiving the event frame, and the bus load is increased, so the distribution amount of write data is relatively small. When the event frame is not sent from the rewrite object ECU19, the distribution amount of write data is relatively large.
[0672] In addition, you can also Fig.108 As shown, in the vehicle system, when it is determined that the CGW 13 is distributing write data, the bus load is reduced by extending the transmission interval of application data such as vehicle control and diagnosis to the maximum allowed interval. In the CGW 13, the bus load can also be reduced by extending the transmission interval of application data by the vehicle system, thereby distributing a relatively large amount of write data.
[0673] The bus load table embedded in the rewrite specification data is set uniformly and commonly, for example, regardless of the vehicle model, grade, etc. of the vehicle manufacturer. This is because if the ECU equipment greatly differs depending on the vehicle model, grade, etc., the bus load greatly differs. If the optimal bus load table is set independently according to the vehicle model, grade, etc., it will take a lot of man-hours for verification, and thus such a cumbersome trouble is avoided.
[0674] Similar to the case where the installation is performed while the vehicle is moving as described above, when the installation is performed while the vehicle is parked, distribution control processing of write data is also performed. In this case, if the rewrite object ECU19 is a +B power system ECU, it can also be updated in the +B power state, so the transmission allowance of the +B power state in the bus load table is referred to. On the other hand, in the case where the rewrite object ECU19 is an IG system ECU, the installation is performed in the IG power state, so the transmission allowance of the IG power state in the bus load table is referred to. Here, for example, in the case where the rewrite object ECU19 is an ACC system ECU, it can also be installed in the IG power state. In this case, refer to the transmission allowance of the IG power state in the bus load table. In addition, the composition of the bus load table and the table to which the rewrite object ECU belongs is explained, but as long as the distribution frequency of the write data for each power state can be determined, it can also be in the form of storing any table.
[0675] (12) Activation Request Instruction Processing
[0676] Reference Figures 109 to 111 The instruction processing of the activation request is described. The vehicle program rewriting system 1 performs the instruction processing of the activation request in the CGW 13. The CGW 13 makes an activation request to a plurality of rewriting target ECUs 19 that have completed the rewriting of the application program to make the rewritten program effective. In the present embodiment, the CGW 13 understands the status of the group of rewriting target ECUs 19 by analyzing the rewriting specification data for the CGW. In addition, the CGW 13 makes an activation request only when the vehicle is parked, and does not make an activation request when the vehicle is driving.
[0677] like Fig.109 As shown, the CGW 13 includes a rewrite target determination unit 84a, a rewrite completion determination unit 84b, an activation executable determination unit 84c, and an activation request instruction unit 84d in the activation request instruction unit 84. The rewrite target determination unit 84a determines a plurality of rewrite target ECUs 19 that are cooperatively controlled. The rewrite completion determination unit 84b determines whether the rewrite of the program has been completed in all of the determined plurality of rewrite target ECUs 19 after the rewrite target determination unit 84a determines the plurality of rewrite target ECUs 19.
[0678] If the rewrite completion determination unit 84b determines that the rewrite of the program is completed in all of the rewrite target ECUs 19, the activation executable determination unit 84c determines whether the activation can be executed. If the user agrees to the activation and the vehicle is parked, the activation executable determination unit 84c determines that the activation can be executed.
[0679] If the activation executable determination unit 84c determines that the activation can be performed, the activation request indication unit 84d indicates an activation request. Specifically, after indicating a switch request for the new side, the activation request indication unit 84d indicates a reset request, monitors the session transfer timeout, or monitors the internal reset of the rewrite object ECU19, thereby indicating an activation request. In a double-sided memory ECU or a single-sided suspended memory ECU, the application is activated by starting it on the new side (non-operation side) to which the application is written. On the other hand, in a single-sided separate memory ECU, the application is activated by restarting. In addition, the rewrite object ECU19 can also be configured to reset itself after indicating a switch request for the new side, regardless of the activation request.
[0680] Next, refer to Fig.110 and Fig.111 The following describes the role of the activation request instruction unit in the CGW 13. The CGW 13 executes an activation request instruction program to perform activation request instruction processing.
[0681] If CGW13 starts the instruction processing of the activation request, it determines multiple rewrite object ECU19 (S1201, equivalent to the rewrite object determination step). Specifically, CGW13 determines the rewrite object ECU19 by referring to the ECU (ID) recorded in the rewrite specification data. CGW13 determines whether the rewrite of the application is completed in all of the multiple rewrite object ECU19 determined (S1202, equivalent to the rewrite completion determination step). CGW13, for example, installs the rewrite object ECU19 in sequence according to the order of ECU (ID) recorded in the rewrite specification data. If the installation of the last recorded ECU (ID) is completed, it is determined that the writing is completed in all the rewrite object ECU19.
[0682] If CGW13 determines that the rewriting of the application has been completed in all of the multiple rewriting object ECU19s determined (S1202: "Yes"), it determines whether activation can be performed (S1203, equivalent to the activation executable determination step). Specifically, CGW13 determines whether the user's consent to the update has been obtained before, whether the vehicle is in a parked state, etc. If these conditions are met, it determines that activation can be performed. User consent can also be consent for the entire update process or consent for activation. If CGW13 determines that activation can be performed (S1203: "Yes"), it then indicates activation requests to multiple rewriting object ECU19 at the same time (equivalent to the activation request indication step). Here, it is assumed that ECU (ID1), ECU (ID2) and ECU (ID3) are rewriting object ECU19 of the same group for explanation.
[0683] If CGW13 determines that activation can be performed for ECU (ID1), ECU (ID2) and ECU (ID3), it starts the instruction processing of the activation request. If CGW13 starts the instruction processing of the activation request, it instructs the rewrite object ECU19 to request the switch to the new surface (S1204). CGW13 requests the power management ECU20 to switch the IG power from off to on (S1205). Although the vehicle is in a parked state and the IG switch 42 is in an off state, CGW13 switches the IG power from off to on in order to activate. In addition, when CGW13 performs activation after installation, since the IG power is in an on state, S1205 is not performed, and a start request (wake-up request) is made to the rewrite object ECU19 in a sleep state.
[0684] CGW13 sends a software reset request to the rewrite target ECU19, and instructs the rewrite target ECU19 to make a software reset request (S1206). If the rewrite target ECU19 adopts a specification corresponding to the software reset request, when receiving the software reset request from CGW13, it resets the software and restarts, and activates the application. In the case where the rewrite target ECU19 is a single-sided independent memory ECU, the rewrite target ECU19 switches from the old application to the new application by restarting with the new application. In the case where the rewrite target ECU19 is a single-sided suspended memory ECU or a double-sided memory ECU, the rewrite target ECU19 updates the operation surface information (A surface or B surface) stored in the flash memory, switches the surface where the new application is written to the operation surface, and thereby switches from the old application to the new application.
[0685] CGW13 requests the power management ECU20 to switch the IG power from on to off and from off to on, instructs the rewrite target ECU19 to reset the power, and instructs the rewrite target ECU19 to restart (S1207). Even if the rewrite target ECU19 adopts a specification that does not correspond to the reset request of the software, if the IG power is switched from on to off and from off to on, it will reset itself and restart to activate the application. In this case, if the rewrite target ECU19 is a single-sided single memory ECU, the rewrite target ECU19 restarts with the new application and switches from the old application to the new application. If the rewrite target ECU19 is a single-sided suspended memory ECU or a double-sided memory ECU, the rewrite target ECU19 updates the operation surface information (A surface or B surface) stored in the flash memory, switches the surface where the new application is written to the operation surface, and thereby switches from the old application to the new application. In addition, the CGW 13 monitors the session transfer timeout ( S1208 ), and monitors the internal reset of the rewrite target ECU 19 ( S1209 ).
[0686] That is, if the rewrite target ECU 19 adopts a specification that does not correspond to the software reset request, the CGW 13 cannot instruct activation even if it sends a software reset request to the rewrite target ECU 19. Therefore, the rewrite target ECU 19 with a specification that does not correspond to the software reset request is activated by instructing the rewrite target ECU 19 to request a power reset. For example, in the IG system ECU such as the engine ECU, since it is a configuration that is always reset due to power on and off, it is often not compatible with the software reset request. From the perspective of the rewrite target ECU 19, activation (starting in the new program) is performed based on any one of the software reset request instructed by the CGW 13, the power reset request instructed by the CGW 13, the session transfer timeout, and the internal reset.
[0687] If the rewrite target ECU19 corresponding to the software reset request is instructed by the CGW13 to reset the software, it will forcibly reset itself and activate. If the rewrite target ECU19 of the ACC system and IG system ECU is instructed by the CGW13 to reset the power supply, the power is not forcibly supplied, so it is reset and activated when the power is supplied next time. The rewrite target ECU19 of the +B power system ECU is different from the rewrite target ECU19 of the ACC system and IG system ECU. Since the power is always supplied, it is activated by the session transfer timeout and internal reset. In addition, the activation method for each rewrite target ECU19 is specified by the rewrite specification data.
[0688] If CGW13 is notified by all the rewrite target ECU19 that the new application is started normally, it sends a switching completion notification to DCM12 (S1210). DCM12 notifies the center device 3 that the activation of the update program is completed. CGW13 requests the power management ECU20 to switch the IG power from on to off, and completes the activation synchronization instruction processing. If CGW13 switches the IG power from off to on through user operation, it sends the program version, startup surface, etc. of each ECU to DCM12. DCM12 notifies the center device 3 of the information of each ECU19 received from CGW13. Here, when DCM12 notifies the center device 3 of the completion of activation, ECU structure information including the program version and surface information of each ECU can also be sent to the center device 3. Fig.111 This shows a case where the rewriting target ECU 19 is a double-sided memory ECU or a single-sided suspended memory ECU.
[0689] As described above, by performing the instruction processing of the activation request, the CGW 13 prevents the situation in advance that the multiple rewrite target ECUs 19 that have completed the rewrite of the application program perform the switch from the old program to the new program at their own timing, and appropriately makes the timing of switching from the old program to the new program consistent in the multiple rewrite target ECUs 19. That is, the program ...
Claims
1. An electronic control device comprising: a differential data acquisition unit that acquires differential data, the differential data being data used to rewrite a data storage area of the electronic control device, and the differential data indicating a difference between old data and new data; a matching determination unit that determines whether the differential data matches the data storage area or the storage data based on first determination information related to the storage data stored in the data storage area and second determination information acquired in a manner associated with the differential data; an updated data restoring unit that, when the consistency determining unit determines that the consistency of the differential data is positive, restores the new data, namely, the updated data, using the differential data and the stored data; and a data writing unit, writing the update data restored by the update data restoring unit into the data storage area, The second determination information includes the determination information of the old data and the determination information of the new data. When the first determination information is consistent with the determination information of the old data and the first determination information is inconsistent with the determination information of the new data, the consistency determination unit determines that the consistency of the differential data is positive. The electronic control device includes a data verification value calculation unit that calculates a data verification value for each block obtained by dividing the stored data into one or more blocks. The first determination information includes: data identification information capable of identifying the stored data stored in the data storage area, writing surface information capable of identifying the data storage area in which the update data is written, and the data verification value calculated by the data verification value calculation unit, The second determination information includes: data identification information capable of identifying the old data, writing surface information capable of identifying a data storage area where the new data should be written, and data verification values for each block obtained by dividing the old data into one or more blocks. When the data identification information of the first judgment information is consistent with the data identification information of the second judgment information, the writing surface information of the first judgment information is consistent with the writing surface information of the second judgment information, and the data verification value of the first judgment information is consistent with the data verification value of the second judgment information, the matching judgment unit determines that the matching of the differential data is positive.
2. The electronic control device according to claim 1, wherein: The consistency determination unit determines consistency of the difference data based on the data verification value calculated by the data verification value calculation unit and the data verification value indicating the second determination information.
3. The electronic control device according to claim 2, wherein: When the data writing unit interrupts writing and then restarts, the consistency determination unit determines the consistency of the differential data based on the data verification value calculated by the data verification value calculation unit and the data verification value of the old data and the data verification value of the new data included in the second determination information.
4. The electronic control device according to claim 3, wherein: When the data writing unit interrupts writing and then restarts it, the matching judgment unit judges the matching of the differential data based on the data verification value calculated by the data verification value calculation unit and the data verification value of the new data included in the second judgment information, and judges the matching of the differential data based on the data verification value calculated by the data verification value calculation unit and the data verification value of the old data included in the judgment information, starting from the last block for which the judgment result is judged to be no.
5. The electronic control device according to claim 4, wherein: When the data writing unit interrupts writing and then restarts it, the data writing unit skips writing the updated data until at least the front block of the final block in which the matching judgment unit judges that the matching of the differential data is negative, and starts writing the updated data again from the final block or the rear block of the final block.
6. A vehicle electronic control system comprising a vehicle master device for distributing update data to an electronic control device, and an electronic control device for writing the update data received from the vehicle master device into a non-volatile memory, wherein: The electronic control device comprises: a differential data acquisition unit that acquires differential data, the differential data being data used to rewrite a data storage area of the electronic control device, and the differential data indicating a difference between old data and new data; a matching determination unit that determines whether the differential data matches the data storage area or the storage data based on first determination information related to the storage data stored in the data storage area and second determination information acquired in a manner associated with the differential data; an updated data restoring unit that, when the consistency determining unit determines that the consistency of the differential data is positive, restores the new data, namely, the updated data, using the differential data and the stored data; and a data writing unit, writing the update data restored by the update data restoring unit into the data storage area, The second determination information includes the determination information of the old data and the determination information of the new data. When the first determination information is consistent with the determination information of the old data and the first determination information is inconsistent with the determination information of the new data, the consistency determination unit determines that the consistency of the differential data is positive. The electronic control device includes a data verification value calculation unit that calculates a data verification value for each block obtained by dividing the stored data into one or more blocks. The first determination information includes: data identification information capable of identifying the stored data stored in the data storage area, writing surface information capable of identifying the data storage area in which the update data is written, and the data verification value calculated by the data verification value calculation unit, The second determination information includes: data identification information capable of identifying the old data, writing surface information capable of identifying a data storage area where the new data should be written, and data verification values for each block obtained by dividing the old data into one or more blocks. When the data identification information of the first judgment information is consistent with the data identification information of the second judgment information, the writing surface information of the first judgment information is consistent with the writing surface information of the second judgment information, and the data verification value of the first judgment information is consistent with the data verification value of the second judgment information, the matching judgment unit determines that the matching of the differential data is positive.
7. A method for determining the matching of differential data, comprising performing the following steps in an electronic control device: a matching determination step of determining whether the differential data matches the data storage area or the storage data based on first determination information related to the storage data stored in the data storage area and second determination information acquired in a manner associated with differential data, wherein the differential data is data for rewriting the data storage area and the differential data indicates a difference between old data and new data; an update data restoring step of restoring the new data, that is, the update data, using the difference data and the stored data when the matching determination step determines that the matching of the difference data is positive; and a data writing step, writing the updated data restored by the updated data restoring step into the data storage area; The second determination information includes the determination information of the old data and the determination information of the new data. In the matching determination step, when the first determination information is consistent with the determination information of the old data and the first determination information is inconsistent with the determination information of the new data, it is determined that the matching of the differential data is positive. The electronic control device executes a data verification value calculation step, wherein the data verification value for each block obtained by dividing the stored data into one or more blocks is calculated. The first determination information includes: data identification information capable of identifying the stored data stored in the data storage area, writing surface information capable of identifying the data storage area where the update data is written, and the data verification value calculated by the data verification value calculation step, The second determination information includes: data identification information capable of identifying the old data, writing surface information capable of identifying a data storage area where the new data should be written, and data verification values for each block obtained by dividing the old data into one or more blocks. In the matching judgment step, when the data identification information of the first judgment information is consistent with the data identification information of the second judgment information, the writing surface information of the first judgment information is consistent with the writing surface information of the second judgment information, and the data verification value of the first judgment information is consistent with the data verification value of the second judgment information, the matching of the differential data is judged to be positive.
8. A recording medium having a differential data matching determination program recorded thereon, the differential data matching determination program causing an electronic control device to execute the following steps: a matching determination step of determining whether the differential data matches the data storage area or the storage data based on first determination information related to the storage data stored in the data storage area and second determination information acquired in a manner associated with differential data, wherein the differential data is data for rewriting the data storage area and the differential data indicates a difference between old data and new data; an update data restoring step of restoring the new data, that is, the update data, using the difference data and the stored data when the matching determination step determines that the matching of the difference data is positive; and a data writing step, writing the updated data restored by the updated data restoring step into the data storage area; The second determination information includes the determination information of the old data and the determination information of the new data. In the matching determination step, when the first determination information is consistent with the determination information of the old data and the first determination information is inconsistent with the determination information of the new data, it is determined that the matching of the differential data is positive. The difference data matching determination program causes the electronic control device to execute a data verification value calculation step, in which a data verification value is calculated for each block obtained by dividing the stored data into one or more blocks. The first determination information includes: data identification information capable of identifying the stored data stored in the data storage area, writing surface information capable of identifying the data storage area where the update data is written, and the data verification value calculated by the data verification value calculation step, The second determination information includes: data identification information capable of identifying the old data, writing surface information capable of identifying a data storage area where the new data should be written, and data verification values for each block obtained by dividing the old data into one or more blocks. In the matching judgment step, when the data identification information of the first judgment information is consistent with the data identification information of the second judgment information, the writing surface information of the first judgment information is consistent with the writing surface information of the second judgment information, and the data verification value of the first judgment information is consistent with the data verification value of the second judgment information, the matching of the differential data is judged to be positive.
