JP2013151220A - On-vehicle control device - Google Patents

On-vehicle control device Download PDF

Info

Publication number
JP2013151220A
JP2013151220A JP2012012974A JP2012012974A JP2013151220A JP 2013151220 A JP2013151220 A JP 2013151220A JP 2012012974 A JP2012012974 A JP 2012012974A JP 2012012974 A JP2012012974 A JP 2012012974A JP 2013151220 A JP2013151220 A JP 2013151220A
Authority
JP
Japan
Prior art keywords
battery
power supply
execution history
history data
executed
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
JP2012012974A
Other languages
Japanese (ja)
Inventor
Junichi Nagai
純一 永井
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 JP2012012974A priority Critical patent/JP2013151220A/en
Publication of JP2013151220A publication Critical patent/JP2013151220A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent holding data from being initialized by mistake when driving a starter, with a constitution for initializing the holding data when a battery is removed.SOLUTION: In ignition OFF, execution history data is set to nonexecution, and is written in a flash memory. When a power source reset is released by ignition ON or returning from a voltage drop when driving the starter, the execution history data is read in from the flash memory (S1). When the execution history data is not executed, a detecting signal Sb of the voltage drop is read in (S3). When it is determined that there is removal, the holding data is initialized (S5), and when it is determined that there is no removal, the holding data is read out of the flash memory (S7). The execution finish and the removal existence/nonexistence are set in the execution history data, and are read in the flash memory (S6 and S7), and the detecting signal Sb is reset (S13). When the execution history data is already executed (S2: NO), reading-in processing of the detecting signal Sb and battery removal determining processing are not executed.

Description

本発明は、バッテリが外されたことに応じて保持データを初期化する車載制御装置に関する。   The present invention relates to an in-vehicle control device that initializes retained data in response to removal of a battery.

図6は、特許文献1など開示された従来の車載制御装置のマイコンと電源ICに係る構成を示している。車両のエンジンを制御する電子制御装置1(以下、ECU1と称す)は、イグニッションスイッチ2がオンされると駆動回路3によりメインリレー4をオン駆動する。メイン電源回路5は、バッテリ6からメインリレー4の接点を通して与えられる電圧VBによりメイン電源電圧VOMを生成し、マイコン7のCPUを含むメイン処理部8に供給する。   FIG. 6 shows a configuration related to a microcomputer and a power supply IC of a conventional in-vehicle control device disclosed in Patent Document 1 and the like. An electronic control device 1 (hereinafter referred to as ECU 1) that controls an engine of a vehicle turns on a main relay 4 by a drive circuit 3 when an ignition switch 2 is turned on. The main power supply circuit 5 generates a main power supply voltage VOM from the voltage VB supplied from the battery 6 through the contact of the main relay 4 and supplies the main power supply voltage VOM to the main processing unit 8 including the CPU of the microcomputer 7.

マイコン7には、メイン電源電圧VOM(5V)で動作するメイン処理部8の他に、例えばRAM9のようにサブ電源電圧VOS(3V/3.3V)で動作する低電圧回路処理部も備えている。そこで、サブ電源回路10は、バッテリ6からメインリレー4の接点を通して与えられる電圧VBによりサブ電源電圧VOS1(3.3V)を生成し、RAM9を含む低電圧回路処理部に供給する。   In addition to the main processing unit 8 that operates at the main power supply voltage VOM (5 V), the microcomputer 7 also includes a low voltage circuit processing unit that operates at the sub power supply voltage VOS (3 V / 3.3 V), such as the RAM 9. Yes. Therefore, the sub power supply circuit 10 generates the sub power supply voltage VOS1 (3.3 V) from the voltage VB supplied from the battery 6 through the contact of the main relay 4 and supplies it to the low voltage circuit processing unit including the RAM 9.

RAM9は、ダイアグデータ、各種センサの学習データなどを記憶しており、イグニッションスイッチ2がオフしている間もこれらのデータを保持し続ける必要がある。サブ電源回路11は、バッテリ6から常時接続の専用配線を通して与えられる電圧VBATTによりサブ電源電圧VOS2(3V)を生成する。サブ電源回路10が定電圧出力動作中は、サブ電源回路11は出力動作を停止する。   The RAM 9 stores diagnosis data, learning data of various sensors, and the like, and it is necessary to keep these data while the ignition switch 2 is off. The sub power supply circuit 11 generates a sub power supply voltage VOS2 (3 V) based on the voltage VBATT supplied from the battery 6 through a dedicated wiring that is always connected. While the sub power supply circuit 10 is in constant voltage output operation, the sub power supply circuit 11 stops the output operation.

RAM9に記憶されたデータを保持するため、車両を使用しない時でもサブ電源回路11を動作させなければならない。このため、常時接続された上記専用配線が必要になる。また、車両にはECU1をはじめ多数のECUが搭載されているので、各ECUにおけるメモリバックアップのための暗電流が増加するとバッテリ上がりの原因となる。そこで、専用配線をなくすとともに、従来のRAM9に替えてフラッシュメモリやEEPROMなどの不揮発性メモリを用いることが行われている。   In order to retain the data stored in the RAM 9, the sub power supply circuit 11 must be operated even when the vehicle is not used. For this reason, the dedicated wiring always connected is required. In addition, since a large number of ECUs including the ECU 1 are mounted on the vehicle, if the dark current for memory backup in each ECU increases, the battery may run out. Therefore, a dedicated wiring is eliminated and a nonvolatile memory such as a flash memory or an EEPROM is used instead of the conventional RAM 9.

近年、車載型故障診断装置であるOBD(On Board Diagnosis System)の搭載を義務付ける法規制が進んでいる。OBDは、所定の診断処理を実行し、故障と確定した時には故障内容を記憶保持するとともに、ウォーニングランプを点灯して運転者に知らせる装置である。診断項目としては、例えば触媒劣化、エンジン失火、酸素センサまたは空燃比センサの不良、排気ガス再循環システム(EGR)の不良などが挙げられる。記憶されるデータは、過去の故障診断の実施履歴データ、故障時のエンジン関連データなどである。   In recent years, laws and regulations that require the installation of an OBD (On Board Diagnosis System), which is an in-vehicle failure diagnosis device, have been advanced. The OBD is a device that executes a predetermined diagnosis process and stores and holds the content of the failure when it is determined that the failure has occurred, and lights a warning lamp to notify the driver. Examples of diagnostic items include catalyst deterioration, engine misfire, oxygen sensor or air-fuel ratio sensor failure, exhaust gas recirculation system (EGR) failure, and the like. The stored data includes past failure diagnosis execution history data, engine related data at the time of failure, and the like.

ウォーニングランプが点灯したためディーラーや修理工場に車両が持ち込まれると、通常はECU1に故障診断ツールが接続されてより詳しいデータ解析が行われる。そして、部品交換などの修理がされたときには、故障診断ツールを用いて不揮発性メモリのダイアグデータや学習データの初期化が行われる。しかし、故障診断ツールを利用できない状況下或いはOBDが搭載されていない車両に対しては、より簡易な初期化方法として、ECU1からバッテリ6を外して再接続した後イグニッションスイッチをIGONの位置にした時(またはその後IGOFFとした時)に、不揮発性メモリに記憶されるデータを初期化する手法が用いられる。   When the vehicle is brought to a dealer or a repair shop because the warning lamp is turned on, a failure diagnosis tool is usually connected to the ECU 1 for more detailed data analysis. When repairs such as parts replacement are performed, the diagnosis data and learning data of the nonvolatile memory are initialized using the failure diagnosis tool. However, for situations where a failure diagnosis tool cannot be used or for vehicles not equipped with an OBD, as a simpler initialization method, the battery 6 is removed from the ECU 1 and reconnected, and then the ignition switch is set to the IGON position. A method of initializing data stored in the nonvolatile memory at a time (or when IGOFF is subsequently set) is used.

