This application is based on Japanese Patent Application No. 2015-145759 filed on Jul. 23, 2015, the disclosure of which is incorporated herein by reference.
The present disclosure relates to a relay device and an electronic control unit (hereinafter, abbreviated to ECU) connected to a vehicle-mounted network.
A technique in the related art enables a program to be written into an ECU by allowing the ECU to communicate with a device outside a vehicle by way of a gateway ECU and an in-vehicle LAN (see Patent Literature 1).
Patent Literature 1: JP 2003-46536 A
However, when another ECU transmits data to the in-vehicle LAN while a program is being written into the ECU, a data transmission rate decreases and writing of the program slows down.
In view of the foregoing inconvenience, it is an object of the present disclosure to provide a technique of enabling an ECU to be upgraded smoothly via a vehicle-mounted network.
According to an aspect of the present disclosure, a relay device includes an acquisition unit, a relay unit, a suspend instructing unit, and a cancel instructing unit. The acquisition unit acquires data necessary to perform an upgrade processing from an upgrading tool. The upgrading tool performs the upgrade processing to upgrade ECUs connected to a vehicle-mounted network, and the ECUs include a target ECU which is subject to the upgrade processing and a non-target ECU which is not subject to the upgrade processing. The relay unit provides, via the vehicle-mounted network, the data acquired by the acquisition unit to the target ECU. The suspend instructing unit transmits, via the vehicle-mounted network, a suspend command which instructs the non-target ECU to shift to a suspend state in response to a start of the upgrade processing. The suspend state is a state in which a transmission of other data to the non-target ECU via the vehicle-mounted network is suspended. The cancel instructing unit instructs, via the vehicle-mounted network, the non-target ECU to cancel the suspend state when the upgrade processing is completed.
According to the configuration as above, when the upgrade processing on the target ECU is performed by the upgrading tool via the vehicle-mounted network, the non-target ECU (ECU other than the target ECU) suspends transmission of other data to the vehicle-mounted network. Hence, a communication load on the vehicle-mounted network is restricted during an execution of the upgrade processing and data necessary for the upgrade processing is transmitted and received quickly. The non-target ECU resumes transmission of data via the vehicle-mounted network in a reliable manner after the upgrade processing is completed. Hence, the non-target ECU performs processing without any interference once the upgrade processing is completed. Consequently, the ECUs can be upgraded smoothly via the vehicle-mounted network.
According to another aspect of the present disclosure, an ECU includes an acquisition unit, an upgrading unit, a suspending unit, and a suspend cancelling unit. The acquisition unit acquires, via a vehicle-mounted network, data necessary to perform an upgrade processing of own ECU from an upgrading tool through a relay device. The upgrading unit performs a processing associated with the upgrade processing according to the data acquired by the acquisition unit. The suspending unit shifts the own ECU to a suspend state in which a data transmission via the vehicle-mounted network is suspended upon receipt of a suspend command from the relay device via the vehicle-mounted network when the upgrade processing is started. The suspend canceling unit cancels the suspend state upon receipt of a command from the relay device via the vehicle-mounted network when the upgrade processing is completed.
According to the configuration as above, the ECU suspends transmission of data to the vehicle-mounted network while the upgrading tool is performing the upgrade processing on the target ECU via the vehicle-mounted network. Hence, data necessary for the upgrade processing is transmitted and received quickly. The ECU resumes transmission of data via the vehicle-mounted network in a reliable manner after the upgrade processing is completed. Hence, the ECU performs processing without any interference once the upgrade processing is completed. Consequently, the ECU can be upgraded smoothly via the vehicle-mounted network.
According to another aspect of the present disclosure, a vehicle-mounted system includes a plurality of ECUs (20, 40) connected to a vehicle-mounted network, and a relay device connected to a vehicle-mounted network. The relay device includes a relay device side acquisition unit, a relay unit, a suspend instructing unit, and a cancel instructing unit. The relay device side acquisition unit acquires data necessary to perform an upgrade processing from an upgrading tool. The upgrading tool performs the upgrade processing to upgrade the plurality of ECUs, and the plurality of ECUs include a target ECU which is subject to the upgrade processing and a non-target ECU which is not subject to the upgrade processing. The relay unit provides, via the vehicle-mounted network, the data acquired by the relay device side acquisition unit to the target ECU. The suspend instructing unit transmits, via the vehicle-mounted network, a suspend command which instructs the non-target ECU to shift to a suspend state in response to a start of the upgrade processing. The suspend state is a state in which a transmission of other data to the non-target ECU via the vehicle-mounted network is suspended. The cancel instructing unit instructs, via the vehicle-mounted network, the non-target ECU to cancel the suspend state when the upgrade processing is completed.
Each of the plurality of ECUs includes an ECU side acquisition unit, an upgrading unit, a suspending unit, and a suspend canceling unit. The ECU side acquisition unit acquires, from the relay device via the vehicle-mounted network, data that is necessary to perform the upgrade processing of an own ECU and transmitted from the upgrading tool through the relay device. The upgrading unit performs a processing associated with the upgrade processing according to the data acquired by the ECU side acquisition unit. The suspending unit shifts the own ECU to the suspend state upon receipt of the suspend command from the relay device via the vehicle-mounted network when the upgrade processing is started. The suspend canceling unit cancels the suspend state upon receipt of a command from the relay device when the upgrade processing is completed.
According to the configuration as above, when the upgrade processing on the target ECU forming the vehicle-mounted system is performed by the upgrading tool via the vehicle-mounted network, the non-target ECU suspends transmission of other data to the vehicle-mounted network. Hence, a communication load on the vehicle-mounted network is restricted during the upgrade processing and data necessary for the upgrade processing is transmitted and received quickly. The non-target ECU resumes transmission of data via the vehicle-mounted network in a reliable manner after the upgrade processing of the target ECU is completed. Hence, the non-target ECU can perform processing without any interference after the upgrade processing is completed. Consequently, the target ECU can be upgraded smoothly via the vehicle-mounted network.
The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description made with reference to the accompanying drawings. In the drawings:
Hereinafter, embodiments will be described using the drawings.
(Configuration)
A vehicle-mounted system 1 of a first embodiment includes a relay device 10 and multiple ECUs capable of performing a communicating via a vehicle-mounted network.
More specifically, as one example, the vehicle-mounted system 1 may include an A-network 2 to which the relay device 10 and multiple A-ECUs 20 are connected, and a B-network 3 to which multiple B-ECUs 40 are connected. One of the A-ECUs 20 may be provided as a gateway connected to the B-network 3 (
Alternatively, a network same as the B-network 3 may be provided additionally, or one of the B-ECUs 40 connected to the B-network 3 may be provided as a gateway connected to another network. Further, the vehicle-mounted system 1 may include only the relay device 10 and the A-ECUs 20 connected to the A-network 2 without the B-network 3.
As another example, the vehicle-mounted system 1 may include an A-network 2 to which the relay device 10 and multiple A-ECUs 20 are connected, and a B-network 3 to which the relay device 10 and multiple B-ECUs 40 are connected in which the relay device 10 serves as a gateway (
In Case 2, the relay device 10 (gateway) relays communication between the A-ECU 20 connected to the A-network 2 and the C-ECU 50 connected to the C-network 4. One of the C-ECUs 50 connected to the C-network 4 is provided as a communication ECU 60 which communicates with a rewriting tool 30 described below.
It goes without saying that the ECUs connected to the A-network 2 and C-network 4 may be provided as gateways connected to other networks. A communication ECU is not necessarily provided to the C-network 4 and may be provided to a network connected to the C-network 4 via a gateway or another network connected to the network connected to the C-network 4. In this configuration, the relay device 10 may communicate with a communication ECU by way of the C-network 4 and a network to which the communication ECU is connected.
Each of the A-network 2 through C-network 4 may be a vehicle-mounted network in compliance with protocols, for example, the CAN, FlexRay (registered trademark), or Lin protocol.
The ECUs are configured to perform various types of processing involved in driving of the vehicle.
The relay device 10 is configured to communicate with the rewriting tool 30 which rewrites programs stored in the ECUs (hereinafter, rewriting of program may also be referred to as reprogram or perform reprogramming). When the rewriting tool 30 performs reprogramming, the relay device 10 relays communication between the rewriting tool 30 and an ECU to be reprogrammed (target ECU).
More specifically, in Case 1 (
Meanwhile, in Case 2 (
Configurations of the relay device 10 and the ECUs will now be described.
The relay device 10 includes an in-vehicle communication portion 11, an external communication portion 12, a controller 13, and a storage 14 (as shown in
The in-vehicle communication portion 11 is a portion which communicates with the A-ECUs 20 via the A-network 2.
The external communication portion 12 is a portion which communicates with the rewriting tool 30.
More specifically, in Case 1 (
Meanwhile, in Case 2 (
The controller 13 is chiefly formed of a typical micro-computer including a CPU, a ROM, a RAM, an input-output, a bus line interconnecting the foregoing components, and so on. The controller 13 performs various types of processing according to programs pre-stored in the ROM and programs loaded into the RAM.
The storage 14 is provided by a data-rewritable non-volatile memory, such as a flash memory or an HDD. Programs and various types of data necessary to control the relay device 10 are stored in the storage 14.
Each A-ECU 20 connected to the A-network 2 includes an in-vehicle communication portion 21, a storage 22, and a controller 23 (
The in-vehicle communication portion 21 is a portion which communicates with ECUs or the like connected to a vehicle-mounted network to which an own device is connected by making communication through the vehicle-mounted network. More specifically, when the own device is connected to the A-network 2, the in-vehicle communication portion 21 communicates with the other A-ECUs 20 connected to the A-network 2. When the own device is connected to the A-network 2 and the B-network 3 (provided as the gateway), the in-vehicle communication portion 21 communicates with the other A-ECUs 20 connected to the A-network 2 and also communicates with the B-ECUs 40 connected to the B-network 3.
The storage 22 is provided by a data-rewritable non-volatile memory, such as a flash memory or an HDD. Programs and various types of data necessary to control the A-ECU 20 are stored in the storage 22.
The controller 23 is chiefly formed of a typical micro-computer including a CPU, a ROM, a RAM, an input-output, a bus line interconnecting the foregoing components, and so on. The controller 23 performs various types of processing according to programs pre-stored in the ROM, programs pre-stored in the storage 22 provided as a flash memory, and programs loaded into the RAM.
The ECUs connected to the B-network 3 and C-network 4 are of a same configuration as the A-ECUs 20, and detailed description is omitted herein.
However, as an exception, the communication ECU 60 connected to the C-network 4 is configured as follows. That is, the communication ECU 60 includes an in-vehicle communication portion 61, a storage 62, a controller 63, an external communication portion 64 (
The in-vehicle communication portion 61, the storage 62, and the controller 63 are configured in a same manner, respectively, as the in-vehicle communication portion 21, the storage 22, and the controller 23 included in the A-ECU 20 connected to the A-network 2.
The external communication portion 64 is a portion which communicates with the rewriting tool 30. For example, the external communication portion 64 may wirelessly communicate with the rewriting tool 30 via an unillustrated antenna or may communicate with the rewriting tool 30 via a communication line connected temporarily between the communication ECU 60 and the rewriting tool 30.
(Processing)
Processing when the rewriting tool 30 reprograms an ECU will now be described. As has been described, the relay device 10 relays communication between the rewriting tool 30 and a target ECU (an ECU to be reprogrammed) during reprogramming.
(1) General Outline
Upon receipt of an instruction from a user to reprogram one of the ECUs as a target ECU, the rewriting tool 30 transmits a reprogramming mode shift request, which is a command designating reprogramming, to the target ECU by way of the relay device 10. When the reprogramming is completed, the rewriting tool 30 transmits a reprogramming mode end request, which is a command notifying completion of the reprogramming, to the target ECU.
The rewriting tool 30 is capable of reprogramming multiple target ECUs in parallel at a time. In such a case, the rewriting tool 30 transmits the reprogramming mode shift request individually to the respective target ECUs together with data (rewriting data) constituting a new program. The rewriting tool 30 also transmits a reprogramming mode end request, which is a command notifying completion of the reprogramming, to the target ECUs on which the programming is completed.
The following will describe processing (reprogramming sequence) performed by the rewriting tool 30, the relay device 10, and the ECUs when reprogramming is performed (
In S100, in responding to an instruction from the user, the rewriting tool 30 transmits a reprogramming mode shift request, which is a command instructing a target ECU to start reprogramming (a command addressed to the target ECU as a receiver), to the relay device 10. As has been described, the rewriting tool 30 directly communicates with the relay device 10 through wired or wireless communication in Case 1 (
In S102, the relay device 10 forwards the reprogramming mode shift request to the target ECU. The target ECU is one of the A-ECUs 20 or the B-ECUs 40 in Case 1. When the target ECU is one of the A-ECUs 20, the relay device 10 communicates with the target ECU via the A-network 2. When the target ECU is one of the B-ECUs 40, the relay device 10 communicates with the target ECU via the A-network 2, the A-ECU 20 serving as the gateway, and the B-network 2. The target ECU is one of the A-ECUs 20 in Case 2, and the relay device 10 communicates with the target ECU via the A-network 2.
In S104, in responding to the reprogramming mode shift request, the target ECU transmits a command indicating a reply of reprogramming start (a command addressed to the rewriting tool 30 as a receiver) to the relay device 10.
In S106, the relay device 10 forwards the reply to the rewriting tool 30.
In S108, the relay device 10 transmits a data transmission suspend request to non-target ECUs for which reprogram is not requested.
The data transmission suspend request is a command instructing the non-target ECU to suspend transmission of data to the vehicle-mounted network over a predetermined suspend period (for example, 5 seconds). The data transmission suspend request may be an instruction to suspend transmission of entire data or a part of data (for example, data of a low importance) to the vehicle-mounted network during reprogramming. The data transmission suspend request instructs the non-target ECU not to determine a failure in receiving necessary data from the vehicle-mounted network during reprogramming as an abnormality (hereinafter, paraphrased
The non-target ECU may be all the ECUs forming the vehicle-mounted system 1 other than the target ECU. Alternatively, a part of of the ECUs other than the target ECU may be selected as the non-target ECUs by taking a communication load on the vehicle-mounted network or the like into consideration.
That is, in one example, all of the other ECUs connected to a vehicle-mounted network to which the target ECU is connected may be the non-target ECUs. More specifically, when the target ECU is one of the A-ECUs 20 in Cases 1 and 2, remaining A-ECUs 20 other than the target ECU may be the non-target ECUs. When the target ECU is one of the B-ECUs 40 in Case 2, remaining B-ECUs 40 other than the target ECU may be the non-target ECUs.
In another example, ECUs connected to a vehicle-mounted network by way of which communication is made between the relay device 10 and the target ECU may be the non-target ECUs. To be more specific, when the target ECU is one of the B-ECUs 40 in Case 1, the A-ECUs 20 and remaining B-ECUs 40 other than the target ECU are the non-target ECUs.
In Case 2, too, ECUs connected to a vehicle-mounted network by way of which communication is made between the relay device 10 and the communication ECU 60 may be the non-target ECUs. To be more specific, in addition to the remaining B-ECUs 40 other than the target ECU, the C-ECUs 50 are the non-target ECUs in Case 2.
When the non-target ECUs are determined for each vehicle-mounted network in the manner as above, some ECUs satisfying a predetermined condition among the ECUs connected to the corresponding vehicle-mounted network may be set as the non-target ECUs. When some of the ECUs are selected as the non-target ECUs in the manner as above, it is preferable to transmit an instruction to mask a diagnosis to all ECUs configured to communicate with the non-target ECUs when the data transmission suspend request is transmitted to the non-target ECUs.
In S110, the relay device 10 suspends transmission of a part of data to the vehicle-mounted network. To be more specific, the relay device 10 may suspend transmission of, for example, data other than data necessary for reprogramming.
In S112, in responding to the data transmission suspend request, the non-target ECU suspends transmission of data to the vehicle-mounted network over the suspend period. The non-target ECU may suspend transmission of data to the vehicle-mounted network either entirely or in part. All or some of functions furnished to the non-target ECU may be disabled by stopping a supply of power for the non-target ECU to suspend transmission of data to the vehicle-mounted network. The non-target ECU masks a diagnosis over the suspend period in responding to the data transmission suspend request. More specifically, the non-target ECU is prevented from performing abnormality determination processing relating to data reception from the vehicle-mounted network so as not to perform processing to address an abnormality in the data reception. Hereinafter, a state in which transmission of entire or a part of data to the vehicle-mounted network is suspended while masking a diagnosis may be referred to also as a suspend state.
In S114, the rewriting tool 30 communicates with the target ECU via the relay device 10 to perform reprogram processing in order to reprogram the target ECU.
More specifically, authentication processing is performed first between the rewriting tool 30 and the target ECU to determine whether authorized reprogramming is performed by the rewriting tool 30. When the authentication processing is successful, the target ECU erases a program stored in the storage, acquires rewriting data from the rewriting tool 30 via the relay device 10 or the like, and writes the acquired data into the storage. When writing of the rewriting data is completed, the written data is verified to check whether the data has been written properly. When it is found that the data has been written properly, the reprogram processing is ended.
While the reprogram processing is performed, the relay device 10 acquires data necessary to perform the reprogram processing (data necessary to perform the authentication processing described above, rewriting data, and so on) from the rewriting tool 30, and provides the acquired data to the target
ECU. The relay device 10 also acquires data necessary to perform the reprogram processing from the target ECU and provides the acquired data to the rewriting tool 30.
Also, while the reprogram processing is performed, the relay device 10 repeatedly transmits the data transmission suspend request to the non-target ECU at periodical timing (for example, once in every 2.5 seconds) (S116, S120, and S124). Upon receipt of the data transmission suspend request, the non-target ECU shifts to the suspend state over the suspend period from a time of reception as a start time in the same manner as in S112. In other words, the suspend state is extended by another suspend period from a reception time of the data transmission suspend request as a start time (S118, S122, and S126).
In S128, the rewriting tool 30 transmits a reprogramming mode end request, which is a command instructing the target ECU to end the reprogramming (a command addressed to the target ECU as a receiver), to the relay device 10.
In S130, the relay device 10 forwards the reprogramming mode end request to the target ECU.
In S132, in responding to the reprogramming mode end request, the target ECU transmits a command indicating a reply of the reprograming end (a command addressed to the rewriting tool 30 as a receiver) to the relay device 10.
In S134, the relay device 10 forwards the reply to the rewriting tool 30.
In S136, the relay device 10 resumes transmission of data via the vehicle-mounted network and ends transmission of the data transmission suspend request.
In S138, when 5 seconds elapse after reception of the last data transmission suspend request, the non-target ECU resumes transmission of data to the vehicle-mounted network and cancels masking of a diagnosis (in other words, cancels the suspend state).
(2) Abnormality Detection Processing
Abnormality detection processing will now be described (
In S200, the relay device 10 determines whether reprogramming is presently being carried out. To be more specific, for example, a determination may be made according to whether a reprogram counter exhibits a value of 1 or greater. When a positive determination is obtained (S200; YES), advancement is made to S205. When a negative determination is obtained (S205: NO), the abnormality detection processing is ended.
In S205, the relay device 10 determines whether a predetermined abnormality detection duration has elapsed after data is received from the rewriting tool 30 last time. When a positive determination is obtained (S205: YES), advancement is made to S210. When a negative determination is obtained (S205: NO), the abnormality detection processing is ended.
In S210, the relay device 10 cancels the suspend state (a state where transmission of data to the vehicle-mounted network is suspended while masking a diagnosis) of the non-target ECU, and the abnormality detection processing is ended. More specifically, in one example, the relay device 10 may cancel the suspend state by canceling transmission of the data transmission suspend request to the non-target ECU. In another example, the relay device 10 may transmit a data transmission suspending cancel request, which is a command giving an instruction to cancel the suspend state, to the non-target ECU. The non-target ECU may cancel the suspend state in responding to the received data transmission suspending cancel request.
In S205 and S210, the relay device 10 may determine whether the predetermined abnormality detection duration has elapsed after data is received from the target ECU last time in a same manner. The suspend state of the non-target ECU may be cancelled when an elapse of the abnormality detection duration is determined.
(Effects)
According to the first embodiment, effects as follows can be obtained.
(1) According to the vehicle-mounted system 1, the data transmission suspend request is transmitted periodically from the relay device 10 to the non-target ECU while the target ECU is being reprogrammed by the rewriting tool 30 via the vehicle-mounted network. When the non-target ECU receives the data transmission suspend request first time, the non-target ECU shifts to the suspend state (a state where transmission of data to the vehicle-mounted network is suspended while masking a diagnosis) over the suspend period. Thereafter, the suspend state is extended each time the data transmission suspend request is received. When the reprogramming is completed, the suspend state of the non-target ECU is cancelled by canceling transmission of the data transmission suspend request from the relay device 10 to the non-target ECU.
Hence, a communication load on the vehicle-mounted network is restricted during reprogramming and data necessary for the reprogramming is transmitted and received quickly. The ECUs included in the vehicle-mounted system 1 can be thus reprogrammed by an external device at a high speed. After the reprogram processing is completed, the suspend state of the non-target ECU is cancelled in a reliable manner. After the reprogram processing is completed, the non-target ECU can perform processing without any interference. Consequently, the ECUs can be reprogrammed smoothly via the vehicle-mounted network.
(2) The target ECU in the suspend state not only suspends transmission of data to the vehicle-mounted network, but also masks a diagnosis. The configuration as above can prevent an inconvenience that suspending of transmission of data by the non-target ECU is erroneously detected as an abnormal state, such as a malfunction, and processing to deal with the abnormal state is performed.
(3) The non-target ECU which has received the data transmission suspend request extends the suspend state by another suspend period. Hence, the non-target ECU cancels the suspend state by itself when transmission of the data transmission suspend request from the relay device 10 stops during the reprogram processing. With this configuration, even when an abnormality occurs in the relay device 10 during the reprogram processing, the non-target ECU returns to a previous state from the suspend state in a reliable manner and is thus capable of operating in a same manner as before the reprogramming.
(4) Processing to make the non-target ECU shift to the suspend state is performed by the relay device 10 installed to the vehicle. Hence, in comparison with a case where the same processing is performed by a device installed outside a vehicle, such as the rewriting tool 30, a risk that the same processing is performed without authorization can be lowered, and security can be ensured further. In a case where the same processing is performed by a device installed outside the vehicle, authentication processing is thought to be essential. In the present disclosure, by performing the processing to make the non-target ECU shift to the suspend state by the relay device 10 installed to the vehicle, a need of the authentication processing is eliminated. Consequently, costs can be reduced.
(5) A low-performance ECU incapable of communicating with a device installed outside the vehicle may be installed to the vehicle. In the present disclosure, the relay device 10 installed to the vehicle is also capable of communicating with such an ECU. Hence, the relay device 10 is also capable of making the low-performance ECU shift to the suspend state by transmitting the data transmission suspend request during reprogramming.
(6) During reprogramming, the relay device 10 cancels the suspend state of the non-target ECU when failing to receive new data from the rewriting tool 30 after an elapse of the the abnormality detection duration from the last time data reception from the rewriting tool 30. Hence, the suspend state of the non-target ECUs can be cancelled in a reliable manner when transmission of data from the rewriting tool 30 to the target ECU is stopped due to an abnormality.
The relay device 10 is capable of readily detecting interruption of communication from the rewriting tool 30 during reprogramming. In the present disclosure, the suspend state of the non-target ECUs is cancelled by the relay device 10. Thus, interruption of communication from the rewriting tool 30 during reprogramming can be readily detected and properly treated.
A vehicle-mounted system 1 of a second embodiment will now be described. The vehicle-mounted system 1 of the second embodiment is of a same configuration as the counterpart of the first embodiment above, and performs a reprogram sequence and abnormality detection processing in a same manner as in the first embodiment above except that a suspend state is cancelled in a different manner after reprogram processing is completed in the reprogram sequence.
More specifically, in the first embodiment above, the suspend state is cancelled by canceling transmission of the data transmission suspend request after the reprogram processing is completed. In the second embodiment, the suspend state is cancelled by transmitting a data transmission suspending cancel request from a relay device 10 to a non-target ECU.
The following will chiefly describe a difference from the first embodiment above as to the reprogram sequence of the second embodiment (
S300 through S336 are same as S100 through S136, respectively, in the reprogramming of the first embodiment above, and a description is omitted herein.
In S338, the relay device 10 transmits a data transmission suspending cancel request to the non-target ECU.
In S340, the non-target ECU cancels the suspend state in responding to the received data transmission suspending cancel request.
(Effects)
According to the second embodiment, an effect as follows can be obtained in addition to the effects obtained in the first embodiment above.
In the second embodiment, the data transmission suspending cancel request is transmitted from the relay device 10 to the non-target ECU when the reprogramming is completed, and the non-target ECU cancels the suspend state in responding to the received request. Hence, the suspend state of the non-target ECU can be cancelled as soon as the reprogram processing is completed
A vehicle-mounted system 1 of a third embodiment will now be described. The vehicle-mounted system 1 of the third embodiment is of a configuration same as the counterpart of the first embodiment above except for a part of a content of a reprogram sequence. More specifically, processing to make a non-target ECU shift to a suspend state when reprogramming is started and processing to cancel the suspend state when the reprogramming is completed are different. The following will chiefly describe a difference from the first embodiment above.
(1) General Outline
Firstly, a difference of the reprogram sequence of the third embodiment from the reprogram sequence of the first embodiment above will be chiefly described (
S400 through S415 are same as S100 through S106, respectively, in the reprogramming of the first embodiment above, and a description is omitted herein.
In S420, a relay device 10 transmits a data transmission suspend request to a non-target ECU. S420 corresponds to S525 of reprogram monitoring processing described below.
As in the first embodiment above, the data transmission suspend request of the third embodiment may direct the non-target ECU to shift to the suspend state only over a suspend period. Alternatively, different from the first embodiment above, the data transmission suspend request may direct the non-target ECU to shift to the suspend state without limiting a time to the suspend period.
S425 is same as S110 in the reprogramming of the first embodiment above, and a description is omitted herein.
In S430, the non-target ECU shifts to the suspend state in a same manner as in S112 of the first embodiment above. In a case where the suspend period is set in the data transmission suspend request, the non-target ECU shifts to the suspend state only over the suspend period.
In S435, the reprogram processing is performed in a same manner as in the first embodiment above. In a case where the suspend period is set in the data transmission suspend request, the relay device 10 transmits the data transmission suspend request periodically to the non-target ECU during the reprogram processing in a same manner as in the first embodiment above. Otherwise the relay device 10 does not repeatedly transmit the data transmission suspend request.
S440 through S455 are same as S128 through S134, respectively, in the reprogramming of the first embodiment above, and a description is omitted herein.
In S460, the relay device 10 resumes transmission of data via a vehicle-mounted network.
Subsequently, the relay device 10 transmits a data transmission suspending cancel request to the non-target ECU (S465). S465 corresponds to S535 of the reprogram monitoring processing described below. The non-target ECU cancels the suspend state in responding to the received data transmission suspending cancel request (S470).
When the suspend period is set in the data transmission suspend request, the suspend state may be cancelled by canceling transmission of the data transmission suspend request from the relay device 10.
(2) Reprogram Monitoring Processing
Reprogram monitoring processing performed by the relay device 10 will now be described (
In S500, the relay device 10 determines whether reprogramming of a new target ECU is started during a reprogramming of a present target ECU according to a command received from a rewriting tool 30. More specifically, for example, when the relay device 10 receives a reprogramming mode shift request for an ECU on which reprogramming is not presently performed as a target ECU, it may be determined that reprogramming of a new target ECU is started. When a positive determination is obtained (S500: YES), advancement is made to S505. When a negative determination is obtained (S500: NO), advancement is made to S510.
In S505, the relay device 10 increments a reprogram counter exhibiting the number of ECUs on which reprogramming is presently performed, and advancement is made to S510.
In S510, the relay device 10 determines whether reprogramming of the target ECU is completed according to a command received from the rewriting tool 30. More specifically, for example, when the relay device 10 receives a reprogramming mode end request for the target ECU, it may be determined that reprogramming of the target ECU is completed. When a positive determination is obtained (S510: YES), advancement is made to S515. When a negative determination is obtained (S510: NO), advancement is made to S520.
In S515, the relay device 10 decrements the reprogram counter, and advancement is made to S520.
In S520, the relay device 10 determines whether a value of the reprogram counter has changed from 0 to 1 (in other words, determines whether reprogramming is newly started while none of the ECUs is in reprogramming). When a positive determination is obtained (S520: YES), advancement is made to S525. When a negative determination is obtained (S520: NO), advancement is made to S530.
In S525, the relay device 10 transmits the data transmission suspend request to the non-target ECU in a same manner as in S420 of
Depending on a manner by which to determine which ECU is to be selected as a non-target ECU, the data transmission suspend request may not be transmitted to ECUs connected to a vehicle-mounted network corresponding to a new target ECU. Herein, the new target ECU is an ECU whose reprogramming is started during reprogramming of another target ECU whose reprogramming is being performed. In such a case, it is preferable to transmit the data transmission suspend request to the ECUs connected to the vehicle-mounted network corresponding to the new target ECU for setting as the non-target ECUs.
In S530, the relay device 10 determines whether the value of the reprogram counter has changed from 1 to 0 (in other words, determines whether reprogramming of all of the ECUs is completed). When a positive determination is obtained (S530: YES), advancement is made to S535. When a negative determination is obtained (S530: No), the reprogram monitoring processing is ended.
In S535, the relay device 10 cancels the suspend state of the non-target ECU, and the reprogram monitoring processing is ended.
More specifically, when the suspend period is not set in the data transmission suspend request, the relay device 10 may transmit the data transmission suspending cancel request to the non-target ECU. Meanwhile, when the suspend period is set in the data transmission suspend request, the suspend state of the non-target ECU may be cancelled by canceling transmission of the data transmission suspend request, or the suspend state may be cancelled by transmitting the data transmission suspending cancel request to the non-target ECU.
(Effects)
According to the third embodiment, an effect as follows can be obtained in addition to the effects obtained in the first embodiment above.
That is, while the rewriting tool 30 is capable of reprogramming multiple target ECUs in parallel at a time, the relay device 10 counts the number of the target ECUs that perform reprogramming, and cancels the suspend state of the non-target ECU when the number of the target ECUs decreases to 0. Hence, even when multiple ECUs are reprogrammed in parallel at a time, the suspend state of the non-target ECU is cancelled in a reliable manner when reprogramming of all of the ECUs is completed to allow the non-target ECU to operate in a same manner as before the reprogramming.
A vehicle-mounted system 1 of a fourth embodiment will now be described. The vehicle-mounted system 1 of the fourth embodiment is of a same configuration as the counterpart of the third embodiment above except for processing to cancel a suspend state of a non-target ECU when reprogramming is completed. More specifically, a content of reprogram monitoring processing performed by a relay device 10 is different from the content of the third embodiment above. The following will describe the difference, namely, the reprogram monitoring processing while omitting a description of common portions (
In S600, the relay device 10 determines whether reprogramming of a new target ECU is started in a same manner as in S500 of the reprogram monitoring processing of the third embodiment above. When a positive determination is obtained (S600: YES), advancement is made to S605.
When a negative determination is obtained (S600: NO), advancement is made to S615.
In S605, the relay device 10 increments a reprogram counter exhibiting the number of ECUs that presently perform reprogramming, and advancement is made to S610.
In S610, the relay device 10 starts measuring a reprogramming duration, and advancement is made to S615. The reprogramming duration is a time period elapsed after a start of most recently started reprogramming of the target ECU. By the processing in S610, each time reprogramming of a new target ECU is started, a measurement value of the reprogramming duration is reset and a time elapsed after a start of most recent reprogramming is measured again as the reprogramming duration.
S615 and S620 are same as S520 and S525, respectively, of the reprogram monitoring processing of the first embodiment above, and a description is omitted herein.
In S625, the relay device 10 determines whether the reprogramming duration exceeds a predetermined end duration. When a positive determination is obtained (S625: YES), advancement is made to S630. When a negative determination is obtained (S625: NO), the reprogram monitoring processing is ended.
In S630, processing same as processing in S535 of the reprogram monitoring processing of the first embodiment above is performed, and subsequently the reprogram monitoring processing is ended.
(Effects)
According to the fourth embodiment, an effect as follows can be obtained in addition to the effects obtained in the third embodiment above.
That is, as has been described, in a case where the rewriting tool 30 is capable of reprogramming multiple target ECUs in parallel at a time, the relay device 10 measures the reprogramming duration, which is a time elapsed after a start of most recently started reprogramming of the target ECU. The relay device 10 cancels the suspend state of the non-target ECU when the last reprogramming duration reaches the predetermined end duration. Hence, by setting the end time to an appropriate length of time, even when multiple ECUs are reprogrammed in parallel at a time, the suspend state of the non-target ECU can be cancelled in a reliable manner after reprogramming of all of the ECUs is completed to allow the non-target ECU to operate in a same manner as before the reprogramming.
While the above has described the embodiments by way of example, the present disclosure can be implemented in various other embodiments.
(1) In the first through fourth embodiments above, a program saved in a target ECU is re-written by the reprogram sequence. Alternatively, a subject to be rewritten is not limited to programs. For example, data (various parameters or the like) saved in a target ECU may be rewritten by the reprogram sequence.
The rewriting tool 30 may perform a failure diagnosis on a target ECU by communicating with the target ECU via the vehicle-mounted network. By performing processing same as the reprogram sequence, a non-target ECU may be shifted to the suspend state during a failure diagnosis on the target ECU and the suspend state of the non-target ECU may be cancelled when the failure diagnosis is completed. To be more specific, the rewriting tool 30 may perform a failure diagnosis on a target ECU during the reprogram processing in the reprogram sequence.
(2) In the first through forth embodiments above, a non-target ECU is shifted to the suspend state by transmitting the data transmission suspend request from the relay device 10 to the non-target ECU. However, the present disclosure is not limited to the configuration as above. A command giving an instruction to suspend transmission of data to the vehicle-mounted system and a command giving an instruction to mask a diagnosis may be transmitted separately from the relay device 10 to the non-target ECU. The non-target ECU may shift to or extend the suspend state by suspending transmission of data to the vehicle-mounted network and masking a diagnosis in responding separately to the respective received commands.
In the second through fourth embodiments above, the suspend state of the non-target ECU is cancelled by transmitting the data transmission suspending cancel request from the relay device 10 to the non-target ECU. However, the present disclosure is not limited to the configuration as above. A command giving an instruction to cancel suspending of transmission of data to the vehicle-mounted network and a command giving an instruction to cancel masking of a diagnosis may be transmitted separately from the relay device 10 to the non-target ECU. The non-target ECU may cancel the suspend state by resuming transmission of data to the vehicle-mounted network and canceling masking of a diagnosis in responding separately to the respective received commands.
(3) Functions furnished to a single component in the respective embodiments above may be allocated to more than one component or functions furnished to multiple components may be intensively allocated to a single component. At least a part of the configurations of the respective embodiments above may be replaced with a configuration furnished with a same function. A part of the configurations of the respective embodiments above may be omitted. At least a part of the configurations of the respective embodiments above may be added to or replaced with the configurations of any other embodiments above.
(4) Besides the vehicle-mounted systems 1 described above, a technical idea of the present disclosure can be implemented by various embodiments, such as the rewriting tool 30 and the relay device 10 and the ECUs forming the vehicle-mounted system 1. Further, a technical idea of the present disclosure can be implemented by various other embodiments, such as a program controlling a computer to function as the relay device 10, the ECUs, and the rewriting tool 30, a medium which stores the above-described program, and a method corresponding to processing performed by the relay device 10, the ECUs, and the rewriting tool 30.
The rewriting tool 30 of the respective embodiments above corresponds to an example of an upgrading tool.
In the reprogram sequence of the first embodiment above, S108 corresponds to an example of a suspend instructing unit, S112 corresponds to an example of a suspending unit, S114 corresponds to examples of upgrade processing, a relay device side acquisition unit, a relay unit, an ECU side acquisition unit, and an upgrading unit. Also, S116, S120, S124, and S136 correspond to an example of a cancel instructing unit, S118, S122, and S126 correspond to an example of a suspend extending unit, and S138 corresponds to an example of a suspend canceling unit. In the present disclosure, upgrading of the ECU may include, such as diagnosis, maintenance, tuning up, fitting-out, repair, update of the ECU.
The data transmission suspend request in S108 corresponds to an example of a suspend command, and the data transmission suspend request in S116, S120, and S124 corresponds to an example of a suspend extending command.
Also, S210 in the abnormality detection processing corresponds to an example of an abnormality treating unit.
In the reprogram sequence of the second embodiment above, S308 corresponds to an example of the suspend instructing unit, S312 corresponds to an example of the suspending unit, S314 corresponds to examples of the upgrade processing, the relay device side acquisition unit, the relay unit, the ECU side acquisition unit, and the upgrading unit. Also, S316, S320, S324, and S338 correspond to an example of the cancel instructing unit, and S340 corresponds to an example of the suspend canceling unit.
The data transmission suspend request in S308 corresponds to an example of the suspend command, the data transmission suspend request in S316, S320, and S324 corresponds to an example of the suspend extending command, and the data transmission suspending cancel request in S338 corresponds to an example of a suspend canceling command.
In the reprogram sequence of the third embodiment above, S420 corresponds to an example of the suspend instructing unit, S430 corresponds to an example of the suspending unit, S435 corresponds to examples of the upgrade processing, the relay device side acquisition unit, the relay unit, the
ECU side acquisition unit, and the upgrading unit. Also, S465 corresponds to an example of the cancel instructing unit, and S470 corresponds to an example of the suspend canceling unit.
The data transmission suspend request in S420 corresponds to an example of the suspend command, and the data transmission suspending cancel request in S465 corresponds to an example of the suspend canceling command.
In the reprogram monitoring processing, S500 corresponds to an example of a start determination unit, S505 and S515 correspond to an example of a counting unit, S510 corresponds to an example of an end determination unit, and S530 and S535 correspond to an example of the cancel instructing unit.
In the reprogram monitoring processing of the fourth embodiment above, S600 corresponds to an example of the start determination unit, and S625 and S630 correspond to an example of the cancel instructing unit.
Number | Date | Country | Kind |
---|---|---|---|
2015-145759 | Jul 2015 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2016/070770 | 7/14/2016 | WO | 00 |