JP5872982B2 - Vehicle control device - Google Patents

Vehicle control device Download PDF

Info

Publication number
JP5872982B2
JP5872982B2 JP2012177994A JP2012177994A JP5872982B2 JP 5872982 B2 JP5872982 B2 JP 5872982B2 JP 2012177994 A JP2012177994 A JP 2012177994A JP 2012177994 A JP2012177994 A JP 2012177994A JP 5872982 B2 JP5872982 B2 JP 5872982B2
Authority
JP
Japan
Prior art keywords
update data
writing
interruption
value
written
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP2012177994A
Other languages
Japanese (ja)
Other versions
JP2014035729A (en
Inventor
池田 喜紀
喜紀 池田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2012177994A priority Critical patent/JP5872982B2/en
Publication of JP2014035729A publication Critical patent/JP2014035729A/en
Application granted granted Critical
Publication of JP5872982B2 publication Critical patent/JP5872982B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、電気的に消去及び書き込みが可能な不揮発性メモリを備えた車両用制御装置に関する。   The present invention relates to a vehicle control device including a nonvolatile memory that can be electrically erased and written.

特許文献1には、複数の物理ブロックで構成される不揮発性メモリにデータを書き込むときに、物理ブロックの先頭ページの冗長領域にあり、その先頭ページにデータが書き込まれているか否かを示す第1のフラグに、データが書き込まれていることを示す固定値を書き込む第1のフラグ書き込みステップと、その物理ブロックにデータを書き込むデータ書き込みステップと、を有する、不揮発性記憶装置の制御方法が開示されている。   Japanese Patent Application Laid-Open No. 2004-228688 shows whether or not data is written in a redundant area of the first page of a physical block when data is written to a nonvolatile memory composed of a plurality of physical blocks, and whether or not the data is written in the first page. Disclosed is a method for controlling a non-volatile storage device, comprising: a first flag writing step for writing a fixed value indicating that data is written to one flag; and a data writing step for writing data to the physical block. Has been.

国際公開第2004/031966号International Publication No. 2004/031966

例えば、不揮発性メモリに書き込まれた更新データの誤り検出を、起動時に行うよう構成された車両用制御装置では、不揮発性メモリへの更新データの書き込み途中で電源が遮断するなどして書き込みが中断し、更新データに異常が生じると、再起動時に誤りデータの強制的な書き換えなどの機会がないままリセットされることで、誤り検出、リセットが繰り返され、システムを動かすことができなくなる可能性があった。   For example, in a vehicle control device that is configured to detect an error in update data written in the nonvolatile memory at the time of start-up, the writing is interrupted because the power is cut off while the update data is being written to the nonvolatile memory. However, if there is an abnormality in the update data, it will be possible to reset the error data without a chance to forcibly rewrite the error data at the time of restart, and it will be impossible to move the system due to repeated error detection and reset. there were.

本発明は上記問題点に鑑みなされたものであり、不揮発性メモリに対する更新データの書き込みが中断した場合に、動作不良となることを抑制できる、車両用制御装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a vehicle control device that can suppress malfunction when writing of update data to a nonvolatile memory is interrupted.

そのため、本願発明では、電気的に消去及び書き込みが可能な不揮発性メモリを備え、起動時に、前記不揮発性メモリの更新データの誤り検出を行い、誤りを検出した場合にリセットを実施する車両用制御装置において、前記不揮発性メモリに対する更新データの書き込みにおいて中断があった場合に、起動時の前記誤り検出に先立って前記更新データを所定値に書き換え、その後に前記誤り検出を行うようにした。   Therefore, in the present invention, there is provided a non-volatile memory that is electrically erasable and writable, and at the time of start-up, an error is detected in update data of the non-volatile memory, and a reset is performed when an error is detected. In the apparatus, when there is an interruption in the writing of update data to the nonvolatile memory, the update data is rewritten to a predetermined value prior to the error detection at the time of startup, and then the error detection is performed.

上記発明によると、更新データの書き込みにおいて中断があった場合でも、起動時の誤り検出に先立って更新データを所定値に書き換えることで、誤り検出、リセットが繰り返されることを抑制でき、以って、動作不良となることを抑制できる。   According to the above invention, even when there is an interruption in the writing of the update data, it is possible to suppress repeated error detection and reset by rewriting the update data to a predetermined value prior to error detection at the time of startup. Therefore, it is possible to suppress malfunction.

本願発明の実施形態における車両用制御装置のブロック図である。It is a block diagram of a control device for vehicles in an embodiment of the invention of this application. 本願発明の実施形態における不揮発性メモリのアドレス空間を示す図である。It is a figure which shows the address space of the non-volatile memory in embodiment of this invention. 本願発明の実施形態における車両用制御装置の起動時の状態変化及び不揮発性メモリのアクセスを示すタイムチャートである。It is a time chart which shows the state change at the time of starting of the control apparatus for vehicles in embodiment of this invention, and access of a non-volatile memory. 本願発明の実施形態における車両用制御装置の起動時処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process at the time of starting of the control apparatus for vehicles in embodiment of this invention. 本願発明の実施形態における全体サム値(中断判別値)の書き込みの様子及び固定値による書き換えの様子を説明するための図である。It is a figure for demonstrating the mode of writing of the whole sum value (interruption discriminating value) in the embodiment of this invention, and the mode of rewriting by a fixed value. 本願発明の実施形態における車両用制御装置の起動時処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process at the time of starting of the control apparatus for vehicles in embodiment of this invention. 本願発明の実施形態における車両用制御装置の起動時処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process at the time of starting of the control apparatus for vehicles in embodiment of this invention.

以下に本発明の実施の形態を説明する。
図1は、車両用制御装置の一例を示すブロック図である。
図1に示す車両用制御装置1は、各種の車両搭載機器(エンジン、自動変速機、エアコンなど)を制御する装置であり、マイクロコンピュータ(演算器)2、電源回路3、I/F回路4などを備える。
Embodiments of the present invention will be described below.
FIG. 1 is a block diagram illustrating an example of a vehicle control device.
A vehicle control device 1 shown in FIG. 1 is a device that controls various vehicle-mounted devices (engines, automatic transmissions, air conditioners, etc.), and includes a microcomputer (calculator) 2, a power supply circuit 3, and an I / F circuit 4. Etc.

マイクロコンピュータ(以下、「マイコン」という)2は、CPU(演算処理装置)21、フラッシュROMやEEPROMなどの電気的に消去及び書き込みが可能な不揮発性メモリ22、RAMなどの揮発性メモリ23を含んでいる。
不揮発性メモリ22は、ビット誤り検出機能付のメモリモジュール(ECCメモリ)とすることができる。ビット誤り検出機能付のメモリモジュールは、例えば、エラー訂正コードECC(冗長化データ)を持ち、1bitのエラーに対しては誤り検出と訂正とが可能である一方、2bitのエラーに対しては、エラー検出は可能であるものの訂正を行えないモジュールである。
そして、マイコン2は、I/F回路4を介して外部からセンサ信号などを入力し、また、I/F回路4を介して外部に向けて操作信号などを出力する。
A microcomputer (hereinafter referred to as “microcomputer”) 2 includes a CPU (arithmetic processing unit) 21, an electrically erasable and writable nonvolatile memory 22 such as a flash ROM and an EEPROM, and a volatile memory 23 such as a RAM. It is out.
The nonvolatile memory 22 can be a memory module (ECC memory) with a bit error detection function. A memory module with a bit error detection function has, for example, an error correction code ECC (redundant data), and can detect and correct an error for a 1-bit error, whereas for a 2-bit error, This is a module that can detect errors but cannot correct them.
The microcomputer 2 inputs a sensor signal or the like from the outside via the I / F circuit 4 and outputs an operation signal or the like toward the outside via the I / F circuit 4.

マイコン2及び電源回路3には、運転者によってオン/オフされる電源スイッチ5を介して、車両電源(バッテリ)6の電力が供給される。
また、電源回路3によってオン/オフが制御されるセルフシャットオフリレー7を介する経路によっても、車両電源6の電力がマイコン2及び電源回路3に供給されるようになっていて、セルフシャットオフリレー7をオンに保持することで、電源スイッチ5がオフされた後も、マイコン2に対する電力供給を継続させることが可能である。
また、電源回路3は、マイコン2からプログラムラン信号P−RUNを入力し、マイコン2に対してリセット信号を出力する外部監視回路としての機能を備えている。
The microcomputer 2 and the power supply circuit 3 are supplied with electric power from a vehicle power supply (battery) 6 via a power switch 5 that is turned on / off by the driver.
Further, the power of the vehicle power supply 6 is also supplied to the microcomputer 2 and the power supply circuit 3 through a path through the self-shutoff relay 7 whose on / off is controlled by the power supply circuit 3. By keeping 7 on, it is possible to continue supplying power to the microcomputer 2 even after the power switch 5 is turned off.
The power supply circuit 3 also has a function as an external monitoring circuit that inputs a program run signal P-RUN from the microcomputer 2 and outputs a reset signal to the microcomputer 2.

不揮発性メモリ22には、例えば、図2に示すように、格納データの1つ或いは複数毎にビット誤り検出やビット誤り訂正を行うためのコード(エラー訂正コードECC)が格納されるようになっている。
図2において、更新データは、マイコン2への電源投入期間中に、順次更新して書き込まれる学習データや故障診断データ(故障履歴データ)などであり、固定データは、初期状態において書き込まれる制御定数などの更新されないデータである。
For example, as shown in FIG. 2, a code (error correction code ECC) for bit error detection and bit error correction is stored in the nonvolatile memory 22 for each one or a plurality of stored data. ing.
In FIG. 2, the update data is learning data or failure diagnosis data (failure history data) that is updated and written sequentially during the power-on period of the microcomputer 2, and the fixed data is a control constant that is written in the initial state. Data that is not updated.

マイコン2は、図3に示すように、電源投入によって起動すると、まず、初期化処理を実施した後、誤り検出訂正を行わせつつ不揮発性メモリ22から更新データを読み出し、全更新データの読み出しを完了すると、その他の処理(更新データの書き込みを含む)を実施する。
更新データの不揮発性メモリ22への書き込みは、全更新データの読み出しを完了した後の電源投入期間中に、必要に応じて実施され、更新データの書き込みタイミングはランダムである。
As shown in FIG. 3, when the microcomputer 2 is started by turning on the power, first, after performing the initialization process, the update data is read from the nonvolatile memory 22 while performing error detection and correction, and all update data is read. Upon completion, other processing (including writing update data) is performed.
The update data is written to the nonvolatile memory 22 as necessary during the power-on period after the reading of all the update data is completed, and the update data write timing is random.

以下では、マイコン2における起動時における更新データの処理の一例を、図4のフローチャートに従って詳細に説明する。
マイコン2に電源投入されると(電源投入されかつリセットが解除されると)、まず、ステップS101で初期化処理を実施する。
Hereinafter, an example of update data processing at the time of startup in the microcomputer 2 will be described in detail according to the flowchart of FIG.
When the microcomputer 2 is turned on (when the power is turned on and the reset is released), first, initialization processing is performed in step S101.

初期化処理が終了すると、ステップS102へ進み、不揮発性メモリ22における更新データ、又は、更新データを含む格納データエリア全てに対する誤り検出訂正を禁止し(換言すれば、誤り検出訂正の開始を遅延し)、誤り検出訂正に先立って、ステップS103〜ステップS105の更新データの書き換え処理に進む。
このステップS103〜ステップS105における更新データの書き換え処理は、更新データの書き込み途中で、電源が遮断されるなどして書き込みが中断し、更新データに異常が生じた場合に、更新データを所定値に書き換え、書き込み処理において算出される更新したエラー訂正コードECCに書き換える処理である。
そして、係る更新データの書き換え処理が終わってから、ステップS106で、不揮発性メモリ22における更新データ、又は、更新データを含む格納データエリア全てに対する誤り検出訂正を起動させるようになっている。
When the initialization process is completed, the process proceeds to step S102, where error detection / correction is prohibited for all the update data in the nonvolatile memory 22 or the storage data area including the update data (in other words, the start of error detection / correction is delayed). ), Prior to error detection and correction, the process proceeds to the update data rewrite process in steps S103 to S105.
In the update data rewrite process in steps S103 to S105, the update data is set to a predetermined value when the update data is interrupted due to power interruption or the like during the update data write and an abnormality occurs in the update data. This is a process of rewriting the updated error correction code ECC calculated in the rewriting and writing processes.
Then, after the update data rewrite process is completed, in step S106, error detection and correction for all the update data in the nonvolatile memory 22 or the storage data area including the update data is activated.

ステップS103では、更新データの書き込みが中断したか否かを判別するための中断判別値である第1サム値及び第2サム値を、不揮発性メモリ22の更新データを格納するエリア(以下、「更新データエリア」という)から読み出す。
更新データの更新データエリアに対する書き込みにおいては、書き込みを開始する前に、書き込みが決定した複数の更新データの全体サム値を演算し、当該全体サム値を、書き込みの中断の有無を判断するための値として、更新データの書き込み過程において不揮発性メモリ22に複数書き込むようにしてある。
In step S103, the first sum value and the second sum value, which are interruption determination values for determining whether or not the writing of update data has been interrupted, are stored in an area (hereinafter referred to as “the update data” in the nonvolatile memory 22). Update data area).
In writing update data to the update data area, before starting writing, the total sum value of a plurality of update data determined to be written is calculated, and the total sum value is used to determine whether or not the writing is interrupted. A plurality of values are written in the nonvolatile memory 22 in the process of writing update data.

より具体的には、図5(A)に示すように、最初に書き込みを行う更新データと共に全体サム値を書き込み、最後に書き込みを行う更新データと共に最初と同じ全体サム値を書き込むようになっている。即ち、更新データの書き込み過程の最初及び最後で、同じ全体サム値(中断判別値)を、更新データエリアに書き込むようにしてある。
そして、ステップS103では、書き込み過程の最初に書き込まれる更新データと共に格納されている全体サム値を第1サム値として読み出し、更に、書き込み過程の最後に書き込まれる更新データと共に格納されている全体サム値を第2サム値として読み出す。
尚、中断判別値としての全体サム値を、最初の更新データの書き込みの直前に書き込み、また、最後の更新データの書き込みの直後に書き込むようにすることができる。
More specifically, as shown in FIG. 5A, the whole sum value is written together with the update data to be written first, and the same whole sum value as the first is written together with the update data to be written last. Yes. That is, the same whole sum value (interruption determination value) is written to the update data area at the beginning and end of the update data write process.
In step S103, the total sum value stored together with the update data written at the beginning of the writing process is read as the first sum value, and further the total sum value stored together with the update data written at the end of the writing process. Is read as the second sum value.
The total sum value as the interruption determination value can be written immediately before the first update data is written, or can be written immediately after the last update data is written.