特開2006−105001号公報JP 2006-105001 A

上述した車載制御装置は、バッテリ電圧としきい値とを比較することによりバッテリが外されたことを検出している。しかし、劣化が進んだバッテリまたは氷点下などの非常に低い温度環境で用いられるバッテリは内部抵抗が増加し、スタータの駆動時に電圧が大きく低下して、バッテリが外されたと誤判定する虞がある。誤判定が生じると、保持されるべきデータが初期化されるという深刻な結果をもたらす。   The vehicle-mounted control apparatus mentioned above has detected that the battery was removed by comparing a battery voltage with a threshold value. However, a battery that has been deteriorated or a battery that is used in a very low temperature environment such as below freezing has an increased internal resistance, and when the starter is driven, there is a possibility that the voltage is greatly reduced, and it is erroneously determined that the battery has been removed. If a misjudgment occurs, it has the serious consequence that the data to be retained is initialized.

本発明は上記事情に鑑みてなされたもので、その目的は、スタータの駆動時に保持データを誤って初期化することを回避可能な車載制御装置を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an in-vehicle control device capable of avoiding erroneous initialization of retained data when a starter is driven.

請求項1に記載した車載制御装置は、イグニッションスイッチ、バッテリからの電源供給路を開閉する電源供給用リレー、およびエンジンを始動させるスタータを備えた車両に搭載されている。車載制御装置は、書き換え可能な不揮発性メモリ、バッテリ外れ検出回路および制御手段を備えている。バッテリ外れ検出回路は、バッテリからの電圧がしきい値以下になったことを条件としてバッテリが外されたことを示す検出信号を出力し、リセット信号が入力されたことを条件としてバッテリが外されていないことを示す検出信号を出力する。   The vehicle-mounted control apparatus according to the first aspect is mounted on a vehicle including an ignition switch, a power supply relay that opens and closes a power supply path from the battery, and a starter that starts the engine. The in-vehicle control device includes a rewritable nonvolatile memory, a battery detachment detection circuit, and a control unit. The battery detachment detection circuit outputs a detection signal indicating that the battery has been removed on condition that the voltage from the battery has fallen below the threshold, and the battery is removed on condition that the reset signal has been input. A detection signal indicating that the signal has not been output is output.

制御手段は、バッテリが接続されている状態でイグニッションスイッチがオンされた時の電源リセットまたはスタータの駆動に起因する電圧低下による電源リセットからの立ち上がり時に、スタータの駆動に先立ってイニシャル処理を実行する。また、イグニッションスイッチがオフされると、シャットダウン処理を実行してから電源供給用リレーをオフする。実行履歴データは、制御手段による検出信号の読み込み処理とバッテリ外れの判定処理との実行状況を示す実行履歴情報であり、データ内容として未実行または実行済を持つ。この実行履歴データは、不揮発性メモリに記憶される。保持データは、イグニッションスイッチがオフの期間も不揮発性メモリに記憶して常時保持され、バッテリが外されたことにより初期化されるデータである。   The control means executes an initial process prior to driving the starter at the time of rising from the power reset when the ignition switch is turned on while the battery is connected or a voltage drop caused by driving the starter. . Further, when the ignition switch is turned off, the power supply relay is turned off after the shutdown process is executed. The execution history data is execution history information indicating the execution status of the detection signal reading process and the battery detachment determination process performed by the control means, and has the data content not executed or executed. This execution history data is stored in a nonvolatile memory. The retained data is data that is always stored in the nonvolatile memory even when the ignition switch is off, and is initialized when the battery is removed.

制御手段は、シャットダウン処理において実行履歴データに未実行を設定して不揮発性メモリに書き込む。制御手段は、イニシャル処理において不揮発性メモリから実行履歴データを読み出す。ここで、読み出した実行履歴データが未実行に設定されている場合とは、イグニッションスイッチがオンされた場合であって、前回のイグニッションオフから検出信号の読み込みおよびスタータの駆動がなされていない場合である。   The control means sets the execution history data to non-executed in the shutdown process and writes it to the nonvolatile memory. The control means reads execution history data from the nonvolatile memory in the initial process. Here, the case where the read execution history data is set to non-execution is when the ignition switch is turned on, and when the detection signal is not read and the starter is not driven since the previous ignition off. is there.

この場合は、検出信号の読み込み処理とイグニッションスイッチがオフの期間にバッテリが外されたか否か(バッテリ外れ)の判定処理とを実行すべき場合であるので、これらの処理を実行して実行履歴データを実行済に設定して不揮発性メモリに書き込む。そして、バッテリが外されたと判定したときには保持データを初期化する。これにより、故障診断ツール(専用ツール)がないときでも容易に保持データを初期化できる。また、検出信号を判定に用いたので、次のバッテリ外れに備えてバッテリ外れ検出回路にリセット信号を出力する。   In this case, since the reading process of the detection signal and the determination process of whether or not the battery has been removed (battery removal) should be executed during the period when the ignition switch is off, these processes are executed to execute the execution history. Set data as executed and write to non-volatile memory. When it is determined that the battery has been removed, the retained data is initialized. Thereby, even when there is no failure diagnosis tool (dedicated tool), the retained data can be easily initialized. Since the detection signal is used for the determination, a reset signal is output to the battery removal detection circuit in preparation for the next battery removal.

一方、読み出した実行履歴データが実行済に設定されている場合とは、イグニッションスイッチがオンされて検出信号の読み込み処理とバッテリ外れの判定処理とを実行した後、イグニッションスイッチがオフされていないにもかかわらず電源リセットが生じた場合である。つまり、スタータ駆動等による異常な電圧低下が生じた場合である。この場合には、バッテリが外されていないにもかかわらず、バッテリ外れ検出回路がバッテリ外れを示す検出信号を出力している蓋然性が高い。そこで、制御手段は、検出信号の読み込み処理とバッテリ外れの判定処理とを実行することなく、バッテリ外れ検出回路にリセット信号を出力する。   On the other hand, when the read execution history data is set to executed, the ignition switch is turned on, the detection signal reading process and the battery removal determination process are executed, and the ignition switch is not turned off. However, this is a case where a power reset occurs. That is, an abnormal voltage drop occurs due to starter driving or the like. In this case, there is a high probability that the battery detachment detection circuit outputs a detection signal indicating battery detachment even though the battery is not removed. Therefore, the control means outputs a reset signal to the battery detachment detection circuit without executing the detection signal reading process and the battery detachment determination process.

こうした制御により、スタータの駆動時にバッテリ電圧が低下して、バッテリ外れ検出回路がバッテリ外れを示す検出信号を出力した場合でも、バッテリが外されたと誤判定することを回避することができる。その結果、バッテリが外されていないのに保持データを誤って初期化することを防止できる。   Such control can avoid erroneous determination that the battery has been removed even when the battery voltage drops when the starter is driven and the battery removal detection circuit outputs a detection signal indicating battery removal. As a result, it is possible to prevent the stored data from being erroneously initialized even if the battery is not removed.

請求項2に記載した手段によれば、制御手段は、イニシャル処理において、実行履歴データを実行済に設定して不揮発性メモリに書き込む際に、バッテリが外されたか否かの判定結果も併せて書き込む。そして、イニシャル処理において、不揮発性メモリから読み出した実行履歴データが実行済で且つバッテリが外されたとの判定結果である場合、すなわちバッテリが外された後の最初のイグニッションスイッチのオン期間でスタータの駆動等による異常な電圧リセットが生じた場合には、保持データを再度初期化し直す。これにより、一旦初期化された保持データが電圧低下により不定となることを確実に防止できる。   According to the means described in claim 2, in the initial process, the control means also sets a determination result as to whether or not the battery is removed when the execution history data is set to executed and written to the nonvolatile memory. Write. In the initial process, when the execution history data read from the non-volatile memory has been executed and the determination result indicates that the battery has been removed, that is, the start-up period of the first ignition switch after the battery has been removed. If an abnormal voltage reset occurs due to driving or the like, the held data is reinitialized. Thereby, it is possible to reliably prevent the retained data once initialized from becoming unstable due to a voltage drop.

