JP2017123106A - Electronic control apparatus - Google Patents

Electronic control apparatus Download PDF

Info

Publication number
JP2017123106A
JP2017123106A JP2016002637A JP2016002637A JP2017123106A JP 2017123106 A JP2017123106 A JP 2017123106A JP 2016002637 A JP2016002637 A JP 2016002637A JP 2016002637 A JP2016002637 A JP 2016002637A JP 2017123106 A JP2017123106 A JP 2017123106A
Authority
JP
Japan
Prior art keywords
mode
potential
switch
circuit
microcomputer
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
JP2016002637A
Other languages
Japanese (ja)
Other versions
JP6540518B2 (en
Inventor
輝義 加藤
Teruyoshi Kato
輝義 加藤
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2016002637A priority Critical patent/JP6540518B2/en
Publication of JP2017123106A publication Critical patent/JP2017123106A/en
Application granted granted Critical
Publication of JP6540518B2 publication Critical patent/JP6540518B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an electronic control apparatus capable of activating a normal mode even in a case where abnormality in which an instruction of a program-rewriting mode is continuously output occurs.SOLUTION: An electronic control apparatus includes: a first circuit for applying, to a control terminal of a microprocessor, a first potential for activating the microprocessor in a normal mode or a second potential for activating the microprocessor in a program-rewriting mode, on the basis of an output from a mode-switching switch; a second circuit for detecting an output from the mode-switching switch every time an ignition switch is turned on (S22), counting the number of times of continuously detecting an output for applying the second potential to a control terminal of the microprocessor (S23), and determining whether the count value has reached a given value; and a third circuit for switching the potential applied to the control terminal of the microprocessor to the first potential (S25) in the case of the second circuit determining that the count value has reached the given value (S24). Further, the second circuit resets the count value after the third circuit switches to the first potential (S26).SELECTED DRAWING: Figure 2

Description

本発明は、プログラムの書き換えが可能な機能部を搭載した電子制御装置に関する。   The present invention relates to an electronic control device equipped with a functional unit capable of rewriting a program.

例えば特許文献1には、車両外部の書き換え装置から車両に搭載された電子制御装置の機能部(マイコンなど)のプログラムを書き換える処理の途中で異常が発生した際の対策が開示されている。   For example, Patent Document 1 discloses a countermeasure when an abnormality occurs during a process of rewriting a program of a functional unit (such as a microcomputer) of an electronic control device mounted on a vehicle from a rewriting device outside the vehicle.

この特許文献1では、イグニッションスイッチがON状態であればプログラム書き換えモードによる処理を実行し、イグニッションスイッチがOFF状態であれば通常モードによる処理を実行するように、予め規定されている。そして、特許文献1では、プログラムを書き換えるモードによる処理の途中で異常が発生した場合、イグニッションスイッチをOFF状態に切り替えることで電子制御装置を通常モードで起動させる。これにより、異常の発生によってプログラムを書き換える処理が途中で中断しても、そこで処理が停滞しないようにしている。   In Patent Document 1, it is preliminarily specified that the process in the program rewrite mode is executed when the ignition switch is in the ON state, and the process in the normal mode is executed when the ignition switch is in the OFF state. And in patent document 1, when abnormality arises in the middle of the process by the mode which rewrites a program, an electronic control apparatus is started in normal mode by switching an ignition switch to an OFF state. As a result, even if the process of rewriting the program is interrupted in the middle due to the occurrence of an abnormality, the process does not stagnate there.

特開2015−098311号公報Japanese Patent Laying-Open No. 2015-098311

しかしながら、上記特許文献1の技術では、通常モードかプログラム書き換えモードかの指示を出力するスイッチから、プログラム書き換えモードの指示が出力され続けるという異常が発生した場合、イグニッションスイッチをOFF状態に変化させてもプログラム書き換えモードの指示が解除されず、通常モードを起動することができない。   However, in the technique of the above-mentioned Patent Document 1, when an abnormality occurs in which the instruction for the program rewrite mode is continuously output from the switch for outputting the instruction for the normal mode or the program rewrite mode, the ignition switch is changed to the OFF state. However, the program rewrite mode instruction is not canceled and the normal mode cannot be activated.

本発明は、上記課題を鑑みてなされたものであり、プログラム書き換えモードの指示が出力され続けるという異常が発生した場合でも通常モードを起動することができる電子制御装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an electronic control device capable of starting a normal mode even when an abnormality occurs in which a program rewrite mode instruction is continuously output. .

上記課題を解決するために、本発明は、モード切り替えスイッチからの出力に基づいて、マイコンが起動するモードを切り替える電子制御装置であって、モード切り替えスイッチからの出力に基づいて、マイコンを通常モードで起動させる第1電位またはマイコンをプログラム書き換えモードで起動させる第2電位を、マイコンの制御端子に印加する第1回路と、イグニッションスイッチがオン動作される毎にモード切り替えスイッチからの出力を検出し、マイコンの制御端子へ第2電位を印加させる出力が連続して検出された回数をカウントし、カウント値が所定の値に達したか否かを判断する第2回路と、第2回路でカウント値が所定の値に達したと判断されると、マイコンの制御端子に印加される電位を第1電位に切り替える第3の回路とを備え、第2回路は、第3回路で第1電位に切り替えられた後、カウント値をリセットする、ことを特徴とする。   In order to solve the above-described problems, the present invention provides an electronic control device that switches a mode in which a microcomputer is activated based on an output from a mode switch, and sets the microcomputer in a normal mode based on an output from the mode switch. The first potential applied to the microcomputer or the second potential to activate the microcomputer in the program rewrite mode is applied to the control terminal of the microcomputer, and the output from the mode switch is detected each time the ignition switch is turned on. The second circuit that counts the number of times that the output for applying the second potential to the control terminal of the microcomputer is continuously detected and determines whether or not the count value has reached a predetermined value is counted by the second circuit When it is determined that the value has reached a predetermined value, the third time for switching the potential applied to the control terminal of the microcomputer to the first potential. With the door, the second circuit, after switching to the first potential at the third circuit, resets the count value, it is characterized.

この本発明の電子制御装置では、イグニッションスイッチがオン動作した時のモード切り替えスイッチからの出力を監視し、プログラム書き換えモードでの起動を指示する第2電位を機能部の制御端子に印加させる出力が連続して現れた回数を、カウンタでカウントする。そして、カウンタのカウント値が所定の値に達すれば、モード切り替えスイッチからの出力にかかわらず、機能部の制御端子に印加される電位を通常モードでの起動を指示する第1電位に切り替える。これにより、プログラム書き換えモードの指示が出力され続けるという異常が生じて、本来であればプログラム書き換えモードでしか起動できない状況であっても、カウント値が所定の値に達すれば強制的に通常モードで起動することができる。   In the electronic control device according to the present invention, the output from the mode changeover switch when the ignition switch is turned on is monitored, and the output for instructing the start in the program rewrite mode is applied to the control terminal of the functional unit. The counter is used to count the number of times it appears continuously. When the count value of the counter reaches a predetermined value, the potential applied to the control terminal of the functional unit is switched to the first potential instructing activation in the normal mode regardless of the output from the mode switch. As a result, an abnormality that the instruction of the program rewrite mode continues to be output occurs, and even if the program can be started only in the program rewrite mode, if the count value reaches a predetermined value, it is forcibly set in the normal mode. Can be activated.

また、本発明の電子制御装置では、カウンタのカウント値が所定の値に達してマイコンが通常モードで起動すれば、カウント値をリセットする。これにより、少なくとも所定の値の回数に1回の割合での通常モードによる起動ができる機会を確保しつつ、意図しないプログラム書き換えモードでの起動をわざと行うことで車両のユーザなどにプログラム書き換えモードの指示が出力され続けるという異常を報知することができる。   In the electronic control device of the present invention, when the count value of the counter reaches a predetermined value and the microcomputer starts in the normal mode, the count value is reset. As a result, the program rewrite mode can be provided to the user of the vehicle by intentionally performing the start in the unintended program rewrite mode while ensuring the opportunity to start in the normal mode at a rate of at least once for the predetermined number of times. An abnormality that the instruction continues to be output can be notified.

以上述べたように、本発明の電子制御装置によれば、プログラム書き換えモードの指示が出力され続けるという異常が発生した場合でも通常モードを起動することができる。   As described above, according to the electronic control device of the present invention, the normal mode can be activated even when an abnormality occurs in which the program rewrite mode instruction continues to be output.

本発明の一実施形態に係る電子制御装置を含む車載システムの構成例を示す図The figure which shows the structural example of the vehicle-mounted system containing the electronic controller which concerns on one Embodiment of this invention. 電子制御装置が実行する起動モード制御処理の手順を示したフローチャートThe flowchart which showed the procedure of the starting mode control process which an electronic controller performs

[概要]
本発明の電子制御装置は、マイコンの起動モードを指示するスイッチの状態を監視する。プログラム書き換えモードの起動を指示するスイッチ状態がある程度連続した場合には、電子制御装置は、スイッチ状態にかかわらず強制的に通常モードで起動する。これにより、スイッチに異常が発生しても、通常モードで起動する機会を確保できる。
[Overview]
The electronic control device of the present invention monitors the state of the switch that instructs the start mode of the microcomputer. When the switch state instructing activation of the program rewrite mode is continued to some extent, the electronic control unit is forcibly activated in the normal mode regardless of the switch state. Thereby, even if an abnormality occurs in the switch, an opportunity to start in the normal mode can be secured.

以下、本発明が提供する電子制御装置について、車載システムへ適用した構成を一例に挙げて詳細に説明する。   Hereinafter, an electronic control device provided by the present invention will be described in detail by taking a configuration applied to an in-vehicle system as an example.

[車載システムの構成例]
図1は、本発明の一実施形態に係る電子制御装置10を含む車載システム1の構成例を示す図である。図1に例示した車載システム1は、電子制御装置10、プログラム書き換えモード移行スイッチ20、プログラム書き換えツール30、イグニッションスイッチ40、およびバッテリ50、を含んで構成される。
[Configuration example of in-vehicle system]
FIG. 1 is a diagram illustrating a configuration example of an in-vehicle system 1 including an electronic control device 10 according to an embodiment of the present invention. The in-vehicle system 1 illustrated in FIG. 1 includes an electronic control device 10, a program rewrite mode transition switch 20, a program rewrite tool 30, an ignition switch 40, and a battery 50.

バッテリ50は、車両のエンジンルームやトランクルームなどに搭載される、例えば12V系の二次電源である。このバッテリ50は、一般的な車両に少なくとも1個は搭載されている。バッテリ50は、電子制御装置10の+B端子に接続され、かつ、イグニッションスイッチ40を介して電子制御装置10のIG端子に接続されている。この+B端子に入力されるバッテリ50の電源電位を「+B電位」という。   The battery 50 is, for example, a 12V secondary power source mounted in an engine room or a trunk room of the vehicle. At least one battery 50 is mounted on a general vehicle. The battery 50 is connected to the + B terminal of the electronic control device 10 and is connected to the IG terminal of the electronic control device 10 via the ignition switch 40. The power supply potential of the battery 50 input to the + B terminal is referred to as “+ B potential”.

イグニッションスイッチ(以下「IGスイッチ」という)40は、車両のドライバー席付近などに配置されるスイッチであり、バッテリ50と電子制御装置10(のIG端子)との間に介在される。このIGスイッチ40は、スイッチOFFの状態であれば、図1の例ではスイッチ出力側のIG端子をLowレベルの電位にすることができる。また、IGスイッチ40は、スイッチONの状態であれば、図1の例ではスイッチ出力側のIG端子をHighレベルの電位、すなわちバッテリ50の電源電位にすることができる。このIG端子に入力されるバッテリ50の電源電位を「IG電位」という。   An ignition switch (hereinafter referred to as “IG switch”) 40 is a switch disposed near the driver's seat of the vehicle, and is interposed between the battery 50 and the electronic control device 10 (IG terminal thereof). If the IG switch 40 is in the switch OFF state, the IG terminal on the switch output side can be set to a low level potential in the example of FIG. Further, in the example of FIG. 1, the IG switch 40 can set the IG terminal on the switch output side to a high level potential, that is, the power supply potential of the battery 50 if the switch is in the ON state. The power supply potential of the battery 50 input to the IG terminal is referred to as “IG potential”.

プログラム書き換えモード移行スイッチ(以下「モード切り替えスイッチ」という)20は、外部から電子制御装置10のWFSE端子に接続される。このモード切り替えスイッチ20は、後述する電子制御装置10のマイコンが起動するモードを、通常モードとするかプログラム書き換えモードとするかを切り替えるスイッチである。モード切り替えスイッチ20は、スイッチOFFの状態であれば、図1の例ではスイッチ出力側のWFSE端子をHighレベルの電位、すなわちIG電位から負荷R1を介して現れる電位にすることができる。また、モード切り替えスイッチ20は、スイッチONの状態であれば、図1の例ではスイッチ出力側のWFSE端子をLowレベル電位、すなわち接地によって現れるGND電位にすることができる。各スイッチ状態でWFSE端子に現れるHigh電位およびLow電位は、負荷R2を介してマイコン(後述する)に入力される。   A program rewrite mode transition switch (hereinafter referred to as “mode changeover switch”) 20 is connected to the WFSE terminal of the electronic control device 10 from the outside. The mode change switch 20 is a switch for changing a mode in which a microcomputer of the electronic control device 10 described later is activated to a normal mode or a program rewrite mode. In the example of FIG. 1, the mode changeover switch 20 can switch the WFSE terminal on the switch output side to a high level potential, that is, a potential appearing via the load R1 from the IG potential in the example of FIG. Further, if the mode changeover switch 20 is in the switch ON state, in the example of FIG. 1, the WFSE terminal on the switch output side can be set to the low level potential, that is, the GND potential that appears by grounding. The High potential and the Low potential that appear at the WFSE terminal in each switch state are input to the microcomputer (described later) via the load R2.

一端がIG電位と接続され、かつ、他端がWFSE端子に接続された負荷R1、および一端がWFSE端子に接続され、かつ、他端がマイコンの制御端子に接続された負荷R2は、モード切り替えスイッチ20からの出力に基づいて、マイコンを通常モードで起動させる電位またはマイコンをプログラム書き換えモードで起動させる電位を、マイコンの制御端子に印加する回路(請求項における「第1回路」)として機能する。   Mode switching is performed for a load R1 having one end connected to the IG potential and the other end connected to the WFSE terminal, and a load R2 having one end connected to the WFSE terminal and the other end connected to the control terminal of the microcomputer. Based on the output from the switch 20, it functions as a circuit (“first circuit” in the claims) that applies to the control terminal of the microcomputer a potential for starting the microcomputer in the normal mode or a potential for starting the microcomputer in the program rewrite mode. .

プログラム書き換えツール30は、外部から電子制御装置10のPR端子に接続される。このプログラム書き換えツール30は、電子制御装置10がプログラム書き換えモードで起動した場合に、後述する電子制御装置10のマイコンと通信を行ってプログラムの書き換え制御を行う。   The program rewriting tool 30 is connected to the PR terminal of the electronic control device 10 from the outside. When the electronic control device 10 is activated in the program rewrite mode, the program rewrite tool 30 performs program rewrite control by communicating with a microcomputer of the electronic control device 10 described later.

電子制御装置10は、プログラムの書き換えが可能な機能部を搭載した装置であり、モード切り替えスイッチ20からの出力であるWFSE端子の電位に基づいて、機能部が起動するモードを切り替える。この電子制御装置10は、電源回路11と、状態モニタ回路12と、プログラム書き換えモードキャンセル回路13と、マイコン14と、を備えている。状態モニタ回路12は、請求項における「第2回路」に相当し、プログラム書き換えモードキャンセル回路13は、請求項における「第3回路」に相当する。   The electronic control device 10 is a device equipped with a functional unit capable of rewriting a program, and switches the mode in which the functional unit is activated based on the potential of the WFSE terminal that is an output from the mode changeover switch 20. The electronic control device 10 includes a power supply circuit 11, a state monitor circuit 12, a program rewrite mode cancel circuit 13, and a microcomputer 14. The state monitor circuit 12 corresponds to a “second circuit” in the claims, and the program rewrite mode cancel circuit 13 corresponds to a “third circuit” in the claims.

電源回路11は、ON状態のIGスイッチ40を介してIG端子に入力されるバッテリ50の電圧信号(例えば12V系信号)を入力し、当該電圧信号から新たな電圧(例えば5V系電圧)を生成して所定の信号線に出力する。この新たな電圧は、例えばマイコン14の電源として用いられる。   The power supply circuit 11 inputs a voltage signal (for example, 12V system signal) of the battery 50 input to the IG terminal via the IG switch 40 in the ON state, and generates a new voltage (for example, 5V system voltage) from the voltage signal. And output to a predetermined signal line. This new voltage is used as a power source for the microcomputer 14, for example.

状態モニタ回路12は、IG端子に接続されており、IG端子に現れる電位の変化、すなわちバッテリ50の電圧信号が入力されたか否かに基づいて、IGスイッチ40がON状態であるかOFF状態であるかを判断する。また、状態モニタ回路12は、WFSE端子に接続されており、WFSE端子に現れる電位の変化、すなわち電位がHigh電位であるかLow電位であるかを検出することで、モード切り替えスイッチ20がON状態であるかOFF状態であるかを判断する。   The state monitor circuit 12 is connected to the IG terminal, and the IG switch 40 is in an ON state or an OFF state based on a change in potential appearing at the IG terminal, that is, whether or not a voltage signal of the battery 50 is input. Determine if there is. Further, the state monitor circuit 12 is connected to the WFSE terminal, and the mode changeover switch 20 is turned on by detecting a change in the potential appearing at the WFSE terminal, that is, whether the potential is a high potential or a low potential. Or whether it is in the OFF state.

また、状態モニタ回路12には、カウンタ12cが設けられている。このカウンタ12cは、IGスイッチ40がOFF状態からON状態に変化(IG_ON動作)した時に、WFSE端子に現れる電位がLow電位であることが検出されると、つまりモード切り替えスイッチ20がON状態となっていることが判断されると、カウント値Cをインクリメントする。カウント値Cは、IGスイッチ40がOFF状態からON状態に変化(IG_ON動作)した時に、WFSE端子に現れる電位がHig電位であることが検出されるか、つまりモード切り替えスイッチ20がOFF状態となっていることが判断されるか、またはカウント値Cが所定の値Thに達すると、初期化(リセット)される。   Further, the state monitor circuit 12 is provided with a counter 12c. When the IG switch 40 is changed from the OFF state to the ON state (IG_ON operation), the counter 12c detects that the potential appearing at the WFSE terminal is the Low potential, that is, the mode switch 20 is turned on. If it is determined that the count value C is determined, the count value C is incremented. When the IG switch 40 changes from the OFF state to the ON state (IG_ON operation), the count value C is detected as the potential appearing at the WFSE terminal being a High potential, that is, the mode changeover switch 20 is in the OFF state. If the count value C reaches a predetermined value Th, it is initialized (reset).

所定の値Thは、モード切り替えスイッチ20がON状態であることを示すLow電位が出力され続けるという異常(以下「モード切り替えスイッチ異常」という)が発生した場合に、電子制御装置10のマイコン14が強制的に通常モードで起動できるようにするために設定される値である。モード切り替えスイッチ異常は、例えば、モード切り替えスイッチ20の電気的接点が固着したり、WFSE端子がGNDと短絡したりして発生する。この所定の値Thは、典型的には2以上の自然数である。以上のことから、カウンタ12cは、IGスイッチ40がオン動作される毎に状態モニタ回路12で検出されるWFSE端子の電位として、Low電位が連続して検出された回数をカウントし、カウントした値が所定の値Thまで達したか否かを判断するために利用される。   The predetermined value Th is determined by the microcomputer 14 of the electronic control device 10 when an abnormality that the Low potential indicating that the mode change switch 20 is in the ON state continues to be output (hereinafter referred to as “mode change switch abnormality”) occurs. It is a value that is set so that it can be forcibly started in the normal mode. The mode change switch abnormality occurs, for example, when the electrical contact of the mode change switch 20 is fixed or the WFSE terminal is short-circuited to GND. This predetermined value Th is typically a natural number of 2 or more. From the above, the counter 12c counts the number of times the Low potential is continuously detected as the potential of the WFSE terminal detected by the state monitor circuit 12 every time the IG switch 40 is turned on, and the counted value Is used to determine whether or not a predetermined value Th has been reached.

さらに、状態モニタ回路12は、プログラム書き換えモードキャンセル回路13と接続されており、WFSE端子においてLow電位が連続して検出された回数が所定の値Thまで達したと判断した場合に、プログラム書き換えモードキャンセル回路13にキャンセル動作を指示する。   Furthermore, the state monitor circuit 12 is connected to the program rewrite mode cancel circuit 13, and when it is determined that the number of times the Low potential has been continuously detected at the WFSE terminal has reached a predetermined value Th, the program rewrite mode A cancel operation is instructed to the cancel circuit 13.

なお、状態モニタ回路12は、+B端子に接続されており、バッテリ50から直接電源の供給を受けることによって常時動作している。このため、状態モニタ回路12は、IGスイッチ40がOFF状態となったとしても、IGスイッチ40の状態、モード切り替えスイッチ20の状態、カウンタ12cのカウント値C、およびキャンセル動作の指示を、保持することができる。   The state monitor circuit 12 is connected to the + B terminal, and is always operating by receiving power directly from the battery 50. For this reason, even if the IG switch 40 is turned off, the state monitor circuit 12 holds the state of the IG switch 40, the state of the mode change switch 20, the count value C of the counter 12c, and the cancel operation instruction. be able to.

プログラム書き換えモードキャンセル回路(以下「モードキャンセル回路」という)13は、モード切り替えスイッチ20とマイコン14との間に介在される。このモードキャンセル回路13は、モード切り替えスイッチ20の状態および状態モニタ回路12から指示されるキャンセル動作の有無に基づいて、マイコン14を通常モードで起動させるか、プログラム書き換えモードで起動させるかを制御(指示)する。   A program rewrite mode cancel circuit (hereinafter referred to as “mode cancel circuit”) 13 is interposed between the mode changeover switch 20 and the microcomputer 14. The mode cancel circuit 13 controls whether to start the microcomputer 14 in the normal mode or the program rewrite mode based on the state of the mode switch 20 and the presence / absence of the cancel operation instructed from the state monitor circuit 12 ( Instructions).

モードキャンセル回路13は、状態モニタ回路12からキャンセル動作の指示がない場合には、モード切り替えスイッチ20の状態に基づいて、起動させるモードを制御(指示)する。具体的には、モードキャンセル回路13は、モード切り替えスイッチ20がOFF状態、すなわちWFSE端子に現れる電位がHigh電位であれば、当該High電位が負荷R2を介して現れる電位(以下「第1電位」という)を、マイコン14の制御端子に印加する。この第1電位の印加によって、通常モードで起動すべきことがマイコン14へ指示される。また、モードキャンセル回路13は、モード切り替えスイッチ20がON状態、すなわちWFSE端子に現れる電位がLow電位であれば、当該Low電位が負荷R2を介して現れる電位(以下「第2電位」という)をマイコン14の制御端子に印加する。この第2電位の印加によって、プログラム書き換えモードで起動すべきことがマイコン14へ指示される。   When there is no cancel operation instruction from the state monitor circuit 12, the mode cancel circuit 13 controls (instructs) the mode to be activated based on the state of the mode changeover switch 20. Specifically, the mode cancel circuit 13 is configured so that the mode change switch 20 is in an OFF state, that is, if the potential appearing at the WFSE terminal is a High potential, the High potential appears via the load R2 (hereinafter “first potential”). Is applied to the control terminal of the microcomputer 14. Application of the first potential instructs the microcomputer 14 to start in the normal mode. Further, the mode cancel circuit 13 sets the potential at which the Low potential appears via the load R2 (hereinafter referred to as “second potential”) when the mode switch 20 is in the ON state, that is, when the potential appearing at the WFSE terminal is the Low potential. Applied to the control terminal of the microcomputer 14. The application of the second potential instructs the microcomputer 14 to start in the program rewrite mode.

これに対し、モードキャンセル回路13は、状態モニタ回路12からキャンセル動作の指示がある場合、モード切り替えスイッチ20の状態にかかわらず、マイコン14を通常モードで強制的に起動させる制御(指示)を行う。この通常モードによる強制的な起動は、例えば図1の例のように、モードキャンセル回路13の内部に有するスイッチSWをON状態にすることで負荷R3を介してマイコン14の制御端子を+B電圧に接続して、当該制御端子の印加電圧を第1電位に上昇させることで容易に実現できる。   On the other hand, the mode cancel circuit 13 performs control (instruction) for forcibly starting the microcomputer 14 in the normal mode regardless of the state of the mode change switch 20 when the cancel operation instruction is issued from the state monitor circuit 12. . Forcibly starting in the normal mode, for example, as shown in FIG. 1, the control terminal of the microcomputer 14 is set to + B voltage via the load R3 by turning on the switch SW included in the mode cancel circuit 13. It can be easily realized by connecting and raising the voltage applied to the control terminal to the first potential.

なお、図1の例では、モードキャンセル回路13によってマイコン14の制御端子に印加される電圧値は、+B電圧を負荷R3と負荷R2とで分圧した電圧値となるため、モード切り替えスイッチ20に異常がない時の通常モードにおいてマイコン14の制御端子に印加される電圧値とは、厳密的には異なることになる。これに関しては、負荷R3の値を負荷R2の値に対して十分大きく設定したり、いずれの電圧値が制御端子に印加されても通常モードを起動できるように、マイコン14が起動モードを判断するためのしきい値を設計したりすることなどで、対応可能である。   In the example of FIG. 1, the voltage value applied to the control terminal of the microcomputer 14 by the mode cancel circuit 13 is a voltage value obtained by dividing the + B voltage by the load R3 and the load R2, so that the mode change switch 20 The voltage value applied to the control terminal of the microcomputer 14 in the normal mode when there is no abnormality is strictly different. In this regard, the microcomputer 14 determines the activation mode so that the value of the load R3 is set sufficiently large with respect to the value of the load R2 or the normal mode can be activated regardless of which voltage value is applied to the control terminal. This can be done by designing a threshold value for this purpose.

マイコン14は、電子制御装置10における様々な制御を実行するマイクロコンピュータである。このマイコン14は、プログラムの書き換えが可能な機能部であり、モードキャンセル回路13からの制御(指示)に従って、制御端子に第1電圧(略IG電位、略+B電位)が印加されれば通常モードで起動し、また制御端子に第2電圧(略GND電位)が印加されればプログラム書き換えモードで起動する。通常モードで起動した場合には、マイコン14は、車両の走行に関する通常の制御を行う。プログラム書き換えモードで起動した場合には、マイコン14は、PR端子に接続されたプログラム書き換えツール30と通信を確立させ、プログラム書き換えツール30から送信されるプログラム情報に従って、プログラムの書き換え制御を行う。   The microcomputer 14 is a microcomputer that executes various controls in the electronic control device 10. The microcomputer 14 is a functional unit capable of rewriting a program, and in accordance with control (instruction) from the mode cancel circuit 13, if a first voltage (approximately IG potential, approximately + B potential) is applied to the control terminal, the normal mode is set. If the second voltage (substantially GND potential) is applied to the control terminal, it starts in the program rewrite mode. When the microcomputer 14 is activated in the normal mode, the microcomputer 14 performs normal control related to the traveling of the vehicle. When the microcomputer 14 is activated in the program rewriting mode, the microcomputer 14 establishes communication with the program rewriting tool 30 connected to the PR terminal, and performs program rewriting control according to the program information transmitted from the program rewriting tool 30.

なお、上述した電子制御装置10は、典型的には中央演算処理装置(CPU:Central Processing Unit)、メモリ、および入出力インタフェースなどを含んで構成され、メモリに格納されたプログラムをCPUが読み出して解釈実行することにより、上述した電源回路11、状態モニタ回路12、モードキャンセル回路13、およびマイコン14としての機能を発揮する。   The electronic control device 10 described above is typically configured to include a central processing unit (CPU), a memory, an input / output interface, and the like, and the CPU reads a program stored in the memory. By executing the interpretation, the functions as the power supply circuit 11, the state monitor circuit 12, the mode cancel circuit 13, and the microcomputer 14 described above are exhibited.

[車載システムで実行される起動モード切り替え処理]
図2をさらに参照して、本発明の一実施形態に係る車載システム1で行われる電子制御装置10の起動モードを適切に切り替える処理を説明する。図2は、電子制御装置10が実行する起動モード制御処理の手順を示したフローチャートである。なお、状態モニタ回路12のカウンタ12cは、車両出荷時に初期化されており、カウント値Cがゼロであるとして説明する。
[Startup mode switching process executed in the in-vehicle system]
With further reference to FIG. 2, processing for appropriately switching the activation mode of the electronic control device 10 performed in the in-vehicle system 1 according to an embodiment of the present invention will be described. FIG. 2 is a flowchart showing the procedure of the start mode control process executed by the electronic control device 10. Note that the counter 12c of the state monitor circuit 12 is initialized when the vehicle is shipped, and the count value C is assumed to be zero.

図2に示す起動モード制御処理は、例えば車両の電源状態がアクセサリー電源オン状態(ACC_ON)になると開始される。起動モード制御処理を開始すると、電子制御装置10は、IGスイッチ40の状態を監視する(S21)。   The start mode control process shown in FIG. 2 is started, for example, when the power state of the vehicle becomes the accessory power on state (ACC_ON). When the start mode control process is started, the electronic control unit 10 monitors the state of the IG switch 40 (S21).

IG端子に現れる電位の変化を検出して、IGスイッチ40がOFF状態からON状態に変化(IG_ON動作)したと判断すると(S21:Yes)、電子制御装置10は、その時のモード切り替えスイッチ20の状態を判断する(S22)。   If the change of the potential appearing at the IG terminal is detected and it is determined that the IG switch 40 has changed from the OFF state to the ON state (IG_ON operation) (S21: Yes), the electronic control unit 10 The state is determined (S22).

WFSE端子に現れるHig電位を検出して、モード切り替えスイッチ20がOFF状態であることを判断すると(S22:No)、電子制御装置10は、通常モードで起動する(S25)。このステップS22の判断において通常モードで起動した場合には、モード切り替えスイッチ異常が生じていないと判定される。通常モードで起動した場合には、電子制御装置10は、状態モニタ回路12のカウンタ12cを初期化してカウント値Cをリセットする(S26)。   When the High potential appearing at the WFSE terminal is detected and it is determined that the mode switch 20 is in the OFF state (S22: No), the electronic control unit 10 is activated in the normal mode (S25). If it is determined in step S22 that the operation has been started in the normal mode, it is determined that no mode change switch abnormality has occurred. When the electronic control unit 10 is activated in the normal mode, the electronic control unit 10 initializes the counter 12c of the state monitor circuit 12 and resets the count value C (S26).

一方、WFSE端子に現れるLow電位を検出して、モード切り替えスイッチ20がON状態であることを判断すると(S22:Yes)、電子制御装置10は、状態モニタ回路12のカウンタ12cをインクリメントしてカウント値Cを1つ増加させる(S23)。そして、電子制御装置10は、カウンタ12cのカウント値Cが所定の値Thに達したか否かを判断する(S24)。   On the other hand, when the Low potential appearing at the WFSE terminal is detected and it is determined that the mode switch 20 is in the ON state (S22: Yes), the electronic control unit 10 increments the counter 12c of the state monitor circuit 12 and counts it. The value C is increased by 1 (S23). Then, the electronic control unit 10 determines whether or not the count value C of the counter 12c has reached a predetermined value Th (S24).

上記ステップS24においてカウンタ12cのカウント値Cが所定の値Thに達していないと判断した場合(S24:No)、電子制御装置10は、プログラム書き換えモードで起動する(S27)。このステップS24の判断においてプログラム書き換えモードで起動した場合には、モード切り替えスイッチ異常が生じているか否かを判定できない状況にある。   When it is determined in step S24 that the count value C of the counter 12c has not reached the predetermined value Th (S24: No), the electronic control unit 10 is activated in the program rewrite mode (S27). When the program rewrite mode is activated in the determination in step S24, it is impossible to determine whether or not a mode change switch abnormality has occurred.

これに対して、上記ステップS24においてカウンタ12cのカウント値Cが所定の値Thに達したと判断した場合(S24:Yes)、電子制御装置10は、モード切り替えスイッチ異常が生じたと判定し、強制的に通常モードで起動する(S25)。そして、通常モードで起動した場合には、電子制御装置10は、状態モニタ回路12のカウンタ12cを初期化してカウント値Cをリセットする(S26)。   On the other hand, when it is determined in step S24 that the count value C of the counter 12c has reached the predetermined value Th (S24: Yes), the electronic control unit 10 determines that a mode change switch abnormality has occurred, Therefore, it starts in the normal mode (S25). When the electronic control unit 10 is activated in the normal mode, the electronic control unit 10 initializes the counter 12c of the state monitor circuit 12 and resets the count value C (S26).

上記ステップS21〜S27の処理は、例えば車両の電源状態が電源オフ状態(ACC_OFF)になるまで、繰り返して実行される(S28)。   The processes in steps S21 to S27 are repeatedly executed until, for example, the power state of the vehicle becomes the power off state (ACC_OFF) (S28).

[実施の形態の作用・効果]
以上のように、本発明の一実施形態に係る電子制御装置10によれば、IGスイッチ40がOFF状態からON状態に変化(IG_ON動作)した時のモード切り替えスイッチ20端に現れる電位を監視する。そして、プログラム書き換えモードで起動させることを指示する第2電位をマイコン14の制御端子に印加させるLow電位が、モード切り替えスイッチ20端に連続して現れた回数を、カウンタ12cでカウントする。カウント値Cが所定の値Thに達すれば、モード切り替えスイッチ20端の電位にかかわらず、通常モードで起動させることを指示する第1電位をマイコン14の制御端子に印加する。
[Operations and effects of the embodiment]
As described above, according to the electronic control device 10 according to an embodiment of the present invention, the potential appearing at the end of the mode switch 20 when the IG switch 40 changes from the OFF state to the ON state (IG_ON operation) is monitored. . Then, the counter 12c counts the number of times that the Low potential for applying the second potential for instructing activation in the program rewrite mode to the control terminal of the microcomputer 14 appears continuously at the end of the mode changeover switch 20. When the count value C reaches a predetermined value Th, a first potential for instructing activation in the normal mode is applied to the control terminal of the microcomputer 14 regardless of the potential at the end of the mode switch 20.

これにより、モード切り替えスイッチ異常が生じて、本来であればプログラム書き換えモードでしか起動できない状況であっても、カウント値Cが所定の値Thに達すれば強制的に通常モードで起動することができる。よって、モード切り替えスイッチ異常が生じた時に、車両を全く動かすことができなくなる状態を回避でき、例えば整備工場などのメンテナンスを受けることが可能な場所までの車両走行が可能となる。   As a result, even if the mode changeover switch malfunctions and can be activated only in the program rewrite mode, the normal mode can be forcibly activated if the count value C reaches the predetermined value Th. . Therefore, it is possible to avoid a state in which the vehicle cannot be moved at all when a mode change switch abnormality occurs, and it is possible to travel to a place where maintenance can be received, such as a maintenance shop.

また、本実施形態に係る電子制御装置10では、カウント値Cが所定の値Thに達することでモード切り替えスイッチ異常が生じたと判定した後に、カウンタ12cを初期化する。このカウンタ12cの初期化により、モード切り替えスイッチ異常が生じて、本来であればプログラム書き換えモードでしか起動できない状況であっても、所定の値Thの回数に1回の割合での通常モードによる起動ができる機会を確保することができる。加えて、意図しないプログラム書き換えモードでの起動をわざと行うことで、車両のユーザなどにモード切り替えスイッチ異常を報知することができる。   Further, in the electronic control apparatus 10 according to the present embodiment, the counter 12c is initialized after determining that the mode change switch abnormality has occurred due to the count value C reaching the predetermined value Th. When the counter 12c is initialized, a mode change switch abnormality occurs, and even if it can be activated only in the program rewrite mode, activation in the normal mode is performed at a rate of once per the predetermined value Th. An opportunity to be able to In addition, by intentionally starting up in an unintended program rewrite mode, it is possible to notify a vehicle user or the like of a mode change switch abnormality.

本発明は、プログラムの書き換えが可能な機能部を搭載した電子制御装置に利用可能であり、特にプログラム書き換えモードの指示が出力され続けるという異常が発生した場合でも通常モードを起動したい場合に有用である。   The present invention can be used for an electronic control device equipped with a functional unit capable of rewriting a program, and is particularly useful when it is desired to start the normal mode even when an abnormality occurs in which an instruction of the program rewriting mode is continuously output. is there.

1 車載システム
10 電子制御装置
11 電源回路
12 状態モニタ回路
12c カウンタ
13 プログラム書き換えモードキャンセル回路
14 マイコン
20 プログラム書き換えモード切り替えスイッチ
30 プログラム書き換えツール
40 イグニッションスイッチ
50 バッテリ
DESCRIPTION OF SYMBOLS 1 In-vehicle system 10 Electronic controller 11 Power supply circuit 12 Status monitor circuit 12c Counter 13 Program rewrite mode cancellation circuit 14 Microcomputer 20 Program rewrite mode changeover switch 30 Program rewrite tool 40 Ignition switch 50 Battery

Claims (1)

モード切り替えスイッチからの出力に基づいて、マイコンが起動するモードを切り替える電子制御装置であって、
前記モード切り替えスイッチからの出力に基づいて、前記マイコンを通常モードで起動させる第1電位または前記マイコンをプログラム書き換えモードで起動させる第2電位を、前記マイコンの制御端子に印加する第1回路と、
イグニッションスイッチがオン動作される毎に前記モード切り替えスイッチからの出力を検出し、前記マイコンの制御端子へ前記第2電位を印加させる出力が連続して検出された回数をカウントし、カウント値が所定の値に達したか否かを判断する第2回路と、
前記第2回路で前記カウント値が前記所定の値に達したと判断されると、前記マイコンの制御端子に印加される電位を前記第1電位に切り替える第3の回路とを備え、
前記第2回路は、前記第3回路で前記第1電位に切り替えられた後、前記カウント値をリセットする、
電子制御装置。
An electronic control device that switches the mode in which the microcomputer starts based on the output from the mode switch,
A first circuit for applying a first potential for starting the microcomputer in a normal mode or a second potential for starting the microcomputer in a program rewrite mode to a control terminal of the microcomputer based on an output from the mode switch;
Each time the ignition switch is turned on, the output from the mode change switch is detected, the number of times that the output for applying the second potential to the control terminal of the microcomputer is continuously detected is counted, and the count value is predetermined. A second circuit for determining whether or not a value of
A third circuit that switches the potential applied to the control terminal of the microcomputer to the first potential when the second circuit determines that the count value has reached the predetermined value;
The second circuit resets the count value after being switched to the first potential in the third circuit.
Electronic control device.
JP2016002637A 2016-01-08 2016-01-08 Electronic control unit Active JP6540518B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016002637A JP6540518B2 (en) 2016-01-08 2016-01-08 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016002637A JP6540518B2 (en) 2016-01-08 2016-01-08 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2017123106A true JP2017123106A (en) 2017-07-13
JP6540518B2 JP6540518B2 (en) 2019-07-10

Family

ID=59306614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016002637A Active JP6540518B2 (en) 2016-01-08 2016-01-08 Electronic control unit

Country Status (1)

Country Link
JP (1) JP6540518B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017159162A (en) * 2017-06-23 2017-09-14 株式会社ディ・ライト Game machine

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0930365A (en) * 1995-07-24 1997-02-04 Mazda Motor Corp Package mounted electronic type air bag device and method for fitting the air bag device to vehicle
JPH09114704A (en) * 1995-10-18 1997-05-02 Nippon Telegr & Teleph Corp <Ntt> Fault judgement circuit
JPH11272498A (en) * 1998-03-25 1999-10-08 Denso Corp Electronic controller
JP2000337210A (en) * 1999-05-26 2000-12-05 Denso Corp Electronic control device
JP2008176393A (en) * 2007-01-16 2008-07-31 Hitachi Ltd Electronic controller
JP2013107602A (en) * 2011-11-24 2013-06-06 Denso Corp Vehicle control device
JP2015217911A (en) * 2014-05-21 2015-12-07 株式会社デンソー Electronic control apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0930365A (en) * 1995-07-24 1997-02-04 Mazda Motor Corp Package mounted electronic type air bag device and method for fitting the air bag device to vehicle
JPH09114704A (en) * 1995-10-18 1997-05-02 Nippon Telegr & Teleph Corp <Ntt> Fault judgement circuit
JPH11272498A (en) * 1998-03-25 1999-10-08 Denso Corp Electronic controller
US6341239B1 (en) * 1998-03-25 2002-01-22 Denso Corporation Electronic control unit and method having program rewriting function
JP2000337210A (en) * 1999-05-26 2000-12-05 Denso Corp Electronic control device
JP2008176393A (en) * 2007-01-16 2008-07-31 Hitachi Ltd Electronic controller
JP2013107602A (en) * 2011-11-24 2013-06-06 Denso Corp Vehicle control device
JP2015217911A (en) * 2014-05-21 2015-12-07 株式会社デンソー Electronic control apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017159162A (en) * 2017-06-23 2017-09-14 株式会社ディ・ライト Game machine

Also Published As

Publication number Publication date
JP6540518B2 (en) 2019-07-10

Similar Documents

Publication Publication Date Title
JP4900692B2 (en) Communication device and occupant protection device
JP2007203929A (en) Dark current measuring device for vehicle, and power control device for vehicle
WO2014115412A1 (en) Vehicular power source controller
JP4665846B2 (en) Microcomputer and electronic control device
US20110144852A1 (en) Installed in vehicle for monitoring target section in the vehicle
WO2016111213A1 (en) In-vehicle relay device and relay method
JP6323296B2 (en) Control device
US10710521B2 (en) Abnormality monitoring device and electric power steering device using same
JP2011111039A (en) Activation/halt method for controller, control system, and controller
JP2016060433A (en) Vehicular power supply device
JP2017123106A (en) Electronic control apparatus
WO2012063456A1 (en) Combination switch
JP2016208581A (en) Surge protection circuit
US9904352B2 (en) Processor control apparatus and processor control method
WO2016013155A1 (en) Device for vehicle and state transition program product
JP7143797B2 (en) Power control device for in-vehicle camera module
JP2017178086A (en) Electronic control device
JP2017114381A (en) Electronic control device
JP6120171B2 (en) Electronic control unit
US10845429B2 (en) Electronic control device
CN112162895B (en) Abnormal state detection method, device, system, equipment and medium
JP6690495B2 (en) Electronic control unit
JP2018106393A (en) State signal output device and erroneous output prevention method
KR101410870B1 (en) Structure for Power Supplying for Cluster System of Construction Heavy Machine
CN115514044A (en) Power supply control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180302

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190417

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190527

R151 Written notification of patent or utility model registration

Ref document number: 6540518

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151