ここで、更新データの書き込み途中で、電源遮断などによって書き込みが中断すると、図5(A)に示すように、書き込み過程の最初側の全体サム値(第1サム値)が、そのときの書き込み予定の更新データの全体サム値に更新されるのに対し、最後の更新データの書き込み処理まで進まないことで、書き込み過程の最後側の全体サム値(第2サム値)が前回値のまま上書きされることなく保存されるため、第1サム値と第2サム値とが不一致(不整合)の状態になる。
尚、マイコン2における電源遮断は、電源(バッテリ)の取り外しや電力供給ハーネスの断線や中間コネクタの抜けなどによって生じる。また、マイコン2に対する電力供給が瞬間的に途絶える場合は、マイコン2が出力するプログラムラン信号P−RUNが途絶え、電源回路3はマイコン2にリセット信号を出力し、マイコン2を再起動させる。
Here, when the writing is interrupted due to power interruption or the like during the writing of the update data, as shown in FIG. 5A, the entire sum value (first sum value) on the first side of the writing process is written at that time. The total sum value of the scheduled update data is updated, but the last update data writing process does not proceed, so the last total value (second sum value) in the writing process is overwritten with the previous value. Therefore, the first sum value and the second sum value are inconsistent (mismatched).
Note that the power interruption in the microcomputer 2 occurs due to removal of the power source (battery), disconnection of the power supply harness, disconnection of the intermediate connector, or the like. When the power supply to the microcomputer 2 is momentarily interrupted, the program run signal P-RUN output from the microcomputer 2 is interrupted, and the power supply circuit 3 outputs a reset signal to the microcomputer 2 to restart the microcomputer 2.

一方、一連の更新データの書き込み処理が中断なく進行すれば、書き込み過程の最初側での全体サム値の書き込みと、書き込み過程の最後での全体サム値の書き込みとが行われることで、最初側と最後側との全体サム値(中断判別値)が一致(整合)することになる。
従って、書き込み過程における最初側で全体サム値(中断判別値)を書き込むアドレスに格納されている第1サム値と、書き込み過程における最後側で全体サム値(中断判別値)を書き込むアドレスに格納されている第2サム値とが、一致(整合)するか否かによって、前回の更新データの書き込み処理が中断したか否かを判別することができる。
On the other hand, if the process of writing a series of update data proceeds without interruption, the entire sum value is written at the beginning of the writing process, and the entire sum value is written at the end of the writing process. And the total sum value (interruption discriminant value) of the last side coincide (match).
Therefore, the first sum value stored in the address to which the entire sum value (interruption determination value) is written on the first side in the writing process and the address to which the entire sum value (interruption determination value) is written on the last side in the writing process. Whether or not the previous update data writing process is interrupted can be determined based on whether or not the second sum value matches (matches).

そこで、ステップS104では、ステップS103で読み出した第1サム値と第2サム値とを比較(照合)し、第1サム値と第2サム値とが不一致(不整合)である場合には、前回の更新データの書き込み処理において、書き込みの中断が発生したものと判断し、中断による更新データの異常(破損)に対処するためのステップS105に進む。
一方、第1サム値と第2サム値とが一致(整合)している場合には、前回の更新データの書き込み処理において、最後の更新データの書き込みまで中断することなく、一連の更新データの書き込みが最初から最後まで正常に行われたものと判断する。この場合、書き込みの中断による更新データの破損(訂正不能な異常)はなく、ステップS105の処理は不要であるので、ステップS105を迂回してステップS106へ進む。
Therefore, in step S104, the first sum value and the second sum value read in step S103 are compared (collated), and if the first sum value and the second sum value do not match (mismatch), In the last update data write process, it is determined that the write interruption has occurred, and the process proceeds to step S105 to deal with an abnormality (damage) of the update data due to the interruption.
On the other hand, when the first sum value and the second sum value match (match), in the previous update data write process, the series of update data is not interrupted until the last update data is written. Judge that writing was performed normally from the beginning to the end. In this case, there is no damage (uncorrectable abnormality) of the update data due to the interruption of writing, and the process of step S105 is unnecessary, so the process bypasses step S105 and proceeds to step S106.

更新データに異常(破損)がある状態で、誤り検出訂正を伴う更新データの読み出しを行うと、更新データの誤り(訂正不能な誤りである2ビットエラー)が検出されることで、後述するようにマイコン2のリセットが実施される。ここで、ステップS102〜ステップS106の各ステップの処理を行わない場合、リセット解除後に更新データの異常が解消されないまま、再度誤り検出訂正が行われることで、リセット、誤り検出を繰り返し、マイコン2による制御動作が開始されないことになってしまう。
そこで、誤り検出に基づくリセットが行われないように、ステップS105では、全更新データエリアに対して、固定値である更新データ、及び、書き込み処理において算出されるエラー訂正コードECCを上書きし、異常となっている更新データを含む全更新データを予め決められている固定値に書き換え、書き込み処理において算出される更新された全エラー訂正コードECCに書き換えると共に、固定値である書き換え後の更新データに見合う全体サム値を、書き込みの最初と最後で更新データエリアに書き込むようにする。
If update data with error detection and correction is read in a state where there is an abnormality (damage) in the update data, an update data error (a 2-bit error that cannot be corrected) is detected, which will be described later. Then, the microcomputer 2 is reset. Here, when the processing of each step from step S102 to step S106 is not performed, the reset and error detection are repeated by performing the error detection and correction again without resolving the abnormality of the update data after canceling the reset. The control operation will not be started.
Therefore, in order to prevent reset based on error detection, in step S105, the update data which is a fixed value and the error correction code ECC calculated in the writing process are overwritten in all the update data areas, and an abnormality is detected. All the update data including the update data is rewritten to a predetermined fixed value, rewritten to the updated all error correction code ECC calculated in the writing process, and the rewritten update data is a fixed value. An appropriate total sum value is written to the update data area at the beginning and end of writing.

図5(B)は、更新データエリアの更新データ及びエラー訂正コードECCを固定値で上書きした後の状態を示し、最初の更新データから書き込みが中断した時点での更新データまで、更に、中断した以降の新たな書き込み(上書き)が行われなかった更新データの全てが、固定値に書き換えられており、更に、全エラー訂正コードECCが、更新データに見合う書き込み処理において算出されたエラー訂正コードECCに書き換えられている。
更新データの固定値は、予め不揮発性メモリ22に保存されている。
尚、誤り検出において誤りが検出されることがない更新データとエラー訂正コードECCとの組み合わせとして、更新データ及びエラー訂正コードECCの固定値を予め不揮発性メモリ22に保存させておくこともできる。
FIG. 5B shows a state after the update data and the error correction code ECC are overwritten with fixed values in the update data area, and further interrupted from the first update data to the update data at the time when writing was interrupted. All of the update data that has not been newly written (overwritten) thereafter has been rewritten to a fixed value, and all error correction codes ECC are error correction codes ECC calculated in the writing process corresponding to the update data. Has been rewritten.
The fixed value of the update data is stored in the nonvolatile memory 22 in advance.
Note that the fixed value of the update data and the error correction code ECC can be stored in the nonvolatile memory 22 in advance as a combination of update data and error correction code ECC in which no error is detected in error detection.

ここで、更新データが学習値である場合には、前記固定値を、学習値の初期値(デフォルト値)とすることができる。また、固定値を、更新データのアドレス毎に持っていて、各アドレスに対応する固定値に上書きすることができる。
また、中断判別値として、全体サム値を用いることができる他、例えば、ランダムな値や書き込み処理毎に順繰りに更新される値を中断判別値として設定し、これを、更新データの書き込み過程における最初と最後で書き込むことができる。
Here, when the update data is a learning value, the fixed value can be an initial value (default value) of the learning value. Further, a fixed value is held for each address of the update data, and the fixed value corresponding to each address can be overwritten.
In addition, the entire sum value can be used as the interruption determination value. For example, a random value or a value that is sequentially updated for each writing process is set as the interruption determination value, and this is set in the update data writing process. Can be written at the beginning and end.

また、書き込み過程において時系列的に書き込む複数の中断判別値を、既定の相関を満たす相互に異なる値とすることができ、この場合、複数の中断判別値が規定の相関を満たしていれば、中断判別値が整合し、中断がなかったことを示すことになる。ここで、規定の相関を満たす状態とは、例えば、比や偏差が既定値である場合などである。
更に、例えば、更新データの書き込みを行う際に、書き込む予定の更新データの全体サム値を演算して、不揮発性メモリ22に書き込む一方、起動時に更新データエリアの全更新データを読み出して全体サム値を演算し、不揮発性メモリ22に書き込まれていた全体サム値と、読み出した更新データに基づき演算した全体サム値との整合性(一致、不一致)を判断することで、書き込みの中断があったか否かを判断させることができる。
In addition, a plurality of interruption determination values to be written in time series in the writing process can be different values satisfying a predetermined correlation. In this case, if a plurality of interruption determination values satisfy a prescribed correlation, The interruption determination values are consistent, indicating that there was no interruption. Here, the state satisfying the specified correlation is, for example, a case where the ratio or the deviation is a predetermined value.
Further, for example, when writing update data, the total sum value of the update data to be written is calculated and written to the non-volatile memory 22, while all the update data in the update data area is read at startup and the total sum value is read. Whether or not the writing is interrupted by determining the consistency (match or mismatch) between the total sum value written in the nonvolatile memory 22 and the total sum value calculated based on the read update data. Can be determined.

上記のようにして、誤りが発生している更新データを含めて、全ての更新データ及びエラー訂正コードECCを予め定めた固定値に書き換えれば、ステップS107以降に進んで誤り検出が実施されるときに、更新データの異常発生(訂正不能な誤り)が検出され、リセットされることが避けられ、最終的にステップS112に進んで、車両用制御装置1による制御を開始させることができる。   When all the update data and the error correction code ECC including the update data in which an error has occurred are rewritten to a predetermined fixed value as described above, the process proceeds to step S107 and thereafter error detection is performed. In addition, the occurrence of an abnormality in the update data (an error that cannot be corrected) is detected and reset is avoided, and finally the process proceeds to step S112, where the control by the vehicle control device 1 can be started.

ステップS106では、不揮発性メモリ22における誤り検出訂正の中止を解除し、ステップS107以降の更新データの読み出しを開始させる。
ステップS107では、更新データ及びそのエラー訂正コードECCを、不揮発性メモリ22の更新データエリアから読み出す。ここで、ステップS105で全更新データを固定値に書き換え、更新された全エラー訂正コードECCに書き換えた後、ステップS107に進んだ場合には、固定値としての更新データ及びエラー訂正コードECCを読み出すことになる。
In step S106, the cancellation of error detection and correction in the nonvolatile memory 22 is canceled, and reading of update data after step S107 is started.
In step S107, the update data and its error correction code ECC are read from the update data area of the nonvolatile memory 22. Here, in step S105, all update data is rewritten to a fixed value, and after rewriting to the updated all error correction code ECC, when the process proceeds to step S107, the update data and error correction code ECC as fixed values are read. It will be.

ステップS108では、更新データとそのエラー訂正コードECCとの照合を行う。
そして、照合結果に異常がなければ、ステップS111へ進んで、全更新データの読み出しが完了したか否かを判定し、全更新データの読み出しが完了していない場合には、ステップS107に戻って、次の更新データ及びそのエラー訂正コードECCの読み出しを行い、全更新データの読み出しが完了すると、ステップS112に進んでその他の処理に移行する。
In step S108, the update data and its error correction code ECC are collated.
If there is no abnormality in the collation result, the process proceeds to step S111 to determine whether reading of all update data is completed. If reading of all update data is not completed, the process returns to step S107. Then, the next update data and its error correction code ECC are read, and when reading of all the update data is completed, the process proceeds to step S112 and proceeds to other processing.

一方、ステップS108での照合結果に異常があれば(読み出した更新データに誤りがあれば)、ステップS109へ進む。
ステップS109では、更新データの誤りが訂正可能なビット誤りであるか否か、一例として更新データの異常が1ビット誤りであるか否かを判断する。
On the other hand, if there is an abnormality in the collation result in step S108 (if there is an error in the read update data), the process proceeds to step S109.
In step S109, it is determined whether or not the update data error is a correctable bit error. For example, it is determined whether or not the update data error is a 1-bit error.

ここで、更新データの異常が1ビット誤りであれば、訂正可能であるので、ステップS110へ進んで更新データの訂正を実施し、ステップS111へ進む。
また、2ビット以上の誤りが発生している場合は訂正不能と判断し、ステップS113へ進み、エラー情報として、例えば誤りが生じている更新データのアドレスなどを、不揮発性メモリ22に保存する。
Here, if the abnormality of the update data is a 1-bit error, it can be corrected. Therefore, the process proceeds to step S110, the update data is corrected, and the process proceeds to step S111.
If an error of 2 bits or more has occurred, it is determined that correction is not possible, and the process proceeds to step S113, where, for example, the address of update data in which an error has occurred is stored in the nonvolatile memory 22 as error information.

次いで、ステップS114では、マイコン2のシャットダウン処理(シャットダウンするための命令実施など)を行い、更に、ステップS115では、プログラムラン信号P−RUNの出力を停止する。
外部監視回路として機能する電源回路3は、マイコン2から出力されるプログラムラン信号P−RUNを監視しており、プログラムラン信号P−RUNが途絶えると、マイコン2をリセットさせるリセット信号を出力する。
Next, in step S114, the microcomputer 2 is shut down (execution of an instruction for shutting down), and in step S115, the output of the program run signal P-RUN is stopped.
The power supply circuit 3 functioning as an external monitoring circuit monitors the program run signal P-RUN output from the microcomputer 2 and outputs a reset signal for resetting the microcomputer 2 when the program run signal P-RUN is interrupted.

