JP2014225210A - Electronic control device for vehicle - Google Patents

Electronic control device for vehicle Download PDF

Info

Publication number
JP2014225210A
JP2014225210A JP2013105241A JP2013105241A JP2014225210A JP 2014225210 A JP2014225210 A JP 2014225210A JP 2013105241 A JP2013105241 A JP 2013105241A JP 2013105241 A JP2013105241 A JP 2013105241A JP 2014225210 A JP2014225210 A JP 2014225210A
Authority
JP
Japan
Prior art keywords
data
nonvolatile memory
control means
power supply
time
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.)
Pending
Application number
JP2013105241A
Other languages
Japanese (ja)
Inventor
健 谷本
Takeshi Tanimoto
健 谷本
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2013105241A priority Critical patent/JP2014225210A/en
Publication of JP2014225210A publication Critical patent/JP2014225210A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform rewriting of data before data garbling occurs due to retention failure of a nonvolatile memory, in an electronic control device for vehicle provided with the nonvolatile memory.SOLUTION: A microcomputer 12 operates by receiving power supply from a power supply circuit 18, and performs control including writing of data to a nonvolatile memory 14, when IGSW 4 is in an on-state. When writing data to the nonvolatile memory 14, writing time and writing frequency are also updated, and when the microcomputer 12 stops operation, starting time which is set based on these each parameter is set to a soak timer 16. When the starting time elapses, the soak timer 16 starts the microcomputer 12, and makes the data in the nonvolatile memory 14 to be rewritten.

Description

本発明は、不揮発性メモリを備えた車両用電子制御装置に関する。   The present invention relates to a vehicle electronic control device including a nonvolatile memory.

フラッシュメモリやEEPROM等の不揮発性メモリには、データが書き込まれてからデータを保持することのできる保持期間があり、データ書き込み後、保持期間が経過すると、データの保持能力(所謂リテンション)が低下して、データ化けが生じることがある。   A nonvolatile memory such as a flash memory or an EEPROM has a holding period in which data can be held after data is written, and when the holding period elapses after data writing, the data holding ability (so-called retention) decreases. Data corruption may occur.

このため、不揮発性メモリを備えた装置においては、不揮発性メモリへの書き込み動作を実行してからの経過時間を計測し、経過時間が所定時間に達すると、不揮発性メモリに対しデータの再書き込みを行うことが提案されている(例えば、特許文献1参照)。   For this reason, in a device equipped with a nonvolatile memory, the elapsed time since the write operation to the nonvolatile memory is measured, and when the elapsed time reaches a predetermined time, the data is rewritten to the nonvolatile memory. Has been proposed (see, for example, Patent Document 1).

特開2000−11670号公報JP 2000-11670 A

上記提案の技術では、不揮発性メモリへの書き込み動作後の経過時間が所定時間に達すると、不揮発性メモリに対しデータを再度書き込むことにより、不揮発性メモリのリテンション不良によりデータ化けが発生するのを防止する。   In the proposed technique, when the elapsed time after the write operation to the non-volatile memory reaches a predetermined time, the data is rewritten to the non-volatile memory, thereby causing data corruption due to the retention failure of the non-volatile memory. To prevent.

従って、上記提案の技術は、不揮発性メモリへの書き込み動作後の経過時間の計測、及び、不揮発性メモリへのデータの書き込み、を行う部分が、常時電源供給を受けて動作している装置であれば、問題なく適用できる。   Therefore, the proposed technique is an apparatus in which the portion for measuring the elapsed time after the write operation to the nonvolatile memory and writing the data to the nonvolatile memory is always operated by receiving power supply. If there is, it can be applied without problems.

しかし、車両用電子制御装置は、通常、イグニッションスイッチがオフ状態にあるときに、バッテリからの電源供給が遮断されて、動作を停止する。
このため、車両用電子制御装置においては、その動作停止時に、不揮発性メモリへの書き込み動作後の経過時間の計測、及び、不揮発性メモリへのデータの再書き込みを実施することができない。
However, the vehicle electronic control device normally stops operating when the ignition switch is in the OFF state, because the power supply from the battery is cut off.
For this reason, in the vehicle electronic control device, when the operation is stopped, it is impossible to measure the elapsed time after the write operation to the nonvolatile memory and to rewrite the data to the nonvolatile memory.

従って、車両用電子制御装置に上記提案の技術を適用しても、不揮発性メモリのリテンション不良によりデータ化けが発生するのを防止することができない。
本発明は、こうした問題に鑑みなされたものであり、不揮発性メモリを備えた車両用電子制御装置において、不揮発性メモリのリテンション不良によりデータ化けが生じる前に、データの再書き込みを実施できるようにすることを目的とする。
Therefore, even if the proposed technique is applied to the vehicle electronic control device, it is impossible to prevent data corruption due to a retention failure of the nonvolatile memory.
The present invention has been made in view of these problems, and in a vehicle electronic control device including a nonvolatile memory, data can be rewritten before data corruption occurs due to a retention failure of the nonvolatile memory. The purpose is to do.

本発明の車両用電子制御装置においては、イグニッションスイッチがオン状態であるとき、電源手段から制御手段への電源供給が実施されて、制御手段が動作する。そして、制御手段は、不揮発性メモリへのデータの書き込みを含む所定の制御動作を実行する。   In the vehicle electronic control device of the present invention, when the ignition switch is in the ON state, power is supplied from the power supply means to the control means, and the control means operates. Then, the control means executes a predetermined control operation including writing of data into the nonvolatile memory.

また、電源手段から制御手段への電源供給が遮断されて制御手段が動作を停止しているときには、不揮発性メモリへのデータの書き込みが実施されてからの経過時間が、不揮発性メモリがデータを保持可能な保持期間に達する前に、起動手段が制御手段を起動する。   In addition, when the power supply from the power supply means to the control means is shut off and the control means stops operating, the elapsed time after the data is written to the nonvolatile memory is The activation means activates the control means before the retention period that can be retained is reached.

そして、制御手段は、起動手段により起動されると、不揮発性メモリのデータを再度書き込む。
従って、本発明の車両用電子制御装置によれば、バッテリからの電源供給が遮断されて、制御手段が動作を停止していても、不揮発性メモリのリテンション不良によってデータ化けが生じる前に、起動手段が制御手段を起動することで、不揮発性メモリへのデータの再書き込みを実施させることができる。
When the control unit is activated by the activation unit, the control unit writes the data in the nonvolatile memory again.
Therefore, according to the electronic control device for a vehicle of the present invention, even if the power supply from the battery is cut off and the control means stops operating, it is activated before data corruption occurs due to a retention failure of the nonvolatile memory. When the means activates the control means, data can be rewritten to the nonvolatile memory.

よって、本発明の車両用電子制御装置によれば、不揮発性メモリに記憶されたデータが、リテンション不良によってデータ化け(換言すれば消滅)するのを防止し、不揮発性メモリに記憶されたデータの信頼性を高めることができる。   Therefore, according to the vehicle electronic control device of the present invention, the data stored in the nonvolatile memory is prevented from being garbled (in other words, disappearing) due to a retention failure, and the data stored in the nonvolatile memory is prevented. Reliability can be increased.

実施形態の車両用電子制御装置の構成を表すブロック図である。It is a block diagram showing the structure of the electronic controller for vehicles of embodiment. 不揮発性メモリの書き込み/消去サイクルとデータ保持期間との関係を記述した特性データを表す説明図である。It is explanatory drawing showing the characteristic data which described the relationship between the write / erase cycle of a non-volatile memory, and a data retention period. 不揮発性メモリへのデータの書き込み処理を表すフローチャートである。It is a flowchart showing the write-in process of the data to a non-volatile memory. 不揮発性メモリへのデータの書き込み動作を表すタイムチャートである。It is a time chart showing the write-in operation | movement of the data to a non-volatile memory.

以下に本発明の実施形態を図面と共に説明する。
なお、本発明は、下記の実施形態によって何ら限定して解釈されない。また、下記の実施形態の構成の一部を、課題を解決できる限りにおいて省略した態様も本発明の実施形態である。また、特許請求の範囲に記載した文言のみによって特定される発明の本質を逸脱しない限度において考え得るあらゆる態様も本発明の実施形態である。また、下記の実施形態の説明で用いる符号を特許請求の範囲にも適宜使用しているが、これは本発明の理解を容易にする目的で使用しており、本発明の技術的範囲を限定する意図ではない。
Embodiments of the present invention will be described below with reference to the drawings.
The present invention is not construed as being limited in any way by the following embodiments. An aspect in which a part of the configuration of the following embodiment is omitted as long as the problem can be solved is also an embodiment of the present invention. Moreover, all the aspects which can be considered in the limit which does not deviate from the essence of the invention specified only by the wording described in the claims are embodiments of the present invention. Further, the reference numerals used in the description of the following embodiments are also used in the claims as appropriate, but this is used for the purpose of facilitating the understanding of the present invention, and limits the technical scope of the present invention. Not intended.

図1に示すように、本実施形態の電子制御装置10は、車両に搭載されて所定の制御対象(エンジン、自動変速機等の車載装置)を制御するのに用いられるものであり、制御対象を制御するための演算処理を行うマイクロコンピュータ(以下、マイコンという)12を備える。   As shown in FIG. 1, an electronic control device 10 according to the present embodiment is mounted on a vehicle and used to control a predetermined control target (an onboard device such as an engine or an automatic transmission). A microcomputer (hereinafter referred to as a microcomputer) 12 that performs arithmetic processing for controlling the above is provided.

マイコン12は、CPU12a、ROM12b、RAM12cを中心に構成され、A/D変換器を含む入力部(図示せず)を介して制御対象の動作状態を表す検出信号を取り込み、制御対象の制御量を算出し、駆動回路を含む出力部(図示せず)から制御対象に向けて制御信号を出力する。   The microcomputer 12 is configured around the CPU 12a, the ROM 12b, and the RAM 12c. The microcomputer 12 takes in a detection signal indicating an operation state of the control target via an input unit (not shown) including an A / D converter, and determines a control amount of the control target. The control signal is calculated and output from the output unit (not shown) including the drive circuit toward the control target.

また、電子制御装置10には、不揮発性メモリ14、ソークタイマ16、及び電源回路18が設けられている。
不揮発性メモリ14は、マイコン12が制御に用いるデータを保存するためのものであり、例えば、EEPROMにて構成されている。
In addition, the electronic control device 10 is provided with a nonvolatile memory 14, a soak timer 16, and a power supply circuit 18.
The non-volatile memory 14 is for storing data used by the microcomputer 12 for control, and is composed of, for example, an EEPROM.

ソークタイマ16は、マイコン12により設定された時間を計時し、その設定時間が経過すると、電源回路18からマイコン12への電源供給を開始させて、マイコン12を起動するためのものである。   The soak timer 16 measures the time set by the microcomputer 12 and, when the set time elapses, starts the power supply from the power supply circuit 18 to the microcomputer 12 and activates the microcomputer 12.

電源回路18は、車両に搭載されたバッテリ2から電源供給を受けて、電子制御装置10の内部回路(マイコン12、ソークタイマ16等)を駆動するための電源電圧(直流定電圧)を生成するものである。   The power supply circuit 18 receives power supply from the battery 2 mounted on the vehicle and generates a power supply voltage (DC constant voltage) for driving the internal circuits (the microcomputer 12, the soak timer 16, etc.) of the electronic control device 10. It is.

すなわち、電源回路18には、バッテリ2から常時電源供給がなされている。
そして、電源回路18は、図4に示すように、車両乗員により操作されるイグニッションスイッチ(以下、IGSWとも記載する)4がオン状態になると(時点t0)、メインリレー6をオン状態にし、メインリレー6を介して入力されるバッテリ電圧にて、マイコン12への電源供給を開始する。
That is, the power supply circuit 18 is constantly supplied with power from the battery 2.
Then, as shown in FIG. 4, when the ignition switch (hereinafter also referred to as IGSW) 4 operated by the vehicle occupant is turned on (time t0), the power supply circuit 18 turns the main relay 6 on, Power supply to the microcomputer 12 is started with the battery voltage input via the relay 6.

また、電源回路18は、IGSW4がオン状態からオフ状態に切り替えられると(時点t2)、その旨をマイコン12に通知し、その後マイコン12から入力されるオフ指令に従い、メインリレー6をオフ状態にして、マイコン12への電源供給を停止する(時点t4)。   Further, when the IGSW 4 is switched from the on state to the off state (at time t2), the power supply circuit 18 notifies the microcomputer 12 of that fact, and then turns off the main relay 6 according to the off command input from the microcomputer 12. Then, the power supply to the microcomputer 12 is stopped (time t4).

また、電源回路18は、ソークタイマ16に対しては、常時電源供給を行い、IGSW4がオフ状態であるとき、ソークタイマ16によるカウント値が「0」になって、ソークタイマ16から起動指令が入力されると(時点t5)、メインリレー6をオン状態にして、マイコン12への電源供給を開始する。   Further, the power supply circuit 18 always supplies power to the soak timer 16, and when the IGSW 4 is in an OFF state, the count value by the soak timer 16 becomes “0”, and an activation command is input from the soak timer 16. (Time t5), the main relay 6 is turned on, and the power supply to the microcomputer 12 is started.

従って、マイコン12は、IGSW4がオン状態になるか(時点t0)、或いは、ソークタイマ16から起動指令が出力されると(時点t5)、電源回路18から電源供給を受けて起動し、所定の制御処理を実行することになる。   Accordingly, when the IGSW 4 is turned on (time point t0) or a start command is output from the soak timer 16 (time point t5), the microcomputer 12 starts by receiving power supply from the power supply circuit 18 and performs predetermined control. Processing will be executed.

また、電子制御装置10は、車内LANを構成する通信線を介して、車両に搭載された他の電子制御装置(ECU)20に接続されている。このため、マイコン12は、他のECU20との間で通信が可能であり、他のECU20から現在時刻を表す時刻データを含む各種データを取得することができる。   The electronic control device 10 is connected to another electronic control device (ECU) 20 mounted on the vehicle via a communication line constituting the in-vehicle LAN. For this reason, the microcomputer 12 can communicate with another ECU 20 and can acquire various data including time data representing the current time from the other ECU 20.

なお、時刻データを取得するのに用いる他のECU20としては、現在時刻を計測する時計機能を有する電子制御装置であればよいが、より好ましくは、GPS衛星からの送信信号に基づき現在時刻を精度よく検出可能なGPS受信機、若しくは、電波時計を内蔵した電子制御装置であるとよい。   The other ECU 20 used for acquiring the time data may be an electronic control device having a clock function for measuring the current time, but more preferably the current time is accurately determined based on a transmission signal from a GPS satellite. It may be a well-detectable GPS receiver or an electronic control device with a built-in radio clock.

次に、マイコン12において実行される制御処理の内、本発明に関わる主要な処理である不揮発性メモリ14へのデータの書き込み処理を、図3に示すフローチャートに沿って説明する。   Next, a data write process to the nonvolatile memory 14 which is a main process related to the present invention among the control processes executed in the microcomputer 12 will be described with reference to the flowchart shown in FIG.

なお、この書き込み処理を実行するに当たって、マイコン12のROM内には、書き込み処理を含む各種制御処理の制御プログラムに加えて、図2に示す不揮発性メモリ14の特性データが記憶されているものとする。   In executing the writing process, the ROM of the microcomputer 12 stores the characteristic data of the nonvolatile memory 14 shown in FIG. 2 in addition to the control programs for various control processes including the writing process. To do.

この特性データは、不揮発性メモリ14に対するデータの書き込み/消去サイクル(以下、単に書き込み回数という)と、不揮発性メモリ14がデータを保持可能な保持期間との関係を表すものである。   This characteristic data represents a relationship between a data write / erase cycle (hereinafter simply referred to as the number of times of writing) to the nonvolatile memory 14 and a retention period in which the nonvolatile memory 14 can retain data.

そして、本実施形態では、例えば、書き込み回数30000回までは、データ保持期間15年、書き込み回数30000回から50000回までは、データ保持期間2年、書き込み回数が50000回を越えるとデータ保持期間「0」、と設定されている。   In this embodiment, for example, the data retention period is 15 years up to the write count of 30000, the data retention period is 2 years from the write count of 30000 to 50000, and the data retention period “ 0 ”is set.

但し、図2の特性データは一例であり、本発明を実施する際には、使用する不揮発性メモリの保証期間に応じて設定すればよい。また、この特性データは、不揮発性メモリ14に記憶されていてもよい。   However, the characteristic data in FIG. 2 is an example, and when the present invention is implemented, it may be set according to the guarantee period of the nonvolatile memory to be used. Further, this characteristic data may be stored in the nonvolatile memory 14.

また、以下の説明では、不揮発性メモリ14は、データを書き込み可能なメモリ領域が一つであるものとし、メモリ領域が複数ある不揮発性メモリに対する書き込み動作については、後に変形例として説明する。   In the following description, the nonvolatile memory 14 has a single memory area into which data can be written, and a writing operation to a nonvolatile memory having a plurality of memory areas will be described later as a modified example.

図3に示す書き込み処理は、電源回路18からマイコン12への電源供給が開始されて、マイコン12が起動されてから、電源回路18からの電源供給が停止するまでの間、CPU12aがメインルーチンの一つとして繰り返し実行する処理である。   In the writing process shown in FIG. 3, the CPU 12a performs the main routine from the start of power supply to the microcomputer 12 from the power supply circuit 18 until the power supply from the power supply circuit 18 is stopped after the microcomputer 12 is activated. This process is repeatedly executed as one.

図3に示すように、書き込み処理が開始されると、まずS110にて、今回の起動は、ソークタイマ16からの起動指令によるものであるか否かを判断する。
そして、今回の起動は、ソークタイマ16からの起動指令によるものでない場合(つまりIGSW4がオン状態になったことによるものである場合)には、S120に移行して、不揮発性メモリ14内のデータの更新が必要であるか否かを判断する。
As shown in FIG. 3, when the writing process is started, first, in S110, it is determined whether or not the current activation is due to an activation command from the soak timer 16.
If the current activation is not due to the activation command from the soak timer 16 (that is, due to the IGSW 4 being turned on), the process proceeds to S120 and the data in the nonvolatile memory 14 is transferred. Determine whether an update is necessary.

S120にて、不揮発性メモリ14内のデータの更新が必要であると判断されると、S130に移行して、不揮発性メモリ14に対し更新用のデータを書き込む(図4に示す時点t1)。   If it is determined in S120 that the data in the nonvolatile memory 14 needs to be updated, the process proceeds to S130, and the update data is written in the nonvolatile memory 14 (time t1 shown in FIG. 4).

そして、続くS140では、車内LANを介して、他のECU20から現在時刻を取得し、S150にて、その取得した現在時刻を、不揮発性メモリ14へのデータの最終書き込み時刻として、不揮発性メモリ14に書き込む。   In the subsequent S140, the current time is acquired from the other ECU 20 via the in-vehicle LAN, and in S150, the acquired current time is used as the last data writing time to the nonvolatile memory 14, and the nonvolatile memory 14 Write to.

また、S160では、不揮発性メモリ14に記憶されているデータの書き込み回数をカウントアップし、更新する。
つまり、不揮発性メモリ14には、制御用のデータと共に、そのデータの最終書き込み時刻及び書き込み回数が記憶されており、S150、S160では、これらの情報を更新する。
In S160, the number of times of writing data stored in the nonvolatile memory 14 is counted up and updated.
That is, the nonvolatile memory 14 stores the control data and the last write time and the write count of the data. In S150 and S160, the information is updated.

このように、S130〜S160にて、不揮発性メモリ14内のデータが更新されるか、或いは、S120にてそのデータ更新は不要であると判断された際には、S170に移行し、IGSW4がオフ状態になったか否かを判断する。   As described above, when the data in the nonvolatile memory 14 is updated in S130 to S160, or when it is determined that the data update is unnecessary in S120, the process proceeds to S170, and the IGSW 4 It is determined whether or not it is turned off.

そして、IGSW4がオフ状態になっていなければ、再度S120に移行して、上記処理を実行し、IGSW4がオフ状態になっていれば、S180に移行する。
S180では、車内LANを介して、他のECU20から現在時刻を取得し、S190にて、その取得した現在時刻から、S150にて更新した最終書き込み時刻を減じることで、不揮発性メモリ14へデータを書き込んだ最終書き込み時刻からの経過時間を算出する。
If the IGSW 4 is not in the off state, the process proceeds to S120 again to execute the above process. If the IGSW 4 is in the off state, the process proceeds to S180.
In S180, the current time is acquired from the other ECU 20 via the in-vehicle LAN, and in S190, the final write time updated in S150 is subtracted from the acquired current time, whereby data is stored in the nonvolatile memory 14. The elapsed time from the last writing time is calculated.

また、S200では、S160にて更新した不揮発性メモリ14へのデータの書き込み回数から、図2に例示した特性データを用いて、不揮発性メモリ14がデータを保持可能な保持期間を算出する。   In S200, a retention period in which the nonvolatile memory 14 can retain data is calculated from the number of times data is written to the nonvolatile memory 14 updated in S160, using the characteristic data illustrated in FIG.

そして、続くS210では、S200で算出した保持期間からS190にて算出した経過時間を減じることで、ソークタイマ16がマイコン12の起動指令を発生するまでの起動時間を算出し、その算出した起動時間をソークタイマ16にセットし、ソークタイマ16に対し起動時間のカウント動作を開始させる(図4に示す時点t3参照)。   In the subsequent S210, the elapsed time calculated in S190 is subtracted from the holding period calculated in S200 to calculate the startup time until the soak timer 16 generates a startup command for the microcomputer 12, and the calculated startup time is calculated. The soak timer 16 is set, and the soaking timer 16 starts the activation time counting operation (see time t3 shown in FIG. 4).

この結果、ソークタイマ16は、起動時間のカウント動作を開始し、その後、セットされた起動時間が経過すると(起動時間のカウント値が「0」になると)、電源回路18に起動指令を出力して、マイコン12を起動させる(図4に示す時点t5参照)。   As a result, the soak timer 16 starts the activation time counting operation. After that, when the set activation time elapses (when the activation time count value becomes “0”), the soak timer 16 outputs an activation command to the power supply circuit 18. Then, the microcomputer 12 is activated (see time t5 shown in FIG. 4).

また、S210にて、ソークタイマ16に起動時間をセットし、ソークタイマ16を起動した後は、S220に移行して、電源回路18に対しメインリレー6をオフさせ(図4に示す時点t4参照)、当該書き込み処理を終了する。   In S210, the activation time is set in the soak timer 16, and after the soak timer 16 is activated, the process proceeds to S220 to turn off the main relay 6 for the power supply circuit 18 (see time t4 shown in FIG. 4). The writing process ends.

この結果、電源回路18からマイコン12への電源供給が遮断されて、マイコン12は動作を停止することになる。
次に、S110にて、今回の起動はソークタイマ16からの起動指令によるものであると判断されると、S230に移行して、不揮発性メモリ14から全データを読み出し、続くS240にて、そのデータを不揮発性メモリ14に再度書き込む、上書き処理を実行する。
As a result, the power supply from the power supply circuit 18 to the microcomputer 12 is cut off, and the microcomputer 12 stops operating.
Next, when it is determined in S110 that the current activation is due to the activation command from the soak timer 16, the process proceeds to S230, where all data is read from the nonvolatile memory 14, and in S240, the data is read. Is overwritten in the non-volatile memory 14 again.

S240による上書き処理が完了すると(図4に示す時点t6参照)、S250〜S270の処理を実行することにより、S140〜S160と同様の手順で、現在時刻の取得、最終書き込み時刻及び書き込み回数の更新を行う。   When the overwriting process in S240 is completed (see time point t6 shown in FIG. 4), the processes of S250 to S270 are executed to acquire the current time, update the last write time, and the number of writes in the same procedure as in S140 to S160. I do.

そして、その後は、S220に移行し、電源回路18に対しメインリレー6をオフさせ(図4に示す時点t6参照)、当該書き込み処理を終了する。
以上説明したように、本実施形態の電子制御装置10によれば、IGSW4がオン状態となってマイコン12が起動されてから、マイコン12が不揮発性メモリ14へのデータの書き込みを行った際には、最終書き込み時刻及び書き込み回数を更新する。
Then, the process proceeds to S220, the main relay 6 is turned off for the power supply circuit 18 (see time point t6 shown in FIG. 4), and the writing process is finished.
As described above, according to the electronic control device 10 of the present embodiment, when the microcomputer 12 writes data to the nonvolatile memory 14 after the IGSW 4 is turned on and the microcomputer 12 is activated. Updates the last write time and write count.

このため、マイコン12が動作中であれば、マイコン12は、S120〜S160の処理にて、最終書き込み時刻及び書き込み回数を確認することで、最終書き込み時刻からの経過期間が不揮発性メモリ14によるデータの保持期間に達する前に、不揮発性メモリ14内のデータを更新することができる。   For this reason, if the microcomputer 12 is in operation, the microcomputer 12 checks the final write time and the number of writes in the processing of S120 to S160, so that the elapsed period from the final write time is the data stored in the nonvolatile memory 14. Before reaching the retention period, the data in the nonvolatile memory 14 can be updated.

また、電源回路18からの電源供給が遮断されて、マイコン12が動作を停止しているときには、ソークタイマ16が、最終書き込み時刻からの経過時間が不揮発性メモリ14のデータ保持期間に達するまでカウント(ダウンカウント)する。そして、そのカウント値が「0」になると、マイコン12の起動タイミングであるとして、マイコン12を起動させる。   Further, when the power supply from the power supply circuit 18 is shut off and the microcomputer 12 stops operating, the soak timer 16 counts until the elapsed time from the last write time reaches the data holding period of the nonvolatile memory 14 ( Count down). When the count value becomes “0”, the microcomputer 12 is activated as it is the activation timing of the microcomputer 12.

そして、ソークタイマ16からの起動指令によりマイコン12が起動した際には、マイコン12は、S230〜S270の処理にて、不揮発性メモリ14内のデータを更新する。   When the microcomputer 12 is activated by the activation command from the soak timer 16, the microcomputer 12 updates the data in the nonvolatile memory 14 in the processes of S230 to S270.

このため、本実施形態の電子制御装置によれば、マイコン12が動作を停止していても、最終書き込み時刻からの経過期間が不揮発性メモリ14によるデータの保持期間に達する前に、不揮発性メモリ14内のデータを更新することができる。   For this reason, according to the electronic control device of this embodiment, even if the microcomputer 12 stops operating, the non-volatile memory before the elapsed period from the last write time reaches the data retention period of the non-volatile memory 14. The data in 14 can be updated.

よって、本実施形態の電子制御装置10によれば、不揮発性メモリ14のリテンション不良によってデータ化けが生じる迄の間に、必ず、不揮発性メモリ14へのデータの書き込みを行うことができ、不揮発性メモリ14内のデータの信頼性を確保することができる。   Therefore, according to the electronic control device 10 of the present embodiment, data can be always written to the nonvolatile memory 14 until data corruption occurs due to retention failure of the nonvolatile memory 14. The reliability of the data in the memory 14 can be ensured.

なお、本実施形態においては、マイコン12が、本発明の制御手段に相当し、電源回路18が、本発明の電源手段に相当し、ソークタイマ16が、本発明の起動手段に相当し、電子制御装置10に対し車内LANを介して接続される他のECU20が、外部装置に相当する。   In the present embodiment, the microcomputer 12 corresponds to the control means of the present invention, the power supply circuit 18 corresponds to the power supply means of the present invention, the soak timer 16 corresponds to the starting means of the present invention, and the electronic control. The other ECU 20 connected to the device 10 via the in-vehicle LAN corresponds to an external device.

以上、本発明の一実施形態について説明したが、本発明は、上記実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内にて、種々の態様をとることができる。
例えば、上記実施形態では、不揮発性メモリ14は、データを書き込み可能なメモリ領域が一つであるものとして説明したが、不揮発性メモリ14に、データを書き込み可能なメモリ領域が複数ある場合には、メモリ領域毎に、最終書き込み時刻及び書き込み回数を管理するようにすればよい。
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, A various aspect can be taken in the range which does not deviate from the summary of this invention.
For example, in the above embodiment, the nonvolatile memory 14 has been described as having one memory area into which data can be written. However, when the nonvolatile memory 14 has a plurality of memory areas into which data can be written, The last write time and the write count may be managed for each memory area.

そして、この場合、S180〜S210の処理にて、ソークタイマ16に起動時間をセットする際には、メモリ領域毎に、データ保持時間から、最終書き込み時刻からの経過時間を減じることにより、起動時間を求め、その起動時間の内、最も短い起動時間を、ソークタイマ16にセットするようにすればよい。   In this case, when setting the activation time in the soak timer 16 in the processing of S180 to S210, the activation time is reduced by subtracting the elapsed time from the last write time from the data holding time for each memory area. The shortest startup time among the startup times may be set in the soak timer 16.

また、この場合、ソークタイマ16からの起動指令によりマイコン12が起動し、S230〜S270の処理にて、不揮発性メモリ14内のデータを更新する際には、不揮発性メモリ14内の全データを再書き込み(上書き)するようにするとよい。   In this case, when the microcomputer 12 is activated by the activation command from the soak timer 16 and the data in the non-volatile memory 14 is updated in the processes of S230 to S270, all the data in the non-volatile memory 14 is restored. It is good to write (overwrite).

なお、S230〜S270では、複数のメモリ領域の内、最終書き込み時刻が最も古い(換言すれば、リテンション不良によるデータ化けが発生しやすい)メモリ領域内のデータを再書き込み(上書き)するようにしてもよいが、この場合には、S270の処理実行後に、S180〜S210の処理を実行する必要がある。   In S230 to S270, the data in the memory area with the oldest last write time (in other words, data corruption is likely to occur due to retention failure) among the plurality of memory areas is rewritten (overwritten). In this case, however, it is necessary to execute the processing of S180 to S210 after the execution of the processing of S270.

つまり、S230〜S270にて、最終書き込み時刻が最も古いメモリ領域内のデータを再書き込みした場合、最終書き込み時刻が次に古いメモリ領域にてデータ化けが発生する虞があるので、そのメモリ領域に対応して起動時間を設定するために、S180〜S210の処理を実行するのである。   In other words, when data in the memory area with the oldest last write time is rewritten in S230 to S270, data corruption may occur in the memory area with the oldest last write time. In order to set the activation time correspondingly, the processing of S180 to S210 is executed.

次に、上記実施形態では、不揮発性メモリ14へデータを書き込んだ後の経過時間や、ソークタイマ16にセットする起動時間は、外部装置である他のECU20から取得した現在時刻に基づき算出するものとして説明したが、電子制御装置10に時間計測用の時計機能があれば、現在時刻を他のECU20から取得する必要はない。   Next, in the above embodiment, the elapsed time after data is written to the nonvolatile memory 14 and the activation time set in the soak timer 16 are calculated based on the current time acquired from another ECU 20 that is an external device. As described above, if the electronic control device 10 has a clock function for time measurement, it is not necessary to acquire the current time from the other ECU 20.

また、上記実施形態では、マイコン12を起動させるのに用いられるソークタイマ16は、マイコン12の動作停止時に起動するものとして説明したが、これは、ソークタイマ16の計時(カウント)動作によって消費電力を低減するためであり、電子制御装置10が時計機能を有する場合には、その時計機能を利用して、マイコン12を起動させるようにしてもよい。   In the above embodiment, the soak timer 16 used to start the microcomputer 12 has been described as being started when the operation of the microcomputer 12 is stopped, but this reduces power consumption by the time counting operation of the soak timer 16. For this reason, when the electronic control unit 10 has a clock function, the microcomputer 12 may be activated using the clock function.

また上記実施形態では、不揮発性メモリ14へのデータの書き込み後、リテンション不良によってデータ化けが生じる迄に、不揮発性メモリ14へのデータの再書き込みを実施させる期間は、図2に示す特性データから得られる保持期間に応じて設定するものとして説明した。   In the above-described embodiment, the period in which data is rewritten to the nonvolatile memory 14 after the data is written to the nonvolatile memory 14 until data corruption occurs due to a retention failure is determined from the characteristic data shown in FIG. It demonstrated as what is set according to the holding | maintenance period obtained.

しかし、この期間は、不揮発性メモリ14においてデータの保持が保証されている保持期間の内、最も短い時間(図では2年)、若しくは、それよりも短い期間に、設定するようにしてもよい。   However, this period may be set to the shortest period (two years in the figure) or shorter than the retention period in which data retention is guaranteed in the nonvolatile memory 14. .

2…バッテリ、4…IGSW(イグニッションスイッチ)、6…メインリレー、10…電子制御装置、12…マイコン、12a…CPU、12b…ROM、12c…RAM、14…不揮発性メモリ、16…ソークタイマ、18…電源回路、20…ECU。   DESCRIPTION OF SYMBOLS 2 ... Battery, 4 ... IGSW (ignition switch), 6 ... Main relay, 10 ... Electronic control unit, 12 ... Microcomputer, 12a ... CPU, 12b ... ROM, 12c ... RAM, 14 ... Non-volatile memory, 16 ... Soak timer, 18 ... power supply circuit, 20 ... ECU.

Claims (8)

不揮発性メモリ(14)と、
前記不揮発性メモリへのデータの書き込みを含む所定の制御を実行する制御手段(12)と、
少なくともイグニッションスイッチ(4)がオン状態であるとき、前記制御手段への電源供給を行う電源手段(18)と、
前記電源手段から前記制御手段への電源供給が遮断されて前記制御手段が動作を停止しているとき、前記不揮発性メモリへのデータの書き込みが実施されてからの経過時間が、前記不揮発性メモリがデータを保持可能な保持期間に達する前に、前記電源手段から前記制御手段への電源供給を開始させて前記制御手段を起動する起動手段(16)と、
を備え、前記制御手段は、前記起動手段により起動されると、前記不揮発性メモリのデータを再度書き込むことを特徴とする車両用電子制御装置。
A non-volatile memory (14);
Control means (12) for executing predetermined control including data writing to the nonvolatile memory;
Power supply means (18) for supplying power to the control means when at least the ignition switch (4) is in an ON state;
When the power supply from the power supply means to the control means is interrupted and the control means stops operating, the elapsed time from the writing of data to the nonvolatile memory is the nonvolatile memory. Starting means (16) for starting the control means by starting the power supply from the power supply means to the control means before reaching a holding period in which data can be held;
And the control means writes the data in the nonvolatile memory again when activated by the activation means.
前記制御手段は、前記不揮発性メモリへのデータの書き込みを実施したときの書き込み時刻と現在時刻とに基づき、前記起動手段の動作に必要な前記経過時間を算出することを特徴とする請求項1に記載の車両用電子制御装置。   2. The control unit according to claim 1, wherein the control unit calculates the elapsed time required for the operation of the activation unit based on a writing time and a current time when data is written to the nonvolatile memory. An electronic control device for a vehicle as described in 1. 前記制御手段は、前記現在時刻を外部装置(20)から取得することを特徴とする請求項2に記載の車両用電子制御装置。   The vehicle electronic control device according to claim 2, wherein the control means acquires the current time from an external device (20). 前記制御手段は、前記不揮発性メモリへのデータの書き込みを実施すると、前記書き込み時刻として、外部装置から現在時刻を取得することを特徴とする請求項2又は請求項3に記載の車両用電子制御装置。   4. The vehicle electronic control according to claim 2, wherein the control unit obtains a current time from an external device as the write time when data is written to the nonvolatile memory. 5. apparatus. 前記制御手段は、前記不揮発性メモリへのデータの書き込み回数をカウントし、該カウントした書き込み回数と、前記不揮発性メモリへの書き込み回数と前記保持期間との関係を表す特性データとに基づき、前記起動手段の動作に必要な前記保持期間を算出することを特徴とする請求項1〜請求項4のいずれか1項に記載の車両用電子制御装置。   The control means counts the number of times data is written to the non-volatile memory, and based on the counted number of times of writing and the characteristic data representing the relationship between the number of times of writing to the non-volatile memory and the holding period, The vehicular electronic control device according to any one of claims 1 to 4, wherein the holding period necessary for the operation of the starting means is calculated. 前記制御手段は、前記保持期間から前記経過時間を減算することにより、前記起動手段が当該制御手段を起動するタイミングを設定することを特徴とする請求項1〜請求項5のいずれか1項に記載の車両用電子制御装置。   The said control means sets the timing which the said starting means starts the said control means by subtracting the said elapsed time from the said holding | maintenance period, The any one of Claims 1-5 characterized by the above-mentioned. The electronic control apparatus for vehicles as described. 前記起動手段は、所定期間の経過後に前記制御手段を起動するタイマからなり、
前記制御手段は、前記タイマに、前記保持期間から前記経過時間を減算した期間を設定することで、前記タイマが当該制御手段を起動するタイミングを設定することを特徴とする請求項1〜請求項5のいずれか1項に記載の車両用電子制御装置。
The activation means comprises a timer that activates the control means after the elapse of a predetermined period,
The said control means sets the timing which the said timer starts the said control means by setting the period which subtracted the said elapsed time from the said holding | maintenance period to the said timer. The vehicle electronic control device according to any one of 5.
前記制御手段は、前記電源手段から当該制御手段への電源供給が遮断されるときに、前記タイマを起動させることを特徴とする請求項7に記載の車両用電子制御装置。   8. The vehicle electronic control device according to claim 7, wherein the control means starts the timer when power supply from the power supply means to the control means is interrupted.
JP2013105241A 2013-05-17 2013-05-17 Electronic control device for vehicle Pending JP2014225210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013105241A JP2014225210A (en) 2013-05-17 2013-05-17 Electronic control device for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013105241A JP2014225210A (en) 2013-05-17 2013-05-17 Electronic control device for vehicle

Publications (1)

Publication Number Publication Date
JP2014225210A true JP2014225210A (en) 2014-12-04

Family

ID=52123829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013105241A Pending JP2014225210A (en) 2013-05-17 2013-05-17 Electronic control device for vehicle

Country Status (1)

Country Link
JP (1) JP2014225210A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11360836B2 (en) 2020-07-02 2022-06-14 Kioxia Corporation Receiving terminal, communication system, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11360836B2 (en) 2020-07-02 2022-06-14 Kioxia Corporation Receiving terminal, communication system, and program

Similar Documents

Publication Publication Date Title
JP4572751B2 (en) Electronic control unit
WO2014091666A1 (en) Onboard electronic control device
JP5176728B2 (en) Electronic control device for vehicle
JP2006307721A (en) Electronic control unit for vehicle
JP6011162B2 (en) Electronic control unit
US7210055B2 (en) Electronic control apparatus
JP5962697B2 (en) Electronic control unit
JP6024508B2 (en) Vehicle data processing device
JP2015217911A (en) Electronic control apparatus
JP2014225210A (en) Electronic control device for vehicle
JP2015137068A (en) Electronic control device
JP2007145235A (en) Control device for vehicle or the like
JP2016126699A (en) Electronic control unit for vehicle
JP2008146521A (en) Automobile electronic controller
US11314634B2 (en) Electronic control unit and data protection method therefor
JP3870974B2 (en) Electronic control unit
JP5686083B2 (en) Electronic control device for vehicle
JP2007071079A (en) Electronic control unit for vehicle
JP6172040B2 (en) Electronic control unit
KR20130042317A (en) Method for diagnosing engine off timer
JP2011100416A (en) In-vehicle electronic controller and memory control method
JP6534887B2 (en) Air conditioning controller for vehicle
JP2013171600A (en) Nonvolatile memory device
JP2013058159A (en) Electronic control device
JP2018161927A (en) Automobile electronic control device