WO2018186089A1 - 車両制御装置 - Google Patents

車両制御装置 Download PDF

Info

Publication number
WO2018186089A1
WO2018186089A1 PCT/JP2018/008462 JP2018008462W WO2018186089A1 WO 2018186089 A1 WO2018186089 A1 WO 2018186089A1 JP 2018008462 W JP2018008462 W JP 2018008462W WO 2018186089 A1 WO2018186089 A1 WO 2018186089A1
Authority
WO
WIPO (PCT)
Prior art keywords
flag
special program
vehicle control
program
control device
Prior art date
Application number
PCT/JP2018/008462
Other languages
English (en)
French (fr)
Inventor
規雄 村山
務 赤池
Original Assignee
日立オートモティブシステムズ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日立オートモティブシステムズ株式会社 filed Critical 日立オートモティブシステムズ株式会社
Publication of WO2018186089A1 publication Critical patent/WO2018186089A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to an apparatus for controlling a vehicle.
  • the control software installed in the vehicle is required to comply with ISO 26262, which is a functional safety standard.
  • ISO 26262 requires that special programs that are not included in the specifications of the vehicle control device be guaranteed to be deactivated. This is because if the special program is started unintentionally, the vehicle operation may become unstable due to an unintended influence on the vehicle control.
  • the special program referred to here is a program in which processing other than the processing for controlling the vehicle is implemented. For example, a program in which reprogram processing is implemented, a program in which hardware check at the time of shipping inspection is implemented, and the like.
  • a special program is written together on a ROM (Read Only Memory) for storing the control program, and a flag indicating whether or not the special mode program is permitted to be activated is set in an appropriate storage device (the same ROM, EEPROM ( (Electrically Erasable Programmable Read Only Memory)).
  • a CPU Central Processing Unit activates the special program only when the flag permits the special program to be activated.
  • the present invention has been made in view of the above-described problems, and an object of the present invention is to provide a vehicle control device that can reliably deactivate a special program while the special program is resident in the vehicle control device.
  • the vehicle control device includes a first storage area that can be accessed only by the first arithmetic device, and a second storage area that can be accessed only by the second arithmetic device, and starts a special program. At least one of the first flag and the second flag indicating whether or not to permit this is stored in either the first storage area or the second storage area.
  • the vehicle control device of the present invention it is possible to reliably deactivate the special program while always holding the special program.
  • FIG. 1 is a configuration diagram of a vehicle control device 100 according to Embodiment 1.
  • FIG. 3 is a schematic diagram for explaining a storage area provided in a ROM 140.
  • FIG. 3 is a flowchart for explaining a procedure for the first CPU 111 to execute a special program 142;
  • FIG. 10 is a schematic diagram for explaining a storage area included in a ROM 140 according to the second embodiment.
  • 10 is a schematic diagram illustrating a storage area included in a ROM 140 according to Embodiment 3.
  • FIG. It is a flowchart explaining the work procedure at the time of shipping the vehicle control apparatus 100 from a factory. It is a flowchart explaining the operation
  • FIG. 1 is a configuration diagram of a vehicle control device 100 according to Embodiment 1 of the present invention.
  • the vehicle control device 100 is a device that controls the operation of the vehicle, and includes a first CPU 111, a second CPU 112, a RAM (Random Access Memory) 120, an EEPROM 130, and a ROM 140.
  • the ROM 140 stores a control program 141, a special program 142, a first flag 143, and a second flag 144.
  • the control program 141 is a program that implements a process for controlling the operation of the vehicle.
  • the special program 142 is a program that implements other processes. For example, as described above, a program in which reprogramming processing or hardware check is implemented corresponds to this.
  • the first flag 143 and the second flag 144 have values indicating whether or not the execution of the special program 142 is permitted.
  • the first CPU 111 and the second CPU 112 each control the operation of the vehicle by executing the control program 141.
  • One or both of the first CPU 111 and the second CPU 112 further execute a special program 142. In the following description, it is assumed that the first CPU 111 executes the special program 142.
  • the RAM 120 is a memory that temporarily stores data used when the first CPU 111 and the second CPU 112 operate.
  • the EEPROM 130 is a non-volatile storage device that stores data used when the first CPU 111 and the second CPU 112 operate. For example, data to be stored permanently such as learned data and failure history can be stored in the EEPROM 130.
  • FIG. 2 is a schematic diagram for explaining a storage area provided in the ROM 140.
  • the ROM 140 includes a first ROM area 145 that can be accessed only by the first CPU 111 and a second ROM area 146 that can be accessed only by the second CPU 112.
  • the first ROM area 145 stores a first flag 143.
  • the second ROM area 146 stores a second flag 144.
  • the control program 141 and the special program 142 are stored in a storage area that can be accessed by the CPU that executes them. Since the first CPU 111 executes these in the first embodiment, the first ROM area 145 stores these programs.
  • the first CPU 111 executes the special program 142 only when both the first flag 143 and the second flag 144 have a value that allows the special program 142 to be activated.
  • the special program 142 can be prevented from being erroneously activated. That is, the special program 142 can be reliably deactivated.
  • the possibility that each CPU erroneously rewrites the flag can be suppressed. For example, even if the first CPU 111 malfunctions, the second flag 144 cannot be rewritten. Thereby, the possibility that the first flag 143 and the second flag 144 are erroneously rewritten can be further suppressed, and the special program 142 can be inactivated more reliably.
  • FIG. 3 is a flowchart for explaining a procedure for the first CPU 111 to execute the special program 142.
  • the first CPU 111 receives a request for executing the special program 142 from, for example, the outside of the vehicle, the first CPU 111 starts this flowchart.
  • each step of FIG. 3 will be described.
  • Step S301 The first CPU 111 determines whether or not the second flag 144 indicates that the special program 142 is permitted to be activated. For example, the value of the second flag 144 can be acquired by inquiring the value of the second flag 144 from the first CPU 111 to the second CPU 112. If the second flag 144 permits the activation of the special program 142 (valid), the process proceeds to step S302; otherwise (invalid), the process proceeds to step S303.
  • Step S302 The first CPU 111 determines whether or not the first flag 143 indicates that the special program 142 is permitted to be activated. If the first flag 143 permits the special program 142 to be activated (valid), the process proceeds to step S307. Otherwise (invalid), the process proceeds to step S305.
  • Step S303 The first CPU 111 waits for a command to rewrite the second flag 144 (enable the second flag 144) so as to allow the special program 142 to be activated.
  • a command can be received from an external device that has issued a request for executing the special program 142.
  • Step S304 The first CPU 111 validates the second flag 144 according to the command received in step S303.
  • the process of waiting for a command and the process of rewriting the second flag 144 according to the command can be implemented in the control program 141, for example.
  • Steps S305 to S306 The first CPU 111 performs the same processing as the steps S303 to S304 on the first flag 143.
  • Steps S307 to S308) The first CPU 111 determines that starting the special program 142 is permitted (S307).
  • the first CPU 111 executes the special program 142 according to the request for starting this flowchart (S308).
  • Examples of the special program 142 include the following.
  • Other programs can be configured as the special program 142 as long as it is a program other than the process for controlling the vehicle.
  • An example of the special program 142 is a program in which a reprogramming process for rewriting data stored in the ROM 140 is implemented. Reprogramming is a process of updating the control program 141 to a new version, for example. Processing for rewriting the special program 142, the first flag 143, and the second flag 144 can also be implemented as reprogramming processing.
  • Step S308 Example 2 of Special Program 142
  • the special program 142 there is a program for checking whether or not the hardware included in the vehicle control device 100 has failed. This includes the process of checking the failure history.
  • Step S308 Example 3 of Special Program 142
  • a program that outputs data held internally by the vehicle control device 100 can be cited.
  • a process of outputting an internal variable stored in the EEPROM 130 to the outside of the vehicle control device 100 can be considered.
  • An example of the special program 142 is a program that receives a program or data from outside the vehicle control apparatus 100 and stores it in the RAM 120.
  • FIG. 4 is a schematic diagram illustrating a storage area included in the ROM 140 according to the second embodiment of the present invention. Since the configuration other than the storage area included in the ROM 140 is the same as that of the first embodiment, differences will be mainly described below.
  • the second flag 144 is stored on the EEPROM 130. Both the first CPU 111 and the second CPU 112 can access the EEPROM 130.
  • the first CPU 111 When the first CPU 111 receives a request for executing the special program 142, the first CPU 111 acquires the value of the second flag 144 via the second CPU 112 as in the first embodiment, and the special program 142 is combined with the first flag 143. It is determined whether or not execution is permitted. Thereby, the same effect as Embodiment 1 can be exhibited.
  • the special program 142 may be erroneously started in that the first CPU 111 may rewrite the second flag 144 by mistake.
  • the second CPU 112 is similar to the first embodiment in that the first flag 143 cannot be rewritten. Therefore, it is possible to inactivate the special program 142 more reliably as compared to simply duplicating the flag.
  • the EEPROM 130 may be divided into two storage areas, one being configured to be accessible only by the first CPU 111 and the other being configured to be accessible only by the second CPU 112. Thereby, substantially the same effect as Embodiment 1 can be exhibited.
  • FIG. 5 is a schematic diagram for explaining a storage area included in the ROM 140 according to the third embodiment of the present invention. Since the configuration of the storage area provided in the ROM 140 and the timer 150 described later are the same as those in the first embodiment, the differences will be mainly described below.
  • the second ROM area 146 stores the control program 147, and the second CPU 112 executes the control program 147.
  • a part of the processing implemented by the control program 147 is used as a substitute for the second flag 144. The specific method will be described below.
  • the first CPU 111 or the second CPU 112 starts the timer 150 when the vehicle control device 100 is started.
  • the control program 147 implements a condition determination process that checks whether or not the count value of the timer 150 has reached a predetermined threshold value in the control process.
  • the second CPU 112 determines whether or not the count value has reached a predetermined threshold in the process of executing the condition determination process.
  • the special program 142 when the count value is less than the predetermined threshold, it is possible to allow the special program 142 to be activated, and when it is greater than or equal to the predetermined threshold, it is possible to inhibit the special program 142 from being activated. As a result, it is possible to allow the special program 142 to be activated from when the vehicle control device 100 is activated until the predetermined threshold value is reached, and after that, the special program 142 can be automatically prohibited from being activated. Compared with rewriting the 2 flag 144 one by one, processing and maintenance work can be simplified.
  • FIG. 6 is a flowchart for explaining an operation procedure when the vehicle control device 100 is shipped from the factory. The steps in FIG. 6 will be described below.
  • Steps S601 to S603 The operator writes the control program 141 and the special program 142 in the first ROM area 145 using an appropriate writing device (S601). The operator further writes the first flag 143 in the first ROM area 145 (S602) and writes the second flag 144 in the second ROM area 146 (S603). Since the special program 142 is executed in the subsequent steps, each of these flags has a value (valid) indicating that the special program 142 is allowed to be activated.
  • the writing device is configured to be connected to a maintenance terminal of a vehicle on which the vehicle control device 100 is mounted, for example.
  • the writing device may not always have direct access to the data held internally by the vehicle control device 100. Therefore, for example, a command can be issued from the writing device to the vehicle control device 100, and the vehicle control device 100 can execute the command to execute a writing command from the writing device. Steps S303 and S305 are for that purpose.
  • Step S604 The worker performs a shipping inspection by activating one of the special programs 142 that has a function of checking the hardware of the vehicle control device 100. If there are a plurality of special programs 142 or a plurality of functions are implemented, it is sufficient to activate only the shipping inspection function.
  • Steps S605 to S606 The operator rewrites each of the first flag 143 and the second flag 144 to a value (invalid) that prohibits starting the special program 142 by the procedure opposite to steps S602 to S603. As a result, the vehicle control device 100 is delivered to the user with the special program 142 deactivated.
  • FIG. 7 is a flowchart for explaining a work procedure when the vehicle control device 100 is returned from the market due to a failure or the like. Hereinafter, each step of FIG. 7 will be described.
  • Step S701 The operator reads out a failure history stored in the EEPROM 130 by executing a diagnostic function included in the control program 141. If the special program 142 has the same diagnostic function, steps S702 and S703 are performed before this step.
  • Steps S702 to S706 These steps are the same as steps S602 to S606. However, since the first flag 143 and the second flag 144 have already been written, these flags are overwritten in steps S702 and S703.
  • FIG. 8 is a flowchart for explaining the reprogramming procedure.
  • the reprogramming work is performed as part of the maintenance work of the vehicle control device 100 in order to upgrade the control program 141, for example.
  • each step of FIG. 8 will be described.
  • Steps S801 to S805 These steps are the same as steps S702 to S706. However, it differs from the procedure of FIG. 7 only in that the special program 142 in which the function of reprogramming the first ROM area 145 is started in step S803.
  • Step S803 Supplement 1
  • the ROM 140 is configured using a flash ROM, it is necessary to erase the storage area to be rewritten (blank state) and then perform reprogramming in units of blocks having a certain size. This is because the flash ROM cannot write new data unless the data is erased, and can only write data in units of blocks.
  • a part of the storage area for storing the special program 142 can be used for the first flag 143.
  • the special program 142 is also rewritten when reprogramming is performed, and the storage area following the end of the special program 142 is used as the first flag 143. Thereby, when writing the final block of the special program 142, the first flag 143 can be written together.
  • the first flag 143 indicates that the first CPU 111 prohibits starting the special program 142 when the address storing the first flag 143 is blank. Can also be handled. Thus, for example, when it is desired to prohibit the activation of the special program 142 after the first ROM area 145 is once erased (blank state), the first flag 143 is written together with the special program 142 and the activation is permitted. It is sufficient to write only the special program 142. Therefore, the reprogramming work can be simplified.
  • FIG. 8 Step S803: Supplement 3
  • the flash ROM is used as the ROM 140, and the block for writing the special program 142 and the block for writing the first flag 143 can be separated.
  • the first CPU 111 can handle that the special program 142 is permitted to be activated. If it is desired to temporarily allow the special program 142 to be activated, it is sufficient to erase the block storing the first flag 143 at a time, so that the work time for that is short.
  • FIG. 8 Step S803: Supplement No. 4
  • the special program 142 is permitted to be activated when the first flag 143 is in the blank state, the following advantages are obtained.
  • the reprogramming operation is terminated halfway due to, for example, power shutdown, it is necessary to restart the reprogramming by starting the special program 142 again.
  • the storage area for storing the first flag 143 is erased at the beginning of reprogramming and is in a blank state, it is permitted to start the special program 142 as it is without enabling the first flag 143 again. Will be. Therefore, it is not necessary to re-enable the first flag 143 in order to resume reprogramming, which is advantageous from the viewpoint of work efficiency.
  • FIG. 8 Step S803: Supplement No. 5
  • the special program 142 when allowing the special program 142 to be activated when the first flag 143 is in a blank state, the first flag 143 is erased by, for example, the vehicle control device 100 being hacked. If this is done, the special program 142 may be illegally activated. However, even in this case, if the second CPU 112 can detect by some means that the first ROM area 145 has been illegally erased, for example, the special program 142 is temporarily prohibited from starting even if the first flag 143 is valid. Thus, unauthorized activation can be prevented.
  • the present invention is not limited to the above embodiment, and includes various modifications.
  • the above-described embodiment has been described in detail for easy understanding of the present invention, and is not necessarily limited to one having all the configurations described.
  • a part of the configuration of an embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of an embodiment.
  • the first CPU 111 and the second CPU 112 can access only different ROM areas, but the same configuration can be applied to each core of a multi-core CPU. In this case, since each core reads only the flag that can be accessed by itself, the same effect as the present invention can be exhibited.
  • Vehicle control device 111 First CPU 112: Second CPU 120: RAM 130: EEPROM 140: ROM 141: Control program 142: Special program 143: First flag 144: Second flag 145: First ROM area 146: Second ROM area

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Mechanical Engineering (AREA)
  • Stored Programmes (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

特殊プログラムを車両制御装置に常駐させつつ、特殊プログラムを確実に非活性化することができる車両制御装置を提供する。このため、本発明に係る車両制御装置は、第1演算装置のみがアクセスすることができる第1記憶領域と、第2演算装置のみがアクセスすることができる第2記憶領域とを備え、特殊プログラムを起動することを許可するか否かを示す第1フラグと第2フラグのうち少なくともいずれかを、前記第1記憶領域と前記第2記憶領域のいずれかに格納する。

Description

車両制御装置
 本発明は、車両を制御する装置に関する。
 車両が搭載する制御ソフトウェアは、機能安全規格であるISO26262に準拠することが求められている。ISO26262は、車両制御装置の仕様として含まれていない特殊プログラムを非活性化することを保証するよう求めている。特殊プログラムが意図せず起動すると、車両制御に対して意図しない影響を与えて車両動作が不安定になる可能性があるからである。ここでいう特殊プログラムとは、車両を制御する処理以外の処理を実装したプログラムであり、例えばリプログラム処理を実装したプログラム、出荷検査時のハードウェアチェックを実装したプログラムなどがこれに該当する。
ISO26262 Part6
 特殊プログラムを非活性化する手法としては、例えば以下のようなものが考えられる。
制御プログラムを記憶するROM(Read Only Memory)上に特殊プログラムを併せて書き込んでおき、さらに特殊モードプログラムを起動することを許可するか否かを示すフラグを適当な記憶装置(同じROM、EEPROM(Electrically Erasable Programmable Read Only Memory)など)に書き込む。CPU(Central Processing Unit)は同フラグが特殊プログラムを起動することを許可している場合のみ、特殊プログラムを起動する。
 上記のような非活性化手法を用いる場合、フラグが何らかの原因により誤って書き換えられると、本来であれば特殊プログラムを起動することが禁止されているにも関わらず起動することができるとみなされる可能性がある。この場合、特殊プログラムを非活性化することが充分に保証されていないということができる。したがって特殊プログラムを実行するためには、実行するごとに特殊プログラムを車両制御装置に対して書き込み、実行し終えると車両制御装置から特殊プログラムを消去する必要がある。換言すると、特殊プログラムを車両制御装置内に常駐させておくことができない。このような構成は、作業効率の観点から望ましくない。
 本発明は、上記のような課題に鑑みてなされたものであり、特殊プログラムを車両制御装置に常駐させつつ、特殊プログラムを確実に非活性化することができる車両制御装置を提供することを目的とする。
 本発明に係る車両制御装置は、第1演算装置のみがアクセスすることができる第1記憶領域と、第2演算装置のみがアクセスすることができる第2記憶領域とを備え、特殊プログラムを起動することを許可するか否かを示す第1フラグと第2フラグのうち少なくともいずれかを、前記第1記憶領域と前記第2記憶領域のいずれかに格納する。
 本発明に係る車両制御装置によれば、特殊プログラムを常に保持しつつ、特殊プログラムを確実に非活性化することができる。
実施形態1に係る車両制御装置100の構成図である。 ROM140が備える記憶領域について説明する模式図である。 第1CPU111が特殊プログラム142を実行する手順を説明するフローチャートである。 実施形態2におけるROM140が備える記憶領域について説明する模式図である。 実施形態3におけるROM140が備える記憶領域について説明する模式図である。 車両制御装置100を工場から出荷する際の作業手順を説明するフローチャートである。 車両制御装置100が故障などにより市場から返却されたときの作業手順を説明するフローチャートである。 リプログラミング作業の手順を説明するフローチャートである。
<実施の形態1>
 図1は、本発明の実施形態1に係る車両制御装置100の構成図である。車両制御装置100は、車両の動作を制御する装置であり、第1CPU111、第2CPU112、RAM(Random Access Memory)120、EEPROM130、ROM140を備える。
 ROM140は、制御プログラム141、特殊プログラム142、第1フラグ143、第2フラグ144を格納する。制御プログラム141は、車両の動作を制御する処理を実装したプログラムである。特殊プログラム142は、それ以外の処理を実装したプログラムである。例えば先に説明したように、リプログラミング処理やハードウェアチェックを実装したプログラムがこれに相当する。第1フラグ143と第2フラグ144は、特殊プログラム142を実行することを許可するか否かを示す値を有する。
 第1CPU111と第2CPU112は、それぞれ制御プログラム141を実行することにより、車両の動作を制御する。第1CPU111と第2CPU112のうちいずれかまたは双方は、さらに特殊プログラム142を実行する。以下では第1CPU111が特殊プログラム142を実行するものとして説明する。
 RAM120は、第1CPU111と第2CPU112が動作する際に用いるデータを一時的に記憶するメモリである。EEPROM130は、第1CPU111と第2CPU112が動作する際に用いるデータを記憶する不揮発性記憶装置である。例えば学習済データや故障履歴などのように永続的に記憶すべきデータをEEPROM130に格納することができる。
 図2は、ROM140が備える記憶領域について説明する模式図である。ROM140は、第1CPU111のみがアクセスすることができる第1ROM領域145と、第2CPU112のみがアクセスすることができる第2ROM領域146とを有する。第1ROM領域145は、第1フラグ143を格納する。第2ROM領域146は、第2フラグ144を格納する。制御プログラム141と特殊プログラム142は、これらを実行するCPUがアクセスすることができる記憶領域に格納する。本実施形態1においては第1CPU111がこれらを実行することとしたので、第1ROM領域145がこれらプログラムを格納する。
 第1CPU111は、第1フラグ143と第2フラグ144がともに、特殊プログラム142を起動することを許可する旨の値を有している場合のみ、特殊プログラム142を実行する。フラグを2重化することにより、いずれかのフラグが特殊プログラム142を起動許可する旨の値に誤って書き換えられたとしても、特殊プログラム142を誤って起動しないようにすることができる。すなわち特殊プログラム142を確実に非活性化することができる。
 さらに、第1フラグ143と第2フラグ144のうち少なくともいずれかを、第1ROM領域145と第2ROM領域146のいずれかに格納することにより、各CPUが誤ってフラグを書き換える可能性を抑制できる。例えば第1CPU111が誤動作したとしても、第2フラグ144を書き換えることはできない。これにより、第1フラグ143と第2フラグ144が誤って書き換えられる可能性をさらに抑制し、特殊プログラム142をより確実に非活性化することができる。
 図3は、第1CPU111が特殊プログラム142を実行する手順を説明するフローチャートである。第1CPU111は、特殊プログラム142を実行するよう要求するリクエストを例えば車両の外部から受け取ったとき、本フローチャートを開始する。以下図3の各ステップについて説明する。
(図3:ステップS301)
 第1CPU111は、特殊プログラム142を起動することを許可する旨を第2フラグ144が示しているか否かを判断する。例えば第1CPU111から第2CPU112に対して第2フラグ144の値を照会することにより、第2フラグ144の値を取得することができる。特殊プログラム142を起動することを第2フラグ144が許可している(有効)場合はステップS302へ進み、それ以外(無効)であればステップS303へ進む。
(図3:ステップS302)
 第1CPU111は、特殊プログラム142を起動することを許可する旨を第1フラグ143が示しているか否かを判断する。特殊プログラム142を起動することを第1フラグ143が許可している(有効)場合はステップS307へ進み、それ以外(無効)であればステップS305へ進む。
(図3:ステップS303)
 第1CPU111は、特殊プログラム142を起動することを許可するように第2フラグ144を書き換える(第2フラグ144を有効化する)コマンドを待機する。例えば特殊プログラム142を実行するよう要求するリクエストを発行した車外装置から、そのようなコマンドを受け取ることができる。
(図3:ステップS304)
 第1CPU111は、ステップS303において受け取ったコマンドにしたがって、第2フラグ144を有効化する。コマンドを待機する処理、およびそのコマンドにしたがって第2フラグ144を書き換える処理は、例えば制御プログラム141のなかに実装することができる。
(図3:ステップS305~S306)
 第1CPU111は、第1フラグ143についてステップS303~S304と同様の処理を実施する。
(図3:ステップS307~S308)
 第1CPU111は、特殊プログラム142を起動することが許可されていると判断する(S307)。第1CPU111は、本フローチャートを開始するリクエストにしたがって特殊プログラム142を実行する(S308)。特殊プログラム142の例として以下のようなものが挙げられる。車両を制御する処理以外のプログラムであれば、その他プログラムも特殊プログラム142として構成することができる。
(図3:ステップS308:特殊プログラム142の例その1)
 特殊プログラム142の例として、ROM140が記憶しているデータを書き換えるリプログラミング処理を実装したプログラムが挙げられる。リプログラミングとは、例えば制御プログラム141を新バージョンに更新する処理である。特殊プログラム142、第1フラグ143、第2フラグ144を書き換える処理も、リプログラミング処理として実装することができる。
(図3:ステップS308:特殊プログラム142の例その2)
 特殊プログラム142の例として、車両制御装置100が備えるハードウェアが故障しているか否かをチェックするプログラムが挙げられる。故障履歴をチェックする処理もこれに含まれる。
(図3:ステップS308:特殊プログラム142の例その3)
 特殊プログラム142の例として、車両制御装置100が内部的に保持しているデータを出力するプログラムが挙げられる。例えばEEPROM130が格納している内部変数を車両制御装置100の外へ出力する処理が考えられる。
(図3:ステップS308:特殊プログラム142の例その4)
 特殊プログラム142の例として、車両制御装置100の外からプログラムやデータを受け取り、これをRAM120に格納するプログラムが挙げられる。
<実施の形態2>
 図4は、本発明の実施形態2におけるROM140が備える記憶領域について説明する模式図である。ROM140が備える記憶領域の構成以外は実施形態1と同様なので、以下では主に差異点について説明する。
 本実施形態2において、第2フラグ144はEEPROM130上に格納されている。第1CPU111と第2CPU112ともに、EEPROM130に対してアクセスすることができる。
 第1CPU111は、特殊プログラム142を実行するよう要求するリクエストを受け取ると、実施形態1と同様に第2CPU112を介して第2フラグ144の値を取得し、第1フラグ143と併せて、特殊プログラム142を実行することが許可されているか否かを判断する。これにより実施形態1と同様の効果を発揮することができる。
 本実施形態2においては、第1CPU111が第2フラグ144を誤って書き換える可能性がある点においては、特殊プログラム142が誤って起動される可能性がある。しかし第2CPU112が第1フラグ143を書き換えることができない点においては実施形態1と同様である。したがって、単にフラグを2重化することと比較して、特殊プログラム142をより確実に非活性化することができる。
 本実施形態2において、EEPROM130を2つの記憶領域に分け、一方は第1CPU111のみがアクセスできるように構成し、他方は第2CPU112のみがアクセスできるように構成してもよい。これにより、実施形態1とほぼ同様の効果を発揮することができる。
<実施の形態3>
 図5は、本発明の実施形態3におけるROM140が備える記憶領域について説明する模式図である。ROM140が備える記憶領域の構成と後述するタイマ150以外は実施形態1と同様なので、以下では主に差異点について説明する。
 本実施形態3において、第2ROM領域146は制御プログラム147を格納し、第2CPU112は制御プログラム147を実行する。本実施形態3においては、制御プログラム147が実装している処理の一部を、第2フラグ144の代用として用いる。以下その具体的手法を説明する。
 第1CPU111または第2CPU112は、車両制御装置100が起動すると、タイマ150を起動する。制御プログラム147は、その制御処理のなかで、タイマ150のカウント値が所定閾値に達したか否かをチェックする条件判断処理を実装している。第2CPU112は、その条件判断処理を実行する過程において、カウント値が所定閾値に達したか否かを判断する。
 例えばカウント値が所定閾値未満である場合は特殊プログラム142を起動することを許可し、所定閾値以上である場合は特殊プログラム142を起動することを禁止することができる。これにより、車両制御装置100が起動してから所定閾値に達するまでの間は特殊プログラム142を起動することを許可し、それ以降は特殊プログラム142を起動することを自動的に禁止できるので、第2フラグ144を逐一書き換えるのと比較して処理やメンテナンス作業を簡易化できる。
<実施の形態4>
 本発明の実施形態4では、実施形態1~3で説明した構成を用いて各種作業を実施する手順を説明する。以下では実施形態1の構成を前提とするが、実施形態2~3の構成においても同様の手順を用いることができる。
 図6は、車両制御装置100を工場から出荷する際の作業手順を説明するフローチャートである。以下図6の各ステップについて説明する。
(図6:ステップS601~S603)
 作業者は、適当な書込装置を用いて、第1ROM領域145に対して制御プログラム141と特殊プログラム142を書き込む(S601)。作業者はさらに、第1ROM領域145に対して第1フラグ143を書き込むとともに(S602)、第2ROM領域146に対して第2フラグ144を書き込む(S603)。以後のステップにおいて特殊プログラム142を実行するので、これらフラグはいずれも、特殊プログラム142を起動することを許可する旨を示す値(有効)とする。
(図6:ステップS602~S603:補足)
 書込装置は、例えば車両制御装置100を搭載している車両のメンテナンス端子に対して接続するように構成されている。この場合、書込装置は車両制御装置100が内部的に保持しているデータに対して必ずしも直接的にアクセスできない場合がある。そこで例えば書込装置から車両制御装置100に対してコマンドを発行し、車両制御装置100がそのコマンドを実行することにより、書込装置からの書込指令を実施することができる。ステップS303やS305はそのためのものである。
(図6:ステップS604)
 作業者は、特殊プログラム142のうち車両制御装置100のハードウェアをチェックする機能を実装したものを起動することにより、出荷検査を実施する。特殊プログラム142が複数存在し、あるいは複数の機能を実装している場合は、出荷検査機能のみを起動すれば足りる。
(図6:ステップS605~S606)
 作業者は、ステップS602~S603と反対の手順により、第1フラグ143と第2フラグ144をそれぞれ、特殊プログラム142を起動することを禁止する値(無効)に書き換える。これにより、特殊プログラム142が非活性化された状態で、車両制御装置100がユーザのもとに届けられることになる。
 図7は、車両制御装置100が故障などにより市場から返却されたときの作業手順を説明するフローチャートである。以下図7の各ステップについて説明する。
(図7:ステップS701)
 作業者は、制御プログラム141が備える診断機能を実行することにより、EEPROM130が格納している故障履歴を読み出す。特殊プログラム142が同診断機能を実装している場合は、本ステップの前にステップS702とS703を実施する。
(図7:ステップS702~S706)
 これらステップは、ステップS602~S606と同様である。ただし第1フラグ143と第2フラグ144は既に書き込まれているので、ステップS702とS703においてはこれらフラグを上書更新することになる。
 図8は、リプログラミング作業の手順を説明するフローチャートである。リプログラミング作業は、例えば制御プログラム141をバージョンアップするため、車両制御装置100のメンテナンス作業の一環として実施される。以下図8の各ステップについて説明する。
(図8:ステップS801~S805)
 これらステップは、ステップS702~S706と同様である。ただしステップS803において、第1ROM領域145をリプログラミングする機能を実装した特殊プログラム142を起動する点のみ、図7の手順とは異なる。
(図8:ステップS803:補足その1)
 ROM140がフラッシュROMを用いて構成されている場合、書き換える記憶領域をいったん消去(ブランク状態)した上で、ある程度のサイズを有するブロック単位でリプログラミングを実施する必要がある。フラッシュROMはいったんデータを消去しないと新たなデータを書き込むことができず、またブロック単位の書き込みしかできないからである。このことを利用して、例えば特殊プログラム142を格納する記憶領域の一部を第1フラグ143のために利用することができる。例えばリプログラミングを実施する際に特殊プログラム142も書き換えることとし、特殊プログラム142の終端に続く記憶領域を第1フラグ143として用いる。これにより、特殊プログラム142の最終ブロックを書き込む際に、第1フラグ143を併せて書き込むことができる。
(図8:ステップS803:補足その2)
 上記補足その1を採用した場合において、第1CPU111は、第1フラグ143を格納するアドレスがブランク状態である場合は、特殊プログラム142を起動することを禁止する旨を第1フラグ143が示していると取り扱うこともできる。これにより、例えば第1ROM領域145をいったん消去(ブランク状態)にした後、特殊プログラム142を起動することを禁止したい場合は特殊プログラム142と併せて第1フラグ143を書き込み、起動を許可する場合は特殊プログラム142のみを書き込めば足りる。したがって、リプログラミング作業を簡易化することができる。
(図8:ステップS803:補足その3)
 上記補足その1~その2とは異なり、ROM140としてフラッシュROMを採用した上で、特殊プログラム142を書き込むブロックと第1フラグ143を書き込むブロックを分けることもできる。第1CPU111はこの場合、例えば第1フラグ143を書き込むアドレスがブランク状態であれば特殊プログラム142を起動することが許可されていると取り扱うことができる。また特殊プログラム142を起動することを一時的に許可したい場合は、第1フラグ143を格納するブロックを一括消去すれば足りるので、そのための作業時間は短くて済む。
(図8:ステップS803:補足その4)
 上記補足その2~その3のように、第1フラグ143がブランク状態であるとき特殊プログラム142を起動することを許可する場合、以下の利点がある。リプログラミング作業が例えば電源遮断などにより途中終了した場合、改めて特殊プログラム142を起動することによりリプログラミングを再開する必要がある。このとき、第1フラグ143を格納する記憶領域は、リプログラミングの最初に消去されてブランク状態になっているので改めて第1フラグ143を有効化しなくともそのまま特殊プログラム142を起動することが許可されていることになる。したがって、リプログラミングを再開するために第1フラグ143を改めて有効化する必要がないので、作業効率の観点から有利である。
(図8:ステップS803:補足その5)
 上記補足その2~その3のように、第1フラグ143がブランク状態であるとき特殊プログラム142を起動することを許可する場合、例えば車両制御装置100がハッキングされることにより第1フラグ143が消去されると、特殊プログラム142を不正に起動される可能性がある。しかしこの場合であっても、第1ROM領域145が不正に消去されたことを第2CPU112が何らかの手段によって検出できれば、例えば第1フラグ143が有効であっても特殊プログラム142を一時的に起動禁止することにより、不正起動を防止できる。
<本発明の変形例について>
 本発明は上記実施形態に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換える事が可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について他の構成の追加・削除・置換をすることができる。
 以上の実施形態において、第1CPU111と第2CPU112がそれぞれ異なるROM領域に対してのみアクセスできることを説明したが、同様の構成はマルチコアCPUの各コアについても適用することができる。この場合、各コアは自身がアクセスすることができるフラグのみを読み取るので、本発明と同様の効果を発揮することができる。
100:車両制御装置
111:第1CPU
112:第2CPU
120:RAM
130:EEPROM
140:ROM
141:制御プログラム
142:特殊プログラム
143:第1フラグ
144:第2フラグ
145:第1ROM領域
146:第2ROM領域

Claims (5)

  1.  車両の動作を制御する車両制御装置であって、
     前記車両の動作を制御する処理を実装した制御プログラムと、前記車両の動作を制御する処理以外の特殊処理を実装した特殊プログラムとを格納する第1記憶装置、
     前記制御プログラムを実行する第1および第2演算装置、
     を備え、
     前記第1記憶装置は、前記第1演算装置のみがアクセスすることができる第1記憶領域と、前記第2演算装置のみがアクセスすることができる第2記憶領域とを有し、
     前記第1記憶領域は、前記特殊プログラムを実行することを許可するか否かを示す第1フラグを格納し、
     前記車両制御装置は、前記特殊プログラムを実行することを許可するか否かを示す第2フラグを、前記第1記憶領域とは異なる記憶領域に格納し、
     前記第1演算装置は、前記特殊プログラムを実行することを許可する旨を前記第1フラグが示すとともに、前記特殊プログラムを実行することを許可する旨を前記第2フラグが示すときに限り、前記特殊プログラムを実行する
     ことを特徴とする車両制御装置。
  2.  前記車両制御装置はさらに、前記第1演算装置と前記第2演算装置が使用するデータを格納する第2記憶装置を備え、
     前記第2記憶装置は、前記第1演算装置と前記第2演算装置がともにアクセスすることができるように構成されており、
     前記第2記憶装置は、前記第2フラグを格納する記憶領域を有している
     ことを特徴とする請求項1記載の車両制御装置。
  3.  前記第2記憶領域は、前記第2フラグを格納しており、
     前記第2演算装置は、前記特殊プログラムを実行することを許可する旨を前記第2フラグが示しているか否かを、前記第1演算装置に対して通知し、
     前記第1演算装置は、前記特殊プログラムを実行することを許可する旨を前記第1フラグが示すとともに、前記特殊プログラムを実行することを許可する旨を前記第2フラグが示している旨の通知を前記第2演算装置から受け取ったときに限り、前記特殊プログラムを実行する
     ことを特徴とする請求項1記載の車両制御装置。
  4.  前記第1演算装置または前記第2演算装置は、前記車両制御装置が起動するとタイマを開始するとともに、前記タイマのカウント値を監視し、
     前記第1演算装置は前記カウント値を前記第1フラグとして用い、または前記第2演算装置は前記カウント値を前記第2フラグとして用い、
     前記第1演算装置または前記第2演算装置は、前記カウント値が所定閾値未満であるときは前記特殊プログラムを実行することを許可する旨を前記カウント値が示しているものとして取り扱い、前記カウント値が前記所定閾値以上であるときは前記特殊プログラムを実行することを許可しない旨を前記カウント値が示しているものとして取り扱う
     ことを特徴とする請求項1記載の車両制御装置。
  5.  前記第1記憶装置は、何らかのデータが書き込まれている状態と、何らのデータも書き込まれていないブランク状態とを有し、
     前記第1演算装置は、前記第1記憶領域のうち前記第1フラグを格納するアドレスが前記ブランク状態である場合は、前記特殊プログラムを実行することを許可する旨を前記第1フラグが示しているものとして取り扱う
     ことを特徴とする請求項1記載の車両制御装置。
PCT/JP2018/008462 2017-04-06 2018-03-06 車両制御装置 WO2018186089A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-076109 2017-04-06
JP2017076109A JP2020101841A (ja) 2017-04-06 2017-04-06 車両制御装置

Publications (1)

Publication Number Publication Date
WO2018186089A1 true WO2018186089A1 (ja) 2018-10-11

Family

ID=63712463

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/008462 WO2018186089A1 (ja) 2017-04-06 2018-03-06 車両制御装置

Country Status (2)

Country Link
JP (1) JP2020101841A (ja)
WO (1) WO2018186089A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002049492A (ja) * 2000-08-04 2002-02-15 Sharp Corp アプリケーション管理方法、アプリケーション管理プログラムを記録した記録媒体、端末装置、および携帯型電話機
JP2012208053A (ja) * 2011-03-30 2012-10-25 Panasonic Corp アプリ制御システム
JP2015069403A (ja) * 2013-09-30 2015-04-13 クラリオン株式会社 プログラム実行制御システム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002049492A (ja) * 2000-08-04 2002-02-15 Sharp Corp アプリケーション管理方法、アプリケーション管理プログラムを記録した記録媒体、端末装置、および携帯型電話機
JP2012208053A (ja) * 2011-03-30 2012-10-25 Panasonic Corp アプリ制御システム
JP2015069403A (ja) * 2013-09-30 2015-04-13 クラリオン株式会社 プログラム実行制御システム

Also Published As

Publication number Publication date
JP2020101841A (ja) 2020-07-02

Similar Documents

Publication Publication Date Title
US10509568B2 (en) Efficient secure boot carried out in information processing apparatus
JP6227794B2 (ja) 車両制御装置、リプログラミングシステム
TWI625672B (zh) 可更新積體電路無線電
WO2021103745A1 (zh) 一种引导程序的保护设计方法
JP2009505304A (ja) 埋設式メモリのアクセス制御
JP2010033576A (ja) バイオスの更新を行う電子機器及び方法
JP3886539B2 (ja) オペレーティングシステムをロードする方法
US7228569B2 (en) Programmable unit
US20120310379A1 (en) Programmable controller
US10895865B2 (en) Numerical controller
KR101601751B1 (ko) 차량용 전자제어유닛 및 그 부트 소프트웨어 리프로그래밍 방법
CN107657153B (zh) 一种芯片内flash区的代码保护方法及装置
WO2018186089A1 (ja) 車両制御装置
JP6575157B2 (ja) ファームウェアのダウンロード方法及びファームウェア組込機器
US20150149703A1 (en) Apparatuses for securing program code stored in a non-volatile memory
JP2016126699A (ja) 自動車用電子制御装置
JP6708596B2 (ja) 電子制御装置及び制御プログラム検証方法
JP2001256118A (ja) マイクロコンピュータシステムの保護方法,メモリ装置,マイクロコンピュータシステム
EP3246821B1 (en) Semiconductor device and its memory access control method
JP5084853B2 (ja) ファームウエア更新装置、通信装置、電子機器、ファームウエア更新システム、ファームウエア更新方法及びプログラム
KR102434126B1 (ko) Plc 프로그램 처리 장치
JP2007011929A (ja) 不揮発性メモリのデータ更新方法、制御装置、及びデータ更新プログラム
CN110888653A (zh) 存储器中固件读写的控制方法、系统、电子设备、芯片
KR102351645B1 (ko) 예열 플러그 제어 장치, 예열 플러그 제어 방법 및 이를 실행시키기 위하여 컴퓨터 판독 가능한 저장 매체에 저장된 컴퓨터 프로그램
KR101548924B1 (ko) 차량용 ecu 및 튜닝 보호 기능 해제 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18780674

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18780674

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP