JP2015060526A - Electronic control device for vehicle - Google Patents

Electronic control device for vehicle Download PDF

Info

Publication number
JP2015060526A
JP2015060526A JP2013195547A JP2013195547A JP2015060526A JP 2015060526 A JP2015060526 A JP 2015060526A JP 2013195547 A JP2013195547 A JP 2013195547A JP 2013195547 A JP2013195547 A JP 2013195547A JP 2015060526 A JP2015060526 A JP 2015060526A
Authority
JP
Japan
Prior art keywords
nonvolatile memory
power supply
supply voltage
writing
cpu
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.)
Granted
Application number
JP2013195547A
Other languages
Japanese (ja)
Other versions
JP6162011B2 (en
Inventor
▲高▼▲柳▼ 恵一
恵一 ▲高▼▲柳▼
Keiichi Takayanagi
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 JP2013195547A priority Critical patent/JP6162011B2/en
Publication of JP2015060526A publication Critical patent/JP2015060526A/en
Application granted granted Critical
Publication of JP6162011B2 publication Critical patent/JP6162011B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an electronic control device for a vehicle, configured to prevent failure determination and abnormal-value writing due to reduction in power source voltage, while using a non-volatile memory included in a CPU, thereby reducing CPU load.SOLUTION: The electronic control device stores a learning value indicating a vehicle state on a non-volatile memory 6 included in a CPU 2, to control a vehicle on the basis of the learning value read from the non-volatile memory. When a power source voltage Vba to be applied to the CPU drops or is predicted to drop below a predetermined value, an access from the CPU to the non-volatile memory is regulated. When the power source voltage drops or is predicted to drop, an access to the non-volatile memory can be regulated, thereby preventing failure determination and abnormal-value writing, and reducing CPU processing, resulting in reduction in load.

Description

本発明は、CPUに内蔵された不揮発性メモリに車両の状態を示す学習値を記憶し、この不揮発性メモリから読み出した学習値に基づき車両を制御する自動車用電子制御装置に関する。   The present invention relates to an automotive electronic control device that stores a learning value indicating a vehicle state in a nonvolatile memory built in a CPU and controls the vehicle based on the learning value read from the nonvolatile memory.

メインマイクロコンピュータ(メインマイコン)と、サブマイクロコンピュータ(サブマイコン)とを備え、不揮発性メモリを外付けして、サブマイコンの管理下で使用する自動車用電子制御装置では、クランキング等による電源電圧の低下時に、不揮発性メモリへの書き込みが重なると正常に処理できない可能性がある。
そこで、例えば特許文献1では、電源電圧がサブマイコンの最低作動電圧より低下したときに、メインマイコンで、サブマイコンによる外付けの不揮発性メモリへの書き込みを禁止している。
In automotive electronic control units equipped with a main microcomputer (main microcomputer) and sub-microcomputer (sub-microcomputer) with a non-volatile memory and used under the control of the sub-microcomputer, power supply voltage due to cranking, etc. If the writing to the non-volatile memory overlaps at the time of decrease, there is a possibility that normal processing cannot be performed.
Therefore, for example, in Patent Document 1, when the power supply voltage drops below the minimum operating voltage of the sub-microcomputer, the main microcomputer prohibits the sub-microcomputer from writing to the external nonvolatile memory.

特開2002−24101号公報Japanese Patent Laid-Open No. 2002-24101

ところで、外付けの不揮発性メモリを廃止し、マイコン(CPU)に内蔵された不揮発性メモリを使用すれば、外付け不揮発性メモリだけでなく、この不揮発性メモリを管理及び制御するサブマイコンも不要となり、車両用制御機器のコストを削減できる。
しかしながら、電力不足により内蔵不揮発性メモリに不定値の書き込みが行われないように、メインマイコン自身での電源電圧を監視する必要がある。また、サブマイコンに比べて最低作動電圧が高いメインマイコンで不揮発性メモリへの書き込み処理を実施しなければならないため、電源電圧が低下した場合に、異常判定及び異常値を書き込む可能性が高くなる。しかも、電源電圧の低下が予想される場合、及び書き込み異常が疑われる場合等において、それぞれに応じた処理が必要となり、メインマイコンの負担が増大する、という課題があった。
By the way, if the external non-volatile memory is abolished and the non-volatile memory built in the microcomputer (CPU) is used, not only the external non-volatile memory but also a sub-microcomputer for managing and controlling this non-volatile memory is unnecessary. Thus, the cost of the vehicle control device can be reduced.
However, it is necessary to monitor the power supply voltage in the main microcomputer itself so that indefinite values are not written to the built-in nonvolatile memory due to power shortage. In addition, since the main microcomputer, which has a higher minimum operating voltage than the sub-microcomputer, must perform the writing process to the non-volatile memory, there is a high possibility of writing an abnormality determination and an abnormal value when the power supply voltage drops. . In addition, when a decrease in power supply voltage is expected, or when a writing abnormality is suspected, there is a problem that processing corresponding to each is required and the burden on the main microcomputer increases.

本発明は上記のような事情に鑑みてなされたもので、その目的とするところは、CPUに内蔵されている不揮発性メモリを使用しながら、電源電圧の低下による異常判定及び異常値の書き込みを抑制でき、CPUの負担を軽減できる自動車用電子制御装置を提供することにある。   The present invention has been made in view of the circumstances as described above. The object of the present invention is to perform abnormality determination and writing of abnormal values due to a decrease in power supply voltage while using a nonvolatile memory built in the CPU. An object of the present invention is to provide an automotive electronic control device that can suppress the burden on the CPU.

本発明の自動車用電子制御装置は、CPUに内蔵された不揮発性メモリに車両の状態を示す学習値を記憶し、前記不揮発性メモリから読み出した学習値に基づき車両を制御する電子制御装置であって、前記CPUに印加される電源電圧が所定値よりも低下した場合、及び所定値よりも低下することが予想される場合に、前記CPUによる前記不揮発性メモリへのアクセスを制限する、ことを特徴とする。   An electronic control device for an automobile according to the present invention is an electronic control device that stores a learned value indicating a vehicle state in a nonvolatile memory built in a CPU and controls the vehicle based on the learned value read from the nonvolatile memory. And restricting access to the non-volatile memory by the CPU when the power supply voltage applied to the CPU drops below a predetermined value and when it is expected to drop below the predetermined value. Features.

本発明によれば、CPUに印加される電源電圧が所定値よりも低下した場合、及び所定値よりも低下することが予想される場合に、CPUによる不揮発性メモリへのアクセスを制限することで、異常判定及び異常値の書き込みを抑制でき、CPUによる処理を低減して負担を軽減できる。   According to the present invention, when the power supply voltage applied to the CPU drops below a predetermined value and when it is expected to drop below the predetermined value, the CPU restricts access to the nonvolatile memory. Thus, abnormality determination and abnormal value writing can be suppressed, and the processing by the CPU can be reduced to reduce the burden.

本発明の実施形態に係る自動車用電子制御装置の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an automotive electronic control device according to an embodiment of the present invention. 図1に示した自動車用電子制御装置における不揮発性メモリに対する第1の制御動作を示すフローチャートである。2 is a flowchart showing a first control operation for a nonvolatile memory in the automotive electronic control device shown in FIG. 1. 第1の制御動作の変形例1を示すフローチャートである。It is a flowchart which shows the modification 1 of a 1st control action. 第1の制御動作の変形例2を示すフローチャートである。It is a flowchart which shows the modification 2 of a 1st control action. 第1の制御動作の変形例3を示すフローチャートである。It is a flowchart which shows the modification 3 of a 1st control action. 第1の制御動作の変形例4を示すフローチャートである。It is a flowchart which shows the modification 4 of 1st control action. 不揮発性メモリに対する第2の制御動作を示すフローチャートである。It is a flowchart which shows the 2nd control action with respect to a non-volatile memory. 不揮発性メモリに対する第3の制御動作を示すフローチャートである。It is a flowchart which shows the 3rd control action with respect to a non-volatile memory. 図8におけるデータ待避動作とデータ復旧動作について説明するブロック図である。FIG. 9 is a block diagram for explaining a data saving operation and a data recovery operation in FIG. 8. 不揮発性メモリに対する第4の制御動作を示すフローチャートである。It is a flowchart which shows the 4th control action with respect to a non-volatile memory. 不揮発性メモリに対する第5の制御動作を示すフローチャートである。It is a flowchart which shows the 5th control action with respect to a non-volatile memory. 不揮発性メモリに対する第6の制御動作を示すフローチャートである。It is a flowchart which shows the 6th control action with respect to a non-volatile memory. 第6の制御動作の変形例5を説明するフローチャートである。It is a flowchart explaining the modification 5 of the 6th control action. 不揮発性メモリに対する第7の制御動作を示すフローチャートである。It is a flowchart which shows the 7th control action with respect to a non-volatile memory. 不揮発性メモリに対する第8の制御動作を示すフローチャートである。It is a flowchart which shows the 8th control action with respect to a non-volatile memory. 不揮発性メモリに対する第9の制御動作を示すフローチャートである。It is a flowchart which shows the 9th control action with respect to a non-volatile memory.

以下、本発明の実施形態について図面を参照して説明する。
図1に示すように、自動車用電子制御装置としてのECU(Electronic Control Unit)1は、CPU(Central Processing Unit)2、入力回路3、出力回路・出力監視回路4、及び電源回路5等を含んで構成されている。入力回路3には各種センサ及びスイッチ、例えばエンジン回転センサ、クランク角センサ、スロットルセンサ、電圧センサ、水温センサ、イグニッションキー、及びスタータスイッチ等から計測結果やスイッチの状態を示す信号が入力される。入力回路3に入力された信号はCPU2に入力され、CPU2で処理された信号が、出力回路から各種被制御機器のリレーやソレノイドバルブ等に供給され、これらが制御される。この際、出力監視回路によって各種被制御機器の制御状態がCPU2にフィードバックされ、CPU2によって各種被制御機器の制御状態が監視される。
Embodiments of the present invention will be described below with reference to the drawings.
As shown in FIG. 1, an ECU (Electronic Control Unit) 1 as an automotive electronic control device includes a CPU (Central Processing Unit) 2, an input circuit 3, an output circuit / output monitoring circuit 4, a power supply circuit 5, and the like. It consists of The input circuit 3 receives signals indicating measurement results and switch states from various sensors and switches such as an engine rotation sensor, a crank angle sensor, a throttle sensor, a voltage sensor, a water temperature sensor, an ignition key, and a starter switch. The signal input to the input circuit 3 is input to the CPU 2, and the signal processed by the CPU 2 is supplied from the output circuit to relays and solenoid valves of various controlled devices, and these are controlled. At this time, the control state of various controlled devices is fed back to the CPU 2 by the output monitoring circuit, and the control state of the various controlled devices is monitored by the CPU 2.

電源回路5には、バッテリ等の電源から電源電圧Vbaが印加され、各回路、例えば上記CPU2、入力回路3、及び出力回路・出力監視回路4に動作電源が供給される。
そして、上記ECU1によって、例えば点火タイミング、燃料噴射量、スロットルバルブの開閉、及びバルブタイミング等が制御されるようになっている。
上記CPU2には、電気的に記録内容の消去・再書き込みが可能な不揮発性メモリ(不揮発性半導体メモリ)6が内蔵されている。この不揮発性メモリ6には、CPU2による制御手順を記述したソフトウェア、車両の状態、例えばエンジンの状態を示す学習値、及び自己診断の結果(エラーコード)等が格納されており、エンジン始動時に読み出してCPU2内のRAM等に記憶し、これらの記憶情報に基づき車両、例えばエンジンを制御する。また、学習値はバッテリ取り外し時やバッテリ交換時等の復帰用データ(初期値)として使用する。
A power supply voltage Vba is applied to the power supply circuit 5 from a power supply such as a battery, and operating power is supplied to each circuit, for example, the CPU 2, the input circuit 3, and the output circuit / output monitoring circuit 4.
The ECU 1 controls, for example, ignition timing, fuel injection amount, throttle valve opening / closing, valve timing, and the like.
The CPU 2 incorporates a nonvolatile memory (nonvolatile semiconductor memory) 6 that can electrically erase and rewrite recorded contents. This non-volatile memory 6 stores software describing the control procedure by the CPU 2, vehicle state, for example, a learning value indicating the engine state, a self-diagnosis result (error code), etc., which are read when the engine is started. Are stored in a RAM or the like in the CPU 2 and a vehicle, for example, an engine is controlled based on the stored information. The learning value is used as return data (initial value) when the battery is removed or the battery is replaced.

[第1の制御動作]
次に、CPU2による不揮発性メモリ6に対する第1の制御動作について、図2のフローチャートにより説明する。CPU2は、電圧センサで電源電圧Vbaを監視しており(ステップS1)、電源電圧Vbaが低下したか否かを判定する(ステップS2)。この電圧センサによる電源電圧Vbaの検出には、例えばバッテリライン電圧あるいはイグニッションキーに直結されている電源ラインの電圧を計測する。
[First control operation]
Next, the first control operation for the nonvolatile memory 6 by the CPU 2 will be described with reference to the flowchart of FIG. The CPU 2 monitors the power supply voltage Vba with a voltage sensor (step S1), and determines whether or not the power supply voltage Vba has decreased (step S2). For detection of the power supply voltage Vba by this voltage sensor, for example, the battery line voltage or the voltage of the power supply line directly connected to the ignition key is measured.

そして、電源電圧Vbaが所定値、すなわち不揮発性メモリ6の動作保証電圧の下限値Vminより低下(Vba<Vmin)したと判定されると、不揮発性メモリ6への書き込みを禁止する(ステップS3)。一方、通常状態(Vba≧Vmin)であると判定されると、不揮発性メモリ6への書き込みを許可する(ステップS4)。
次のステップS5で、電源電圧Vbaが低下して不揮発性メモリ6が書き込み禁止中か否かを判定する。書き込み禁止中でなければステップS1に戻って、電源電圧Vbaの監視に基づき、不揮発性メモリ6へのアクセス(書き込み)制御動作を繰り返す(ステップS1〜S4)。
When it is determined that the power supply voltage Vba is lower than a predetermined value, that is, the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6 (Vba <Vmin), writing to the nonvolatile memory 6 is prohibited (step S3). . On the other hand, if it is determined that the normal state (Vba ≧ Vmin), writing to the nonvolatile memory 6 is permitted (step S4).
In the next step S5, it is determined whether or not the power supply voltage Vba is lowered and the non-volatile memory 6 is write-protected. If the writing is not prohibited, the process returns to step S1, and the access (write) control operation to the nonvolatile memory 6 is repeated based on the monitoring of the power supply voltage Vba (steps S1 to S4).

一方、ステップS5で書き込み禁止中と判定されると、電源電圧Vbaを計測し(ステップS6)、書き込み禁止の解除電圧Vre以上(Vba>Vre)に回復したか否かを判定する(ステップS7)。電源電圧Vbaが解除電圧Vre以上に回復していなければ、不揮発性メモリ6への書き込み禁止を維持し(ステップS8)、ステップS6に戻って電源電圧Vbaを計測し、書き込み禁止の解除電圧Vre以上に回復するまでステップS6〜S8の動作を繰り返す。
ステップS7で電源電圧Vbaが解除電圧Vre以上に回復したと判定されると、不揮発性メモリ6への書き込みを許可する(ステップS9)。そして、ECU1による制御が終了したか否か、例えばイグニッションキーがオンからオフになったか否かを判定し(ステップS10)、ECU1による制御が終了するまで上述したステップS1〜S9の動作を繰り返す。
On the other hand, if it is determined in step S5 that the writing is prohibited, the power supply voltage Vba is measured (step S6), and it is determined whether or not the write prohibiting release voltage Vre is restored (Vba> Vre) (step S7). . If the power supply voltage Vba has not recovered to the release voltage Vre or higher, write prohibition to the nonvolatile memory 6 is maintained (step S8), the process returns to step S6 to measure the power supply voltage Vba, and the write prohibition release voltage Vre or higher. The operations in steps S6 to S8 are repeated until it is recovered.
If it is determined in step S7 that the power supply voltage Vba has recovered to the release voltage Vre or higher, writing to the nonvolatile memory 6 is permitted (step S9). Then, it is determined whether or not the control by the ECU 1 is finished, for example, whether or not the ignition key is turned off from on (step S10), and the above-described operations of steps S1 to S9 are repeated until the control by the ECU 1 is finished.

このように、車両のバッテリ等の電源からECU1へ供給される電源電圧Vbaを監視及び確認して、通常時、すなわち不揮発性メモリ6の動作保証電圧の下限値Vmin(例えば6V)以上のときは、不揮発性メモリ6に対する書き込み、及びブランクチェック等のアクセスを許可し、下限値Vminより低電圧のときには不揮発性メモリ6への書き込み、及びブランクチェック等のアクセスを禁止する。また、電源電圧Vbaが低下して不揮発性メモリ6がアクセス禁止となった場合には、解除電圧Vre以上となるまでアクセス禁止状態を維持し、解除電圧Vre以上となったときにアクセスを許可する。   As described above, the power supply voltage Vba supplied to the ECU 1 from the power source such as a battery of the vehicle is monitored and confirmed, and in normal times, that is, when the operation guarantee voltage of the nonvolatile memory 6 is equal to or higher than the lower limit value Vmin (for example, 6 V). Write access to the non-volatile memory 6 and access such as a blank check are permitted. When the voltage is lower than the lower limit value Vmin, access to the non-volatile memory 6 and access such as a blank check are prohibited. Further, when the power supply voltage Vba decreases and the nonvolatile memory 6 is prohibited from accessing, the access prohibited state is maintained until the voltage becomes equal to or higher than the release voltage Vre, and access is permitted when the voltage becomes higher than the release voltage Vre. .

上記構成の自動車用電子制御装置によると、内蔵の不揮発性メモリ6へ書き込みを行うと不定値となるような低い電源電圧(Vba<Vmin)の場合には、不揮発性メモリ6に対する書き込み、及びブランクチェック等のアクセスを行わないので、異常判定及び異常値の書き込みを抑制することができる。また、電源電圧Vbaが、下限値Vmin以下になった場合は、電源電圧Vbaが解除電圧Vre以上(Vba≧Vre)に回復してから、不揮発性メモリ6に対するアクセスを行うことで、正常な書き込み等の処理を行うことができる。これによって、外付けの不揮発性メモリとサブマイコンを削減し、ECU1に内蔵された不揮発性メモリ6を使用しながら、異常判定及び異常値の書き込みを抑制でき、CPU2の負担を軽減できる。   According to the vehicle electronic control device having the above-described configuration, in the case of a low power supply voltage (Vba <Vmin) that becomes an indeterminate value when writing to the built-in nonvolatile memory 6, writing to the nonvolatile memory 6 and blanking are performed. Since access such as checking is not performed, abnormality determination and writing of abnormal values can be suppressed. In addition, when the power supply voltage Vba becomes lower than the lower limit value Vmin, the normal write is performed by accessing the nonvolatile memory 6 after the power supply voltage Vba recovers to the release voltage Vre or higher (Vba ≧ Vre). Etc. can be performed. As a result, it is possible to reduce external nonvolatile memory and sub-microcomputers, suppress abnormality determination and writing of abnormal values while using the nonvolatile memory 6 built in the ECU 1, and reduce the load on the CPU 2.

なお、上記解除電圧Vreは、書き込み禁止時の低電圧判定値である不揮発性メモリ6の動作保証電圧の下限値Vminと等しくすることもできるが、電源電圧Vbaの安定性と不揮発性メモリ6への書き込み余裕を考慮して、下限値Vminよりも高く設定すると良い。
また、電源電圧Vbaの低下で、本処理後にCPU2がリセットした場合には、不揮発性メモリ6へリセットフラグをセットして、CPU2がリセットされたことを記録し、従来と基本的に同様な後処理を行う。
The release voltage Vre can be made equal to the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6 which is a low voltage determination value at the time of write prohibition, but the stability of the power supply voltage Vba and the nonvolatile memory 6 In consideration of the write margin, it may be set higher than the lower limit value Vmin.
If the CPU 2 is reset after this processing due to a drop in the power supply voltage Vba, a reset flag is set in the non-volatile memory 6 to record that the CPU 2 has been reset. Process.

<変形例1>
図3に示す変形例1は、図2に示したフローチャートにおける、不揮発性メモリ6へのアクセス(書き込み)制御において、イグニッションキーのオン/オフ状態を考慮するものである。
すなわち、まずイグニッションキーがオンか否かを判定し(ステップS11)、オンであれば電源電圧Vbaが低下する可能性があるので、不揮発性メモリ6を書き込み禁止にする(ステップS12)。そして、イグニッションキーがオンしてからの経過時間を計測し(ステップS13)、所定時間が経過したか否かを判定する(ステップS14)。所定時間が経過するまではステップS12〜S14を繰り返し、不揮発性メモリ6への書き込み禁止を維持する。この所定時間は、イグニッションキーがオンしてから、例えばスタータが回転されてエンジンが始動し、電源電圧Vbaが安定するまでの時間を設定する。そして、所定時間経過すると、不揮発性メモリ6への書き込みを許可し(ステップS15)、ステップS19の書き込み禁止中か否かの判定に移動する。
<Modification 1>
The modification 1 shown in FIG. 3 considers the on / off state of the ignition key in the access (write) control to the nonvolatile memory 6 in the flowchart shown in FIG.
That is, first, it is determined whether or not the ignition key is on (step S11). If the ignition key is on, the power supply voltage Vba may decrease, and thus the nonvolatile memory 6 is write-protected (step S12). Then, an elapsed time after the ignition key is turned on is measured (step S13), and it is determined whether or not a predetermined time has elapsed (step S14). Until the predetermined time elapses, steps S12 to S14 are repeated, and the prohibition of writing to the nonvolatile memory 6 is maintained. This predetermined time is set to the time from when the ignition key is turned on until the starter is rotated and the engine is started and the power supply voltage Vba is stabilized. When a predetermined time has elapsed, writing to the nonvolatile memory 6 is permitted (step S15), and the process proceeds to step S19 for determining whether writing is prohibited.

一方、ステップS11でイグニッションキーがオフと判定された場合には、電圧センサで電源電圧Vbaを監視し(ステップS16)、電源電圧Vbaが低下したか否かを判定する(ステップS17)。電源電圧Vbaが所定値、例えば不揮発性メモリ6の動作保証電圧の下限値Vminより低下したと判定されると、不揮発性メモリ6への書き込みを禁止し(ステップS18)、通常状態(動作保証電圧内)であると判定されると、不揮発性メモリ6への書き込みを許可する(ステップS15)。
ステップS19では、電源電圧Vbaが低下したことにより、不揮発性メモリ6が書き込み禁止中か否かを判定する。書き込み禁止中でなければステップS11に戻り、上述した制御動作を繰り返す。
On the other hand, when it is determined in step S11 that the ignition key is off, the power supply voltage Vba is monitored by the voltage sensor (step S16), and it is determined whether or not the power supply voltage Vba has decreased (step S17). When it is determined that the power supply voltage Vba is lower than a predetermined value, for example, the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6, writing to the nonvolatile memory 6 is prohibited (step S18), and the normal state (operation guarantee voltage) If it is determined that it is (inside), writing to the nonvolatile memory 6 is permitted (step S15).
In step S19, it is determined whether or not the nonvolatile memory 6 is write-protected because the power supply voltage Vba has decreased. If writing is not prohibited, the process returns to step S11 to repeat the control operation described above.

本変形例1では、車両のバッテリ等の電源からECU1へ供給される電源電圧Vbaの監視及び確認に加えて、イグニッションキーのオン/オフ状態を考慮するので、電源電圧Vbaが低下したときだけでなく、電源電圧Vbaの低下が予想される場合にも、CPU2による不揮発性メモリ6への書き込みを禁止することで、異常判定及び異常値の書き込みを抑制できる。これによって、CPU2による処理を低減して負担を軽減できる。
なお、復帰動作は、図2のフローチャートのステップS6以降と同様であり、電源電圧Vbaが解除電圧Vreより低い場合には書き込み禁止を維持し、解除電圧Vre以上になったときに、不揮発性メモリ6への書き込みを許可に復帰させる。
In the first modification, in addition to monitoring and confirmation of the power supply voltage Vba supplied to the ECU 1 from the power source such as a battery of the vehicle, the on / off state of the ignition key is taken into account, so that only when the power supply voltage Vba decreases. Even when the power supply voltage Vba is expected to decrease, the determination of abnormality and the writing of abnormal values can be suppressed by prohibiting the CPU 2 from writing to the nonvolatile memory 6. Thereby, the processing by the CPU 2 can be reduced and the burden can be reduced.
The return operation is the same as that after step S6 in the flowchart of FIG. 2. When the power supply voltage Vba is lower than the release voltage Vre, the write prohibition is maintained, and when the voltage exceeds the release voltage Vre, the nonvolatile memory Return writing to 6 to permission.

<変形例2>
図4に示す変形例2は、スタータスイッチのオン/オフ状態に応じて不揮発性メモリ6へのアクセス(書き込み)制御を行うものである。
まず、スタータスイッチがオンか否かを判定し(ステップS21)、オンの時には不揮発性メモリ6を書き込み禁止にし(ステップS22)、オフの時は書き込み許可とする(ステップS23)。
<Modification 2>
Modification 2 shown in FIG. 4 performs access (write) control to the nonvolatile memory 6 in accordance with the on / off state of the starter switch.
First, it is determined whether or not the starter switch is on (step S21). When the starter switch is on, writing to the nonvolatile memory 6 is prohibited (step S22), and when it is off, writing is permitted (step S23).

そして、書き込み禁止中か否かを判定し(ステップS24)、書き込み禁止中でなければステップS21に戻ってスタータスイッチのオン/オフ状態に応じた不揮発性メモリ6への書き込み制御を行う。
スタータスイッチのオンによるクランキングは、消費電力が大きく、電源電圧Vbaが低下する可能性があるので、上述したようにCPU2による不揮発性メモリ6への書き込みを禁止することで、異常判定及び異常値の書き込みを抑制でき、CPU2による処理を低減して負担を軽減できる。
なお、復帰動作は、図2のフローチャートに示したように、電源電圧Vbaが解除電圧Vreより低い場合には書き込み禁止を維持し、解除電圧Vre以上になったときに、不揮発性メモリ6への書き込みを許可に復帰させる。
Then, it is determined whether or not writing is prohibited (step S24). If writing is not prohibited, the process returns to step S21 to control writing to the nonvolatile memory 6 in accordance with the on / off state of the starter switch.
Cranking by turning on the starter switch consumes a large amount of power and may reduce the power supply voltage Vba. As described above, by prohibiting writing to the nonvolatile memory 6 by the CPU 2, abnormality determination and an abnormal value are performed. Can be suppressed, and the processing by the CPU 2 can be reduced to reduce the burden.
As shown in the flowchart of FIG. 2, the return operation maintains the write inhibition when the power supply voltage Vba is lower than the release voltage Vre, and when the power supply voltage Vba becomes equal to or higher than the release voltage Vre, Return writing to permission.

また、本変形例2は、図2に示した電源電圧Vbaの監視と組み合わせることもでき、スタータスイッチがオンで、且つ電源電圧Vbaが不揮発性メモリ6の動作保証電圧の下限値Vminより低下したときに、不揮発性メモリ6へのアクセス(書き込み)を禁止するようにしても良い。
更に、図3に示したステップS11において、イグニッションキーがオンか否かの判定ではなく、スタータスイッチがオンか否かを判定し、ステップS14の所定時間を、スタータスイッチがオンしてからエンジンが始動するまでの時間、あるいはエンジン回転が安定するまでの時間に設定しても良い。
Further, the second modification can be combined with the monitoring of the power supply voltage Vba shown in FIG. 2, the starter switch is turned on, and the power supply voltage Vba is lower than the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6. Sometimes, access (write) to the nonvolatile memory 6 may be prohibited.
Further, in step S11 shown in FIG. 3, it is not determined whether or not the ignition key is turned on, but whether or not the starter switch is turned on, and a predetermined time of step S14 is determined after the starter switch is turned on. You may set to the time until it starts, or the time until engine rotation is stabilized.

<変形例3>
図5に示す変形例3は、エンジン停止時に、電源電圧Vbaが低下した場合に不揮発性メモリ6を書き込み禁止にし、エンジンが所定回転以上で回転している時は書き込み許可とするものである。
まず、エンジン回転センサ等によりエンジンが回転しているか否かを判定し(ステップS31)、回転している場合には、所定回転以上で回転しているか否か判定する(ステップS32)。エンジンが所定回転以上で回転している場合には不揮発性メモリ6への書き込みを許可し(ステップS33)、所定回転数以下の場合には不揮発性メモリ6への書き込みを禁止する(ステップS36)。
<Modification 3>
In the third modification shown in FIG. 5, when the engine is stopped, the nonvolatile memory 6 is prohibited from writing when the power supply voltage Vba decreases, and writing is permitted when the engine rotates at a predetermined speed or more.
First, it is determined whether or not the engine is rotating by an engine rotation sensor or the like (step S31). If the engine is rotating, it is determined whether or not the engine is rotating at a predetermined rotation or more (step S32). When the engine is rotating at a predetermined rotation speed or higher, writing to the nonvolatile memory 6 is permitted (step S33), and when the engine speed is equal to or lower than the predetermined rotation speed, writing to the nonvolatile memory 6 is prohibited (step S36). .

ステップS31でエンジンが回転していないと判定された場合(停車時、アイドルストップ時等)には、電源電圧Vbaを監視し(ステップS34)、電源電圧Vbaが不揮発性メモリ6の動作保証電圧の下限値Vminより低下したか否かを判定し(ステップS35)、低下したときには不揮発性メモリ6への書き込みを禁止し(ステップS36)、低下していないときには書き込みを許可する(ステップS33)。
次のステップS37で、不揮発性メモリ6が書き込み禁止中か否かを判定する。書き込み禁止中でなければステップS31に戻って、エンジン回転と電源電圧Vbaの監視を行い、上述した動作を繰り返す。復帰動作は、図2のフローチャートにおけるステップS6以降と同様である。
If it is determined in step S31 that the engine is not rotating (when the vehicle is stopped, idling stop, etc.), the power supply voltage Vba is monitored (step S34), and the power supply voltage Vba is the operation guarantee voltage of the nonvolatile memory 6. It is determined whether or not the value has fallen below the lower limit value Vmin (step S35). When the value is lowered, writing to the nonvolatile memory 6 is prohibited (step S36), and when it is not lowered, writing is permitted (step S33).
In the next step S37, it is determined whether or not the nonvolatile memory 6 is write-protected. If the writing is not prohibited, the process returns to step S31, the engine rotation and the power supply voltage Vba are monitored, and the above-described operation is repeated. The return operation is the same as that after step S6 in the flowchart of FIG.

エンジンが所定の回転以上で回転していれば、発電が行われて電源電圧Vbaを確保できるので、エンジンが停止している状態や、アイドリング状態のような回転数が低い状態で、CPU2による不揮発性メモリ6への書き込みを禁止することで、異常判定及び異常値の書き込みを抑制でき、CPU2による処理を低減して負担を軽減できる。
なお、アイドリング状態でも十分な発電量が確保できれば、ステップS32でのエンジン回転による判断は不要である。また、このステップS32で電源電圧Vbaを計測し、不揮発性メモリ6の動作保証電圧の下限値Vminより高いか低いかを判定し、低い場合にはCPU2による不揮発性メモリ6への書き込みを禁止し、高い場合には許可するようにしても良い。これは、HEV(Hybrid Electric Vehicle)車両では、走行中でもエンジンを停止することがあり、ECU1への電力供給が不足する可能性があるためである。
If the engine is rotating at a predetermined speed or more, the power generation is performed and the power supply voltage Vba can be secured. Therefore, the non-volatile state by the CPU 2 can be obtained in a state where the engine is stopped or in a low rotational speed such as an idling state. By prohibiting writing to the volatile memory 6, it is possible to suppress abnormality determination and writing of abnormal values, and the processing by the CPU 2 can be reduced to reduce the burden.
If a sufficient amount of power generation can be secured even in the idling state, the determination based on the engine rotation in step S32 is unnecessary. In step S32, the power supply voltage Vba is measured to determine whether it is higher or lower than the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6. If it is lower, writing to the nonvolatile memory 6 by the CPU 2 is prohibited. If it is high, it may be allowed. This is because, in a HEV (Hybrid Electric Vehicle) vehicle, the engine may be stopped even during traveling, and power supply to the ECU 1 may be insufficient.

<変形例4>
図6に示す変形例4は、電源電圧Vbaを監視し、電源電圧Vbaが低下したレベルに応じて不揮発性メモリ6への書き込み量(時間)を制限するものである。
まず、電源電圧Vbaを監視し(ステップS41)、電源電圧Vbaが低下したか否かを判定する(ステップS42)。電源電圧が低下していない場合には、不揮発性メモリ6の全記憶領域を書き込み許可にする(ステップS43)。
<Modification 4>
Modification 4 shown in FIG. 6 monitors the power supply voltage Vba, and limits the amount of writing (time) to the nonvolatile memory 6 according to the level at which the power supply voltage Vba has decreased.
First, the power supply voltage Vba is monitored (step S41), and it is determined whether or not the power supply voltage Vba has decreased (step S42). If the power supply voltage has not dropped, writing is permitted in the entire storage area of the nonvolatile memory 6 (step S43).

ステップS42で電源電圧Vbaが低下したと判定されると、電源電圧Vbaが極低電圧、例えば不揮発性メモリ6の動作保証電圧の下限値Vminより低いか否かを判定する(ステップS44)。電源電圧Vbaが極低電圧でない場合には、不揮発性メモリ6への書き込み量(時間)を小さく(短く)設定して書き込み許可し(ステップS45)、極低電圧であれば書き込みを禁止する(ステップS46)。
次に、不揮発性メモリ6が書き込み制限中か否かを判定し(ステップS47)、書き込み制限中でなければステップS41に戻って、上述した動作を繰り返す。
復帰動作は、図2のフローチャートに示したように、電源電圧Vbaが解除電圧Vreより低い場合には書き込み禁止を維持し、解除電圧Vre以上になったときに、不揮発性メモリ6への書き込みを許可に復帰させる。
If it is determined in step S42 that the power supply voltage Vba has decreased, it is determined whether or not the power supply voltage Vba is lower than an extremely low voltage, for example, the lower limit value Vmin of the operation guarantee voltage of the nonvolatile memory 6 (step S44). If the power supply voltage Vba is not an extremely low voltage, the write amount (time) to the nonvolatile memory 6 is set to be small (short) to permit writing (step S45), and if it is an extremely low voltage, writing is prohibited ( Step S46).
Next, it is determined whether or not the nonvolatile memory 6 is in write restriction (step S47). If the write restriction is not in effect, the process returns to step S41 and the above-described operation is repeated.
As shown in the flow chart of FIG. 2, the return operation maintains the write inhibition when the power supply voltage Vba is lower than the release voltage Vre, and writes to the nonvolatile memory 6 when the release voltage Vre becomes higher than the release voltage Vre. Return to permission.

上記変形例4によれば、不揮発性メモリ6への書き込み禁止と書き込み許可だけでなく、電源電圧Vbaが動作保証電圧の下限値Vmin付近(下限値Vminより高いが十分な余裕がないレベル)に低下したときに、書き込み量(時間)を小さく(短く)設定して書き込みを行うことで、電源電圧Vbaのレベルに応じた書き込み制御を行うことができる。
なお、上記変形例4では、電源電圧Vbaの低下と極低電圧か否かの判定を行ったが、これらのステップS42,S44間に、電源電圧Vbaの中間レベルを判定するステップを設けることで、電源電圧Vbaの低下に応じた、より細かい制御が可能となる。例えば、電源電圧Vbaが6.0V以上であれば記憶領域の全域に書き込み許可、5.5Vまでは3/4の領域、5.0Vまでは1/2の領域、4.5Vまでは1/4の領域を書き込み許可とし、4.5V以下では書き込み禁止にする。
According to the fourth modification, not only write prohibition and write permission to the nonvolatile memory 6 but also the power supply voltage Vba is near the lower limit value Vmin of the operation guarantee voltage (a level that is higher than the lower limit value Vmin but does not have a sufficient margin). When the voltage drops, writing can be performed in accordance with the level of the power supply voltage Vba by setting the writing amount (time) to be small (short).
In the modification 4, the power supply voltage Vba is decreased and it is determined whether or not the voltage is extremely low. However, a step for determining the intermediate level of the power supply voltage Vba is provided between these steps S42 and S44. Thus, finer control is possible according to the decrease in the power supply voltage Vba. For example, if the power supply voltage Vba is 6.0 V or higher, writing is permitted in the entire storage area, up to 5.5 V is a 3/4 area, up to 5.0 V is a 1/2 area, up to 4.5 V is 1 / Area 4 is allowed to be written, and writing is prohibited at 4.5V or lower.

[第2の制御動作]
図7のフローチャートに示す第2の制御動作は、デバイスの駆動中か否か、不揮発性メモリが書き込み中か否かに応じて、不揮発性メモリ6への書き込みを制限するものである。
ステップS51では、デバイスが稼働中か否かを判定し、稼働中でなければ不揮発性メモリ6への書き込みを許可する(ステップS52)。ここで、デバイスとは作動によって電源電圧Vbaの低下が予想される機器、例えばアクチュエータ、スタータ、ヒータ、パワーステアリング、及びエアコン等であり、エンジンが低回転時に高いギヤへの切り替えも含む。
[Second control operation]
The second control operation shown in the flowchart of FIG. 7 restricts writing to the nonvolatile memory 6 depending on whether or not the device is being driven and whether or not the nonvolatile memory is being written.
In step S51, it is determined whether or not the device is operating. If not, writing to the nonvolatile memory 6 is permitted (step S52). Here, the device is a device in which the power supply voltage Vba is expected to decrease due to operation, for example, an actuator, a starter, a heater, a power steering, an air conditioner, and the like, and includes switching to a higher gear when the engine is running at a low speed.

次のステップS53では、不揮発性メモリ6への書き込み中か否かを判定し、書き込み中であれば不揮発性メモリへの書き込みを中断し(ステップS54)、書き込み中でなければ不揮発性メモリ6への書き込みを禁止する(ステップS55)。この際、書き込みを中断したアドレスをバックアップRAM等に記憶しておく。
ステップS56では、不揮発性メモリ6への書き込みが制限(禁止及び中断)中か否かを判定し、書き込み許可状態であればステップS51に戻り、ステップS51〜S55の動作を繰り返す。書き込み制限中であれば、電源電圧Vbaを計測し(ステップS57)、書き込み禁止の解除電圧Vre以上に回復したか否かを判定する(ステップS58)。電源電圧Vbaが解除電圧Vre以上に回復していなければ、不揮発性メモリ6への書き込み制限を維持し(ステップS59)、ステップS57に戻って電源電圧Vbaを計測し、書き込み禁止の解除電圧Vre以上に回復するまでステップS57〜S59の動作を繰り返す。
In the next step S53, it is determined whether or not writing to the nonvolatile memory 6 is in progress. If writing is in progress, writing to the nonvolatile memory is interrupted (step S54). Is prohibited (step S55). At this time, the address at which writing was interrupted is stored in a backup RAM or the like.
In step S56, it is determined whether or not writing to the nonvolatile memory 6 is restricted (prohibited and suspended). If the writing is permitted, the process returns to step S51, and the operations in steps S51 to S55 are repeated. If the writing is being restricted, the power supply voltage Vba is measured (step S57), and it is determined whether or not the power supply voltage Vba has been recovered to the writing prohibition release voltage Vre or more (step S58). If the power supply voltage Vba has not recovered to the release voltage Vre or higher, the write restriction to the nonvolatile memory 6 is maintained (step S59), the process returns to step S57, the power supply voltage Vba is measured, and the write inhibit release voltage Vre or higher is maintained. The operation of steps S57 to S59 is repeated until it is recovered.

ステップS58で電源電圧Vbaが解除電圧Vre以上に回復していれば、不揮発性メモリ6への書き込みを許可し、中断していた場合には中断したアドレスから再書き込みを行う(ステップS60)。そして、書き込み終了後にECU1による制御が終了したか否か、例えばイグニッションキーがオンからオフになったか否かを判定し(ステップS61)、ECU1による制御が終了するまで上述したステップS51〜S60の動作を繰り返す。
上記のような第2の制御動作では、デバイスが稼働中か否かにより、電源電圧Vbaの低下を予想し、且つ不揮発性メモリ6への書き込み中か否かを判定することで、電源電圧Vbaが低下したときに書き込みを禁止するだけでなく、不揮発性メモリ6への書き込み中であっても書き込みを中断することで、異常判定及び異常値の書き込みを抑制できる。
また、電源電圧Vbaが解除電圧Vre以上に回復したときに、中断したアドレスから書き込みを行うことで、正常な書き込みを行うことができる。
If the power supply voltage Vba has recovered to the release voltage Vre or higher in step S58, writing to the nonvolatile memory 6 is permitted. If interrupted, rewriting is performed from the interrupted address (step S60). Then, it is determined whether or not the control by the ECU 1 is finished after the writing is finished, for example, whether or not the ignition key is turned off from on (step S61), and the operations of the above-described steps S51 to S60 until the control by the ECU 1 is finished. repeat.
In the second control operation as described above, a decrease in the power supply voltage Vba is predicted depending on whether or not the device is in operation, and it is determined whether or not writing to the nonvolatile memory 6 is in progress. In addition to prohibiting the writing when the voltage drops, the determination of abnormality and the writing of the abnormal value can be suppressed by interrupting the writing even during the writing to the nonvolatile memory 6.
Moreover, when the power supply voltage Vba recovers to the release voltage Vre or higher, writing is performed from the interrupted address, so that normal writing can be performed.

[第3の制御動作]
図8のフローチャートに示す第3の制御動作は、上述した第1、第2の制御動作及びその変形例1〜4において、不揮発性メモリ6への書き込み許可を受け、不揮発性メモリ6へ書き込みを行う際の詳しい動作を示している。本第3の制御動作は、例えば不揮発性メモリ6への書き込み中に瞬低等によりNMI(Non-Maskable Interrupt)割り込みが発生した場合に、不揮発性メモリ6内のデータをバックアップRAMへ待避するものである。
すなわち、不揮発性メモリ6への書き込み許可を受け、不揮発性メモリ6へ書き込みを行う(ステップS71)。書き込み中の電源電圧Vbaを監視し(ステップS72)、電源電圧Vbaが所定値以下か否かを判定する(ステップS73)。電源電圧Vbaが所定値以下でなければ、データの待避が実施済みか否かを判定し(ステップS74)、実施済みであればバックアップRAMから不揮発性メモリ6にデータを復旧する(ステップS75)。実施済みでなければ、書き込み許可を受けた後のステップに戻る。
[Third control operation]
The third control operation shown in the flowchart of FIG. 8 receives the write permission to the nonvolatile memory 6 and writes to the nonvolatile memory 6 in the first and second control operations and the modifications 1 to 4 described above. It shows the detailed operation when performing. In the third control operation, for example, when an NMI (Non-Maskable Interrupt) interrupt occurs due to an instantaneous drop or the like during writing to the nonvolatile memory 6, the data in the nonvolatile memory 6 is saved to the backup RAM. It is.
That is, the writing permission to the nonvolatile memory 6 is received and writing to the nonvolatile memory 6 is performed (step S71). The power supply voltage Vba during writing is monitored (step S72), and it is determined whether or not the power supply voltage Vba is equal to or lower than a predetermined value (step S73). If the power supply voltage Vba is not less than or equal to the predetermined value, it is determined whether or not data saving has been performed (step S74), and if it has been performed, the data is restored from the backup RAM to the nonvolatile memory 6 (step S75). If not, return to the step after receiving write permission.

電源電圧Vbaが所定値以下であれば、電源電圧Vbaが動作保証電圧以上か否かを判定する(ステップS76)。そして、動作保証電圧以上であれば、不揮発性メモリ6内のデータをバックアップRAM内に待避し(ステップS77)、待避が終了したか否か判定して(ステップS78)、終了と判定されると書き込み許可を受けた後のステップに戻る。ステップS76で動作保証電圧以上であると判定されると、不揮発性メモリ6への書き込みを中断し(ステップS79)、中断したアドレスをバックアップRAM等に記憶して、書き込み許可を受けた後のステップに戻る。
上記ステップS77におけるバックアップRAMへのデータの待避は、図9に示すように、バックアップRAM7における学習値を記憶する領域7aと異なるデータ待避領域7bにする。そして、矢印に示すように、不揮発性メモリ6とデータ待避領域7bとの間でデータの待避(矢印8a)と復旧(矢印8b)を行う。
If the power supply voltage Vba is equal to or lower than a predetermined value, it is determined whether or not the power supply voltage Vba is equal to or higher than the operation guarantee voltage (step S76). If it is equal to or higher than the operation guarantee voltage, the data in the nonvolatile memory 6 is saved in the backup RAM (step S77), it is determined whether the saving is completed (step S78), and it is determined that the process is finished. Return to step after receiving write permission. If it is determined in step S76 that the voltage is equal to or higher than the operation guarantee voltage, the writing to the non-volatile memory 6 is interrupted (step S79), the interrupted address is stored in the backup RAM, etc. Return to.
As shown in FIG. 9, the data saving to the backup RAM in the step S77 is performed in a data saving area 7b different from the area 7a for storing the learning value in the backup RAM 7. As indicated by the arrows, data is saved (arrow 8a) and restored (arrow 8b) between the nonvolatile memory 6 and the data save area 7b.

本第3の制御動作では、不揮発性メモリへの書き込み中に瞬低によりNMI割り込みが発生した場合に、書き込み中の不揮発性メモリ6のアドレスを記憶して書き込み動作を中断する。また、不揮発性メモリ6内のデータをRAMまたはバックアップRAMへ待避する。そして、瞬低発生時は、不揮発性メモリ6へ正常に書き込みが行われないことがあるので、瞬低が発生した場合には、RAMまたはバックアップRAMのデータを不揮発性メモリ6へ書き込む。
これによって、不揮発性メモリへの書き込み中にNMI割り込み等が発生した場合に、異常判定及び異常値の書き込みを抑制し、不揮発性メモリ6内のデータをバックアップRAMへ待避して、バックアップRAMから不揮発性メモリ6に復旧させることができる。
なお、ステップS77,S78のバックアップRAMへの待避と、ステップS74のデータ待避実施済みかの判定は行わず、不揮発性メモリへの書き込み中にNMI割り込み等が発生した場合に、異常判定及び異常値の書き込みを抑制するようにしても良い。
In the third control operation, when an NMI interrupt occurs due to a momentary drop during writing to the nonvolatile memory, the address of the nonvolatile memory 6 being written is stored and the writing operation is interrupted. Further, the data in the nonvolatile memory 6 is saved to the RAM or the backup RAM. When the instantaneous drop occurs, the writing to the nonvolatile memory 6 may not be performed normally. Therefore, when the instantaneous drop occurs, the data of the RAM or the backup RAM is written to the nonvolatile memory 6.
As a result, when an NMI interrupt or the like occurs during writing to the nonvolatile memory, abnormality determination and writing of an abnormal value are suppressed, data in the nonvolatile memory 6 is saved to the backup RAM, and the nonvolatile data is stored in the backup RAM. Memory 6 can be restored.
Note that the saving to the backup RAM in steps S77 and S78 and the data saving in step S74 are not determined. If an NMI interrupt or the like occurs during writing to the nonvolatile memory, an abnormality determination and an abnormal value are performed. May be suppressed.

[第4の制御動作]
図10のフローチャートに示す第4の制御動作は、不揮発性メモリ6のデータを、予め不揮発性メモリ6内の別の記憶領域に複製しておくものである。本第4の制御動作は、上述した第1乃至第3の制御動作とは独立して行い、これらの制御動作のいずれか、あるいは複数と組み合わせることができる。
まず、エンジン回転センサ等によりエンジン回転が所定回転数以上で安定しているか否か判定し(ステップS81)、安定している場合に不揮発性メモリ6のデータを、該不揮発性メモリ6の別の記憶領域(物理アドレス)に複製しておく(ステップS82)。続いて、前回の書き込み中に電源電圧Vbaが低下したか否かを判定する(ステップS83)。前回、不揮発性メモリ6への書き込み中に電源電圧Vbaの低下(6V未満、NMI割り込み等)が発生し、その後、電源電圧Vbaが復帰(判断基準を6V以上、または6V+α等に設定)した場合は、不揮発性メモリ6内のデータが破損している可能性があるため、予め複製しておいたデータで復旧する。また、不揮発性メモリ6の消去中に電源電圧Vbaの低下が起きた場合には、不揮発性メモリ6が内部異常(ブランク不良等)を起こしている可能性があるため、不揮発性メモリ6の初期化を行う。
[Fourth control operation]
In the fourth control operation shown in the flowchart of FIG. 10, data in the nonvolatile memory 6 is copied in advance to another storage area in the nonvolatile memory 6. The fourth control operation is performed independently of the first to third control operations described above, and can be combined with any one or more of these control operations.
First, it is determined whether or not the engine rotation is stable at a predetermined rotation speed or higher by an engine rotation sensor or the like (step S81), and if it is stable, the data in the nonvolatile memory 6 is stored in another nonvolatile memory 6 A copy is made in the storage area (physical address) (step S82). Subsequently, it is determined whether or not the power supply voltage Vba has decreased during the previous writing (step S83). When the power supply voltage Vba dropped (less than 6V, NMI interrupt, etc.) during writing to the non-volatile memory 6 last time, and then the power supply voltage Vba returned (the criterion is set to 6V or higher, or 6V + α, etc.) Since there is a possibility that the data in the non-volatile memory 6 is damaged, it is restored with the data copied in advance. Further, when the power supply voltage Vba is reduced during the erasure of the nonvolatile memory 6, there is a possibility that the nonvolatile memory 6 has an internal abnormality (such as a blank defect). To do.

次に、今回の書き込み時に電源電圧Vbaが回復したか否かを判定し(ステップS84)、電源電圧Vbaが回復したと判定されると、不揮発性メモリ6の内容を複製したデータから復旧する。
ステップS81でエンジン回転が所定回転数以上で安定していないと判定された場合、ステップS83で前回の書き込み中に電源電圧Vbaが低下していないと判定された場合、及びステップS84で今回の書き込み時に電源電圧Vbaが回復していないと判定された場合には、本第4の制御動作を終了する。
Next, it is determined whether or not the power supply voltage Vba has been recovered at the time of writing this time (step S84). If it is determined that the power supply voltage Vba has been recovered, the contents of the nonvolatile memory 6 are recovered from the duplicated data.
If it is determined in step S81 that the engine speed is not stable at a predetermined speed or more, if it is determined in step S83 that the power supply voltage Vba has not decreased during the previous writing, and the current writing is performed in step S84. If it is determined that the power supply voltage Vba has not recovered from time to time, the fourth control operation ends.

このように、電源電圧Vbaの瞬低が起こり難い、エンジン回転数が安定しているときに、不揮発性メモリ6内のデータを、予め不揮発性メモリ6の別の記憶領域(物理アドレス)に複製しておくことで、不揮発性メモリ6への書き込み中に電源電圧Vbaの低下が発生しても、複製したデータから復旧させることができる。
なお、データ複製時に、不揮発性メモリ6の複数の記憶領域へ書き込むことで、データを復旧できる可能性を高くできる。
In this way, when the power supply voltage Vba is unlikely to drop instantaneously and the engine speed is stable, the data in the nonvolatile memory 6 is copied in advance to another storage area (physical address) of the nonvolatile memory 6. By doing so, even if the power supply voltage Vba is reduced during writing to the nonvolatile memory 6, it is possible to recover from the replicated data.
Note that the possibility of data recovery can be increased by writing data to a plurality of storage areas of the nonvolatile memory 6 at the time of data replication.

[第5の制御動作]
図11のフローチャートに示す第5の制御動作は、不揮発性メモリ6のデータを読み出し、予め設定した範囲内に値が収まっているかを確認するものである。本第5の制御動作も、上述した第1乃至第4の制御動作とは独立して行う。
まず、不揮発性メモリ6のデータを読み出し(ステップS91)、予め設定した範囲内に値が収まっているかを判定する(ステップS92)。この設定範囲は、予め設定範囲データとして記憶しておいても良いし、制御用のプログラム値に含まれていても良い。そして、不揮発性メモリ6から読み出したデータが予め設定した範囲外であれば、不揮発性メモリ6の記憶データが破損した可能性があるので、該当する不揮発性メモリ6の特定のデータ、または同一ブロック、または全てのデータを初期化し、新たに初期値を設定する(ステップS93)。
本第5の制御動作は、不揮発性メモリ6の記憶データが破損した可能性がある場合に実施することで、不揮発性メモリ6の特定のデータ、ブロックあるいは全てのデータを復旧できる。
[Fifth control operation]
The fifth control operation shown in the flowchart of FIG. 11 is to read data from the nonvolatile memory 6 and check whether the value is within a preset range. The fifth control operation is also performed independently of the first to fourth control operations described above.
First, data in the nonvolatile memory 6 is read (step S91), and it is determined whether the value is within a preset range (step S92). This set range may be stored in advance as set range data, or may be included in a control program value. If the data read from the non-volatile memory 6 is outside the preset range, the stored data in the non-volatile memory 6 may be damaged. Therefore, the specific data of the corresponding non-volatile memory 6 or the same block Alternatively, all data is initialized and a new initial value is set (step S93).
The fifth control operation is performed when there is a possibility that the data stored in the nonvolatile memory 6 is damaged, whereby specific data, blocks, or all data in the nonvolatile memory 6 can be recovered.

[第6の制御動作]
図12のフローチャートに示す第6の制御動作は、複数のECUを備えたシステムであって、これらECU間でデータの授受が行われる場合に、不揮発性メモリ6のデータを、当該ECU1とは異なる別のECUに待避するものである。本第6の制御動作も、上述した第1乃至第5の制御動作とは独立して行う。
学習値を更新後(ステップS101)、この学習値をECU1とは異なる別のECUが備えるRAM、バックアップRAMあるいは不揮発性メモリ等に待避しておく(ステップS102)。学習値を待避する別のECUは、少なくともECU1と同等か、より低い電源電圧Vbaで動作するものが望ましい。
[Sixth control operation]
The sixth control operation shown in the flowchart of FIG. 12 is a system including a plurality of ECUs, and when data is exchanged between these ECUs, the data in the nonvolatile memory 6 is different from that of the ECU 1. It is saved in another ECU. The sixth control operation is also performed independently of the first to fifth control operations described above.
After updating the learning value (step S101), the learning value is saved in a RAM, a backup RAM, a nonvolatile memory, or the like provided in another ECU different from the ECU 1 (step S102). Another ECU that saves the learning value is preferably one that operates at least at the power supply voltage Vba that is equal to or lower than that of the ECU 1.

そして、ECU1で学習値を不揮発性メモリ6に書き込み更新する(ステップS103)。この学習値の更新中あるいは消去中に、電源電圧Vbaの低下が発生したか否か判定し(ステップS104)、発生した場合には、上記別のECUに待避した学習値を不揮発性メモリ6に書き込んでデータを復旧する。電源電圧Vbaの低下が発生しない場合には終了し、次回の学習値の書き込み中の電源電圧Vbaの低下に備える。
本第6の制御動作によれば、不揮発性メモリ6へ学習値の更新中、及び消去中に電源電圧Vbaの低下によるNMI割り込み等が発生した場合に、他のECUへ待避していた学習値等を不揮発性メモリ6へ書き込んで復旧させることができる。
Then, the learning value is written and updated in the nonvolatile memory 6 in the ECU 1 (step S103). During the update or deletion of the learned value, it is determined whether or not the power supply voltage Vba has decreased (step S104). If it has occurred, the learned value saved in the other ECU is stored in the nonvolatile memory 6. Write and recover data. If the power supply voltage Vba does not decrease, the process ends and prepares for a decrease in the power supply voltage Vba during writing of the next learned value.
According to the sixth control operation, when an NMI interrupt or the like due to a decrease in the power supply voltage Vba occurs during updating or erasing of the learning value in the nonvolatile memory 6, the learning value saved to another ECU Etc. can be restored by writing them in the nonvolatile memory 6.

<変形例5>
図13に示す制御動作は、図12に示した第6の制御動作の変形例を示している。ステップS101〜S104は、図12と同じであるので詳細な説明は省略する。
すなわち、ステップS104で学習値の更新中あるいは消去中に、電源電圧Vbaの低下が発生したと判定された場合に、同一ブロック内で複数の範囲に異常があるか否か判定する(ステップS106)。複数の範囲に異常なしと判定された場合には、他のECUから不揮発性メモリ6の該当データを復旧する(ステップS107)。複数の範囲に異常ありと判定された場合には、異ブロック間で複数の範囲に異常があるか否かを判定する(ステップS108)。異ブロック間で複数の範囲に異常ありと判定されると、他のECUから不揮発性メモリ6の該当ブロックのデータを復旧する(ステップS109)。異ブロック間で複数の範囲に異常なしと判定されると、他のECUから不揮発性メモリ6の全記憶領域のデータを復旧する(ステップS110)。
本変形例5によれば、不揮発性メモリ6へのデータの復旧を、データの異常の状況に応じて、該当データ、該当ブロック、全記憶領域と切り換え、効率良く復旧することができる。
<Modification 5>
The control operation shown in FIG. 13 shows a modification of the sixth control operation shown in FIG. Steps S101 to S104 are the same as those in FIG.
That is, if it is determined in step S104 that the power supply voltage Vba has decreased during the update or deletion of the learning value, it is determined whether or not there is an abnormality in a plurality of ranges in the same block (step S106). . If it is determined that there is no abnormality in a plurality of ranges, the corresponding data in the nonvolatile memory 6 is restored from another ECU (step S107). If it is determined that there is an abnormality in a plurality of ranges, it is determined whether or not there is an abnormality in the plurality of ranges between different blocks (step S108). If it is determined that there is an abnormality in a plurality of ranges between different blocks, the data of the corresponding block in the nonvolatile memory 6 is restored from another ECU (step S109). If it is determined that there is no abnormality in a plurality of ranges between different blocks, the data in the entire storage area of the nonvolatile memory 6 is restored from another ECU (step S110).
According to the fifth modification, the restoration of data to the nonvolatile memory 6 can be efficiently restored by switching to the corresponding data, the corresponding block, and the entire storage area in accordance with the data abnormality status.

[第7の制御動作]
図14のフローチャートに示す第7の制御動作は、複数のECUを備えたシステムであって、これらECU間で通信等によりデータの授受が行われる場合に、不揮発性メモリ6のデータを、当該ECU1とは異なる別のECUに待避し、不揮発性メモリ6の物理的な破損時、またはデータが所定範囲内にない時(データの破損)等において、他のECUから通信等を使用してデータを復旧するものである。本第7の制御動作も、上述した第1乃至第6の制御動作とは独立して行う。
[Seventh control operation]
The seventh control operation shown in the flowchart of FIG. 14 is a system including a plurality of ECUs. When data is exchanged between these ECUs by communication or the like, the data in the nonvolatile memory 6 is transferred to the ECU 1. When the nonvolatile memory 6 is physically damaged, or when the data is not within a predetermined range (data corruption), the data is transferred from another ECU using communication or the like. It will be restored. The seventh control operation is also performed independently of the first to sixth control operations described above.

すなわち、不揮発性メモリ6の全データを、ECU1とは異なる別のECUが備えるRAM、バックアップRAMあるいは不揮発性メモリ等に待避しておく(ステップS111)。
そして、不揮発性メモリ6が破損したか否か、あるいはデータが所定範囲内にあるか否かを判定する(ステップS112)。データが所定範囲内にあるか否かの判定には、例えば不揮発性メモリ6の記憶データのSUM値、IN/OUT値等で確認を行う。不揮発性メモリ6が破損している場合、あるいはデータが破損している場合には、別のECUから通信等を使用して不揮発性メモリ6の全データを復旧する。破損していない場合には、本制御動作を終了する。
That is, all data in the nonvolatile memory 6 is saved in a RAM, a backup RAM, a nonvolatile memory, or the like provided in another ECU different from the ECU 1 (step S111).
Then, it is determined whether or not the nonvolatile memory 6 is damaged or whether the data is within a predetermined range (step S112). In order to determine whether the data is within a predetermined range, for example, confirmation is performed based on the SUM value, IN / OUT value, etc. of the data stored in the nonvolatile memory 6. When the nonvolatile memory 6 is damaged, or when the data is damaged, all data in the nonvolatile memory 6 is restored using communication or the like from another ECU. If it is not damaged, this control operation is terminated.

本第7の制御動作によれば、不揮発性メモリ6の物理的な破損時、または全データが所定範囲内にない(全データ破損)時等に、他のECUから通信等を使用してデータを復旧することができる。
なお、不揮発性メモリ6のデータを待避する際、複数の他のECUへ全データを待避しても良く、復帰させるデータは複数の待避先のデータの多数決で決めても良いし、優先順位(例えば動作保証電圧が低いECUほど、優先度が高い等)に従って決定しても良い。
また、データの待避先に不揮発性メモリを用いる場合には、別のECUに内蔵されている不揮発性メモリと、外付け不揮発性メモリのどちらも使用することができる。
According to the seventh control operation, when the nonvolatile memory 6 is physically damaged, or when all data is not within a predetermined range (all data is damaged), data is transmitted from another ECU using communication or the like. Can be recovered.
When saving the data in the nonvolatile memory 6, all the data may be saved to a plurality of other ECUs, and the data to be restored may be determined by a majority decision of a plurality of save destination data. For example, the ECU may be determined in accordance with the lower priority of the operation guarantee voltage.
When a nonvolatile memory is used as a data save destination, both a nonvolatile memory built in another ECU and an external nonvolatile memory can be used.

[第8の制御動作]
図15のフローチャートに示す第8の制御動作は、不揮発性メモリへの書き込み中に、瞬低(NMI割り込み等)が発生した場合に、書き込み時の領域を記憶禁止にして、この記憶禁止にした領域に、再度不揮発性メモリへRAMまたはバックアップRAM値を書き込むものである。本第8の制御動作も、上述した第1乃至第7の制御動作とは独立して行う。
まず、不揮発性メモリ6が書き込み中か否か判定し(ステップS121)、書き込み中であれば、電源電圧Vbaを監視して瞬低(NMI割り込み等)が発生したか否かを判定する(ステップS122)。瞬低が発生した場合は、書き込み中の不揮発性メモリ6の記憶領域(アドレス)を記憶する(ステップS123)。そして、次のステップS124で、該当アドレスにRAMまたはバックアップRAMから再書き込みを行う。
ステップS121で不揮発性メモリ6が書き込み中でないと判定された場合、ステップS122で瞬低が発生していないと判定されない場合には、制御動作を終了する。
本第8の制御動作によれば、瞬低発生時は、不揮発性メモリ6へ正常に書き込みが行われないことがあるので、不揮発性メモリ6へRAMまたはバックアップRAMのデータの再書き込みを行うことで、記憶したデータの信頼性を向上できる。
[Eighth control operation]
In the eighth control operation shown in the flowchart of FIG. 15, when an instantaneous drop (NMI interrupt or the like) occurs during writing to the nonvolatile memory, the area at the time of writing is prohibited from being stored, and this storage is prohibited. The RAM or backup RAM value is written again to the nonvolatile memory in the area. The eighth control operation is also performed independently of the first to seventh control operations described above.
First, it is determined whether or not the nonvolatile memory 6 is writing (step S121). If writing is in progress, the power supply voltage Vba is monitored to determine whether or not an instantaneous drop (such as an NMI interrupt) has occurred (step S121). S122). When the instantaneous drop occurs, the storage area (address) of the nonvolatile memory 6 being written is stored (step S123). In the next step S124, rewriting is performed from the RAM or the backup RAM to the corresponding address.
If it is determined in step S121 that the non-volatile memory 6 is not in writing, and if it is not determined in step S122 that no instantaneous drop has occurred, the control operation is terminated.
According to the eighth control operation, when the instantaneous drop occurs, the writing to the nonvolatile memory 6 may not be performed normally. Therefore, the data of the RAM or the backup RAM is rewritten to the nonvolatile memory 6. Thus, the reliability of stored data can be improved.

[第9の制御動作]
図16のフローチャートに示す第9の制御動作は、不揮発性メモリ6の書き込み用カウンタ値に応じて、学習値の待避先を外付け不揮発性メモリと内蔵不揮発性メモリで切り換えるものである。外付け不揮発性メモリは、例えば複数のECUを備えたシステムにおいて、これらECU間でデータの授受が行われる場合に、当該ECU1とは異なる別のECUに外付けされているものを用いる。本第9の制御動作も、上述した第1乃至第8の制御動作とは独立して行う。
[Ninth control action]
The ninth control operation shown in the flowchart of FIG. 16 switches the learning value save destination between the external nonvolatile memory and the built-in nonvolatile memory in accordance with the write counter value of the nonvolatile memory 6. As the external non-volatile memory, for example, in a system including a plurality of ECUs, when data is exchanged between these ECUs, a memory externally attached to another ECU different from the ECU 1 is used. The ninth control operation is also performed independently of the first to eighth control operations described above.

まず、不揮発性メモリ6の書き込み用カウンタ値が奇数か偶数かを判定し(ステップS131)、奇数の場合には外付け不揮発性メモリに学習値を待避し(ステップS132)、偶数の場合には内蔵不揮発性メモリ6に学習値を待避する(ステップS133)。次に、不揮発性メモリ6の書き込み用カウンタ値を更新する(ステップS134)。学習値を待避後に、書き込み用カウンタ値を更新することで、次回の書き込みを今回とは異なるメモリに書き込むように設定する。そして、不揮発性メモリ6の書き込みが正常か否かを判定する(ステップS135)。正常であれば制御動作を終了し、正常でなければ不揮発性メモリのデータを修復する(ステップS136)。   First, it is determined whether the write counter value of the nonvolatile memory 6 is odd or even (step S131). If the counter value is odd, the learning value is saved in the external nonvolatile memory (step S132). The learning value is saved in the built-in nonvolatile memory 6 (step S133). Next, the write counter value in the nonvolatile memory 6 is updated (step S134). After saving the learning value, the writing counter value is updated, so that the next writing is set to be written in a memory different from the current writing. Then, it is determined whether or not the writing in the nonvolatile memory 6 is normal (step S135). If normal, the control operation is terminated, and if not normal, the data in the nonvolatile memory is restored (step S136).

本第9の制御動作では、内蔵不揮発性メモリ6のデータが破損した場合は、外付け不揮発性メモリのデータを使用することで、不定値のデータを使用することがない。また、内蔵不揮発性メモリ6のデータが破損していた場合には、書き込みを行ったメモリとは別形式のデータから復旧するので、データ修復の可能性を高くすることができる。
なお、内蔵不揮発性メモリ6と外付け不揮発性メモリに同時に同じデータを書き込み、一方が壊れたときに、他方で救済するように構成しても良い。また、外付け不揮発性メモリと内蔵不揮発性メモリでは、外付け不揮発性メモリの方が信頼性が高いので、外付け不揮発性メモリを優先するように構成しても良い。
In the ninth control operation, when the data in the built-in nonvolatile memory 6 is damaged, the data in the external nonvolatile memory is used, so that indefinite value data is not used. In addition, when the data in the built-in nonvolatile memory 6 is damaged, the data is restored from data in a format different from that of the memory in which writing is performed, so that the possibility of data restoration can be increased.
Note that the same data may be written to the built-in nonvolatile memory 6 and the external nonvolatile memory at the same time, and when one is broken, the other may be relieved. In addition, the external nonvolatile memory and the built-in nonvolatile memory may be configured to give priority to the external nonvolatile memory because the external nonvolatile memory has higher reliability.

更に、外付け不揮発性メモリが、ECU1とは異なる別のECUに外付けされているものを用いる場合について説明したが、コストよりも信頼性を優先する場合には、ECU1に不揮発性メモリを外付けしても良い。
更にまた、カウンタ値が奇数の時に外付け不揮発性メモリに待避し、偶数の時に内蔵不揮発性メモリ6に待避するようにしたが、カウンタ値が偶数の時に外付け不揮発性メモリに待避し、奇数の時に内蔵不揮発性メモリ6に待避するようにしても良いのはもちろんである。
Further, the case where an external nonvolatile memory is used that is externally attached to another ECU different from the ECU 1 has been described. However, when reliability is given priority over cost, the nonvolatile memory is removed from the ECU 1. May be attached.
Furthermore, when the counter value is an odd number, it is saved in the external nonvolatile memory, and when the counter value is an even number, it is saved in the built-in nonvolatile memory 6. However, when the counter value is an even number, it is saved in the external nonvolatile memory. Of course, it may be saved in the built-in nonvolatile memory 6 at this time.

上述したように、ソフトウェアとバッテリ取り外し後の学習値復帰用データ(=内蔵不揮発性メモリ)がCPU内に共存する構成において、内蔵の不揮発性メモリが不定値を取り得るような電源電圧の場合は、内蔵不揮発メモリへのアクセス(書き込み)を禁止する。また、例えばイグニッションキーのオフ時やエンジン停止時(HEV車含む)に電源電圧を監視して、内蔵不揮発性メモリへの書き込みを制御している。
これによって、電源電圧が低下したときには、内蔵不揮発性メモリへの書き込み、及びブランクチェックを行わないため、異常判定及び異常値を書き込むことがなくなる。また、一度不定値を取り得るような状態になった場合には、電源電圧のレベルが安定してから、内蔵不揮発性メモリへの書き込みを行うことで、正常に書き込み処理が行える。
As described above, in the configuration in which the software and the learning value recovery data after removal of the battery (= built-in nonvolatile memory) coexist in the CPU, the power supply voltage is such that the built-in nonvolatile memory can take an indefinite value. , Access (write) to the built-in nonvolatile memory is prohibited. Further, for example, when the ignition key is turned off or the engine is stopped (including HEV vehicles), the power supply voltage is monitored to control writing to the built-in nonvolatile memory.
As a result, when the power supply voltage drops, writing to the built-in nonvolatile memory and blank check are not performed, so that the abnormality determination and the abnormal value are not written. In addition, once the indeterminate value can be obtained, the writing process can be normally performed by writing to the built-in nonvolatile memory after the power supply voltage level is stabilized.

従って、本発明によれば、CPUに印加される電源電圧が所定値よりも低下した場合、及び所定値よりも低下することが予想される場合に、CPUによる不揮発性メモリへのアクセスを制限することで、異常判定及び異常値の書き込みを抑制でき、CPUによる処理を低減して負担を軽減できる。
自動車用電子制御装置にあっては、例えば空燃比の学習値のデータが不定値となったり破壊されたりすると、空燃比が適正な範囲から外れ、失火してエンストを招く惧れがあるので、安全性の見地から前述した制御動作が有効である。
Therefore, according to the present invention, when the power supply voltage applied to the CPU drops below a predetermined value and when it is expected to drop below the predetermined value, the CPU restricts access to the nonvolatile memory. Thus, abnormality determination and abnormal value writing can be suppressed, and processing by the CPU can be reduced to reduce the burden.
In the electronic control device for automobiles, for example, if the data of the learned value of the air-fuel ratio becomes an indefinite value or is destroyed, the air-fuel ratio falls outside the appropriate range, and there is a possibility that misfire will cause an engine stall. From the viewpoint of safety, the control operation described above is effective.

ここで、上記実施形態から把握し得る請求項以外の技術的思想について、以下に効果と共に記載する。
(イ)請求項1記載の自動車用電子制御装置において、前記電源電圧が所定値よりも低下した後、アクセス制限の解除電圧以上に回復した場合に、前記CPUから前記不揮発性メモリへのアクセス制限を解除する、自動車用電子制御装置。
上記構成によると、電源電圧が、内蔵の不揮発性メモリの記憶情報が不定値を取り得る状態になった場合に、電源電圧が解除電圧以上に回復してから、不揮発性メモリに対するアクセスを行うことで、正常な書き込み等の処理を行うことができる。
Here, technical ideas other than the claims that can be grasped from the above embodiment will be described together with effects.
(A) In the automotive electronic control device according to claim 1, when the power supply voltage drops below a predetermined value and then recovers to an access restriction release voltage or more, the CPU restricts access to the nonvolatile memory. An electronic control device for automobiles that releases
According to the above configuration, when the storage voltage of the built-in nonvolatile memory can take an indefinite value, the nonvolatile memory is accessed after the power supply voltage recovers to the release voltage or higher. Thus, processing such as normal writing can be performed.

(ロ)請求項1記載の自動車用電子制御装置において、更にイグニッションキーがオンしてから所定時間経過するまでの時間、スタータがオンしたとき、エンジン回転が所定回転よりも低いとき、及び作動によって電源電圧の低下が予想される機器が稼働中の少なくともいずれかの場合に、前記CPUから前記不揮発性メモリへのアクセスを制限する、自動車用電子制御装置。
上記構成によると、電源電圧が低下する可能性がある場合に、前記CPUから前記不揮発性メモリへのアクセスを制限することができる。
(B) In the electronic control device for an automobile according to claim 1, when the starter is turned on after the ignition key is turned on, when the predetermined time elapses, when the engine speed is lower than the predetermined speed, and by the operation An automotive electronic control device that restricts access from the CPU to the nonvolatile memory when at least one of devices in which a decrease in power supply voltage is expected is in operation.
According to the above configuration, when there is a possibility that the power supply voltage is lowered, access from the CPU to the nonvolatile memory can be restricted.

1…ECU(自動車用電子制御装置)、2…CPU、3…入力回路、4…出力回路・出力監視回路、5…電源回路、6…不揮発性メモリ、Vba…電源電圧   DESCRIPTION OF SYMBOLS 1 ... ECU (electronic control apparatus for motor vehicles), 2 ... CPU, 3 ... Input circuit, 4 ... Output circuit and output monitoring circuit, 5 ... Power supply circuit, 6 ... Nonvolatile memory, Vba ... Power supply voltage

Claims (3)

CPUに内蔵された不揮発性メモリに車両の状態を示す学習値を記憶し、前記不揮発性メモリから読み出した学習値に基づき車両を制御する電子制御装置であって、
前記CPUに印加される電源電圧が所定値よりも低下した場合、及び所定値よりも低下することが予想される場合に、前記CPUによる前記不揮発性メモリへのアクセスを制限する、ことを特徴とする自動車用電子制御装置。
An electronic control device that stores a learning value indicating a state of the vehicle in a nonvolatile memory built in the CPU and controls the vehicle based on the learning value read from the nonvolatile memory,
When the power supply voltage applied to the CPU drops below a predetermined value and when it is expected to drop below a predetermined value, the CPU restricts access to the nonvolatile memory. Electronic control device for automobile.
前記不揮発性メモリへの書き込み中に前記電源電圧が低下した場合は、前記電源電圧の復帰後に再書き込みを実施する、ことを特徴とする請求項1に記載の自動車用電子制御装置。   2. The automotive electronic control device according to claim 1, wherein, when the power supply voltage decreases during writing to the nonvolatile memory, rewriting is performed after the power supply voltage is restored. 前記電源電圧の復帰後の再書き込みの前に、前記不揮発性メモリにおける再書き込みの対象となる記憶領域の初期化を行う、ことを特徴とする請求項2に記載の自動車用電子制御装置。   The vehicle electronic control device according to claim 2, wherein a storage area to be rewritten in the nonvolatile memory is initialized before rewriting after the power supply voltage is restored.
JP2013195547A 2013-09-20 2013-09-20 Electronic control unit for automobile Expired - Fee Related JP6162011B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013195547A JP6162011B2 (en) 2013-09-20 2013-09-20 Electronic control unit for automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013195547A JP6162011B2 (en) 2013-09-20 2013-09-20 Electronic control unit for automobile

Publications (2)

Publication Number Publication Date
JP2015060526A true JP2015060526A (en) 2015-03-30
JP6162011B2 JP6162011B2 (en) 2017-07-12

Family

ID=52817965

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013195547A Expired - Fee Related JP6162011B2 (en) 2013-09-20 2013-09-20 Electronic control unit for automobile

Country Status (1)

Country Link
JP (1) JP6162011B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020204921A (en) * 2019-06-18 2020-12-24 株式会社デンソー Data storing control unit and data storing control system
WO2024134749A1 (en) * 2022-12-20 2024-06-27 日立Astemo株式会社 Vehicle control device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005928A (en) * 1999-06-17 2001-01-12 Hitachi Maxell Ltd Ic card
JP2003002132A (en) * 2001-06-19 2003-01-08 Koyo Seiko Co Ltd Vehicle control device
JP2013122690A (en) * 2011-12-12 2013-06-20 Toshiba Corp Ic card, portable electronic device and ic card control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005928A (en) * 1999-06-17 2001-01-12 Hitachi Maxell Ltd Ic card
JP2003002132A (en) * 2001-06-19 2003-01-08 Koyo Seiko Co Ltd Vehicle control device
JP2013122690A (en) * 2011-12-12 2013-06-20 Toshiba Corp Ic card, portable electronic device and ic card control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020204921A (en) * 2019-06-18 2020-12-24 株式会社デンソー Data storing control unit and data storing control system
JP7279534B2 (en) 2019-06-18 2023-05-23 株式会社デンソー Data storage controller and data storage control system
WO2024134749A1 (en) * 2022-12-20 2024-06-27 日立Astemo株式会社 Vehicle control device

Also Published As

Publication number Publication date
JP6162011B2 (en) 2017-07-12

Similar Documents

Publication Publication Date Title
JP4636118B2 (en) Electronic device and program
US8095263B2 (en) Electronic control unit and vehicle control system
US7155326B2 (en) Electric control unit
JP5176728B2 (en) Electronic control device for vehicle
US20090281689A1 (en) Electronic control system for vehicles
JP3460256B2 (en) Battery disconnection detector
US7003382B2 (en) Electronic control unit for a vehicle
JP2002347541A (en) On-vehicle control device
US7203581B2 (en) Electronic control unit for controlling updating of data in non-volatile memory
JP6162011B2 (en) Electronic control unit for automobile
JP2004285856A (en) Intake amount control device for engine, and intake amount control method for engine
WO2008099276A1 (en) Vehicle control device
JP4281222B2 (en) Nonvolatile memory writing device
JP2007162586A (en) On-vehicle control device
JP2018134964A (en) Electronic control unit for automobile
JP2007062632A (en) Electronic control unit and storing method of data for abnormality generated time storage
US11314634B2 (en) Electronic control unit and data protection method therefor
US8341343B2 (en) Controller
JPH11141391A (en) Controller for automobile
JP3644058B2 (en) Electronic control device for vehicle engine and data rewrite control device for EEPROM
JP2012226674A (en) Electronic controller for automobile
JP2004178067A (en) Electronic control device
JP3444295B2 (en) Electronic control unit for vehicle engine
JP2001182607A (en) Vehicle controlling device
WO2019159716A1 (en) Electronic control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170420

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: 20170516

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170614

R150 Certificate of patent or registration of utility model

Ref document number: 6162011

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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