The present invention relates to a vehicle-mounted program writing device.
A control program, in which a control operation of a vehicle-mounted control device mounted on a vehicle is described, is stored in a non-volatile memory such as a flash memory in a microcontroller. Data used in the control program, such as initial values or the like, are also stored in the non-volatile memory. It is usual that these programs or data are not changed after vehicles are shipped to markets. However, upon detection of bugs or for providing a better service, the control program or data is updated.
As for update processing of the control program or data of the vehicle, the vehicle is brought to a dealer and a rewrite is performed therein. However, in recent years, there has been proposed a method of performing update processing through a wireless communication such as a mobile telephone network that is an infrastructure outside the vehicle.
In PLT 1, an information management base station device outside a vehicle transmits an update request to a stopped vehicle through a wireless communication device mounted on the vehicle, and the vehicle receiving the update request wakes up from a sleep state, starts up a vehicle-mounted control device mounted on the vehicle, and writes an updated program transmitted from the information management base station device to the vehicle-mounted control device.
Also, in PLT 2, an external tool and a writing device mounted on a vehicle are connected to each other through a communication cable, an updated program transmitted from the external tool is stored to the writing device, and then, the updated program is written from the writing device to a vehicle-mounted control device in a state in which the communication cable is disconnected therefrom.
In the method of PLT 1, since there is no means to store the updated program in advance, the sum of an updated program transmission time from the information management base station device to the vehicle-mounted control device and a write time to the vehicle-mounted control device is a time required for writing the updated program. Thus, there occurs a problem that it takes a long time to write the updated program. That is, in a case where a driver is in a situation that he or she suddenly wants to drive a vehicle while the updated program is being written, the driver has to wait until the write completion.
In the method of PLT 2, since the communication is not required during writing, the updated program can be stored to the writing device by connecting the communication cable to another vehicle. As a result, a reduction in a write time can be realized in that the write time can be reduced because the writing can be performed without communication with the outside, and in that write processing of the vehicle and the processing of storing the updated program to another vehicle through the communication cable can be performed in parallel. However, conversely, in order for the parallel processing, it is necessary to perform the write processing immediately after the completion of the storage processing with respect to one vehicle. In this regard, the vehicle driver cannot select a time slot when he or she does not use the vehicle or a convenient time slot.
Therefore, an object of the present invention is to update a control program or data of a vehicle-mounted control device while a vehicle owner or a driver using a vehicle does not feel inconvenience.
In order to solve the above problems, for example, a configuration described in a scope of the claims is adopted. The present application includes a plurality of means for solving the above problems as follows. A vehicle-mounted program writing device includes: a plurality of vehicle-mounted control devices which control operations of vehicle-mounted devices by using a control program; and a relay device which receives updated program data transmitted from an external center and stores the updated program data in a memory, the updated program data including updated programs and updated data for the vehicle-mounted control devices, wherein the vehicle-mounted control device has a normal operation mode of executing the control program and a repro mode of rewriting the control program to the updated program, the vehicle-mounted control device and the relay device are connected through a vehicle-mounted network, the relay device has a means for receiving the updated programs for the plurality of vehicle-mounted control devices transmitted from the external center before a predetermined first time slot when an ignition is in an on state, and a means for receiving a write start command transmitted from the external center in the first time slot, waking up the vehicle-mounted control devices in the first time slot, and causing a transition to the repro mode, the vehicle-mounted control device notifies the relay device of the transition to the repro mode, and the relay device executes writing of the updated programs and the updated data to the vehicle-mounted control devices in the first time slot on the basis of the notification of the transition to the repro mode from the vehicle-mounted control devices and the presence or absence of the updated program data for the vehicle-mounted control devices which are stored in the memory.
According to the invention, a vehicle-mounted program writing device that writes an updated program and updated data to a vehicle-mounted control device without a driver's feeling inconvenience can be provided.
Objects, configurations, and effects other than those described above will become apparent from the following descriptions of embodiments.
In order to make a driver not feel inconvenience, it is necessary to write an updated program or updated data to a vehicle-mounted control device safely and in a short period of time in a time slot when a vehicle is not used. In the present invention, first of all, in order to realize safety and a reduction in a write time, a means for obtaining an updated program data for a vehicle-mounted control device, which is transmitted from an external center by wireless, when an ignition is in an on state and storing the updated program data to a relay device is assumed. First, since the updated program data is received by wireless, a case where the updated program data cannot be received when a vehicle is stopped at a location which radio waves cannot reach, such as a shade of a building or an indoor parking lot, may be considered. Therefore, receiving the updated program data in the relay device during traveling or the like when the ignition is in an on state is more reliable and safe. Second, the writing from the relay device of the vehicle to the vehicle-mounted control device can more reduce the write time than the direct writing from the external center to the vehicle-mounted control device by wireless.
The present invention is a means which realizes writing of an updated program or updated data to a vehicle-mounted control device in a time slot when a driver does not uses a vehicle. Before describing the means of the present invention, a program update procedure is considered. First, a program update of a vehicle-mounted control device cannot be performed without the consent of a vehicle owner. Thus, it is necessary to confirm consent to the program update or a first time slot when a vehicle is not used, in advance through a telephone or an e-mail. Here, the first time slot is a time slot that is consented to the program update in convenient date designated by a vehicle owner. Therefore, the vehicle owner may want to update the program at a home parking lot in a time slot of 2:00 am to 3:00 am. However, in a case where an external center plans to transmit updated program data to another vehicle in that time slot, the time slot may be changed to another time slot through coordination with a vehicle owner. Also, another vehicle owner may want to update the program by himself or herself in a convenient time slot, without designating a time slot or the like. As such, in the case of designating the time slot, a midnight time slot is expected. Thus, it is necessary to realize writing of an updated program when a driver is not in a vehicle and an ignition is in an off state. This case is defined as a first case. On the other hand, a case where a driver updates the program by himself or herself in a convenient time, without designating a time slot, is defined as a second case. Hereinafter, means for realizing the first case and the second case according to the present invention will be described.
First, the means for realizing the first case will be described. The present means is given on the basis that, since a driver is not in a vehicle, a program update is performed in a time slot desired by a vehicle owner (referred to as a first time slot), based on a command from an external center.
The means of claim 1 is a means wherein, after storing updated program data from an external center to a relay device before a first time slot, the relay device wakes up a vehicle-mounted control device when a write start command transmitted from the external center is received within the first time slot, causes a transition to a repro mode (program rewrite mode), and performs writing of the updated program and updated data to the vehicle-mounted control device in the first time slot, based on a notification of the transition to the repro mode from the vehicle-mounted control device and the presence or absence of the updated program data for the vehicle-mounted control device which are stored in a memory. As a result, the program and data update of the vehicle-mounted control device can be completed in a time slot when a vehicle owner does not feel inconvenience.
The means of claim 2 is the means according to claim 1, wherein the means wakes up the vehicle-mounted control device when the write start command transmitted from the external center within the first time slot is received and the ignition is in an off state, causes a transition to the repro mode (program rewrite mode), and performs writing of the updated program and updated data to the vehicle-mounted control device in the first time slot, based on a notification of the transition to the repro mode from the vehicle-mounted control device and the presence or absence of the updated program data for the vehicle-mounted control device stored in the memory.
The means of claim 3 provides a means which causes the relay device to automatically perform writing even without receiving the write start command from the external center. That is, the present means can compare the second time slot to perform the writing in the updated program data received from the external center with a time obtained from a clock mounted on the vehicle, determine whether the time is within or out of a range of the second time slot, and perform write start command processing. That is, when the storage of the updated program data in the memory of the relay device is already completed, the means wakes up the vehicle-mounted control device by transmitting a wakeup pattern to the vehicle-mounted control device connected to a vehicle-mounted network, and then, performs writing processing of the updated program and the updated data, after receiving the notification of the transition of the vehicle-mounted control device to the repro mode, by transmitting a command of transition to the repro mode to the vehicle-mounted control device. As described above, the present means can obtain a current time from the clock in the vehicle and keep a promise with the vehicle owner by checking whether the time is within a range of the second time slot. That is, this can be realized by equally setting the first time slot and the second time slot.
The means of claim 4 is a claim according to claim 3, wherein a condition that the ignition is in an off state is added as a condition for performing the write start command processing.
The means of claim 5 is the means according to claims 1 to 4, wherein a memory storage completion indicator is installed in the vehicle and is turned on when the relay device completes the storage of the updated program data transmitted from the external center. In a case where the updated program data was transmitted to the vehicle a few days ago, the indicator is turned on so that the driver can recognize that the preparation of the program update is ready, thereby giving a sense of ease.
The means of claim 6 is the means according to claims 1 to 5, wherein a write completion indicator is installed in the vehicle, and the turn-on of the indicator and the write completion notification to the external center are performed after the write completion of the vehicle-mounted control device. Therefore, the driver can feel easy because the driver can confirm the completion, for example, in the next morning if the write completion indictor of the vehicle is turned on. Furthermore, the external center also can know the completion.
Next, the means for realizing the second case will be described. This case is a case where the driver is in the vehicle.
The means of claim 7 is a means wherein a memory storage completion indicator that allows a driver to confirm the storage completion of the updated program data, a write start command button that allows the driver to instruct a write start command, and a write completion indicator that indicates the write completion are installed, a relay device performs writing to a vehicle-mounted control device when the driver selects the write start command button in a convenient time for the driver after confirming the turn-on of the memory storage completion indicator, and furthermore, the write completion is notified to the driver by turning on the write completion indicator. As such, if there are two indicators and one button, the driver can perform the write operation at ease and reliably.
The means of claim 8 is the means according to claim 7, wherein, after an ignition is set to an on state in a convenient time for the driver and a shift gear of the vehicle is set to a parking position, the relay device performs the writing to the vehicle-mounted control device by turning on the write start command button, and furthermore, the write completion is notified to the driver by turning on the write completion indicator. As such, if there are two indicators and one button, the driver can perform the write operation at ease and reliably.
The means of claim 9 is a means for performing writing in a first time slot promised with a driver owner because the driver is not necessarily the owner even if the driver is in the vehicle. The present means is a means wherein, in order to perform the writing in the first time slot promised with the vehicle owner, data of a second time slot (the second time slot is set to be equal to the first time slot) is set to the updated program and is transmitted to the relay device; the relay device uses the clock to check whether the turn-on time of the write start command button is within a range of the second time slot; the relay device performs the writing to the vehicle-mounted control device when it is checked as being within the range and the memory storage completion indicator is turned on; and the relay device notifies the write completion to the driver by turning on the write completion indicator after the write completion.
The means of claim 10 is a means wherein the relay device uses the clock to check whether the turn-on time of the write start command button is within the range of the second time slot; the relay device performs the writing to the vehicle-mounted control device when it is checked as being within the range, the memory storage completion indicator is turned on, and the shift gear position is the parking position when the ignition is in an on state; and the relay device notifies the write completion to the driver by turning on the write completion indicator after the write completion.
According to the present invention, as described above, even in a case where the driver is in the vehicle or even in the case where the driver is not in the vehicle, the updated program can be written by the means for performing the write start in a promised time slot or by pressing the write start command button in a convenient time.
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, a hardware configuration, a software configuration, and a data structure used in the embodiments will be described.
An external center 100 has a function of transmitting updated program data to a vehicle 110 by wireless and receiving a write completion result from the vehicle. A radio relay station 101 relays wireless data between the external center 100 and the vehicle 110. The vehicle 110 includes a relay device 120 which has a function of storing the updated program data and dividing and transmitting an updated program and updated data to a vehicle-mounted control device, a vehicle-mounted control device 130 which controls a control target (engine) 135, a vehicle-mounted control device 140 which controls a control target (transmission) 145, a vehicle-mounted control device 150 which controls a control target (motor) 155, a battery power 172 mounted on a vehicle, an ignition switch IGN 170 which supplies the battery power to electronic devices mounted on the vehicle, a clock 180, a write start command button 182, a memory storage completion indicator 184, and a write completion indicator 186. The relay device 120 includes a wireless transceiver 121 which performs data transmission and reception with the external center 100, and a microcontroller 122. Furthermore, the relay device 120 is connected to a vehicle-mounted network 160, is connected to the clock 180 through a signal line 181, is connected to the write start command button 182 through a signal line 183, is connected to the memory storage completion indicator 184 through a signal line 185, and is connected to the write completion indicator 186 through a signal line 187. Here, the write start command button 182, the memory storage completion indicator 184, and the write completion indicator 186 are prepared separately for ease of description, but operation and display may be replaced by a single device such as an indicator with a touch panel. The wireless transceiver 121 is connected to the microcontroller 122 through a signal line 128. The microcontroller 122 includes a CPU 123 with an arithmetic unit, an internal ROM 124 which stores a program for controlling the operation of the microcontroller, an updated data ROM 125 which stores the updated program data, a RAM 126, and a vehicle-mounted LAN communication unit 127 which performs protocol processing of the vehicle-mounted network.
The vehicle-mounted network 160 is a vehicle-mounted network which connects the relay device 120 to the vehicle-mounted control devices 130, 140, and 150. The battery power 172 supplies power through a power line 173 to the entire vehicle electronic devices, such as the relay device 120 or the vehicle-mounted control devices 130, 140, and 150. Also, the ignition 170 is a signal for starting up the vehicle electronic devices and is connected to the relay device 120 and the vehicle-mounted control devices 130, 140, and 150 through a signal line 171. When the ignition 170 is in an on state, the connected electronic devices are started, and when the ignition 170 is in a start state, the engine is started. The vehicle-mounted control device 130 is connected to the vehicle-mounted network 160 and controls the engine 135 being the control target through a signal line 136. A microcontroller 131 controls the operation of the vehicle-mounted control device 130, and a vehicle-mounted LAN communication unit 132 is connected to the vehicle-mounted network 160. A ROM 133 is a flash memory which stores a program and data for controlling the control target 135, and a RAM 134 is an SRAM.
The vehicle-mounted control device 140 is connected to the vehicle-mounted network 160 and controls the transmission 145 being the control target through a signal line 146. A microcontroller 141 controls the operation of the vehicle-mounted control device 140, and a vehicle-mounted LAN communication unit 142 is connected to the vehicle-mounted network 160. A ROM 143 is a flash memory which stores a program and data for controlling the control target 145, and a RAM 144 is an SRAM. The vehicle-mounted control device 140 outputs a shift gear position signal 147 of the transmission to the relay device 121.
The vehicle-mounted control device 150 is connected to the vehicle-mounted network 160 and controls the motor 155 being the control target through a signal line 156. A microcontroller 151 controls the operation of the vehicle-mounted control device 150, and a vehicle-mounted LAN communication unit 152 is connected to the vehicle-mounted network 160. A ROM 153 is a flash memory which stores a program and data for controlling the control target 155, and a RAM 154 is an SRAM.
Next, a circuit related to the start of the vehicle-mounted control device 130 will be described with reference to
The first signal is an ignition signal IGN 171, the second signal is a wakeup detection signal WakeUp 250 of a driver IC CAN BD 200 of the vehicle-mounted network, and the third signal is a self-holding signal PowerKeep 260 of the microcontroller 131. The three signals are output to a signal 260 through an OR circuit 270 and control the on and off operation of the relay circuit 210. The wakeup detection signal WakeUp 250 is a signal which becomes an on state when a wakeup signal is received through the vehicle-mounted network 160. The wakeup function is a function commonly used in vehicles and also supports a CAN network or a FlexRay network. Also, the signal line 290 is a signal which connects the driver IC CAN BD 200 of the vehicle-mounted network to the microcontroller 131, and is a signal line which performs exchange of communication data.
Next, the self-holding signal PowerKeep 260 will be described. When the microcontroller 131 sets the signal to an on state, the relay circuit 210 can maintain an on state from the circuit configuration even when the ignition signal IGN 171 and the wakeup detection signal WakeUp 250 are in an off state. Therefore, when the updated program is written to the flash memory, if this signal is set to an on state, the power of the microcontroller can be maintained to thereby secure safety. Only the shift gear position signal 147 is output from the vehicle-mounted control device 140 to the relay device 120. The other vehicle-mounted control devices 130 and 150 do not output.
Next, a circuit related to the start of the relay device 120 will be described with reference to
The first signal is an ignition signal 171, the second signal is a wakeup detection signal WakeUp 340 of a driver IC CAN BD 300 of the vehicle-mounted network, and the third signal is a self-holding signal PowerKeep 350 of the microcontroller 122. The three signals are output to a signal 360 through an OR circuit 330 and control the on and off operation of the relay circuit 310. The wakeup detection signal WakeUp 340 is a signal which becomes an on state when a wakeup signal is received through the vehicle-mounted network 160. The wakeup function is a function commonly used in vehicles. Also, a signal line 390 is a signal which connects the driver IC CAN BD 300 of the vehicle-mounted network to the microcontroller 122, and is a signal line which performs exchange of communication data.
Next, the self-holding signal PowerKeep 350 will be described. When the microcontroller 122 sets the signal to an on state, the relay circuit 310 can maintain an on state from the circuit configuration even when the ignition signal 171 and the wakeup detection signal WakeUp 340 are in an off state. Therefore, when the updated program is written to the flash memory, if this signal is set to an on state, the power of the microcontroller 122 can be maintained to thereby secure safety.
Next, an interrupt table configuration of the microcontroller of the relay device is shown in
An interrupt table 400 is a table in which interrupts generated inside or outside the microcontroller are branched to addresses registered in the present table. In the relay device, an address 410 of a memory storage processing program (see
Interrupt table configurations of the microcontrollers of the vehicle-mounted control devices 130, 140, and 150 are shown in
An interrupt table 500 is a table in which interrupts generated inside or outside the microcontroller are branched to addresses registered in the present table. As described above, in the vehicle-mounted control device, the power of the microcontroller is turned on when the ignition IGN is turned on or when the wakeup pattern is received from the vehicle-mounted network. An address of a program to be performed when the power is turned on is registered in 510. Due to this, a wakeup reception processing program of the vehicle-mounted control device of
Next, a transmitted data structure transmitted by the external center 100 is shown in
600 is a transmitted data structure of the updated program data, and 620 is a transmitted data structure of the write start command. A header of the transmitted data 600 is information indicating the start of transmission, and VIN is a vehicle number which uniquely identifies a vehicle. CMD is a type of command. When CMD is “SNDPROG”, received data means the updated program data, and when CMD is “WRITE”, received data means the write start command. ST2 is a start time of the second time slot in claims 3, 4, 9, and 10 of the present invention, and ET2 is an end time of the second time slot. These are unnecessary information in claims 1, 2, 7, and 8. N indicates the number of transmitted updated program data. SIZE[1] is a size of updated program data to be transmitted for the first time and is expressed in units of bytes. SIZE[N] is a size of updated program data to be transmitted for the last time.
Next, ECU[1] is updated program data information to be transmitted at the first time, and ECU[N] is updated program data information to be transmitted at the last time. The number of updated program data information is also equal to N. EOF is information indicating the end of transmitted data.
Next, an internal data structure 610 of ECU[N] will be described. Since ECU[N] has the same internal data structure as other ECU[1] and the like, ECU[N] will be collectively described. In the present embodiment, the updated program data of ECU[N] includes an updated program, updated data, and management information. First, ECUID is a vehicle-mounted control device number which uniquely identifies the vehicle-mounted control device in the vehicle. VNO is a version number of the updated program and the updated data, and PADR is a write address of the ROM of the vehicle-mounted control device. This is a head address required when the updated program and the updated data are written to the ROM. PSIZE is a size of the updated program and the updated data. The unit of the size is a byte. PROGDATA is an updated program and updated data body. Next, the transmitted data structure 620 of the write start command will be described. VIN is a vehicle number which uniquely identifies a vehicle, and CMD is a write start command. 620 is necessary information in claims 1 and 2 and is unnecessary information in claims 3, 4, 7, 8, 9, and 10.
Next, a data structure which the relay device 120 receives from the external center and stored will be described with reference to
Next, RECVIN and RECCMD “WRITE” are variables which respectively hold received data VIN and CMD “WRITE” when the write start command is received from the external center.
The variables and the arrays described above are stored in the updated data ROM 125 of
Next, a memory configuration of the relay device as illustrated in
As such, communication between the relay device and the vehicle-mounted control device can be enabled by assigning a different CANID to each vehicle-mounted control device. Therefore, the ECUID and CANID conversion table which uniquely identifies the vehicle-mounted control device is stored in the constant data area 830. Similarly, in a case where a dedicated CANID is also assigned to the relay device and the vehicle-mounted control device transmits transmitted data to the relay device, it is only necessary to designate and transmit the CANID dedicated to the relay device. Also, the number Nmax of vehicle-mounted control devices mounted on the corresponding vehicle, a wakeup maximum waiting time, or a mode change maximum waiting time is also stored. The wakeup maximum waiting time is a maximum time required until the entire vehicle-mounted control devices are started and can transmit responses to the vehicle-mounted network, when the relay device starts the vehicle-mounted control device in a case where the ignition is in an off state. Therefore, after transmitting the wakeup pattern to the vehicle-mounted network, the relay device can surely confirm the responses from the entire vehicle-mounted control devices by checking the reception buffer after the elapse of the wakeup maximum waiting time. The wakeup starts not the specific vehicle-mounted control device alone but the entire vehicle-mounted control devices. Similarly, the mode change maximum waiting time also can be a maximum time required until a reply meaning the completion of the mode change is returned to the designated vehicle-mounted network, when the relay device transmits the mode change, such as a repro mode, to the vehicle-mounted network. Since the transmission of the mode change designates CANID, the mode of only the specific vehicle-mounted control device is changed. Next, the updated data ROM 125 is a flash memory which stores data received from the external center. The stored data 700 of
On the assumption of the above-described configuration, the overview of the processing of claims 1 to 6 of the present invention is shown in
First, the background from a time point when a program update is found to execution of update processing will be considered. When bugs or improvement points in a vehicle-mounted control program are found in a vehicle manufacturer, an updated program and updated data are created. Then, the description of the failure and the improvement contents are notified in writing to a vehicle owner through a dealer or the like. After that, in order to implement measures, the dealer confirms the approval of the program update to the vehicle owner by telephone, explains that the driver cannot drive the vehicle in a time slot when the writing of the updated program is performed, gets an approval of it, asks a time slot of a convenient date when the program update of the vehicle is performed, and informs the external center of the time slot. As such, in order to make the vehicle owner not feel inconvenience, it is important to update the program in a time slot of a day convenient for the vehicle owner.
In order to write the updated program data to the vehicle of the owner in the notified time slot, the external center needs to transmit and store the updated program data to the relay device of the vehicle of the owner before the notified time slot. The above background relates to claims 1 to 6 and is realized by a processing flow of
On the other hand, when the updated program data is stored in the vehicle-mounted relay device, the driver may want to perform the program update in a convenient timing, without waiting for the write start command from the external center. This case corresponds to claims 7 to 10 and is realized by a processing flow of
The overview of the processing of the external center, the relay device, and the vehicle-mounted control device will be described with reference to the time axes 901, 902, and 903 thereof.
First, the external center transmits updated program data 904 to the relay device in a time slot prior to a predetermined time slot promised with a vehicle owner. The relay device performs reception when an ignition is in an on state. In order to secure the power of the relay device at the beginning, a PowerKeep signal is turned on in 905, and the updated program data is stored in the updated data ROM. Then, a memory storage completion bit is turned on in 906, and a memory storage completion indicator is turned on in 907. Then, a memory storage completion notification 908 to the external device is performed, and the PowerKeep signal is turned off in 909. After the above processing is completed, the external device transmits a write start command 910 to the relay device in the predetermined time slot in the cases of claims 1 and 2. In the cases of claims 3 and 4, it is autonomously determined from a vehicle-mounted clock whether a current time is an already received second time slot, without receiving the write start command. The relay device turns on the PowerKeep signal 911 and transmits a wakeup pattern to the vehicle-mounted control device in 912. Since the power is turned on when the wakeup pattern is received, the vehicle-mounted control device executes the program and turns on the PowerKeep signal in 914. After a wakeup response 913 is received from the vehicle-mounted control device, a repro mode transition request 915 is transmitted to the vehicle-mounted control device to which the program update is requested. It is confirmed that a repro mode response 916 is returned from the vehicle-mounted control device, and the updated program and the updated data are divided and the write processing 917 to 918 is repeatedly transmitted. After the updated program and the updated data for the vehicle-mounted control devices have been completely transmitted, a write end is transmitted in 919. When the vehicle-mounted control device receives the write end, the vehicle-mounted control device transmits a write completion response 920 to the relay device and then turns off the PowerKeep signal in 921. When the write completion response 920 is returned from the vehicle-mounted control device, the updated program and updated data processing of the vehicle-mounted control device is completed. Therefore, the relay device turns on a write completion bit of the vehicle-mounted control device in 922. Then, when there are updated program data for other vehicle-mounted control devices, processing 923 of transmitting all updated programs and updated data to the vehicle-mounted control devices is repeated. After that, when the writing is successful in all the vehicle-mounted control devices (OK), the write completion bit is turned on in 924, a write completion indicator is turned on in 925, a memory storage completion bit is turned off in 926, a memory storage completion indicator is turned off in 927, and a write completion notification 928 is notified to the external center. Then, the PowerKeep signal is turned off in 929 to end the processing. The overview of the present processing is a brief overview, and a case where a malfunction occurs in the vehicle-mounted control device is a write failure. Therefore, it is necessary to notify the external center of the write failure, but this will be described in the following detailed processing flow.
Next, the overview of the processing of claims 7 to 10 of the present invention will be described with reference to the overview of write processing by a write button as shown in
First, when a time slot promised with a vehicle owner is predetermined, the external center transmits updated program data 1004 to the relay device in a time slot prior to the predetermined time slot. However, in claims 7 and 8, it is not always necessary to determine a second time slot in advance with the vehicle owner. In claims 9 and 10, it is necessary to determine the second time slot. The relay device performs reception when an ignition is in an on state. In order to secure the power of the relay device at the beginning, a PowerKeep signal is turned on in 1005, and the updated program data is stored in the updated data ROM. Then, a memory storage completion bit is turned on in 1006, and a memory storage completion indicator is turned on in 1007, so as to notify the memory storage completion. Then, a memory storage completion notification 1008 to the external device is performed, and the PowerKeep signal is turned off in 1009. The above processing is the same as that of
Next, details of the memory storage processing, which is the common processing in
VIN of the own vehicle No of the received data is written to variable RECVIN of the updated data ROM.
CMD of the command of the received data is written to variable RECCMD of the updated data ROM.
The start time ST2 of the second time slot of the received data is written to variable RECST2 of the updated data ROM.
The end time ET2 of the second time slot of the received data is written to variable RECET2 of the updated data ROM.
The number N of the updated program data of the received data is written to variable RECN of the updated data ROM.
The received data sizes SIZE[1] to SIZE[RECN] of the received data are written to the array RECSIZE[1] to RECSIZE[RECN] of the updated data ROM.
The vehicle-mounted control device numbers ECUID[1] to ECUID[RECN] of the received data are written to the array RECECUID[1] to RECECUID[RECN] of the updated data ROM.
The versions VNO[1] to VNO[RECN] of the updated program and the updated data of the received data are written to the array RECECUVNO[1] to RECECUVNO[RECN] of the updated data ROM.
The write head addresses PADR[1] to PADR[RECN] of the updated program and the updated data of the received data are written to the array RECECUPADR[1] to RECECUPADR[RECN] of the updated data ROM.
The updated program and updated data sizes PSIZE[1] to PSIZE[RECN] of the received data are written to the array RECECUPSIZE[1] to RECECUPSIZE[RECN] of the updated data ROM.
The updated program and updated data body PROGDATA[1] to PROGDATA[RECN] of the received data are written to the array RECECUPROGDATA[1] to RECECUPROGDATA[RECN] of the updated data ROM.
Here, it should be noted that the vehicle-mounted control device number to be updated is stored in RECECUID[n] (n=1 to RECN) and that the updated program and the updated data to the ROM of the vehicle-mounted control device at the write head address is stored in RECECUPADR[n] (n=1 to RECN). Also, RECST2 and RECET2 are unnecessary information in the embodiments of claims 1, 2, 7, and 8, and are necessary information in the embodiments of claims 3, 4, 9, and 10.
Then, in 1103, in order to determine whether the received data is data transmitted to the own vehicle, it is checked whether RECVIN is matched with the vehicle No stored in the constant data area of the internal ROM 124. If not matched, a PowerKeep signal of 1109 is turned off to end the processing. If matched, the data is data received to the corresponding vehicle, and thus, it is checked whether RECCMD of 1104 is “SNDPROG”. If not matched, RECCMD is another command, and thus, write start command processing of 1400 is performed. If matched, the received data is the updated program data, and thus, it is checked in 1105 whether the ignition of the vehicle is in an on state. If not matched, the PowerKeep signal of 1109 is turned off to end the processing so as to wait until next transmission from the external center. If matched, a memory storage completion bit is turned on in 1106, a memory storage completion indicator is turned on in 1107, a memory storage completion notification to the external center is performed in 1108, and the PowerKeep signal is turned off in 1109 to end the processing. Here, the memory storage completion notification to the external center is performed by transferring the notification data to the processing program 823 of transmission to the wireless transceiver. Here, in the cases of claims 1 and 2, the write start command reception processing of 1400 is performed when the write start command “WRITE” is received from the external center. However, in claims 3, 4, 7, 8, 9, and 10, the write start command is not received, and thus, the write start command reception processing of 1400 is not performed. In claims 3 and 4, as shown in
The memory storage completion processing according to claims have been described above in detail.
Next, the transmission data structure of the write start command transmitted from the external center in the predetermined time slot will be described with reference to 620 of
Next, the transmitted data structure of the write completion notification transmitted to the external center after the write completion by the relay device will be described with reference to
Next, the write processing in a case where the write start command is received from the external center and a case where the write start is determined at a cycle of 1,000 ms will be described in detail with reference to
The write start command reception processing will be described in detail with reference to
In the embodiment of claim 1, if 1403 is YES, 1404, 1405, and 1406 are omitted, and the write start processing of 1500 and the PowerKeep signal of 1407 is turned off to end the processing.
In the embodiment of claim 2, if 1403 is YES, it is checked whether the ignition of 1404 is turned off, and if No, the PowerKeep signal of 1407 is turned off to end the processing. If YES, 1405 and 1406 are omitted and 1500 is executed.
In the embodiment of claim 3, 1404 is omitted and 1405 and 1406 are executed. If 1406 is YES, 11500 is executed.
In claim 4, 1404 is executed, and if YES, 1405 and 1406 are executed. In 1405, the current time of the clock is set to variable T, and a determination of RECST2<T<RECET2 of 1406 is executed. If NO, there is no predetermined time slot, and thus, the PowerKeep signal of 1407 is turned off to end the processing. If YES, it is within a range of the predetermined time slot, and thus, the write start processing of 1500 is executed. In 1500, the write start processing is executed, and then, the PowerKeep signal of 1407 is turned off to end the processing. As such, in the embodiments of claims 2, 3, and 4, it should be noted that, after checking that the memory storage completion bit is turned on, whether to refer to the state of the ignition or the second time slot is different. In each embodiment, when the entire conditions are satisfied, the write start processing 1500 is executed.
Next, the write start processing of 1500 will be described in detail with reference to
First, in order to start the entire vehicle-mounted control devices, a wakeup pattern is transmitted to a CAN bus of a vehicle-mounted network in 1501. Then, a wakeup maximum waiting time is set to variable WKMAXTIME in 1502, and a determination sentence WKMAXTIME>elapsed time is determined in 1503. The determination sentence is to secure a time for waiting for the wakeup reception indicating that the power of the vehicle-mounted control device receiving the wakeup pattern is turned on and thus the vehicle-mounted control device is started. If YES in 1503, it means that it is within the maximum waiting time and there may exist a vehicle-mounted control device which is not yet started. Therefore, after waiting until NO is determined, processing of 1504 is executed. That is, 1504 is executed in a state in which the entire vehicle-mounted control devices are started. Although in the middle of the processing of
That is, in 1511, it is checked whether the entire received updated program and updated data have been completely transmitted to the corresponding vehicle-mounted control devices. If YES, write completion processing is performed in 2100 and the processing is ended.
Next, the processing 1800 of transmitting the updated program to RECECUID[n] will be described in detail with reference to
In
First, in 1801, a command “WRITE” is set to variable CMMAND. Then, in 1802, RECECUID[n] is set to variable ECUID, ERCECUPADR[n] is set to variable SNDPADR, RECECUPSIZE[n] is set to variable PSIZE, a head address of RECECUPROGDATA[n] is set to variable PROGDATAADR, 4-byte data from PROGDATAADR is set to variable SNDPDATA, and 0 is set to variable SNDSIZE. Then, in 1803, CANID dedicated to the vehicle-mounted control device ECUID of the transmission destination is set to variable CANID. In 1804, variable CANID is set to a CANID field of the transmission buffer, variable CMMAND is set to a CMD field of the transmission buffer, variable SNDPADR is set to a PADR field of the transmission buffer, and variable SNDPDATA is set to a DATA field of the transmission buffer. Then, in 1805, the contents of the transmission buffer are transmitted to the CAN bus. In the above processing, the first write address of the updated program and the updated data and the first 4-byte data of the updated program and the updated data could be transmitted to the vehicle-mounted control device. Then, in 1806, next 4-byte data of the updated program and the updated data are prepared for transmission. That is, variable PROGDATAADR is incremented by 4, 4-byte data from an address indicated by variable PROGDATAADR are set to variable SNDPDATA, variable SNDPADR is increased by 4, and variable SNDSIZE is also increased by 4. Therefore, next 4-byte data of the updated program and the updated data and the write address can be respectively set. Then, in 1807, it is checked whether variable SNDSIZE is matched with variable PSIZE, so as to check whether the updated program and the updated data have been completely transmitted to the corresponding vehicle-mounted control devices. If NO, the processing is returned back to 1804 and the transmission processing is repeated. If YES, 1808 is executed, “END” meaning the transmission completion is set to variable CMMAND, CANID dedicated to ECUID is set to a CANID field of the transmission buffer, variable CMMAND is set to a CMD field of the transmission buffer, and the contents of the transmission buffer are transmitted to the CAN bus. In the above, since the updated program and the updated data have been completely transmitted to the vehicle-mounted control device of RECECUID[n], the write completion processing 2000 of RECECUID[n] is executed and the processing is ended. Since the processing of
The processing of transmitting the updated program and the updated data from the relay device to the vehicle-mounted control device has been described. Next, the write processing of the vehicle-mounted control device which receives the updated program and the updated data will be described with reference to
The write processing of the vehicle-mounted control device RECECUID[n] of
The present program performs the processing of writing the updated program and the updated data to the control program and data storage area 8A03 of the vehicle-mounted control device of
Next, the write completion processing 2000 of RECECUID[n] of
As can be seen if looking back at the entire processing configuration, the write start is initiated from the processing of
Next, in
1 is set to variable n in 2101, and it is checked in 2102 whether the write completion bit RESULTECU[n] of the vehicle-mounted control device of RECECUID[n] is “OK”. If NO, it means an occurrence of a write failure. Thus, the write completion bit described with reference to
Next, the embodiment of the case where the write start is implemented by the write start command button mounted on the vehicle will be described in detail. The present case relates to claims 7 to 10.
In the present embodiment, the detailed processing operation of the overview of the write processing by the write button in
In the embodiment of claim 7, 2203, 2204, 2205, and 2206 are omitted and 2300 is executed. That is, the write start processing by the button is executed and the processing is ended.
In the embodiment of claim 8, it is checked in 2203 whether an ignition is turned on. If NO, the processing is ended. If YES, it is checked in 2204 whether a shift gear position is in a parking position, and if NO, the processing is ended. If YES, 2205 and 2206 are omitted, and the write start processing 2300 by the button is executed and the processing is ended.
In the embodiment of claim 9, 2203 and 2204 are omitted and 2205 and 2206 are executed. In 2205, a current time is obtained from a vehicle-mounted clock and is set to variable T. In 2206, it is checked whether variable T is within a range between a start time RECST2 and an end time RECET2 of a second time slot, and if NO, the processing is ended. If YES, the write start processing 2300 by the button is executed and the processing is ended.
In the embodiment of claim 10, it is checked in 2203 whether the ignition is turned on. If NO, the processing is ended. If YES, it is checked in 2204 whether the shift gear position is the parking, and if NO, the processing is ended. If YES, the current time from the vehicle-mounted clock is set to variable T in 2205. It is checked in 2206 whether variable T is within the range between the start time RECST2 and the end time RECET2 of the second time slot, and if NO, the processing is ended. If YES, the write start processing 2300 by the button is executed and the processing is ended.
The operations of the embodiments of claims 7 to 10 have been described above.
Next, the write start processing by the button as shown in
In 2301, 1 is set to variable n. In 2302, CANID dedicated to RECECUID[n] is set to the CANID field of the transmission buffer, the repro mode command “REPRO_MODE” is set to the CMD field of the transmission buffer, ECUID of the relay device is set to the DATA field of the transmission buffer, and the contents of the transmission buffer are transmitted to the CAN bus. In the above processing, since the ignition is on, the power of the vehicle-mounted control device is on. Therefore, the relay device does not transmit a wakeup pattern and transmits a repro mode transition request command “REPRO_MODE”. Then, a mode change maximum waiting time is set to variable REPROMAXTIME in 2303, and the processing of waiting until the elapse of the REPROMAXTIME time is performed in 2304. A case where the REPROMAXTIME time has elapsed becomes NO. In 2305, the data CANID of the CANID field of the reception buffer is set to variable CANID, the data CMD of the CMD field of the reception buffer is set to variable CMD, and the data DATA of the DATA field of the reception buffer is set to variable DATA. Then, in 2306, it is checked whether variable CMD is matched with “REPRO_RESPONSE”. If NO, it is determined as abnormal and “NG” is set to RESULTECU[n] in 2307. If YES, “processing of transmitting the updated program to RECECUID[n]” of 1800 is executed, and it is checked in 2308 whether variable n is matched with RECN. If NO, the entire updated program and updated data are not transmitted. Therefore, in 2309, variable n is incremented and 2302 is repeated. If YES in 2308, the write completion processing 2100 is performed and the processing is ended. The above-described processing 2301 to 2310 is the same as 1504 to 1513 of
The embodiments of claims 1 to 10 and the operations thereof have been described above.
As described above, according to the present invention, since the relay device mounted on the vehicle can receive the updated program data transmitted from the external center when the ignition is in an on state, without regard to the control operation of the vehicle-mounted control device which is related to traveling, the updated program data can be stored without the driver's feeling inconvenience.
Also, the processing of writing the updated program and the updated data can update the control program and data of the vehicle control device in the promised time slot when the driver of the vehicle is not in the vehicle, when the vehicle is parked at home or other parking lot, or even when the ignition is in an off state at midnight.
Also, in a case where the driver of the vehicle is in the vehicle, the driver can perform the writing in a convenient time by pressing the write start command button or can perform the writing in a limited time slot promised with an owner.
As described above, the updated program and the updated data can be written to the vehicle-mounted control device quickly and without the driver's feeling inconvenience.
Number | Date | Country | Kind |
---|---|---|---|
2014-125884 | Jun 2014 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2015/067673 | 6/19/2015 | WO | 00 |