リセット信号を入力したマイコン2は、ステップS116でリセット処理を実行して再起動することで、再度ステップS101の初期化処理を実施した後、ステップS102に進む。
前述のように、更新データの書き込み途中での電源遮断などによって更新データの書き込みが中断した場合には、再起動時に、誤り検出に先立ち、第1サム値及び第2サム値に基づき中断の有無が判断され、中断が発生したと判断されると、更新データエリアの更新データが固定値に書き換えられ、更新されたエラー訂正コードECCに書き換えられる。
The microcomputer 2 that has input the reset signal executes the reset process in step S116 and restarts, thereby performing the initialization process in step S101 again, and then proceeds to step S102.
As described above, if update data writing is interrupted due to power interruption or the like during update data writing, the presence or absence of interruption based on the first sum value and the second sum value at the time of restart prior to error detection If it is determined that the interruption has occurred, the update data in the update data area is rewritten to a fixed value and rewritten to the updated error correction code ECC.

これにより、書き込みの中断によって更新データに異常が生じていても、そのまま誤り検出が行われることがなく、誤りが検出されない状態に更新データを書き換えてから、誤り検出に進むことになるから、更新データの書き込み途中での電源遮断によって、誤り検出とリセットとが繰り返されるようになることを未然に抑制できる。
尚、ステップS105で更新データを固定値に書き換えている途中で、電源遮断が発生した場合にも、最初に書き込む全体サム値(中断判別値)と、最後に書き込む全体サム値(中断判別値)とが異なるようになることで、起動時に書き込みの中断が発生したことが判断され、再度、更新データエリアの更新データを固定値に書き換え、更新されたエラー訂正コードECCに書き換える処理が実施されることになる。従って、ステップS105での書き込み処理の中断に対しても、誤り検出とリセットとが繰り返されるようになることを抑制できる。
As a result, even if there is an abnormality in the update data due to the interruption of writing, error detection is not performed as it is, and update data is rewritten in a state where no error is detected, and then error detection is performed. It is possible to prevent the error detection and the reset from being repeated due to the power interruption during the data writing.
It should be noted that even when the power supply is interrupted while the update data is being rewritten to a fixed value in step S105, the total sum value written first (interrupt discriminant value) and the last sum value written last (interrupt discriminant value) Thus, it is determined that the writing has been interrupted at the time of activation, and the update data in the update data area is rewritten to a fixed value and the process of rewriting the updated error correction code ECC is performed again. It will be. Therefore, it is possible to prevent the error detection and reset from being repeated even when the writing process is interrupted in step S105.

ところで、図4のフローチャートに示す処理では、更新データエリア全体について、書き込みの中断があったか否かを判断し、中断があった場合には、更新データエリア全体を固定値で書き換えるようにしたが、更新データエリアを複数ブロックに分割し、ブロック毎に書き込みが中断したか否かを判断し、書き込み中断が発生したブロックのみを固定値で書き換えることができる。
上記のように、更新データエリアを分割したブロック単位で、中断の有無及び固定値による書き換えを行えば、誤りが検出されることがない正常な値が固定値に書き換えられてしまうことを抑制でき、更新データが例えば学習値であれば、学習の進行が損なわれることを抑制できる。
また、図4のフローチャートに示す処理では、ステップS114にてシャットダウン処理を実施した後に、プログラムラン信号P−RUNの停止により外部監視回路がリセット信号を出力するか、又は、マイコン2自身がリセット信号を出力することができる。
By the way, in the process shown in the flowchart of FIG. 4, it is determined whether or not writing has been interrupted for the entire update data area. If there is an interrupt, the entire update data area is rewritten with a fixed value. It is possible to divide the update data area into a plurality of blocks, determine whether or not the writing is interrupted for each block, and rewrite only the block in which the writing interruption has occurred with a fixed value.
As described above, if rewriting is performed with the presence or absence of interruption and a fixed value in units of blocks obtained by dividing the update data area, it is possible to suppress rewriting of a normal value with no error detected to a fixed value. If the update data is, for example, a learning value, it is possible to prevent the progress of learning from being impaired.
In the process shown in the flowchart of FIG. 4, after the shutdown process is performed in step S114, the external monitoring circuit outputs a reset signal due to the stop of the program run signal P-RUN, or the microcomputer 2 itself resets the reset signal. Can be output.

図6のフローチャートは、更新データエリアを複数に分割したブロック単位で、書き込みの中断の有無及び固定値による書き換えを行うようにした、マイコン2の処理の流れを示す。
図6のフローチャートにおいて、図4のフローチャートと同じ処理を行うステップについては、同じステップ番号を付してあり、図4のフローチャートに対して処理内容が異なるステップである、ステップS103A,104A,105A,105Bについて詳細に説明し、他のステップについての説明を省略する。
The flowchart of FIG. 6 shows the flow of processing of the microcomputer 2 in which rewriting is performed with or without writing interruption and a fixed value in units of blocks obtained by dividing the update data area into a plurality of blocks.
In the flowchart of FIG. 6, steps that perform the same processes as those in the flowchart of FIG. 4 are given the same step numbers, and steps S103A, 104A, 105A, and the steps that are different from the flowchart of FIG. 105B will be described in detail, and descriptions of other steps will be omitted.

ステップS103Aでは、更新データエリアを複数の分割したブロック毎に、更新データの書き込みが中断したか否かを判別するための中断判別値である第1サム値及び第2サム値を読み出す。
更新データを更新データエリアに書き込む場合、ブロック毎に書き込みが決定した更新データの全体サム値を演算し、各ブロックの最初の更新データの書き込み時及び最後の更新データの書き込み時に、全体サム値を書き込むようにしてある。
そして、ステップS103Aでは、対象とするブロックにおいて最初の更新データと共に書き込んだ全体サム値を第1サム値として読み出し、最後の更新データと共に書き込んだ全体サム値を第2サム値として読み出す。
In step S103A, the first sum value and the second sum value, which are interruption determination values for determining whether or not update data writing has been interrupted, are read for each of a plurality of blocks into which the update data area is divided.
When writing update data to the update data area, the total sum value of the update data determined to be written for each block is calculated, and the total sum value is calculated when writing the first update data and the last update data of each block. I write it.
In step S103A, the whole sum value written together with the first update data in the target block is read as the first sum value, and the whole sum value written together with the last update data is read out as the second sum value.

次のステップS104Aでは、ステップS103Aで読み出した、ブロック毎の第1サム値と第2サム値とを比較(照合)し、第1サム値と第2サム値とが不一致(不整合)である場合には、当該ブロックにおける前回の更新データの書き込み処理において、書き込みの中断が発生したものと判断し、ステップS105Aに進む。
ステップS105Aでは、書き込みの中断が発生したと判断されたブロックの更新データを固定値に書き換え、書き込み処理中に算出し更新されるエラー訂正コードECCに書き換える処理を実施する。
In the next step S104A, the first sum value and the second sum value for each block read in step S103A are compared (collated), and the first sum value and the second sum value do not match (inconsistency). In this case, it is determined that writing interruption has occurred in the previous update data writing process in the block, and the process proceeds to step S105A.
In step S105A, the update data of the block for which it is determined that the write interruption has occurred is rewritten to a fixed value, and the error correction code ECC that is calculated and updated during the write process is rewritten.

一方、第1サム値と第2サム値とが一致(整合)している場合には、当該ブロックにおける前回の更新データの書き込み処理において、最初の更新データの書き込みから最後の更新データの書き込みまで中断することなく正常に行われたものと判断する。この場合、ステップS105Aの処理は不要であるので、ステップS105Aを迂回してステップS105Bへ進む。
ステップS105Bでは、更新データエリアを複数に分割した全てのブロックについて、書き込みの中断の有無を判断したか否かを確認し、中断の有無を判断していないブロックが残っている場合には、ステップS103Aに戻る。
On the other hand, if the first sum value and the second sum value match (match), in the previous update data write processing in the block, from the first update data write to the last update data write Judge that it was done normally without interruption. In this case, since the process of step S105A is unnecessary, the process bypasses step S105A and proceeds to step S105B.
In step S105B, it is checked whether or not writing has been interrupted for all blocks obtained by dividing the update data area into a plurality of blocks. Return to S103A.

そして、ステップS103Aでは、書き込みの中断の有無を判断していないブロックについて、第1サム値及び第2サム値の読み出しを行い、その後ステップS104Aに進んで、第1サム値と第2サム値との整合判断を行って、当該ブロックでの更新データの書き込みにおいて電源遮断などによる中断が生じたか否かを判断する。
ステップS105Bで、更新データエリアを複数に分割する全てのブロックについて、中断の有無を判断したと判断すると、ステップS106へ進む。ステップS106では、ステップS102における更新データの誤り検出訂正の中止を解除し、ステップS107以降の誤り検出処理を伴う更新データの読み出しを開始させる。
Then, in step S103A, the first sum value and the second sum value are read out for the blocks for which it has not been determined whether or not the writing is interrupted. Then, the process proceeds to step S104A, where the first sum value and the second sum value are determined. Thus, it is determined whether or not an interruption due to power interruption or the like has occurred in writing update data in the block.
If it is determined in step S105B that all blocks that divide the update data area are determined to be interrupted, the process proceeds to step S106. In step S106, the cancellation of the error detection / correction of the update data in step S102 is canceled, and the update data accompanying the error detection process in step S107 and subsequent steps is started.

上記のように、更新データエリアを複数のブロックに分割し、ブロック毎に書き込み中断の有無を判断させるようにすれば、書き込みが中断することがなく、更新データを正常に書き込むことができたものと推定できるブロックについては、固定値への書き換えが行われない。
従って、書き込みの中断による更新データの異常によって、リセット、誤り検出が繰り返されるようになることを抑制しつつ、正常に書き込まれた更新データが無用に固定値に書き換えられてしまうことを抑制でき、例えば、更新データが学習値であれば、学習のやり直しが無用に行われることを抑制できる。
As described above, if the update data area is divided into a plurality of blocks and the presence or absence of write interruption is determined for each block, the update data can be written normally without interruption. Are not rewritten to fixed values.
Therefore, it is possible to prevent the update data that has been normally written from being rewritten unnecessarily to a fixed value while suppressing the reset and error detection from being repeated due to an abnormality in the update data due to the interruption of writing, For example, if the update data is a learning value, it is possible to prevent the learning from being redone.

ところで、更新データの不揮発性メモリ22に対する書き込みにおいて、同一の更新データを2つのエリアにそれぞれ書き込むミラーリングが行われる場合、換言すれば、同じ構成のデータファイルが複製される場合、一方のエリアへの書き込みにおいて中断(電源遮断)が発生して更新データの誤りが発生しても、同じ構造の他方のエリアへは中断なく更新データを書き込むことができている場合ある。
そして、この場合、誤りが発生した更新データの正しい値は、他方のエリアに保存されていることになるから、書き込みの中断が発生したエリアの更新データを、他の更新データエリアに保存されている値に書き換えることができる。
By the way, when writing update data to the non-volatile memory 22, mirroring for writing the same update data to two areas is performed, in other words, when a data file having the same configuration is duplicated, Even when an interruption (power interruption) occurs in writing and an error occurs in the update data, the update data can be written to the other area of the same structure without interruption.
In this case, since the correct value of the update data in which the error has occurred is stored in the other area, the update data of the area in which the write interruption has occurred is stored in the other update data area. Can be rewritten to a certain value.

係るミラーリングにおける書き換え処理の例を、図7のフローチャートに従って説明する。
図7のフローチャートにおいて、図4のフローチャートと同じ処理を行うステップについては、同じステップ番号を付してあり、図4のフローチャートに対して処理内容が異なるステップであるステップS103B、ステップS104B、ステップS105C及びステップS105Dについて詳細に説明し、他のステップについての説明を省略する。
An example of the rewriting process in the mirroring will be described with reference to the flowchart of FIG.
In the flowchart of FIG. 7, steps that perform the same processing as in the flowchart of FIG. 4 are given the same step numbers, and steps S103B, S104B, and S105C, which are steps different from those in the flowchart of FIG. Step S105D will be described in detail, and description of other steps will be omitted.

ステップS103Bでは、ミラーリングにおける一方のエリア(面)について、書き込み過程の最初に書き込まれる更新データと共に格納されている全体サム値(中断判別値)を第1サム値として読み出し、更に、書き込み過程の最後に書き込まれる更新データと共に格納されている全体サム値(中断判別値)を第2サム値として読み出す。
そして、ステップS104Bでは、ステップS103Bで読み出した第1サム値と第2サム値とを比較(照合)し、第1サム値と第2サム値とが不一致(不整合)である場合には、前回の更新データの書き込み処理において、電源遮断による書き込みの中断が発生したものと判断し、中断による更新データの異常に対処するためのステップS105Cに進む。
In step S103B, for one area (surface) in mirroring, the entire sum value (interruption determination value) stored together with the update data written at the beginning of the writing process is read as the first sum value, and further, at the end of the writing process The total sum value (interruption determination value) stored together with the update data written to is read as the second sum value.
In step S104B, the first sum value and the second sum value read in step S103B are compared (collated), and if the first sum value and the second sum value do not match (mismatch), In the previous update data writing process, it is determined that the interruption of the writing due to the power interruption has occurred, and the process proceeds to step S105C for coping with the abnormal update data due to the interruption.

一方、第1サム値と第2サム値とが一致(整合)している場合には、前回の更新データの書き込み処理において、当該エリア(面)については最後の更新データの書き込みまで中断することなく正常に行われたものと判断する。この場合、ステップS105Cの処理は不要であるので、ステップS105Cを迂回してステップS105Dへ進む。
ステップS105Cでは、中断の発生が検出されたエリアの全更新データを、他方の同じ構造のエリア(複製エリア)に格納されている複製データに書き換える処理を行う。尚、書き換え処理の過程で算出されるエラー訂正コードECCも書き換えられる。
On the other hand, if the first sum value and the second sum value match (match), in the previous update data writing process, the area (surface) is interrupted until the last update data is written. Judge that it was done normally. In this case, since the process of step S105C is unnecessary, the process proceeds to step S105D bypassing step S105C.
In step S105C, a process of rewriting all the update data in the area where the occurrence of the interruption is detected is duplicated data stored in the other area (duplicate area) having the same structure. The error correction code ECC calculated during the rewriting process is also rewritten.

ステップS105Dでは、ミラーリングの各エリアについて書き込み中断の有無を判断したか否かを判別し、書き込み中断の判断が終っていないエリアがあれば、ステップS103Bに戻り、中断の判断が終っていないエリアから、第1サム値及び第2サム値を読み出す。
ここで、ステップS105Cに進む前に、ミラーリングの各面それぞれについて書き込みの中断が生じたか否かを判別し、一方で中断が発生し、他方で中断が発生していない場合に、ステップS105Cに進んで、中断が発生したエリアの更新データを、中断が発生しなかったエリアの更新データで上書きするようにできる。
In step S105D, it is determined whether or not write interruption has been determined for each mirroring area. If there is an area where the write interruption has not been determined, the process returns to step S103B, and the interruption determination has not ended. The first sum value and the second sum value are read out.
Here, before proceeding to step S105C, it is determined whether or not writing has been interrupted for each of the mirroring surfaces. If the interrupt has occurred on the one hand and no interrupt has occurred on the other, the process proceeds to step S105C. Thus, the update data of the area where the interruption has occurred can be overwritten with the update data of the area where the interruption has not occurred.

また、ミラーリングの各面の双方で中断が発生した場合には、双方のエリアの更新データを固定値に書き換えることができる。
更に、ミラーリングの各面それぞれを複数ブロックに分割して、ブロック毎に中断判別値(全体サム値)を格納させ、ブロック単位で中断の有無を判断し、書き込みの中断が発生したブロックについては、他方の面の対応するブロックの更新データに上書きさせることができる。
In addition, when interruption occurs on both sides of the mirroring, the update data of both areas can be rewritten to a fixed value.
Furthermore, each surface of the mirroring is divided into a plurality of blocks, an interruption determination value (overall sum value) is stored for each block, the presence / absence of interruption is determined in units of blocks, and the block in which writing interruption has occurred The update data of the corresponding block on the other side can be overwritten.

図7のフローチャートに示す処理では、ミラーリングによって更新データが複製される場合に、書き込み中断によって更新データの誤りが発生しても、正しい値に上書きすることが可能となる。
従って、書き込み中断によって更新データに異常が生じも、起動時の誤り検出によってリセットされてしまうことを未然に回避して、リセット、誤り検出が繰り返されるようになることを抑制できると共に、例えば更新データが学習データであれば、学習のやり直しを避けることができ、それまでの学習結果をそのまま反映した制御を行える。
In the process shown in the flowchart of FIG. 7, when update data is replicated by mirroring, even if an update data error occurs due to write interruption, it is possible to overwrite the correct value.
Therefore, even if the update data becomes abnormal due to the interruption of writing, it is possible to prevent the reset and error detection from being repeated by preventing the reset due to the error detection at the start. If it is learning data, it is possible to avoid re-learning and to perform control reflecting the learning results up to that point.

尚、更新データの書き込み過程の最初及び最後に限定せず、更新データを1つ或いは複数書き込む毎に中断判別値を不揮発性メモリ22に書き込ませることができ、この場合、中断判別値が整合する状態と、不整合となる状態との切り替わりタイミングから、書き込み中断(電源遮断)の発生位置、換言すれば、電源遮断によって破損した可能性がある更新データを、中断判別値の書き込み周期を最小単位として特定することが可能である。
そして、この場合、書き込みの中断位置を特定できるので、少なくとも中断位置に該当する1乃至複数の更新データ(破損の可能性が見込まれる更新データ)を固定値に書き換え、そのデータに対応する更新されたエラー訂正コードECCに書き換える一方、他の更新データについてはそのまま保持させることができる。
The interruption determination value can be written to the nonvolatile memory 22 every time one or a plurality of update data is written, without being limited to the beginning and the end of the update data writing process. In this case, the interruption determination value is consistent. From the switching timing between the status and the inconsistent status, the writing interruption (power cutoff) occurrence position, in other words, the update data that may have been damaged by the power shutdown, the interruption discriminating value writing cycle is the smallest unit Can be specified.
In this case, since the interruption position of writing can be specified, at least one or more update data (update data that is likely to be damaged) corresponding to the interruption position is rewritten to a fixed value, and the update corresponding to the data is performed. While the error correction code ECC is rewritten, other update data can be retained as it is.

ここで、上記実施形態から把握し得る請求項以外の技術的思想について、以下に効果と共に記載する。
(イ)前記不揮発性メモリに対する更新データの書き込み過程の少なくとも最初と最後とで、中断判別値を書き込む、請求項2又は3記載の車両用制御装置。
上記発明によると、最初の中断判別値と最後の中断判別値とが整合しない場合、書き込み途中のいずれかで中断が生じたものと判断できる。
Here, technical ideas other than the claims that can be grasped from the above embodiment will be described together with effects.
(A) The vehicle control device according to claim 2 or 3, wherein the interruption determination value is written at least at the beginning and at the end of the update data writing process to the nonvolatile memory.
According to the above invention, when the first interruption determination value and the last interruption determination value do not match, it can be determined that an interruption has occurred in the middle of writing.

(ロ)前記中断判別値が、書き込みが決定された更新データの全体サム値である、請求項1〜3のいずれか1つに記載の車両用制御装置。
上記発明によると、書き込みが決定された更新データの全体サム値が、更新データの書き込み過程で複数書き込まれ、書き込みが中断される前に書き込まれた全体サム値は、そのときの書き込み予定の更新データに対応することになるが、中断後は全体サム値が書き換えられないので、中断後を書き込みタイミングとする全体サム値は更新前のデータに対応することになり、係る全体サム値の不整合によって中断の有無を判断できる。
(B) The vehicle control device according to any one of claims 1 to 3, wherein the interruption determination value is an entire sum value of update data for which writing has been determined.
According to the above invention, a plurality of total sum values of the update data determined to be written are written in the update data writing process, and the total sum value written before the writing is interrupted is the update of the write schedule at that time. Since the total sum value is not rewritten after the interruption, the whole sum value with the writing timing after the interruption corresponds to the data before the update, and the whole sum value is inconsistent. The presence or absence of interruption can be determined.

(ハ)前記所定値が、予め決定された固定値である、請求項1〜3のいずれか1つに記載の車両用制御装置。
上記発明によると、書き込み中断によって破損した更新データを、固定値に書き換えることで、誤り検出を行っても正常と判断されるようにする。
(C) The vehicle control device according to any one of claims 1 to 3, wherein the predetermined value is a predetermined fixed value.
According to the above-described invention, the update data damaged by the interruption of writing is rewritten to a fixed value so that it is determined to be normal even if error detection is performed.

(ニ)更新データの書き込みにおいて複製データが書き込まれ、
前記所定値が、更新データの複製データである、請求項1〜3のいずれか1つに記載の車両用制御装置。
上記発明によると、書き込み中断によって更新データが破損しても、別途格納されている複製データに書き換えることで、誤り検出を行っても正常と判断されるようにし、かつ、更新データとして最新の値に復活させることができる。
(D) When the update data is written, duplicate data is written,
The vehicle control device according to claim 1, wherein the predetermined value is duplicate data of update data.
According to the above invention, even if the update data is damaged due to the interruption of writing, it can be determined to be normal even if error detection is performed by rewriting the copy data separately stored, and the latest value as the update data. Can be revived.

(ホ)前記更新データが、エラー訂正コードと共に前記不揮発性メモリに書き込まれ、
更新データを所定値に書き換えるときに、書き込み処理において算出された更新されたエラー訂正コードに書き換える、請求項1〜3のいずれか1つに記載の車両用制御装置。
上記発明によると、更新データの書き込み処理において算出された更新されたエラー訂正コードに書き換えることで、誤り検出で誤りの発生が検出されることを避ける。
(E) the update data is written to the nonvolatile memory together with an error correction code;
The vehicle control device according to claim 1, wherein when the update data is rewritten to a predetermined value, the updated error correction code calculated in the writing process is rewritten.
According to the above invention, the occurrence of an error is prevented from being detected by error detection by rewriting the updated error correction code calculated in the update data writing process.

1…車両用制御装置、2…マイコン、3…電源回路、4…I/F回路、5…電源スイッチ、6…車両電源、7…セルフシャットオフリレー、21…CPU、22…不揮発性メモリ   DESCRIPTION OF SYMBOLS 1 ... Control apparatus for vehicles, 2 ... Microcomputer, 3 ... Power supply circuit, 4 ... I / F circuit, 5 ... Power switch, 6 ... Vehicle power supply, 7 ... Self shut-off relay, 21 ... CPU, 22 ... Non-volatile memory

Claims (3)

電気的に消去及び書き込みが可能な不揮発性メモリを備え、起動時に、前記不揮発性メモリの更新データの誤り検出を行い、誤りを検出した場合にリセットを実施する車両用制御装置において、
前記不揮発性メモリに対する更新データの書き込みにおいて中断があった場合に、起動時の前記誤り検出に先立って前記更新データを所定値に書き換え、その後に前記誤り検出を行う、車両用制御装置。
In a vehicle control device that includes a nonvolatile memory that is electrically erasable and writable, performs error detection of update data in the nonvolatile memory at startup, and performs reset when an error is detected,
A vehicle control device that rewrites the update data to a predetermined value prior to the error detection at the time of activation and then performs the error detection when there is an interruption in the writing of the update data to the nonvolatile memory.
前記不揮発性メモリに対して更新データを書き込む過程において、複数の中断判別値を書き込み、
前記複数の中断判別値が整合しない場合に、起動時の前記誤り検出に先立って前記更新データを所定値に書き換える、請求項1記載の車両用制御装置。
In the process of writing update data to the nonvolatile memory, a plurality of interruption determination values are written,
The vehicle control device according to claim 1, wherein, when the plurality of interruption determination values do not match, the update data is rewritten to a predetermined value prior to the error detection at the time of activation.
前記不揮発性メモリにおける更新データの格納エリアが複数のブロックに分割され、更新データを書き込む過程において前記複数のブロック毎に複数の中断判別値を書き込み、前記複数のブロック毎に前記更新データの前記所定値への書き換えを行う、請求項2記載の車両用制御装置。   The update data storage area in the nonvolatile memory is divided into a plurality of blocks, and in the process of writing the update data, a plurality of interruption determination values are written for each of the plurality of blocks, and the predetermined number of the update data is written for each of the plurality of blocks. The vehicle control device according to claim 2, wherein the value is rewritten.
JP2012177994A 2012-08-10 2012-08-10 Vehicle control device Expired - Fee Related JP5872982B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012177994A JP5872982B2 (en) 2012-08-10 2012-08-10 Vehicle control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012177994A JP5872982B2 (en) 2012-08-10 2012-08-10 Vehicle control device

Publications (2)

Publication Number Publication Date
JP2014035729A JP2014035729A (en) 2014-02-24
JP5872982B2 true JP5872982B2 (en) 2016-03-01

Family

ID=50284673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012177994A Expired - Fee Related JP5872982B2 (en) 2012-08-10 2012-08-10 Vehicle control device

Country Status (1)

Country Link
JP (1) JP5872982B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6304007B2 (en) 2014-12-09 2018-04-04 株式会社デンソー Microcontroller
JP6512065B2 (en) * 2015-10-29 2019-05-15 株式会社デンソー Electronic control unit

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001084002A (en) * 1999-09-10 2001-03-30 Aisin Seiki Co Ltd Control device
JP2001331382A (en) * 2000-05-19 2001-11-30 Matsushita Electric Ind Co Ltd Method and device for managing nonvolatile memory
JP2004341817A (en) * 2003-05-15 2004-12-02 Matsushita Electric Ind Co Ltd Information processing method and program, and navigation system
JP4419752B2 (en) * 2004-08-25 2010-02-24 株式会社デンソー Data storage
JP2006079229A (en) * 2004-09-08 2006-03-23 Hanshin Electric Co Ltd Method and device for maintaining data integrity for flash memory microcomputer
WO2009078145A1 (en) * 2007-12-14 2009-06-25 Kabushiki Kaisha Toshiba Control device

Also Published As

Publication number Publication date
JP2014035729A (en) 2014-02-24

Similar Documents

Publication Publication Date Title
JP2014035730A (en) Vehicle control device
JP4345860B2 (en) Vehicle memory management device
JP4227149B2 (en) Information storage method for electronic control unit
TWI490876B (en) Method and apparatus of system boot and pilot process
JP2009120054A (en) Vehicular memory management device
JP5872982B2 (en) Vehicle control device
JP6708596B2 (en) Electronic control device and control program verification method
US11314634B2 (en) Electronic control unit and data protection method therefor
JP4483876B2 (en) Storage device control method in duplex system
JP2008196441A (en) Control device for vehicle
JP2009289049A (en) Memory control device
JP7029366B2 (en) Electronic control device for automobiles
JP4708088B2 (en) Failure recovery method and microcomputer
JP7024582B2 (en) In-vehicle control device
US20080270830A1 (en) Data Processing System and Method for Operating a Data Processing System
JP7007223B2 (en) Control device and abnormality detection method
JP6011687B1 (en) Storage device and control method thereof
JP6363044B2 (en) Control device
JP2013065261A (en) Memory management device
JP5095241B2 (en) Data processing apparatus and program starting method
JP2019045952A (en) Vehicle information memory device
JP6699591B2 (en) Engine controller
JP3451489B2 (en) RAM content destruction handling method and programmable controller
JP2009083777A (en) Vehicle control device and program
JP6568826B2 (en) Electronic control unit

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20140528

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151130

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160114

R150 Certificate of patent or registration of utility model

Ref document number: 5872982

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees