Patent Description:
A vehicle is equipped with a plurality of electronic control units (ECUs) that controls operation of a vehicle. Each ECU includes a processor, a temporary storage unit such as a random access memory (RAM), and a non-volatile storage unit such as a flash read-only memory (ROM). The processor of each ECU implements control functions of that ECU by executing software stored in the non-volatile storage unit. The software stored in each ECU is rewritable, and it is possible to improve the functions of each ECU or add a new vehicle control function to each ECU by updating the software to a newer version.

An over-the-air (OTA) technique is an example of a technique of updating software on an ECU. In the OTA technique, a program on the ECU is updated or a program is added to the ECU by wirelessly connecting an in-vehicle communication device connected to an in-vehicle network to a communication network such as the Internet, downloading software from a server via wireless communication, and installing the downloaded software (see, e.g., <CIT> (<CIT>)). As disclosed in <CIT>, a master device for a vehicle <NUM> determines whether a cancellation request is generated during program re-writing from an old program to a new program by an update data distribution unit distributing update data to an electronic control device <NUM> to be re-written; when determining that the cancellation request is generated, specifies a roll back method for returning the state of the electronic control device to be re-written to a state before the writing of the update data is started, according to the memory type of a non-volatile memory mounted on the electronic control device to be re-written and the data type of the update data of the new program or the old program; instructs roll back according to the roll back method to the electronic control device to be re-written; and operates the electronic control device to be re-written with the old program.

There are two types of non-volatile storage units that are mounted on the ECU: memories (single-bank memories) having one data storage area for storing data such as a program and memories (dual-bank memories) having two data storage areas for storing data such as a program. Either of these two types of memories is used depending on the specifications of the ECU etc..

When a software update on an ECU to be updated fails, it is desired to be able to retry and quickly complete the software update. However, a software update can take a long time when, for example, the communication environment becomes poor during retry of the software update. Especially for an ECU with a single-bank memory, if a software update process fails in the middle, the ECU cannot be operated. This causes inconvenience when there is an emergency to use a vehicle. Accordingly, there is room for improvement.

The present disclosure provides an OTA master, an update control method, a non-transitory storage medium, and a vehicle that can improve software updates on an electronic control unit.

An OTA master according to a first aspect of the present disclosure is provided according to claim <NUM>.

A software update control method according to a second aspect of the present disclosure is provided according to claim <NUM>.

A non-transitory storage medium according to a third aspect of the present disclosure is provided according to claim <NUM>.

A vehicle according to a fourth aspect of the present invention includes the OTA master according to the first aspect.

The present disclosure can provide an OTA master, an update control method, a non-transitory storage medium, and a vehicle that can improve software updates on an electronic control unit.

<FIG> is a block diagram showing an overall configuration of a network system according to an embodiment.

A network system shown in <FIG> is a system for updating software on electronic control units 13a to 13d mounted on a vehicle, and includes a server <NUM> (center) and an in-vehicle network <NUM> that is mounted on the vehicle.

The server <NUM> can communicate with an OTA master <NUM> mounted on the vehicle via a network <NUM>, and manages software updates on the electronic control units 13a to 13d mounted on the vehicle.

The server <NUM> includes a central processing unit (CPU), a RAM, a storage device having a readable and writable storage medium such as hard disk and solid state drive (SSD), and a communication device for communicating with the OTA master <NUM> via the network <NUM>. The storage device stores a program for managing software updates, information to be used for the software update management, and update data for the electronic control units. In the server <NUM>, the CPU controls transmission of the update data to the OTA master <NUM> by executing the program read from the storage device using the RAM as a working area.

The in-vehicle network <NUM> includes the OTA master <NUM>, a communication module <NUM>, the electronic control units (ECUs) 13a to 13d, and a display device <NUM>. The OTA master <NUM> is connected to the communication module <NUM> via a bus 15a, is connected to the electronic control units 13a, 13b via a bus 15b, is connected to the electronic control units 13c, 13d via a bus 15c, and is connected to the display device <NUM> via a bus 15d. The communication module <NUM> is a communication device that connects the in-vehicle network <NUM> and the server <NUM>.

The OTA master <NUM> includes a microcomputer and a communication device. The microcomputer includes a CPU, a RAM, a ROM, and a storage device. In the OTA master <NUM>, the CPU of the microcomputer performs a control process that will be described later by executing a program read from the ROM or the storage device using the RAM as a working area. The communication device is a device that communicates with the communication module <NUM>, the electronic control units 13a to 13d, and the display device <NUM> via the buses 15a to 15d shown in <FIG>. The OTA master <NUM> can wirelessly communicate with the server <NUM> via the communication module <NUM>. The OTA master <NUM> controls a software update on the electronic control unit of which software is a target of the software update (the electronic control unit to be updated, target electronic control unit) out of the electronic control units 13a to 13d, based on the update data acquired from the server <NUM>. The OTA master <NUM> is sometimes referred to as the master device or the central gateway.

The electronic control units 13a to 13d control devices such as actuators and sensors mounted on the vehicle. The display device <NUM> (human-machine interface (HMI)) is used to display various indications such as an indication that there is update data, an accept request screen that requests a user or an administrator to accept a software update, an update result, etc. during a software update process for the electronic control units 13a to 13d. A typical example of the display device <NUM> is a display device for a car navigation system. However, the display device <NUM> is not particularly limited as long as it can display information necessary for a program update process. Although the four electronic control units 13a to 13d are illustrated in <FIG>, the number of electronic control units is not particularly limited. In addition to the display device <NUM>, an electronic control unit may further be connected to the bus 15d shown in <FIG>.

Each of the electronic control units 13a to 13d includes a CPU, a RAM, a non-volatile memory (storage), and a communication device. The CPU of each electronic control unit 13a to 13d implements functions of that electronic control unit by executing software (program) read from the non-volatile memory using the RAM as a working area. There are two types of electronic control units: those having one data storage area for storing software and those having two data storage areas for storing software. In the data storage area (bank) of the electronic control unit, version information, parameter data, a boot program for booting, a program for software updates, etc. are sometimes stored in addition to the software for implementing the functions of the electronic control unit. In the electronic control units having one data storage area (one bank, single-bank memories), installing update data in the data storage area affects the software on the electronic control unit. On the other hand, in the electronic control units having two data storage areas (two banks, dual-bank memories), one of the two data storage areas is used as a storage area to be read (active bank), and software stored in the storage area to be read is executed. Update data can be written in the background to the other storage area that is not to be read (inactive bank, write bank) during execution of a program stored in the storage area to be read (active bank). During activation in the software update process, the updated version of the software can be activated by switching the storage area from which the CPU reads the program.

In the present disclosure, the electronic control units having two data storage areas include: an electronic control unit having a memory with a configuration called "one-bank suspend memory" in which one data storage area of the non-volatile memory is divided into two banks in a pseudo manner and, during execution of a program stored in one bank of the two banks, a program can be written on the other of the two banks; and an electronic control unit which has an expansion non-volatile memory having a one-bank data storage area in addition to a non-volatile memory having a one-bank data storage area and in which these two non-volatile memories can be used as an active bank and an inactive bank.

The software update process is composed of a phase of downloading the update data from the server <NUM>, a phase of transferring the downloaded update data to the electronic control unit to be updated and installing the update data in the storage area of the electronic control unit to be updated, and an activation phase of activating the updated version of the software installed in the electronic control unit to be updated.

Downloading is a process of receiving the update data for updating the software on the electronic control unit from the server <NUM> and storing the received update data. The download phase includes control of a series of processes related to downloading, such as determination as to whether download can be performed and verification of the update data, in addition to reception of the update data. Installation is a process of writing an updated version of the program (update software) in the storage area of the electronic control unit to be updated, based on the downloaded update data. The installation phase includes control of a series of processes related to installation, such as determination as to whether installation can be executed, transfer of the update data, and verification of the updated version of the program, in addition to execution of installation. Activation is a process of activating the installed updated version of the program. The activation phase includes control of a series of processes related to activation, such as determination as to whether activation can be executed and verification of the activation result, in addition to execution of activation.

The update data that is sent from the server <NUM> to the OTA master <NUM> may include any of update software for the electronic control unit, compressed data of the update software, and divided data of the update software or the compressed data. The update data may include an identifier that identifies the electronic control unit to be updated (ECU ID) and an identifier that identifies the software before update (ECU software ID). The update data is downloaded as a distribution package. The distribution package contains the update data for one or more electronic control units.

When the update data includes the update software itself, the OTA master <NUM> transfers the update data (update software) to the electronic control unit to be updated during the installation phase. When the update data includes compressed data, difference data, or divided data of the update software, the OTA master <NUM> may transfer the update data to the electronic control unit to be updated and the electronic control unit to be updated may generate the update software from the update data. Alternatively, the OTA master <NUM> may generate the update software from the update data and then transfer the generated update software to the electronic control unit to be updated. The update software can be generated by decompressing the compressed data or assembling the difference data or the divided data.

The electronic control unit to be updated can install the update software based on an installation request from the OTA master <NUM>. Alternatively, the electronic control unit to be updated that has received the update data may autonomously install the update software without receiving an explicit instruction from the OTA master <NUM>.

The electronic control unit to be updated can activate the update software based on an activation request from the OTA master <NUM>. Alternatively, the electronic control unit to be updated that has received the update data may autonomously activate the update software without receiving an explicit instruction from the OTA master <NUM>.

The software update process can be performed successively or in parallel for each of the electronic control units.

The "program update process" in the present specification includes not only a process in which all of the download, installation, and activation are performed successively but also a process in which only a part of the download, installation, and activation is performed.

<FIG> is a functional block diagram of the OTA master according to the embodiment.

The OTA master <NUM> includes a transmitting unit <NUM>, a receiving unit <NUM>, a storage unit <NUM>, and a control unit <NUM>.

For example, the transmitting unit <NUM> sends an update confirmation request to the server <NUM> when the power supply or ignition of the vehicle is turned on. The update confirmation request is a request to confirm whether there is update data for software. The update confirmation request includes a vehicle identification (ID) (vehicle identification number (VIN)) that identifies the vehicle and the version of the software on the electronic control units 13a to 13d connected to the in-vehicle network <NUM>. The vehicle ID and the version of the software on the electronic control units 13a to 13d are used to determine whether there is update data for the software on the electronic control units 13a to 13d by comparison with the latest version of the software retained in the server <NUM> for each vehicle ID or each vehicle model identified by the vehicle ID. When it is determined based on a response to the update confirmation request that there is update data for the software on any of the electronic control units 13a to 13d, the transmitting unit <NUM> sends an update data download request to the server <NUM>.

The receiving unit <NUM> receives the confirmation result indicating whether there is update data from the server <NUM> as the response to the update confirmation request. After the transmitting unit <NUM> sends the update data download request to the server <NUM>, the receiving unit <NUM> receives update data for the software on the electronic control unit of which software is a target of the software update (electronic control unit to be updated, target electronic control unit) from the server <NUM>. The update data is sent from the server <NUM> as a distribution package. The distribution package may include, in addition to the update data, verification data for verifying the authenticity of the update data, the number of pieces of the update data, the order of installation of the update data, various kinds of control information to be used during software update, etc. The receiving unit <NUM> stores the received distribution package in the storage unit <NUM>.

The storage unit <NUM> stores the distribution package received by the receiving unit <NUM>. The storage unit <NUM> can be used to store, in addition to the update data (distribution package), data related to other control functions that are performed by the OTA technique, during software update by the OTA master <NUM>.

The control unit <NUM> determines whether there is update data for the software on the electronic control unit, based on the confirmation result received by the receiving unit <NUM> from the server <NUM> in response to the update confirmation request. When the receiving unit <NUM> receives the distribution package containing the update data from the server <NUM>, the control unit <NUM> verifies the authenticity of the received distribution package. Verification of the authenticity herein means verifying the integrity and correctness of data. The authenticity can be verified using, for example, a vehicle ID (VIN) and a digital signature. The control unit <NUM> controls the software update process for the target electronic control unit. The software update process that is performed by the control unit <NUM> will be described in detail below.

<FIG> is a flowchart of the software update control process that is performed by the OTA master according to the embodiment. For example, the control process shown in <FIG> is performed when the power supply or ignition of the vehicle is turned on.

In step S11, the transmitting unit <NUM> sends a request to confirm whether there is update data for the software on the electronic control unit to the server <NUM>. The update data confirmation request includes a combination of the vehicle ID and the version of the software on the electronic control unit. The process then proceeds to step S12.

In step S12, the receiving unit <NUM> receives the confirmation result for the update data confirmation request from the server <NUM>. The process then proceeds to step S13.

In step S13, the control unit <NUM> determines whether there is update data for the software on any of the electronic control units 13a to 13d, based on the confirmation result received in step S12. When YES in step S13, the process proceeds to step S14. Otherwise, the process ends.

In step S14, the update data is downloaded. More specifically, the transmitting unit <NUM> sends a request to download a distribution package to the server <NUM>, and the receiving unit <NUM> receives the distribution package sent in response to the download request. The receiving unit <NUM> stores the received distribution package in the storage unit <NUM>. The control unit <NUM> verifies the authenticity of the update data contained in the received distribution package. In step S14, the control unit <NUM> may determine before the download whether the download can be performed. In step S14, after the download is completed, the transmitting unit <NUM> may send a notification that the download is completed to the server <NUM>. The process then proceeds to step S15.

In step S15, the control unit <NUM> performs an installation process and an activation process for the target electronic control unit. More specifically, the control unit <NUM> transfers the update data contained in the distribution package to the target electronic control unit and instructs the target electronic control unit to install the update data. The target electronic control unit writes the update data received from the OTA master <NUM> to the data storage area. The control unit <NUM> then instructs the target electronic control unit to activate the updated version of the software. The target electronic control unit is restarted when a specific operation such as turning off of the power supply or ignition is performed, and executes the updated software. The process then proceeds to step S16.

When the target electronic control unit includes a single-bank memory, the software on the target electronic control unit is affected as soon as the update data is installed in the data storage area. Therefore, the installation process and the activation process may be performed successively. In this case, when the target electronic control unit has one data storage area, an accept request process for both installation and activation may be performed before execution of the installation, and an accept request process before execution of the activation may be omitted.

The control unit <NUM> may perform a process of determining whether the installation can be executed and an accept request process for the installation before execution of the installation. For example, as the accept request process for the installation, the control unit <NUM> causes the display device <NUM> to display an indication that a software update on the electronic control unit is started, a request to the user to accept the software update, and if necessary, the time required to install the update data and restrictions and cautions during installation, and receives an operation input performed by the user using input means such as touch panel or operation button. The control unit <NUM> then determines whether an operation input accepting the software update (installation) has been performed. For example, whether the operation input accepting the installation has been performed can be determined based on whether a button such as "accept" or "start update" displayed on the display device <NUM> has been pressed. When the user does not want to accept start of the software update (installation) immediately but wants to start the software update (installation) later, such an intention can be received when a button such as "later" is pressed.

Similarly, the control unit <NUM> may perform a process of determining whether the activation can be executed and an accept request process for the activation before execution of the activation. For example, as the accept request process for the activation, the control unit <NUM> causes the display device <NUM> to display an indication that the software update on the electronic control unit is ready to be performed and that the program will be updated when a specific operation such as turning off of the power supply or ignition is performed, and if necessary, the time required for the activation and restrictions and cautions during the activation, and receives an operation input performed by the user using the input means such as touch panel or operation button. The control unit <NUM> then determines whether an operation input accepting the software update (activation) has been performed. For example, whether the operation input accepting the activation has been performed can be determined based on whether a button such as "accept" or "update" displayed on the display device <NUM> has been pressed. When the user does not want to accept the software update (activation) immediately but wants to perform the software update later, such an intention can be received when a button such as "later" is pressed.

In step S16, the control unit <NUM> determines whether the software update process for the target electronic control unit has been successfully completed. The control unit <NUM> makes the determination of step S16 based on a notification from the target electronic control unit. For example, the control unit <NUM> determines that the software update process for the target electronic control unit has been successfully completed when the control unit <NUM> acquires from the target electronic control unit a notification that the updated software has been successfully activated and identification information of the activated software on the target electronic control unit and confirms based on the acquired information that the software on the target electronic control unit has been updated with appropriate software. When YES in step S16, the process proceeds to step S17. Otherwise, the process proceeds to step S18.

In step S17, the control unit <NUM> deletes the update data stored in the storage unit <NUM>. The control unit <NUM> may sequentially delete the update data for each target electronic control unit or may delete the entire distribution package when the software update process is successfully completed in all of the target electronic control units. Thereafter, the process ends.

In step S18, the control unit <NUM> retries the installation process and the activation process for any target electronic control unit for which the software update process has not been successfully completed. When the software update process for the target electronic control unit is not successfully completed, the control unit <NUM> does not delete the update data for the software on the target electronic control unit but causes the storage unit <NUM> to retain the update data for the software on the target electronic control unit. This allows the control unit <NUM> to promptly retry the software update process based on the update data retained in the storage unit <NUM> without re-downloading the update data for the software on the target electronic control unit from the server <NUM>.

In step S18, as in step S15, the control unit <NUM> transfers the update data contained in the distribution package to the target electronic control unit and instructs the target electronic control unit to install the update data. The target electronic control unit writes the update data received from the OTA master <NUM> to the data storage area. The control unit <NUM> then instructs the target electronic control unit to activate the updated version of the software. The target electronic control unit is restarted when a specific operation such as turning off of the power supply or ignition is performed, and executes the updated software. The process then proceeds to step S19.

In step S19, the control unit <NUM> determines whether the software update process for the target electronic control unit has been successfully completed. As in step S16, the control unit <NUM> acquires from the target electronic control unit a notification that the updated software has been successfully activated and identification information of the activated software on the target electronic control unit. The control unit <NUM> determines that the software update process for the target electronic control unit has been successfully completed when the control unit <NUM> confirms based on the acquired information that the software on the target electronic control unit has been updated with appropriate software. When YES in step S19, the process proceeds to step S17. Otherwise, the process proceeds to step S20.

In step S20, the control unit <NUM> performs error handling. As the error handling, the control unit <NUM> may perform, for example, one of the following processes: a software rollback process for the target electronic control unit, giving a notification that the software update on the electronic control unit has failed, and giving a notification encouraging the user to have it fixed at a dealership or a repair shop. Thereafter, the process ends.

In the example shown in <FIG>, error handling is performed (S20) when the installation process and the activation process are retried once (S18) and the software update is not successfully completed (NO in S19). Steps S18 and S19 may be repeated a plurality of times.

As described above, the OTA master <NUM> according to the present embodiment retains the update data for the target electronic control unit including a single-bank memory in the storage unit <NUM> until the software update process for the target electronic control unit is successfully completed. The OTA master <NUM> deletes the update data from the storage unit <NUM> after the software update process for the target electronic control unit is successfully completed. Accordingly, the update data retained in the storage unit <NUM> can be reused when the software update process for the target electronic control unit is not successfully completed.

In the present embodiment, when the software update process for the target electronic control unit is not successfully completed, the control unit <NUM> retries the software update process based on the update data retained in the storage unit <NUM>. With this control, the target electronic control unit can be quickly updated regardless of the communication condition.

Although the memory in the target electronic control unit may be either a single-bank memory or a dual-bank memory, the OTA master <NUM> according to the present embodiment is particularly effective when the target electronic control unit includes a single-bank memory. When the memory in the target electronic control unit is a dual-bank memory in which, during execution of a program stored in one bank of two banks, a program can be written on the other of the two banks, the electronic control unit can be operated using the software before update even if a software update fails. On the other hand, when the memory in the target electronic control unit includes a single-bank memory, the software before update is rewritten by installation of the updated version of the software. Therefore, the electronic control unit cannot be operated using the software before update if the software update process fails. That is, it is preferable that, when a software update on the target electronic control unit including a single-bank memory fails, the software update process be able to be retried as soon as possible. When a software update on the target electronic control unit fails, the OTA master <NUM> according to the present embodiment can retry the software update process in the shortest possible time by using the update data retained in the storage unit <NUM>. The OTA master <NUM> according to the present embodiment can thus quickly restore the failure.

As described above, when a software update on the electronic control unit having a dual-bank memory fails, the electronic control unit can continue to be operated using the software before update. Therefore, when the target electronic control unit has a dual-bank memory, the control unit <NUM> deletes the update data from the storage unit <NUM> after transfer of the update data to the target electronic control unit is completed in the installation process. The control unit <NUM> causes the storage unit <NUM> to retain the update data for the target electronic control unit including a single-bank memory until the software update process is successfully completed. On the other hand, by deleting the update data for the software on the target electronic control unit with the dual-bank memory that can be operated with the software before update even after the software update process is started, the storage capacity of the storage unit <NUM> of the OTA master <NUM> is secured and the influence on other control processes is reduced.

The functions of the OTA master <NUM> illustrated in the above embodiment may be implemented as a software update control method that is performed by an in-vehicle computer including a processor (CPU), a memory, and a storage device, as a software update control program that causes the in-vehicle computer to perform the functions, or as a computer-readable non-transitory storage medium storing the software update control program. The functions of the OTA master <NUM> illustrated in the above embodiment may also be implemented as a microcomputer equipped with a software update control method or a microcomputer having an update control program installed in a storage device.

In the example described in the above embodiment, the OTA master <NUM> on the in-vehicle network controls program updates on all the electronic control units 13a to 13d. However, instead of providing the OTA master <NUM>, one of the electronic control units 13a to 13d may have the update control function shown in <FIG> and may control software updates on the other electronic control units. Instead of providing the OTA master <NUM>, an external device that can be connected to the in-vehicle network <NUM> by wire may have the update control function shown in <FIG>, and the program update process for the electronic control units 13a to 13d may be performed using this external device.

Claim 1:
An Over-The-Air, OTA, master (<NUM>), comprising:
a receiving unit (<NUM>) configured to receive update data for software being rewritable and stored in a memory included in a target electronic control unit (13a, 13b, 13c, 13d) from a center;
a storage unit (<NUM>) configured to store the update data; and
a control unit (<NUM>) configured to:
control a process of software update in which the software of the target electronic control unit (13a, 13b, 13c, 13d) is updated to a newer version of the software based on the update data,
characterized in that the control unit (<NUM>) is configured to, after transferring the update data from the storage unit (<NUM>) to the target electronic control unit (13a, 13b, 13c, 13d) in the process of the software update:
when the transferred update data includes the update data for the target electronic control unit (13a, 13b, 13c, 13d) including a single-bank memory as the memory, cause the storage unit (<NUM>) to retain the update data for the target electronic control unit (13a, 13b, 13c, 13d) including the single-bank memory after transferring the update data until the process of the software update in the target electronic control unit (13a, 13b, 13c, 13d) is successfully completed, and delete the update data for the target electronic control unit (13a, 13b, 13c, 13d) including the
single-bank memory from the storage unit (<NUM>) after the process of the software update for the target electronic control unit (13a, 13b, 13c, 13d) including a
single-bank memory is successfully completed, wherein the control unit (<NUM>) determines whether the software update process for the target electronic control unit (13a, 13b, 13c, 13d) has been successfully completed based on a notification from the target electronic control unit (13a, 13b, 13c, 13d) including the single-bank memory; and
when the transferred update data includes the update data for the target electronic control unit (13a, 13b, 13c, 13d) including a dual-bank memory as the memory, delete the update data for the target electronic control unit (13a, 13b, 13c, 13d) including the dual-bank memory from the storage unit (<NUM>) after transferring the update data.