請求項3に記載した手段によれば、制御手段は、保持データを揮発性メモリに記憶しておき、シャットダウン処理において不揮発性メモリに書き込む。制御手段は、イニシャル処理において、保持データの初期化を揮発性メモリに記憶される保持データに対して行う。また、不揮発性メモリから読み出した実行履歴データが未実行で且つバッテリが外されていないとの判定結果である場合に、不揮発性メモリから揮発性メモリに保持データを読み出す。これにより、処理速度を高められる。さらに、不揮発性メモリから読み出した実行履歴データが実行済で且つバッテリが外されていないとの判定結果である場合にも、不揮発性メモリから揮発性メモリに保持データを再度読み出す。これにより、一旦読み出された保持データが電圧低下により不定となることを確実に防止できる。   According to the means described in claim 3, the control means stores the retained data in the volatile memory and writes it in the nonvolatile memory in the shutdown process. In the initial process, the control means initializes the retained data for the retained data stored in the volatile memory. Further, when the execution history data read from the nonvolatile memory is a result of determination that the execution history data is not executed and the battery is not removed, the retained data is read from the nonvolatile memory to the volatile memory. Thereby, the processing speed can be increased. Furthermore, even when the execution history data read from the nonvolatile memory is a result of determination that the battery has not been removed, the retained data is read again from the nonvolatile memory to the volatile memory. As a result, it is possible to reliably prevent the held data once read from becoming unstable due to a voltage drop.

請求項4に記載した手段によれば、スタータ駆動信号が入力されるとスタータを駆動するスタータ制御回路を備えている。制御手段は、スタート指令を入力すると、イニシャル処理が終了した後にスタータ駆動信号を出力する。これにより、イニシャル処理が終了する前にスタータが駆動されて電圧低下が生じることを防止できる。   According to a fourth aspect of the present invention, there is provided a starter control circuit for driving the starter when a starter drive signal is inputted. When the start command is input, the control means outputs a starter drive signal after the initial process is completed. As a result, it is possible to prevent the voltage from being lowered due to the starter being driven before the initial process is completed.

請求項5に記載した手段によれば、スタート指令を入力すると、少なくともイニシャル処理の処理時間だけ待ってからスタータの駆動を可能とする遅延回路を備えている。これにより、イニシャル処理が終了する前にスタータが駆動されて電圧低下が生じることを防止できる。   According to the means described in claim 5, when the start command is input, the starter is driven after waiting for at least the processing time of the initial process. As a result, it is possible to prevent the voltage from being lowered due to the starter being driven before the initial process is completed.

請求項6に記載した手段によれば、車載制御装置とバッテリとの間に、イグニッションスイッチを介してバッテリの正側端子に接続される第1電源線、電源供給用リレーの常開接点を介してバッテリの正側端子に接続される第2電源線および電源供給用リレーのコイルを介してバッテリの正側端子に接続される第3電源線が設けられている。保持データは不揮発性メモリに記憶されるので、車載制御装置とバッテリとを直接繋ぐ専用配線を設ける必要がなく、暗電流も低減できる。   According to the means described in claim 6, the first power line connected to the positive terminal of the battery via the ignition switch and the normally open contact of the power supply relay between the vehicle-mounted control device and the battery. A second power supply line connected to the positive terminal of the battery and a third power supply line connected to the positive terminal of the battery via the coil of the power supply relay are provided. Since the retained data is stored in the nonvolatile memory, it is not necessary to provide a dedicated wiring for directly connecting the in-vehicle control device and the battery, and the dark current can be reduced.

請求項7に記載した手段によれば、バッテリ外れ検出回路は、第1ないし第3電源線の電圧のうち最も高い電圧がしきい値以下になったことを条件としてバッテリが外されたことを示す検出信号を出力する。これにより、上記専用配線が設けられていない場合でも、バッテリ外れを検出できる。   According to the means described in claim 7, the battery detachment detection circuit detects that the battery has been removed on condition that the highest voltage among the voltages of the first to third power supply lines is equal to or lower than the threshold value. The detection signal shown is output. Thereby, even when the dedicated wiring is not provided, it is possible to detect battery disconnection.

本発明の第1の実施形態を示す電子制御システムの構成図The block diagram of the electronic control system which shows the 1st Embodiment of this invention イニシャル処理のフローチャートInitial processing flowchart シャットダウン処理のフローチャートFlow chart of shutdown process スタータの駆動によりバッテリ電圧が低下する場合のタイミングチャートTiming chart when battery voltage drops due to starter drive 本発明の第2の実施形態を示す図1相当図FIG. 1 equivalent diagram showing a second embodiment of the present invention 従来技術を示す図1相当図1 equivalent diagram showing the prior art

各実施形態において実質的に同一部分には同一符号を付して説明を省略する。
(第1の実施形態)
以下、第1の実施形態について図1ないし図4を参照しながら説明する。図1に示す電子制御装置21(以下、ECU21と称す)は、エンジン(内燃機関)を制御する車載制御装置である。車両には、バッテリ22、イグニッションスイッチ23、バッテリ22からの電源供給路(電源線29)を開閉するメインリレー24(電源供給用リレー)、エンジンをクランキングするスタータ25(スタータモータ)、スタータリレー26およびスタータスイッチ27が設けられている。スタータリレー26のコイル26bが通電されると、接点26aが閉じてバッテリ22からスタータ25に給電される。
In each embodiment, substantially the same parts are denoted by the same reference numerals and description thereof is omitted.
(First embodiment)
Hereinafter, a first embodiment will be described with reference to FIGS. 1 to 4. An electronic control device 21 (hereinafter referred to as ECU 21) shown in FIG. 1 is an in-vehicle control device that controls an engine (internal combustion engine). The vehicle includes a battery 22, an ignition switch 23, a main relay 24 (power supply relay) that opens and closes a power supply path (power line 29) from the battery 22, a starter 25 (starter motor) that cranks the engine, and a starter relay. 26 and a starter switch 27 are provided. When the coil 26 b of the starter relay 26 is energized, the contact 26 a is closed and power is supplied from the battery 22 to the starter 25.

ECU21の端子21a、21b、21cは、それぞれ電源線28、29、30に設けられた電源端子である。第1電源線28は、イグニッションスイッチ23を介してバッテリ22の正側端子に接続されている。第2電源線29は、メインリレー24の常開接点24aを介してバッテリ22の正側端子に接続されている。第3電源線30は、メインリレー24のコイル24bを介してバッテリ22の正側端子に接続されている。以下の説明において、これら電源線28、29、30の電圧をそれぞれVB1、VB2、VB3とし、バッテリ22の電圧をVBとする。ロードダンプなどにより生じるサージ電圧を抑制するため、各電源線とグランドとの間には必要に応じてダイオードやツェナーダイオードなど(図示せず)が接続されている。   Terminals 21a, 21b, and 21c of the ECU 21 are power supply terminals provided on the power supply lines 28, 29, and 30, respectively. The first power supply line 28 is connected to the positive terminal of the battery 22 via the ignition switch 23. The second power supply line 29 is connected to the positive terminal of the battery 22 via the normally open contact 24 a of the main relay 24. The third power line 30 is connected to the positive terminal of the battery 22 through the coil 24 b of the main relay 24. In the following description, the voltages of these power supply lines 28, 29, and 30 are VB1, VB2, and VB3, respectively, and the voltage of the battery 22 is VB. In order to suppress a surge voltage generated by a load dump or the like, a diode or a Zener diode (not shown) is connected between each power line and the ground as necessary.

ECU21は、電源IC31、マイコン32およびスタータ制御回路33を備えている。電源IC31は、電源線29の電圧VB2に基づいてメイン電源電圧VOM(5V)とサブ電源電圧VOS(3.3V)を生成してマイコン32に供給する。また、イグニッションスイッチ23がオンされた時にメインリレー24をオン駆動する。さらに、ECU21からバッテリ22が外されたか否かを示す検出信号Sbをマイコン32に出力する。   The ECU 21 includes a power supply IC 31, a microcomputer 32, and a starter control circuit 33. The power supply IC 31 generates a main power supply voltage VOM (5 V) and a sub power supply voltage VOS (3.3 V) based on the voltage VB2 of the power supply line 29 and supplies it to the microcomputer 32. Further, when the ignition switch 23 is turned on, the main relay 24 is turned on. Further, a detection signal Sb indicating whether or not the battery 22 is removed from the ECU 21 is output to the microcomputer 32.

マイコン32は、CPUを主体としてメイン電源電圧VOMで動作するメイン処理部34(制御手段)と、RAM35(揮発性メモリ)とフラッシュメモリ(不揮発性メモリ)を含みサブ電源電圧VOSで動作する低電圧回路処理部を備えている。フラッシュメモリには、ダイアグデータや学習データなどの保持データを記憶し後述する初期化処理の対象となるフラッシュメモリ36と、エンジンの制御プログラム、保持データの初期値等を記憶して初期化処理の対象とならないフラッシュメモリ(図示せず)とから構成されている。   The microcomputer 32 includes a main processing unit 34 (control means) that operates at a main power supply voltage VOM, mainly a CPU, a RAM 35 (volatile memory), and a flash memory (nonvolatile memory), and operates at a sub power supply voltage VOS. A circuit processing unit is provided. The flash memory stores retention data such as diagnostic data and learning data and stores the flash memory 36 to be subjected to initialization processing, which will be described later, the engine control program, the initial value of the retention data, and the like. It consists of a flash memory (not shown) that is not the target.

電源IC31において、リレー制御回路37は、電源線28の電圧VB1が立ち上がるとMOSFET38をオンしてメインリレー24をオン駆動する。このリレー制御回路37は、イグニッションスイッチ23がオフされた後も、マイコン32からHレベルの電源維持信号Shが入力されている間はMOSFET38をオンし続ける。   In the power supply IC 31, the relay control circuit 37 turns on the MOSFET 38 and drives the main relay 24 on when the voltage VB1 of the power supply line 28 rises. Even after the ignition switch 23 is turned off, the relay control circuit 37 continues to turn on the MOSFET 38 while the H level power supply maintenance signal Sh is input from the microcomputer 32.

メイン電源回路39は、電源線29の電圧VB2を入力してメイン電源電圧VOMを生成する。その構成は、基準電圧生成回路40、オペアンプ41、トランジスタ42および分圧抵抗43a、43b(電圧検出回路43)からなるシリーズレギュレータである。サブ電源回路44も、電源線29の電圧VB2を入力してサブ電源電圧VOSを生成する。その構成は、基準電圧生成回路40、オペアンプ45、トランジスタ46および分圧抵抗47a、47b(電圧検出回路47)からなるシリーズレギュレータである。   The main power supply circuit 39 inputs the voltage VB2 of the power supply line 29 and generates the main power supply voltage VOM. The configuration is a series regulator including a reference voltage generation circuit 40, an operational amplifier 41, a transistor 42, and voltage dividing resistors 43a and 43b (voltage detection circuit 43). The sub power supply circuit 44 also receives the voltage VB2 of the power supply line 29 and generates the sub power supply voltage VOS. The configuration is a series regulator including a reference voltage generation circuit 40, an operational amplifier 45, a transistor 46, and voltage dividing resistors 47a and 47b (voltage detection circuit 47).

バッテリ外れ検出回路48は、電源線28、29、30の電圧VB1、VB2、VB3のうち最も高い電圧がしきい値以下に低下した後再びしきい値を超えると、バッテリが外されたことを示すHレベルの検出信号Sbを出力する。バッテリ22が接続されていれば、イグニッションスイッチ23の状態にかかわらず電圧VB1、VB2、VB3の何れかはバッテリ電圧VBになっている。バッテリ外れ検出回路48は、マイコン32からリセット信号Srが入力されると、バッテリが外されていないことを示すLレベルの検出信号Sbを出力する。   The battery disconnection detection circuit 48 detects that the battery has been removed when the highest voltage among the voltages VB1, VB2, and VB3 of the power supply lines 28, 29, and 30 drops below the threshold and then exceeds the threshold again. An H level detection signal Sb is output. If the battery 22 is connected, one of the voltages VB1, VB2, and VB3 is the battery voltage VB regardless of the state of the ignition switch 23. When the reset signal Sr is input from the microcomputer 32, the battery removal detection circuit 48 outputs an L level detection signal Sb indicating that the battery is not removed.

図示しないが、メイン電源電圧VOMがしきい値以下に低下したときにマイコン32に対し電源リセット信号を出力するパワーオンリセット回路が設けられている。バッテリ外れ検出回路48が用いるしきい値は、パワーオンリセット回路が用いるしきい値以下に設定されている。従って、バッテリ電圧の低下によりバッテリ外れ検出回路48がHレベルの検出信号Sbを出力する場合には、マイコン32は必ず電源リセットされることになる。なお、パワーオンリセット回路に替えて、バッテリ外れ検出回路48にパワーオンリセット機能を備えてもよい。   Although not shown, a power-on reset circuit is provided that outputs a power reset signal to the microcomputer 32 when the main power supply voltage VOM drops below a threshold value. The threshold value used by the battery detachment detection circuit 48 is set to be equal to or lower than the threshold value used by the power-on reset circuit. Therefore, when the battery detachment detection circuit 48 outputs the H level detection signal Sb due to a decrease in the battery voltage, the microcomputer 32 is always reset. Instead of the power-on reset circuit, the battery detachment detection circuit 48 may have a power-on reset function.

次に、図2ないし図4を参照しながら本実施形態の作用を説明する。車両のECU21は、故障状態の特定に資するようにダイアグデータや学習データなどの保持データをフラッシュメモリ36に記憶する。保持データは、初期化が行われない限り、イグニッションスイッチ23の状態にかかわらず常時保持される。車両に故障が生じてディーラーや修理工場で修理が行われた場合、フラッシュメモリ36に記憶されている保持データの初期化が行われる。   Next, the operation of the present embodiment will be described with reference to FIGS. The ECU 21 of the vehicle stores retained data such as diagnostic data and learning data in the flash memory 36 so as to contribute to the identification of the failure state. The retained data is always retained regardless of the state of the ignition switch 23 unless initialization is performed. When a failure occurs in the vehicle and repair is performed at a dealer or a repair shop, the stored data stored in the flash memory 36 is initialized.

保持データの初期化とは、初期化の対象となっていないフラッシュメモリ或いはROM(図示せず)に記憶されている初期値を保持データに設定する処理であり、その保持データはフラッシュメモリ36に書き込まれる。本実施形態のECU21は、故障診断ツール(専用ツール)を用いて初期化する方法に加え、ECU21から一旦バッテリ22を外して再接続した後にイグニッションスイッチ23をオンすることにより初期化する方法を利用することができる。   The initialization of retained data is a process of setting an initial value stored in a flash memory or ROM (not shown) that is not an initialization target as retained data, and the retained data is stored in the flash memory 36. Written. The ECU 21 of the present embodiment uses a method of initializing by turning on the ignition switch 23 after removing the battery 22 from the ECU 21 and reconnecting it in addition to the method of initializing using the failure diagnosis tool (dedicated tool). can do.

図2は、電源リセットが解除された時に、マイコン32のメイン処理部34がスタータ25の駆動前に実行するイニシャル処理である。電源線29の電圧VB2ひいてはメイン電源電圧VOMが低下して電源リセットがかかるのは、イグニッションスイッチ23がオフされた時と、スタータ25の駆動等によりバッテリ電圧VBが低下した時である。バッテリ22の取り外しは、イグニッションスイッチ23がオフされている間に行われる。図3は、イグニッションスイッチ23がオフされた時に、メイン処理部34が電源遮断前にすべき種々の処理を実行した後で最後に実行するシャットダウン処理である。スタータ25の駆動等によりバッテリ電圧VBが低下して電源リセットがかかった時には、シャットダウン処理は実行されない。   FIG. 2 shows an initial process executed by the main processing unit 34 of the microcomputer 32 before the starter 25 is driven when the power reset is released. The voltage VB2 of the power supply line 29 and hence the main power supply voltage VOM are lowered and the power supply is reset when the ignition switch 23 is turned off and when the battery voltage VB is lowered by driving the starter 25 or the like. The battery 22 is removed while the ignition switch 23 is turned off. FIG. 3 shows a shutdown process that is finally executed after the main processing unit 34 performs various processes that should be performed before the power is shut off when the ignition switch 23 is turned off. When the battery voltage VB is lowered due to driving of the starter 25 and the power supply is reset, the shutdown process is not executed.

図4は、スタータ25の駆動によりバッテリ電圧VBが低下して、バッテリ外れ検出回路48がバッテリ外れを表すHレベルの検出信号Sbを出力するとともに、マイコン32が電源リセットされる場合のタイミングチャートである。メイン処理部34は、イニシャル処理において、フラッシュメモリ36からRAM35にダイアグデータや学習データなどの保持データを読み出す。以降、メイン処理部34は、RAM35の保持データを対象としてデータを更新し、シャットダウン処理においてRAM35の保持データをフラッシュメモリ36に書き込む。   FIG. 4 is a timing chart in the case where the battery voltage VB is lowered by driving the starter 25, the battery disconnection detection circuit 48 outputs an H level detection signal Sb indicating battery disconnection, and the microcomputer 32 is reset to a power source. is there. The main processing unit 34 reads stored data such as diagnostic data and learning data from the flash memory 36 to the RAM 35 in the initial processing. Thereafter, the main processing unit 34 updates data for the data held in the RAM 35, and writes the data held in the RAM 35 to the flash memory 36 in the shutdown process.

スタータ25の駆動によるバッテリ外れとの誤判定を防止するため、メイン処理部34は実行履歴データを用いる。実行履歴データとは、前回イグニッションスイッチ23がオフされてから、検出信号Sbの読み込み処理と読み込んだ検出信号Sbに基づくバッテリ外れの判定処理とを実行したか否かの実行状況(未実行/実行済)、およびバッテリ22が外されたか否かの判定結果(外れ有/外れ無)を示すデータである。この実行履歴データは、フラッシュメモリ36に記憶されている。   In order to prevent erroneous determination that the battery is disconnected due to the starter 25 being driven, the main processing unit 34 uses execution history data. The execution history data is an execution status (unexecuted / executed) indicating whether or not the detection signal Sb reading process and the battery detachment determination process based on the read detection signal Sb have been executed since the ignition switch 23 was previously turned off. Data) indicating the determination result of whether or not the battery 22 has been removed (with / without disconnection). This execution history data is stored in the flash memory 36.

メイン処理部34は、シャットダウン処理において、RAM35に未実行の実行履歴データを設定し(ステップT1)、それをフラッシュメモリ36に書き込む(ステップT2)。すなわち、イグニッションスイッチ23がオフされた時(時刻t1、t4、t9)には、必ず実行履歴データが未実行に設定される。その後、メイン処理部34は、保持データをフラッシュメモリ36に書き込んで退避させ(ステップT3)、電源維持信号ShをLレベルにしてメインリレー24を遮断する。   In the shutdown process, the main processing unit 34 sets unexecuted execution history data in the RAM 35 (step T1) and writes it in the flash memory 36 (step T2). That is, when the ignition switch 23 is turned off (time t1, t4, t9), the execution history data is always set to non-execution. Thereafter, the main processing unit 34 writes the retained data to the flash memory 36 and saves it (step T3), sets the power maintenance signal Sh to L level, and shuts off the main relay 24.

メイン処理部34は、イニシャル処理を開始すると(時刻t2、t3、t7、t8、t10、t11)、フラッシュメモリ36から実行履歴データを読み出し(ステップS1)、その実行履歴データが未実行か否かを判断する(ステップS2)。後述するように、イニシャル処理を実行すると、次にイグニッションスイッチ23がオフされてシャットダウン処理を実行するまでの期間、実行履歴データは実行済に維持される(ステップS6、S7)。   When the initial processing is started (time t2, t3, t7, t8, t10, t11), the main processing unit 34 reads execution history data from the flash memory 36 (step S1), and whether or not the execution history data is unexecuted. Is determined (step S2). As will be described later, when the initial process is executed, the execution history data is maintained to be executed during the period from when the ignition switch 23 is turned off to when the shutdown process is executed (steps S6 and S7).

実行履歴データが未実行(YES)の場合とは、前回イグニッションスイッチ23がオフされた時から初めてのイニシャル処理の場合、換言すればイグニッションスイッチ23がオンされたことによる立ち上がり(時刻t2、t7、t10)であって、スタータ25の駆動等によるバッテリ電圧VBの一時的な低下による電源リセットからの立ち上がり(時刻t3、t8、t11)でない場合である。   The case where the execution history data is not executed (YES) is the initial processing for the first time since the ignition switch 23 was turned off the last time, in other words, the rise (time t2, t7, This is a time t10) that is not a rise (time t3, t8, t11) from a power reset due to a temporary drop in the battery voltage VB due to driving of the starter 25 or the like.

この場合には、検出信号Sbを読み込み(ステップS3)、バッテリ外れが検出されたか否かを判断する(ステップS4)。検出信号SbがHレベルのときはバッテリが外された(YES)と判断し、RAM35に記憶される上記保持データを初期化する(ステップS5)。このとき、初期化された保持データを直ちにフラッシュメモリ36に書き込んでもよいが、書き込み時間が長くなるとスタータ25の始動が遅れる虞がある。そこで、上述したように、シャットダウン処理のステップT3でフラッシュメモリ36に書き込んでいる。その後、RAM35に実行済且つ外れ有の実行履歴データを設定し(ステップS6)、それをフラッシュメモリ36に書き込む(ステップS9)。   In this case, the detection signal Sb is read (step S3), and it is determined whether or not battery removal is detected (step S4). When the detection signal Sb is at the H level, it is determined that the battery has been removed (YES), and the stored data stored in the RAM 35 is initialized (step S5). At this time, the stored data that has been initialized may be immediately written to the flash memory 36. However, if the writing time becomes long, the starter 25 may be delayed in starting. Therefore, as described above, the data is written in the flash memory 36 at step T3 of the shutdown process. Thereafter, execution history data that has been executed and has been set off is set in the RAM 35 (step S6), and is written in the flash memory 36 (step S9).

一方、検出信号SbがLレベルのときはバッテリが外されていない(NO)と判断し、フラッシュメモリ36からRAM35に保持データを読み出す(ステップS7)。その後、RAM35に実行済且つ外れ無の実行履歴データを設定し(ステップS8)、それをフラッシュメモリ36に書き込む(ステップS9)。その後、メイン処理部34は、次のバッテリ外れに備えてリセット信号Srを出力する(ステップS13)。   On the other hand, when the detection signal Sb is at the L level, it is determined that the battery is not removed (NO), and the retained data is read from the flash memory 36 to the RAM 35 (step S7). Thereafter, execution history data that has been executed and is not detached is set in the RAM 35 (step S8), and is written in the flash memory 36 (step S9). Thereafter, the main processing unit 34 outputs a reset signal Sr in preparation for the next battery removal (step S13).

ステップS2の判断で実行履歴データが実行済(NO)の場合とは、前回イグニッションスイッチ23がオフされた時から少なくとも1回のイニシャル処理が実行されており、且つ、イグニッションスイッチ23がオフされることなく電源リセットされた状態から立ち上がった場合(時刻t3、t8、t11)である。この場合の検出信号Sbは、バッテリ22が外されていないにもかかわらず、バッテリ電圧の低下によりHレベル(バッテリ外れ)になっている蓋然性が高い。つまり、検出信号Sbは、真のバッテリ外れ状態を反映していない。   The case where the execution history data is already executed (NO) at the determination in step S2 is that at least one initial process has been executed since the ignition switch 23 was turned off last time, and the ignition switch 23 is turned off. This is a case where the power supply is reset without being reset (time t3, t8, t11). The detection signal Sb in this case has a high probability of being at the H level (battery disconnected) due to a decrease in the battery voltage even though the battery 22 is not removed. That is, the detection signal Sb does not reflect a true battery removal state.

そこで、メイン処理部34は、検出信号Sbの読み込み処理と読み込んだ検出信号Sbに基づくバッテリ外れの判定処理を実行しない。また、実行履歴データの変更もしない。さらに、電源リセットによりRAM35の保持データが不定になっている虞があるので、その再設定を行う。すなわち、実行履歴データが外れ有か否かを判断し(ステップS10)、外れ有(YES)の場合には、ステップS5と同様にRAM35に記憶される保持データを初期化する(ステップS11)。外れ無(NO)の場合には、ステップS7と同様にフラッシュメモリ36からRAM35に保持データを読み出す(ステップS12)。メイン処理部34は、次のバッテリ外れに備えてリセット信号Srを出力する(ステップS13)。   Accordingly, the main processing unit 34 does not execute the reading process of the detection signal Sb and the battery detachment determination process based on the read detection signal Sb. Also, the execution history data is not changed. Further, since there is a possibility that the retained data in the RAM 35 is indefinite due to the power reset, the resetting is performed. That is, it is determined whether or not the execution history data is out (step S10). If the execution history data is out (YES), the retained data stored in the RAM 35 is initialized as in step S5 (step S11). If there is no disconnection (NO), the stored data is read from the flash memory 36 to the RAM 35 as in step S7 (step S12). The main processing unit 34 outputs a reset signal Sr in preparation for the next battery removal (step S13).

運転者は、エンジンを始動するために、イグニッションスイッチ23をオン操作し、ブレーキを踏みながらスタータスイッチ27をオン操作する。このイグニッションスイッチ23のオン操作からスタータスイッチ27のオン操作までの時間が短いと、イニシャル処理が間に合わない事態も考えられる。そこで、メイン処理部34は、スタータスイッチ27からスタート指令を入力すると、イニシャル処理が終了した後にスタータ駆動信号を出力する。スタータ制御回路33は、マイコン32からスタータ駆動信号が入力されると、スタータリレー26のコイル26bに通電する。これにより、イニシャル処理が終了する前にスタータ25が駆動されて電圧低下が生じることを防止できる。   In order to start the engine, the driver turns on the ignition switch 23 and turns on the starter switch 27 while stepping on the brake. If the time from the ON operation of the ignition switch 23 to the ON operation of the starter switch 27 is short, there may be a situation where the initial process is not in time. Therefore, when a start command is input from the starter switch 27, the main processing unit 34 outputs a starter drive signal after the initial process is completed. The starter control circuit 33 energizes the coil 26 b of the starter relay 26 when a starter drive signal is input from the microcomputer 32. As a result, it is possible to prevent the voltage drop due to the starter 25 being driven before the initial process is completed.

以上説明したように、本実施形態のマイコン32はフラッシュメモリ36を備え、常時保持が必要な保持データをフラッシュメモリ36に記憶する構成を有している。また、バッテリ外れ検出回路48は、電源線28、29、30の電圧VB1、VB2、VB3のうち最も高い電圧に基づいて検出信号Sbを出力するように構成されている。こうした構成により、ECU21とバッテリ22との間を直接繋ぐ専用配線が不要となり、データのバックアップのための暗電流も低減できる。   As described above, the microcomputer 32 according to the present embodiment includes the flash memory 36 and has a configuration in which stored data that needs to be constantly stored is stored in the flash memory 36. Further, the battery detachment detection circuit 48 is configured to output the detection signal Sb based on the highest voltage among the voltages VB1, VB2, and VB3 of the power supply lines 28, 29, and 30. With such a configuration, a dedicated wiring for directly connecting the ECU 21 and the battery 22 becomes unnecessary, and a dark current for data backup can be reduced.

メイン処理部34は、新たに実行履歴データを導入し、スタータ25を駆動する前のイニシャル処理においてフラッシュメモリ36から実行履歴データを読み出す。この実行履歴データが未実行か実行済かに応じて、イグニッションオンによる正常な立ち上がりか、バッテリ電圧VBの低下による電源リセットからの異常な立ち上がりかを判定することができる。後者の判定時には、メイン処理部34は、検出信号Sbの読み込み処理とバッテリ外れの判定処理を実行しない。従って、スタータ25の駆動によりバッテリ電圧VBがしきい値以下に低下しても、誤ってバッテリ外れと判定して保持データを初期化することを防止できる。   The main processing unit 34 newly introduces execution history data, and reads the execution history data from the flash memory 36 in the initial process before driving the starter 25. Depending on whether the execution history data has not been executed or has been executed, it can be determined whether the rising is normal due to the ignition being turned on, or whether the rising is abnormal due to a decrease in the battery voltage VB. In the latter determination, the main processing unit 34 does not execute the detection signal Sb reading process and the battery removal determination process. Therefore, even if the battery voltage VB drops below the threshold value by driving the starter 25, it is possible to prevent the stored data from being erroneously determined to be out of battery and being initialized.

メイン処理部34は、イニシャル処理において、実行履歴データを実行済に設定してフラッシュメモリ36に書き込む際に、バッテリ外れの判定結果も併せて書き込む。そして、イニシャル処理において、フラッシュメモリ36から読み出した実行履歴データが実行済の場合、判定結果(外れ有/外れ無)に応じて保持データの再初期化/保持データの再読み出しを実行する。これにより、保持データがバッテリ電圧VBの低下により不定となることを確実に防止できる。   In the initial process, the main processing unit 34 also writes the determination result of battery detachment when the execution history data is set to executed and written to the flash memory 36. In the initial process, when the execution history data read from the flash memory 36 has been executed, the re-initialization of the holding data / re-reading of the holding data is executed according to the determination result (existence / non-existence). Thereby, it is possible to reliably prevent the retained data from becoming indefinite due to the decrease in the battery voltage VB.

メイン処理部34は、保持データをRAM35に記憶し、シャットダウン処理においてフラッシュメモリ36に退避させる。この処理シーケンスによれば、保持データの初期化、保持データの更新等をRAM35に対して行えばよいので、処理速度を高めることができる。   The main processing unit 34 stores the retained data in the RAM 35 and saves it in the flash memory 36 in the shutdown process. According to this processing sequence, it is only necessary to initialize the retained data, update the retained data, etc. to the RAM 35, so that the processing speed can be increased.

(第2の実施形態)
図5に示す電子制御装置51(ECU51)は、スタータ制御回路33に替えて遅延回路52を備えている点を除き、図1に示したECU21と同様に構成されている。ECU51は、スタータ25の駆動タイミングを直接制御する機能を備えていない。そこで、遅延回路52は、スタータスイッチ27からのスタート指令を遅延させてスタータリレー26のコイル26bに通電する。このときの遅延時間は、イニシャル処理に要する時間以上に設定されている。本実施形態によっても、第1の実施形態と同様の作用および効果が得られる。
(Second Embodiment)
An electronic control device 51 (ECU 51) shown in FIG. 5 is configured in the same manner as the ECU 21 shown in FIG. 1 except that a delay circuit 52 is provided instead of the starter control circuit 33. The ECU 51 does not have a function of directly controlling the drive timing of the starter 25. Therefore, the delay circuit 52 delays the start command from the starter switch 27 and energizes the coil 26 b of the starter relay 26. The delay time at this time is set to be longer than the time required for the initial process. Also according to the present embodiment, the same operations and effects as those of the first embodiment can be obtained.

(その他の実施形態)
以上、本発明の好適な実施形態について説明したが、本発明は上述した実施形態に限定されるものではなく、発明の要旨を逸脱しない範囲内で種々の変形、拡張を行うことができる。
(Other embodiments)
As mentioned above, although preferred embodiment of this invention was described, this invention is not limited to embodiment mentioned above, A various deformation | transformation and expansion | extension can be performed within the range which does not deviate from the summary of invention.

実行履歴データは、少なくとも実行状況(未実行/実行済)を含めばよく、判定結果(外れ有/外れ無)まで含む必要はない。すなわち、図2に示すステップS6、S8でRAM35に実行済の実行履歴データを設定し、ステップS2でNOと判断した場合にはステップS10〜S12の処理を飛ばしてステップS13に移行すればよい。ただし、ステップS2でNOと判断した場合には保持データが不定になる虞があるので、再設定処理またはエラー処理などを別に講じることが好ましい。   The execution history data only needs to include at least the execution status (not executed / executed), and does not need to include the determination result (missed / not missed). That is, the executed history data is set in the RAM 35 in steps S6 and S8 shown in FIG. 2, and if NO is determined in step S2, the processes in steps S10 to S12 may be skipped and the process proceeds to step S13. However, if NO is determined in step S2, the retained data may become indefinite, so it is preferable to perform resetting processing or error processing separately.

メイン処理部34は、イニシャル処理においてRAM35の保持データを初期化し、またはフラッシュメモリ36からRAM35に保持データを読み出し、シャットダウン処理においてRAM35の保持データをフラッシュメモリ36に書き込んだ。しかし、保持データをRAM35に記憶することなく、フラッシュメモリ36に記憶した保持データを直接書き換えてもよい。この場合には、ステップS5、S11においてフラッシュメモリ36に記憶された保持データを初期化し、ステップS7、S12、T3の処理は不要である。   The main processing unit 34 initializes the retained data in the RAM 35 in the initial process, or reads the retained data from the flash memory 36 into the RAM 35, and writes the retained data in the RAM 35 into the flash memory 36 in the shutdown process. However, the stored data stored in the flash memory 36 may be directly rewritten without storing the stored data in the RAM 35. In this case, the retained data stored in the flash memory 36 in steps S5 and S11 is initialized, and the processes in steps S7, S12, and T3 are unnecessary.

本発明でいう書き換え可能な不揮発性メモリは、1つのメモリチップとは限らない。実行履歴データを記憶する不揮発性メモリと保持データを記憶する不揮発性メモリは、異なるメモリチップまたは異なるメモリ領域であってもよい。書き換え可能な不揮発性メモリは、フラッシュメモリ36に限られず、例えばEEPROMであってもよい。
本発明でいう電源供給用リレーは、半導体スイッチを用いた開閉器も含めたスイッチ手段を広く意味する。
The rewritable nonvolatile memory referred to in the present invention is not limited to one memory chip. The non-volatile memory that stores the execution history data and the non-volatile memory that stores the retained data may be different memory chips or different memory areas. The rewritable nonvolatile memory is not limited to the flash memory 36, and may be, for example, an EEPROM.
The power supply relay referred to in the present invention broadly means switch means including a switch using a semiconductor switch.

図面中、21、51は電子制御装置(車載制御装置)、22はバッテリ、23はイグニッションスイッチ、24はメインリレー(電源供給用リレー)、24aは常開接点、24bはコイル、25はスタータ、28、29、30は第1、第2、第3電源線、33はスタータ制御回路、34はメイン処理部(制御手段)、35はRAM(揮発性メモリ)、36はフラッシュメモリ(書き換え可能な不揮発性メモリ)、48はバッテリ外れ検出回路、52は遅延回路である。   In the drawings, 21 and 51 are electronic control devices (vehicle-mounted control devices), 22 is a battery, 23 is an ignition switch, 24 is a main relay (power supply relay), 24a is a normally open contact, 24b is a coil, 25 is a starter, 28, 29 and 30 are first, second and third power lines, 33 is a starter control circuit, 34 is a main processing unit (control means), 35 is RAM (volatile memory), and 36 is flash memory (rewritable). (Nonvolatile memory), 48 is a battery disconnection detection circuit, and 52 is a delay circuit.

Claims (7)

イグニッションスイッチ、バッテリからの電源供給路を開閉する電源供給用リレー、およびエンジンを始動させるスタータを備えた車両に搭載される車載制御装置において、
書き換え可能な不揮発性メモリと、
バッテリからの電圧がしきい値以下になったことを条件としてバッテリが外されたことを示す検出信号を出力し、リセット信号が入力されたことを条件としてバッテリが外されていないことを示す検出信号を出力するバッテリ外れ検出回路と、
前記イグニッションスイッチがオフされると、前記検出信号の読み込み処理とバッテリ外れの判定処理との実行状況に係る実行履歴データを未実行に設定して前記不揮発性メモリに書き込んでから前記電源供給用リレーをオフするシャットダウン処理を実行し、電源リセット状態から立ち上がると、前記スタータが駆動する前に、前記不揮発性メモリから前記実行履歴データを読み出し、その読み出した実行履歴データが未実行に設定されている場合には、前記検出信号の読み込み処理とバッテリ外れの判定処理とを実行して前記実行履歴データを実行済に設定して前記不揮発性メモリに書き込み、バッテリが外されたと判定したときには前記不揮発性メモリに記憶されて常時保持される保持データを初期化し、前記バッテリ外れ検出回路にリセット信号を出力し、前記読み出した実行履歴データが実行済に設定されている場合には、前記検出信号の読み込み処理とバッテリ外れの判定処理とを実行することなく前記バッテリ外れ検出回路にリセット信号を出力するイニシャル処理を実行する制御手段とを備えていることを特徴とする車載制御装置。
In an in-vehicle control device mounted on a vehicle equipped with an ignition switch, a relay for power supply for opening and closing a power supply path from a battery, and a starter for starting an engine,
Rewritable nonvolatile memory,
Outputs a detection signal indicating that the battery has been removed on the condition that the voltage from the battery has fallen below the threshold value, and indicates that the battery has not been removed on the condition that the reset signal has been input A battery disconnection detection circuit that outputs a signal;
When the ignition switch is turned off, execution history data relating to the execution status of the detection signal reading process and the battery detachment determination process is set to unexecuted and written to the nonvolatile memory, and then the power supply relay When the shutdown process is executed to turn off the power supply, the execution history data is read from the nonvolatile memory before the starter is driven, and the read execution history data is set to non-execution. In this case, the detection signal reading process and the battery detachment determination process are executed to set the execution history data as executed and written to the nonvolatile memory. When it is determined that the battery is removed, the nonvolatile memory Initialize the stored data that is stored in the memory and is held at all times. When a set signal is output and the read execution history data is set to executed, a reset signal is output to the battery removal detection circuit without executing the detection signal reading process and the battery removal determination process. The vehicle-mounted control apparatus characterized by including the control means which performs the initial process which outputs.
前記制御手段は、前記イニシャル処理において、前記実行履歴データを実行済に設定して前記不揮発性メモリに書き込む際に、バッテリが外されたか否かの判定結果も併せて書き込み、前記不揮発性メモリから読み出した実行履歴データが実行済で且つバッテリが外されたとの判定結果である場合には、前記保持データを初期化することを特徴とする請求項1記載の車載制御装置。   In the initial process, when the execution history data is set to executed and written to the nonvolatile memory in the initial process, the control means also writes a determination result as to whether or not a battery has been removed, from the nonvolatile memory. The in-vehicle control device according to claim 1, wherein when the read execution history data is a result of determination that the execution has been completed and the battery has been removed, the retained data is initialized. 揮発性メモリを備え、
前記制御手段は、前記シャットダウン処理において、前記揮発性メモリに記憶されている保持データを前記不揮発性メモリに書き込み、前記イニシャル処理において、前記保持データの初期化を前記揮発性メモリに記憶される保持データに対して行い、前記不揮発性メモリから読み出した実行履歴データが未実行で且つバッテリが外されていないとの判定結果である場合および前記不揮発性メモリから読み出した実行履歴データが実行済で且つバッテリが外されていないとの判定結果である場合には、前記不揮発性メモリに記憶されている保持データを前記揮発性メモリに読み出すことを特徴とする請求項2記載の車載制御装置。
With volatile memory,
The control means writes retained data stored in the volatile memory to the nonvolatile memory in the shutdown process, and retains initialization of the retained data stored in the volatile memory in the initial process. The execution history data read from the non-volatile memory is executed and the execution history data read from the non-volatile memory is executed and the execution history data read from the non-volatile memory is not executed and the battery is not removed. The in-vehicle control device according to claim 2, wherein when the determination result indicates that the battery is not removed, the retained data stored in the nonvolatile memory is read out to the volatile memory.
スタータ駆動信号が入力されると前記スタータを駆動するスタータ制御回路を備え、
前記制御手段は、スタート指令を入力すると、前記イニシャル処理が終了した後に前記スタータ駆動信号を出力することを特徴とする請求項1ないし3の何れかに記載の車載制御装置。
A starter control circuit for driving the starter when a starter drive signal is input;
4. The in-vehicle control device according to claim 1, wherein when the start command is input, the control means outputs the starter drive signal after the initial process is completed.
スタート指令を入力すると、少なくとも前記イニシャル処理の処理時間だけ待ってから前記スタータの駆動を可能とする遅延回路を備えていることを特徴とする請求項1ないし3の何れかに記載の車載制御装置。   4. The in-vehicle control device according to claim 1, further comprising a delay circuit that enables driving of the starter after waiting for at least a processing time of the initial processing when a start command is input. . 前記バッテリとの間に、前記イグニッションスイッチを介して前記バッテリの正側端子に接続される第1電源線、前記電源供給用リレーの常開接点を介して前記バッテリの正側端子に接続される第2電源線および前記電源供給用リレーのコイルを介して前記バッテリの正側端子に接続される第3電源線が設けられていることを特徴とする請求項1ないし5の何れかに記載の車載制御装置。   A first power line connected between the battery and the positive terminal of the battery via the ignition switch, and a positive terminal of the battery via a normally open contact of the power supply relay. 6. The third power supply line connected to the positive terminal of the battery through a second power supply line and a coil of the power supply relay is provided. In-vehicle control device. 前記バッテリ外れ検出回路は、前記第1ないし第3電源線の電圧のうち最も高い電圧がしきい値以下になったことを条件としてバッテリが外されたことを示す検出信号を出力することを特徴とする請求項6記載の車載制御装置。   The battery detachment detection circuit outputs a detection signal indicating that the battery has been removed on condition that the highest voltage among the voltages of the first to third power supply lines is equal to or lower than a threshold value. The in-vehicle control device according to claim 6.
JP2012012974A 2012-01-25 2012-01-25 On-vehicle control device Pending JP2013151220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012012974A JP2013151220A (en) 2012-01-25 2012-01-25 On-vehicle control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012012974A JP2013151220A (en) 2012-01-25 2012-01-25 On-vehicle control device

Publications (1)

Publication Number Publication Date
JP2013151220A true JP2013151220A (en) 2013-08-08

Family

ID=49047992

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012012974A Pending JP2013151220A (en) 2012-01-25 2012-01-25 On-vehicle control device

Country Status (1)

Country Link
JP (1) JP2013151220A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101605639B1 (en) 2014-12-23 2016-03-23 주식회사 현대케피코 System and method for initializing of factory in engine controller
KR101610504B1 (en) 2014-09-05 2016-04-07 현대자동차주식회사 System for managing battery of vehicle and method thereof
JP2018134964A (en) * 2017-02-21 2018-08-30 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
WO2019054482A1 (en) * 2017-09-15 2019-03-21 日立オートモティブシステムズ株式会社 Electronic control device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101610504B1 (en) 2014-09-05 2016-04-07 현대자동차주식회사 System for managing battery of vehicle and method thereof
US9606186B2 (en) 2014-09-05 2017-03-28 Hyundai Motor Company System for managing a battery and method thereof
KR101605639B1 (en) 2014-12-23 2016-03-23 주식회사 현대케피코 System and method for initializing of factory in engine controller
JP2018134964A (en) * 2017-02-21 2018-08-30 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
WO2019054482A1 (en) * 2017-09-15 2019-03-21 日立オートモティブシステムズ株式会社 Electronic control device
KR20200030611A (en) * 2017-09-15 2020-03-20 히다치 오토모티브 시스템즈 가부시키가이샤 Electronic control device
US10857905B2 (en) 2017-09-15 2020-12-08 Hitachi Automotive Systems, Ltd. Electronic control unit
KR102232770B1 (en) 2017-09-15 2021-03-26 히다치 아스테모 가부시키가이샤 Electronic control unit

Similar Documents

Publication Publication Date Title
JP4274186B2 (en) Failure diagnosis apparatus and failure information recording method
JP4065790B2 (en) In-vehicle electronic control unit
US7155326B2 (en) Electric control unit
US7475234B2 (en) Electronic control apparatus equipped with malfunction monitor
CN110594028B (en) Throttle self-learning control method and device and electronic control unit
US5095438A (en) Engine controller with low voltage reset
US20060256497A1 (en) Method of diagnosing main relay by use of electronic control unit and electronic control unit
JP4552982B2 (en) Electronic control unit
US8095263B2 (en) Electronic control unit and vehicle control system
US7203581B2 (en) Electronic control unit for controlling updating of data in non-volatile memory
JP2013151220A (en) On-vehicle control device
JP4706778B2 (en) Electronic control device and vehicle control system
JP4001088B2 (en) Electronic control unit
JP4281808B2 (en) VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD
JP5223630B2 (en) Electronic control unit
US20180024173A1 (en) Vehicle control apparatus
JP2002323902A (en) Electronic controller
JP2009126451A (en) Controller for vehicle
CN110023911B (en) Electronic control device and data protection method thereof
JP2007162586A (en) On-vehicle control device
JP2017096186A (en) Vehicle electronic control device
KR101832278B1 (en) Method for diagnosing engine off timer
JP5672185B2 (en) In-vehicle control device
JP4033141B2 (en) Electronic control device for vehicle
JP2004151021A (en) Fault diagnostic device for vehicle