JP2006209876A - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP2006209876A
JP2006209876A JP2005021083A JP2005021083A JP2006209876A JP 2006209876 A JP2006209876 A JP 2006209876A JP 2005021083 A JP2005021083 A JP 2005021083A JP 2005021083 A JP2005021083 A JP 2005021083A JP 2006209876 A JP2006209876 A JP 2006209876A
Authority
JP
Japan
Prior art keywords
terminal
operation mode
data
mode selection
mode
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
JP2005021083A
Other languages
Japanese (ja)
Inventor
Naoki Ito
直紀 伊藤
Toshihiko Matsuoka
俊彦 松岡
Hideaki Ishihara
秀昭 石原
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 JP2005021083A priority Critical patent/JP2006209876A/en
Publication of JP2006209876A publication Critical patent/JP2006209876A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Read Only Memory (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize an electronic control device in no danger of being changed over to another mode even when noise is superposed on an operation mode selecting terminal in a data rewrite mode. <P>SOLUTION: A mode determination circuit 22 determines the operation mode to the rewrite mode when each level of the operation mode selecting terminal T1 and a test mode transition enable terminal MD0, where a latch circuit L1 is latched when a reset signal becomes inactive, is L and H respectively. Therefore, there is no danger of being changed over to another mode even when noise is superposed on the operation mode selecting terminal T1 when and after the mode is changed to the data rewrite mode. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、データ書込み装置を接続することにより、データの書換えを可能な電子制御装置に関する。   The present invention relates to an electronic control device capable of rewriting data by connecting a data writing device.

従来、この種の電子制御装置として図5に示すものが知られている。図5は、電子制御装置としてのマイクロコンピュータ(以下、マイコンという)と、データ書込み装置(以下、ライタという)とを接続した場合の概念図である。
マイコン2は、3つの動作モード選択端子T1〜T3を備えており、各動作モード選択端子T1〜T3は、それぞれライタ5と接続されている。マイコン2は、各動作モード選択端子T1〜T3から出力される信号のアクティブまたはインアクティブの組合せに基づいて動作モードを決定するモードデコード回路23を備える。例えば、動作モードとしては、ユーザモード(通常モードともいう)、工場出荷時のテスト用のテストモード、マイコンに内蔵されたフラッシュROMに格納されているデータを書換えるためのデータ書換えモードなどが設定されている。そして、モードデコード回路23が、データ書換えモードであると決定すると、シリアル通信回路24が、ライタ5からシリアル通信端子SIN・SOUT・SCLKを介してシリアルデータを受信し、その受信したデータは、フラッシュ書換制御回路25の制御に従ってフラッシュROM26に書込まれる。
Conventionally, an electronic control device of this type shown in FIG. 5 is known. FIG. 5 is a conceptual diagram when a microcomputer (hereinafter referred to as a microcomputer) as an electronic control device and a data writing device (hereinafter referred to as a writer) are connected.
The microcomputer 2 includes three operation mode selection terminals T1 to T3, and each operation mode selection terminal T1 to T3 is connected to the writer 5 respectively. The microcomputer 2 includes a mode decode circuit 23 that determines an operation mode based on an active or inactive combination of signals output from the operation mode selection terminals T1 to T3. For example, as the operation mode, user mode (also called normal mode), test mode for testing at the time of factory shipment, data rewrite mode for rewriting data stored in the flash ROM built in the microcomputer, etc. are set. Has been. When the mode decode circuit 23 determines that the data rewrite mode is selected, the serial communication circuit 24 receives serial data from the writer 5 via the serial communication terminals SIN, SOUT, and SCLK, and the received data is stored in the flash memory. The data is written into the flash ROM 26 under the control of the rewrite control circuit 25.

特開2001−325243号公報JP 2001-325243 A

しかし、上記従来のマイコン2は、動作モード選択端子T1〜T3にノイズが重畳すると、他のモードに切り替わってしまうおそれがある。   However, the conventional microcomputer 2 may be switched to another mode when noise is superimposed on the operation mode selection terminals T1 to T3.

そこでこの発明は、動作モード選択端子にノイズが重畳した場合であっても他のモードに切替わるおそれのない電子制御装置を実現することを目的とする。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to realize an electronic control device that is not likely to switch to another mode even when noise is superimposed on an operation mode selection terminal.

この発明は、上記目的を達成するため、請求項1に記載の発明では、データ書込み装置(5)を接続可能な電子制御装置(1)において、前記データ書込み装置からリセット信号を入力するリセット端子(RESN)と、データ書換えモードを含む複数の動作モードの中から所定のモードを決定させるための動作モード選択信号を前記データ書込み装置から入力する動作モード選択端子(T1〜T3)と、モードの切替えを許可するための許可信号を前記データ書込み装置から入力するイネーブル端子(MD0)と、前記データ書込み装置との間でデータの通信を行うデータ通信端子(ESIN、ESOUT、ESCK)と、このデータ通信端子から入力されるデータを格納する第1の記憶媒体(26)と、前記リセット端子、動作モード選択端子およびイネーブル端子にそれぞれ表れる信号のレベルを監視し、前記リセット端子から入力されたリセット信号がリセット解除を示すレベルになったときに前記イネーブル端子に表れるイネーブル信号のレベルおよび前記動作モード選択端子に表れる動作モード選択信号のレベルをラッチするとともに、そのラッチした各信号のレベルに基づいて動作モードを決定する動作モード決定手段(22)と、この動作モード決定手段が、前記動作モードを前記データ書換えモードに決定したときに前記データ書込み装置から出力されるデータを前記データ通信端子を介して前記第1の記憶媒体に格納するという技術的手段を用いる。
なお、後述する実施形態におけるECU1が請求項1の電子制御装置に、ライタ5がデータ書込み装置にそれぞれ対応する。テストモード遷移イネーブル信号が許可信号に、テストモード遷移イネーブル端子MD0がイネーブル端子にそれぞれ対応する。シリアルデータ入力端子ESINがデータ通信端子に、フラッシュROM26が第1の記憶媒体に、モード決定回路22がモード決定手段にそれぞれ対応する。
In order to achieve the above object, according to the present invention, in the electronic control device (1) to which the data writing device (5) can be connected, a reset terminal for inputting a reset signal from the data writing device. (RESN), an operation mode selection terminal (T1 to T3) for inputting an operation mode selection signal for determining a predetermined mode from a plurality of operation modes including a data rewrite mode, from the data writing device, An enable terminal (MD0) for inputting a permission signal for permitting switching from the data writing device, a data communication terminal (ESIN, ESOUT, ESCK) for performing data communication with the data writing device, and this data A first storage medium (26) for storing data input from a communication terminal, the reset terminal, and an operation mode selection The level of the signal appearing at each of the terminal and the enable terminal is monitored, and the level of the enable signal appearing at the enable terminal and the operation mode selection terminal when the reset signal input from the reset terminal reaches a level indicating reset release. The operation mode selection means (22) that latches the level of the operation mode selection signal that appears, and determines the operation mode based on the level of each latched signal, and the operation mode determination means, which rewrites the operation mode to the data A technical means for storing data output from the data writing device when the mode is determined, in the first storage medium via the data communication terminal is used.
In the embodiment described later, the ECU 1 corresponds to the electronic control device of claim 1 and the writer 5 corresponds to the data writing device. The test mode transition enable signal corresponds to the permission signal, and the test mode transition enable terminal MD0 corresponds to the enable terminal. The serial data input terminal ESIN corresponds to the data communication terminal, the flash ROM 26 corresponds to the first storage medium, and the mode determination circuit 22 corresponds to the mode determination means.

また、請求項2に記載の発明では、請求項1に記載の電子制御装置(1)において、前記動作モード選択端子(T1〜T3)は、前記動作モード決定手段(22)による前記動作モードの決定が終了した以降は、前記動作モード選択端子以外の端子として使用可能であるという技術的手段を用いる。   According to a second aspect of the present invention, in the electronic control unit (1) according to the first aspect, the operation mode selection terminals (T1 to T3) are connected to the operation mode determined by the operation mode determining means (22). After the determination is completed, a technical means that the terminal can be used as a terminal other than the operation mode selection terminal is used.

また、請求項3に記載の発明では、請求項1または請求項2に記載の電子制御装置(1)において、データを格納する第2の記憶媒体(3)を備えており、前記動作モード選択端子(T1〜T3)に接続された入力ライン(2a)に、前記第2の記憶媒体に設けられたチップセレクト端子(CS)に接続された入力ライン(3a)が接続されており、前記チップセレクト端子は、前記データ書換えモードになっているときの前記動作モード選択端子の極性とは逆極性となるように設定されているという技術的手段を用いる。
なお、「極性」とは、端子に表れる電圧がアクティブおよびインアクティブのどちらであるかを示すものであり、「逆極性」とは、一方の端子がアクティブのときは他方の端子はインアクティブになる性質のことである。
According to a third aspect of the present invention, the electronic control device (1) according to the first or second aspect further comprises a second storage medium (3) for storing data, wherein the operation mode selection is performed. An input line (3a) connected to a chip select terminal (CS) provided in the second storage medium is connected to an input line (2a) connected to the terminals (T1 to T3), and the chip The technical means that the select terminal is set to have a polarity opposite to the polarity of the operation mode selection terminal when in the data rewrite mode is used.
“Polarity” indicates whether the voltage appearing at the terminal is active or inactive, and “reverse polarity” indicates that when one terminal is active, the other terminal is inactive. It is a property.

請求項4に記載の発明では、請求項3に記載の電子制御装置(1)において、前記データ通信端子(ESIN、ESOUT、ESCK)に接続されたデータ通信ライン(2b、2c)に、前記第2の記憶媒体(3)のデータ通信端子(DO、DI、SCK)に接続されたデータ通信ライン(3b、3c)が接続されているという技術的手段を用いる。
なお、上記括弧内の符号は、後述する発明の実施形態における符号と対応するものである。
According to a fourth aspect of the present invention, in the electronic control unit (1) according to the third aspect, the data communication lines (2b, 2c) connected to the data communication terminals (ESIN, ESOUT, ESCK) The technical means that the data communication lines (3b, 3c) connected to the data communication terminals (DO, DI, SCK) of the second storage medium (3) are connected is used.
In addition, the code | symbol in the said parenthesis respond | corresponds with the code | symbol in embodiment of the invention mentioned later.

請求項1ないし請求項4に係る発明によれば、リセット端子、動作モード選択端子およびイネーブル端子にそれぞれ表れる信号のレベルを監視し、リセット信号がリセット解除を示すレベルになったときにイネーブル端子に表れるイネーブル信号のレベルおよび動作モード選択端子に表れる動作モード選択信号のレベルをラッチするとともに、そのラッチした各信号のレベルに基づいて動作モードを決定することができるため、動作モード決定以降に動作モード選択端子にノイズが重畳した場合であっても他のモードに切替わるおそれがない。   According to the first to fourth aspects of the invention, the levels of the signals appearing at the reset terminal, the operation mode selection terminal, and the enable terminal are monitored, and when the reset signal reaches a level indicating reset release, The level of the enable signal that appears and the level of the operation mode selection signal that appears at the operation mode selection terminal can be latched, and the operation mode can be determined based on the level of each latched signal. Even when noise is superimposed on the selection terminal, there is no possibility of switching to another mode.

請求項2に係る発明によれば、動作モード選択端子は、動作モード決定手段による動作モードの決定が終了した以降は、動作モード選択端子以外の端子として使用可能であるため、端子の実質的な数を増加させることができる。   According to the second aspect of the invention, the operation mode selection terminal can be used as a terminal other than the operation mode selection terminal after the operation mode determination by the operation mode determination means is completed. The number can be increased.

請求項3に係る発明によれば、動作モード選択端子接続された入力ラインに、第2の記憶媒体に設けられたチップセレクト端子に接続された入力ラインが接続されているため、つまり入力ラインが共有されているため、共有されていない場合よりも、データ書込み装置と接続するラインの数を減らすことができるので、電子制御装置を小型化することができる。なお、チップセレクト端子は、データ書換えモードになっているときの動作モード選択端子の極性とは逆極性であるため、第1の記憶媒体にデータを書込んでいるときに第2の記憶媒体がアクティブになってしまうおそれはない。   According to the invention of claim 3, since the input line connected to the chip select terminal provided in the second storage medium is connected to the input line connected to the operation mode selection terminal, that is, the input line is Since it is shared, the number of lines connected to the data writing device can be reduced as compared with the case where it is not shared, so that the electronic control device can be reduced in size. Since the chip select terminal has a polarity opposite to the polarity of the operation mode selection terminal when in the data rewrite mode, the second storage medium is in the middle of writing data to the first storage medium. There is no risk of becoming active.

請求項4に係る発明によれば、データ通信端子に接続されたデータ通信ラインに、第2の記憶媒体のデータ通信端子に接続されたデータ通信ラインが接続されているため、つまりデータ通信ラインが共有されているため、共有されていない場合よりも、データ書込み装置と接続するラインの数を減らすことができるので、電子制御装置を小型化することができる。なお、チップセレクト端子は、データ書換えモードになっているときの動作モード選択端子の極性とは逆極性であるため、第1の記憶媒体にデータを書込んでいるときに第2の記憶媒体がアクティブになってしまうおそれはない。   According to the invention of claim 4, since the data communication line connected to the data communication terminal of the second storage medium is connected to the data communication line connected to the data communication terminal, that is, the data communication line is Since it is shared, the number of lines connected to the data writing device can be reduced as compared with the case where it is not shared, so that the electronic control device can be reduced in size. Since the chip select terminal has a polarity opposite to the polarity of the operation mode selection terminal when in the data rewrite mode, the second storage medium is in the middle of writing data to the first storage medium. There is no risk of becoming active.

この発明を実施するための最良の形態について図を参照して説明する。図1は、この実施形態に係る電子制御装置とライタとが接続された状態の概略を示す説明図であり、図2は図1に示す電子制御装置に備えられたマイコンの主要構成を示す説明図である。図3は、図2に示すマイコンに備えられたモード決定回路の回路図であり、図4は、図3に示すモード決定回路における各端子の信号レベルとモードとの対応関係を示すモード図表である。この実施形態では、この発明に係る電子制御装置として車両に搭載されるECU (Electronic Control Unit)を例に挙げて説明する。   The best mode for carrying out the present invention will be described with reference to the drawings. FIG. 1 is an explanatory diagram showing an outline of a state where an electronic control device and a writer according to this embodiment are connected, and FIG. 2 is an explanatory diagram showing a main configuration of a microcomputer provided in the electronic control device shown in FIG. FIG. FIG. 3 is a circuit diagram of a mode determination circuit provided in the microcomputer shown in FIG. 2, and FIG. 4 is a mode chart showing the correspondence between the signal level of each terminal and the mode in the mode determination circuit shown in FIG. is there. In this embodiment, an electronic control unit (ECU) mounted on a vehicle will be described as an example of the electronic control device according to the present invention.

[主要構成]
最初に、ECUおよびライタの主要構成を説明する。
図1に示すように、ECU1は、車両のエンジン制御および走行制御などを実効するマイコン2と、車両固有のデータなどを書換え可能に格納するEEPROM3と、フラッシュROM26にデータを書込むライタ5を接続するための端子基板1aとを備える。端子基板1aには、マイコン2に供給される5V電源をライタ5が監視するための5V監視用端子と、ライタ5から出力されるリセット信号を入力するためのリセット端子RESNと、ライタ5から出力されるテストモード遷移イネーブル信号(モードの遷移を許可する信号)を入力するためのテストモード遷移イネーブル端子MDと、ライタ5から出力されるシリアルデータを入力するためのシリアルデータ入力端子SINと、マイコン2からシリアルデータを出力するためのシリアルデータ出力端子SOUTと、シリアルデータの出力を制御するクロック信号をライタ5から入力するためのクロック端子SCLKと、動作モードを選択するための動作モード選択信号を入力するための動作モード選択端子SELNと、グランド線を接続するグランド端子GNDとが備えられている。
端子基板1aに備えられた5V監視用端子、リセット端子RESN、テストモード遷移イネーブル端子MD、シリアルデータ入力端子SIN、シリアルデータ出力端子SOUT、クロック端子SCLK、動作モード選択端子SELNおよびGND端子は、それぞれマイコン2の5V監視用端子VDD5VO、リセット端子RESN、テストモード遷移イネーブル端子MD0、シリアルデータ入力端子ESIN、シリアルデータ出力端子ESOUT、クロック端子ESCK、動作モード選択端子ESBSYおよびグランド端子GNDIと接続されている。
[Main configuration]
First, main components of the ECU and the writer will be described.
As shown in FIG. 1, the ECU 1 connects a microcomputer 2 that performs vehicle engine control and travel control, an EEPROM 3 that stores rewritable data unique to the vehicle, and a writer 5 that writes data to the flash ROM 26. A terminal board 1a. The terminal board 1a has a 5V monitoring terminal for monitoring the 5V power supplied to the microcomputer 2 by the writer 5, a reset terminal RESN for inputting a reset signal output from the writer 5, and an output from the writer 5. A test mode transition enable terminal MD for inputting a test mode transition enable signal (a signal for permitting mode transition), a serial data input terminal SIN for inputting serial data output from the writer 5, and a microcomputer 2 includes a serial data output terminal SOUT for outputting serial data, a clock terminal SCLK for inputting a clock signal for controlling the output of serial data from the writer 5, and an operation mode selection signal for selecting an operation mode. Connect the operation mode selection terminal SELN for input and the ground line. Ground and the terminal GND are provided.
The 5V monitoring terminal, reset terminal RESN, test mode transition enable terminal MD, serial data input terminal SIN, serial data output terminal SOUT, clock terminal SCLK, operation mode selection terminal SELN and GND terminal provided on the terminal board 1a are respectively The microcomputer 2 is connected to a 5V monitoring terminal VDD5VO, a reset terminal RESN, a test mode transition enable terminal MD0, a serial data input terminal ESIN, a serial data output terminal ESOUT, a clock terminal ESCK, an operation mode selection terminal ESBSY, and a ground terminal GNDI. .

また、端子基板1aの動作モード選択端子SELNとマイコン2の動作モード選択端子ESBSYとを接続する入力ライン2aは、入力ライン3aによりEEPROM3のチップセレクト端子CSと接続されている。つまり、入力ライン2a,3aは共有になっている。
端子基板1aのシリアルデータ入力端子SINとマイコン2のシリアルデータ入力端子ESINとを接続するデータ通信ライン2bは、データ通信ライン3bによりEEPROM3のデータ出力端子DOと接続されており、端子基板1aのシリアルデータ出力端子SOUTとマイコン2のシリアルデータ出力端子ESOUTとを接続するデータ通信ライン2cは、データ通信ライン3cによりEEPROM3のデータ入力端子DIと接続されている。つまり、データ通信ライン2b,3bおよびデータ通信ライン2c,3cはそれぞれ共有になっている。
また、端子基板1aのクロック端子SCLKとマイコン2のクロック端子ESCKとを接続するライン2dは、ライン3dによりEEPROM3のクロック端子SCKと接続されている。つまり、ライン2d,3dは共有になっている。
端子基板1aのテストモード遷移イネーブル端子MDとマイコン2のテストモード遷移イネーブル端子MD0とを接続するライン2eには、プルダウン抵抗R5が接続されている。また、ライン3a,3d,3cには、それぞれプルダウン抵抗R1,R2,R3が接続されている。
The input line 2a that connects the operation mode selection terminal SELN of the terminal board 1a and the operation mode selection terminal ESBSY of the microcomputer 2 is connected to the chip select terminal CS of the EEPROM 3 by the input line 3a. That is, the input lines 2a and 3a are shared.
The data communication line 2b connecting the serial data input terminal SIN of the terminal board 1a and the serial data input terminal ESIN of the microcomputer 2 is connected to the data output terminal DO of the EEPROM 3 by the data communication line 3b. The data communication line 2c that connects the data output terminal SOUT and the serial data output terminal ESOUT of the microcomputer 2 is connected to the data input terminal DI of the EEPROM 3 by the data communication line 3c. That is, the data communication lines 2b and 3b and the data communication lines 2c and 3c are shared.
A line 2d connecting the clock terminal SCLK of the terminal board 1a and the clock terminal ESCK of the microcomputer 2 is connected to the clock terminal SCK of the EEPROM 3 by the line 3d. That is, the lines 2d and 3d are shared.
A pull-down resistor R5 is connected to a line 2e that connects the test mode transition enable terminal MD of the terminal board 1a and the test mode transition enable terminal MD0 of the microcomputer 2. In addition, pull-down resistors R1, R2, and R3 are connected to the lines 3a, 3d, and 3c, respectively.

図2に示すように、マイコン2は、5V電源が供給されていないときに自身をシステムリセット状態にするためのパワーオンリセット発生回路21と、動作モードを決定するためのモード決定回路22と、ライタ5との間でシリアルデータの通信を行うためのシリアル通信回路24と、シリアル通信回路24により受信されたデータをフラッシュROM26に書込むための制御を行うフラッシュ書換制御回路25とを備える。
図4に示すように、マイコン2の動作モードは、テストモード遷移イネーブル端子MD0および動作モード選択端子T1〜T3の端子状態により、ユーザモード(通常モードともいう)、書換えモード、テストモード1〜4の計6種類のモードから選択される。動作モード選択端子T1およびテストモード遷移イネーブル端子MD0は、AND回路A1に入力され、AND回路A1の出力は、ラッチ回路L1のD端子に入力される。動作モード選択端子T2およびテストモード遷移イネーブル端子MD0は、AND回路A2に入力され、AND回路A2の出力は、ラッチ回路L2のD端子に入力される。動作モード選択端子T3およびテストモード遷移イネーブル端子MD0は、AND回路A3に入力され、AND回路A3の出力は、ラッチ回路L3のD端子に入力される。リセット端子RESNおよびパワーオンリセット解除信号は、AND回路A13に入力され、AND回路A13の出力は、ラッチ回路L1〜L3のG端子に入力されており、リセット信号が非アクティブ(リセット解除)且つパワーオンリセット解除信号がアクティブ(パワーオンリセット解除)になったタイミングでラッチ回路L1〜L3は、D端子に入力されている信号をラッチする。
ラッチ回路L1のQ端子は、インバータI1に接続されており、インバータI1の出力は、AND回路A8に入力される。AND回路A8には、テストモード遷移イネーブル端子MD0の出力が入力される。
As shown in FIG. 2, the microcomputer 2 includes a power-on reset generation circuit 21 for setting itself to a system reset state when 5V power is not supplied, a mode determination circuit 22 for determining an operation mode, A serial communication circuit 24 for communicating serial data with the writer 5 and a flash rewrite control circuit 25 for performing control for writing data received by the serial communication circuit 24 into the flash ROM 26 are provided.
As shown in FIG. 4, the operation mode of the microcomputer 2 depends on the terminal states of the test mode transition enable terminal MD0 and the operation mode selection terminals T1 to T3, the user mode (also referred to as normal mode), the rewrite mode, and the test modes 1 to 4. A total of six modes are selected. The operation mode selection terminal T1 and the test mode transition enable terminal MD0 are input to the AND circuit A1, and the output of the AND circuit A1 is input to the D terminal of the latch circuit L1. The operation mode selection terminal T2 and the test mode transition enable terminal MD0 are input to the AND circuit A2, and the output of the AND circuit A2 is input to the D terminal of the latch circuit L2. The operation mode selection terminal T3 and the test mode transition enable terminal MD0 are input to the AND circuit A3, and the output of the AND circuit A3 is input to the D terminal of the latch circuit L3. The reset terminal RESN and the power-on reset release signal are input to the AND circuit A13, and the output of the AND circuit A13 is input to the G terminals of the latch circuits L1 to L3, so that the reset signal is inactive (reset release) and power The latch circuits L1 to L3 latch the signal input to the D terminal at the timing when the on-reset release signal becomes active (power-on reset release).
The Q terminal of the latch circuit L1 is connected to the inverter I1, and the output of the inverter I1 is input to the AND circuit A8. The output of the test mode transition enable terminal MD0 is input to the AND circuit A8.

[主要動作]
次に、ライタ5をECU1に接続し、ライタ5からデータをフラッシュROM26に書込む場合のマイコン2の主要動作を説明する。
なお、図4に示すように、テストモード遷移イネーブル端子MD0に表れるテストモード遷移イネーブル信号は、ユーザモードになっているときはLレベルに変化しており、ユーザモード以外の書換えモードまたはテストモードのときはHレベルに変化する。また、書換えモードのときは、動作モード選択端子T1はLレベルに変化しており、動作モード選択端子T2,T3によらず動作モードが選択される。なお、図4において*は、ドントケアであることを示す。
ライタ5に備えられた各端子をECU1の端子基板1aに接続し、ECU1電源をオンすると、5V電源がマイコン2へ供給され、パワーオンリセット発生回路21がリセット信号を出力し、マイコン2がパワーオンリセット解除状態になる。また、ライタ5から出力されたリセット信号(L)がリセット端子RESNを介してモード決定回路22に入力され、リセット状態となる。
[Main operations]
Next, the main operation of the microcomputer 2 when the writer 5 is connected to the ECU 1 and data is written from the writer 5 to the flash ROM 26 will be described.
As shown in FIG. 4, the test mode transition enable signal appearing at the test mode transition enable terminal MD0 changes to the L level when the user mode is set, and the rewrite mode or the test mode other than the user mode is changed. Sometimes it changes to H level. In the rewrite mode, the operation mode selection terminal T1 changes to the L level, and the operation mode is selected regardless of the operation mode selection terminals T2 and T3. In FIG. 4, * indicates don't care.
When each terminal provided in the writer 5 is connected to the terminal board 1a of the ECU 1 and the ECU 1 power is turned on, 5V power is supplied to the microcomputer 2, the power-on reset generation circuit 21 outputs a reset signal, and the microcomputer 2 is powered. The on-reset is released. Further, the reset signal (L) output from the writer 5 is input to the mode determination circuit 22 via the reset terminal RESN, and the reset state is entered.

ここで、リセット信号が非アクティブ(リセット解除)になると、ラッチ回路L1のD端子に入力されている信号がラッチされる。このとき、動作モード選択端子T1に入力されたLレベルの動作モード選択信号およびテストモード遷移イネーブル端子MD0に入力されたHレベルのイネーブル信号が、それぞれモード決定回路22のAND回路A1に入力されており、AND回路A1の出力はLレベルとなっているため、そのLレベルがラッチ回路L1によってラッチされる。そして、ラッチ回路L1のLレベルの出力は、インバータI1によって反転されてHレベルとなり、AND回路A8に入力される。このAND回路A8には、Hレベルのテストモード遷移イネーブル信号が入力されているから、AND回路A8の出力はHレベル(=1)となり、動作モードを書換えモードに決定する(図4)。そして、ライタ5が、フラッシュROM26に格納されているデータの書換えを命令するフラッシュ書換えコマンドと、シリアルデータとをシリアルデータ入力端子SINを介してマイコン2へ送信すると、マイコン2のシリアル通信回路24がシリアルデータを受信し、その受信したデータをフラッシュ書換制御回路25がフラッシュROM26に書込む。
また、図3に示すように、テストモード遷移イネーブル端子MD0は、インバータI2に接続されており、インバータI2の出力レベルのみによって、ユーザモードであるか否かが決定される。つまり、テストモード遷移イネーブル信号がLレベル(インアクティブ)のとき(書換えモードおよびテストモード以外のとき)は、総てユーザモードとなる(図4)。
Here, when the reset signal becomes inactive (reset release), the signal input to the D terminal of the latch circuit L1 is latched. At this time, the L-level operation mode selection signal input to the operation mode selection terminal T1 and the H-level enable signal input to the test mode transition enable terminal MD0 are input to the AND circuit A1 of the mode determination circuit 22, respectively. Since the output of the AND circuit A1 is at L level, the L level is latched by the latch circuit L1. The L level output of the latch circuit L1 is inverted by the inverter I1 to become the H level and is input to the AND circuit A8. Since the AND circuit A8 receives the H level test mode transition enable signal, the output of the AND circuit A8 becomes H level (= 1), and the operation mode is determined to be the rewrite mode (FIG. 4). Then, when the writer 5 transmits a flash rewrite command for instructing rewriting of data stored in the flash ROM 26 and serial data to the microcomputer 2 via the serial data input terminal SIN, the serial communication circuit 24 of the microcomputer 2 Serial data is received, and the flash rewrite control circuit 25 writes the received data into the flash ROM 26.
As shown in FIG. 3, the test mode transition enable terminal MD0 is connected to the inverter I2, and whether or not the user mode is selected is determined only by the output level of the inverter I2. That is, when the test mode transition enable signal is at the L level (inactive) (in a mode other than the rewrite mode and the test mode), all are in the user mode (FIG. 4).

[実施形態の効果]
(1)以上のように、上記ECU1を使用すれば、モード決定回路22は、リセット信号がアクティブになったときにラッチ回路L1がラッチした動作モード選択端子T1およびテストモード遷移イネーブル端子MD0の各レベルがそれぞれL,Hである場合に、動作モードを書換えモードに決定する。このため、データ書換えモードに変化した以降に動作モード選択端子T1にノイズが重畳した場合であっても他のモードに切替わるおそれがない。
(2)また、動作モードが決定した以降は、動作モード選択端子T1〜T3の状態の影響を受けることがないため、リセット解除以降は、動作モード選択端子T1〜T3に対して動作モード選択以外の他の機能を割り付けることができる。
[Effect of the embodiment]
(1) As described above, when the ECU 1 is used, the mode determination circuit 22 is configured so that each of the operation mode selection terminal T1 and the test mode transition enable terminal MD0 latched by the latch circuit L1 when the reset signal becomes active. When the levels are L and H, respectively, the operation mode is determined as the rewrite mode. For this reason, even if noise is superimposed on the operation mode selection terminal T1 after changing to the data rewriting mode, there is no possibility of switching to another mode.
(2) Further, after the operation mode is determined, the operation mode selection terminals T1 to T3 are not affected by the state of the operation mode. Other functions can be assigned.

(3)さらに、書換えモードの決定は、テストモード遷移イネーブル端子MD0から出力されるテストモード遷移イネーブル信号がアクティブであるときのみ有効であり、インアクティブの場合には、動作モードをユーザモードに固定することができる。このため、不用意な動作モード切替が発生した場合であっても、テストモード遷移イネーブル端子がプルダウンされていれば、ユーザモードに復帰するため、フェイルセーフが向上する。
(4)入力ライン2a,3a、データ通信ライン2b,3b、データ通信ライン2c,3cおよびデータ通信ライン2d,3dはそれぞれ共有になっているため、共有になっていない構成よりもライン数を減らすことができるので、ECU1を小型化することができる。
(5)チップセレクト端子CSは、データ書換えモードになっているときの動作モード選択端子T1の極性とは逆極性であるため、フラッシュROM26にデータを書込んでいるときはEEPROM3がハイインピーダンスになるので、誤ってEEPROM3にデータが書込まれるおそれはない。
(3) Furthermore, the rewrite mode is determined only when the test mode transition enable signal output from the test mode transition enable terminal MD0 is active. When the test mode transition enable signal is inactive, the operation mode is fixed to the user mode. can do. For this reason, even if an inadvertent operation mode switching occurs, if the test mode transition enable terminal is pulled down, the user mode is restored, so that the fail-safe is improved.
(4) Since the input lines 2a and 3a, the data communication lines 2b and 3b, the data communication lines 2c and 3c, and the data communication lines 2d and 3d are shared, the number of lines is reduced as compared with the configuration that is not shared. Therefore, the ECU 1 can be downsized.
(5) Since the chip select terminal CS has a polarity opposite to that of the operation mode selection terminal T1 when in the data rewrite mode, the EEPROM 3 becomes high impedance when data is written to the flash ROM 26. Therefore, there is no possibility that data is written in the EEPROM 3 by mistake.

[他の実施形態]
(1)上記実施形態では、リセット信号が非アクティブになったときに、動作モード選択端子T1がLであり、テストモード遷移イネーブル端子MD0がHであることを条件に書換えモードと決定したが、リセット信号が非アクティブになったときに、動作モード選択端子T1〜T3の2つまたは3つの出力レベルの組合せが所定の組合わせであり、テストモード遷移イネーブル端子MD0の出力レベルがHであることを条件に書換えモードと決定することもできる。なお、動作モードを決定するための端子の出力レベルは上記の組合せに限定されるものではなく、変更することができる。
(2)上記実施形態では、この発明に係る電子制御装置としてECUを例に挙げて説明したが、マイコンを搭載したECU以外の電子制御装置、あるいは、直接ライタを接続してデータの書込みを行う種類のマイコンにもこの発明を適用することができる。
[Other Embodiments]
(1) In the above embodiment, when the reset signal becomes inactive, the rewrite mode is determined on condition that the operation mode selection terminal T1 is L and the test mode transition enable terminal MD0 is H. When the reset signal becomes inactive, the combination of two or three output levels of the operation mode selection terminals T1 to T3 is a predetermined combination, and the output level of the test mode transition enable terminal MD0 is H It is also possible to determine the rewrite mode on the condition. The output level of the terminal for determining the operation mode is not limited to the above combination, and can be changed.
(2) In the above embodiment, the ECU is described as an example of the electronic control device according to the present invention. However, data is written by connecting an electronic control device other than the ECU equipped with the microcomputer or a direct writer. The present invention can be applied to various types of microcomputers.

この発明の実施形態に係る電子制御装置とライタとが接続された状態の概略を示す説明図である。It is explanatory drawing which shows the outline of the state with which the electronic control apparatus and writer which concern on embodiment of this invention were connected. 図1に示す電子制御装置に備えられたマイコンの主要構成を示す説明図である。It is explanatory drawing which shows the main structures of the microcomputer provided in the electronic control apparatus shown in FIG. 図2に示すマイコンに備えられたモード決定回路の回路図である。FIG. 3 is a circuit diagram of a mode determination circuit provided in the microcomputer shown in FIG. 2. 図3に示すモード決定回路における各端子の信号レベルとモードとの対応関係を示すモード図表である。4 is a mode chart showing a correspondence relationship between signal levels of respective terminals and modes in the mode determination circuit shown in FIG. 3. 従来のマイコンとライタとを接続した場合の概念図である。It is a conceptual diagram at the time of connecting the conventional microcomputer and a writer.

符号の説明Explanation of symbols

1・・ECU(電子制御装置)、2・・マイコン、2a,3a・・入力ライン、2b,2c,3b,3c・・データ通信ライン、3・・EEPROM(第2の記憶媒体)、5・・ライタ(データ書込み装置)、22・・モード決定回路(モード決定手段)、26・・フラッシュROM(第1の記憶媒体)、CS・・チップセレクト端子、ESIN・・シリアルデータ入力端子(データ通信端子)、ESOUT・・シリアルデータ出力端子(データ通信端子)、MD0・・テストモード遷移イネーブル端子(イネーブル端子)、RESN・・リセット端子。   1 .. ECU (Electronic Control Unit), 2... Microcomputer, 2 a, 3 a... Input line, 2 b, 2 c, 3 b, 3 c... Data communication line 3. ..Writer (data writing device), 22..mode decision circuit (mode decision means), 26..flash ROM (first storage medium), CS..chip select terminal, ESIN..serial data input terminal (data communication) Terminal), ESOUT... Serial data output terminal (data communication terminal), MD0... Test mode transition enable terminal (enable terminal), RESN.

Claims (4)

データ書込み装置を接続可能な電子制御装置において、
前記データ書込み装置からリセット信号を入力するリセット端子と、
データ書換えモードを含む複数の動作モードの中から所定のモードを決定させるための動作モード選択信号を前記データ書込み装置から入力する動作モード選択端子と、
モードの切替えを許可するための許可信号を前記データ書込み装置から入力するイネーブル端子と、
前記データ書込み装置との間でデータの通信を行うデータ通信端子と、
このデータ通信端子から入力されるデータを格納する第1の記憶媒体と、
前記リセット端子、動作モード選択端子およびイネーブル端子にそれぞれ表れる信号のレベルを監視し、前記リセット端子から入力されたリセット信号がリセット解除を示すレベルになったときに前記イネーブル端子に表れる前記許可信号のレベルおよび前記動作モード選択端子に表れる動作モード選択信号のレベルをラッチするとともに、そのラッチした各信号のレベルに基づいて動作モードを決定する動作モード決定手段と、
この動作モード決定手段が、前記動作モードを前記データ書換えモードに決定したときに前記データ書込み装置から出力されるデータを前記データ通信端子を介して前記第1の記憶媒体に格納することを特徴とする電子制御装置。
In an electronic control device to which a data writing device can be connected,
A reset terminal for inputting a reset signal from the data writing device;
An operation mode selection terminal for inputting an operation mode selection signal for determining a predetermined mode from a plurality of operation modes including a data rewrite mode from the data writing device;
An enable terminal for inputting a permission signal for permitting mode switching from the data writing device;
A data communication terminal for communicating data with the data writing device;
A first storage medium for storing data input from the data communication terminal;
The level of the signal appearing at each of the reset terminal, the operation mode selection terminal, and the enable terminal is monitored, and when the reset signal input from the reset terminal reaches a level indicating reset release, the permission signal appearing at the enable terminal An operation mode determination means for latching the level and the level of the operation mode selection signal appearing at the operation mode selection terminal, and determining the operation mode based on the level of each latched signal;
The operation mode determination means stores the data output from the data writing device when the operation mode is determined as the data rewrite mode, in the first storage medium via the data communication terminal. Electronic control device.
前記動作モード選択端子は、前記動作モード決定手段による前記動作モードの決定が終了した以降は、前記動作モード選択端子以外の端子として使用可能であることを特徴とする請求項1に記載の電子制御装置。   2. The electronic control according to claim 1, wherein the operation mode selection terminal can be used as a terminal other than the operation mode selection terminal after the determination of the operation mode by the operation mode determination unit is completed. apparatus. データを格納する第2の記憶媒体を備えており、
前記動作モード選択端子に接続された入力ラインに、前記第2の記憶媒体に設けられたチップセレクト端子に接続された入力ラインが接続されており、
前記チップセレクト端子は、前記データ書換えモードになっているときの前記動作モード選択端子の極性とは逆極性となるように設定されていることを特徴とする請求項1または請求項2に記載の電子制御装置。
A second storage medium for storing data;
An input line connected to a chip select terminal provided in the second storage medium is connected to an input line connected to the operation mode selection terminal;
The said chip select terminal is set so that it may become a polarity opposite to the polarity of the said operation mode selection terminal when it is in the said data rewriting mode. Electronic control device.
前記データ通信端子に接続されたデータ通信ラインに、前記第2の記憶媒体のデータ通信端子に接続されたデータ通信ラインが接続されていることを特徴とする請求項3に記載の電子制御装置。   The electronic control device according to claim 3, wherein a data communication line connected to a data communication terminal of the second storage medium is connected to a data communication line connected to the data communication terminal.
JP2005021083A 2005-01-28 2005-01-28 Electronic control device Pending JP2006209876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005021083A JP2006209876A (en) 2005-01-28 2005-01-28 Electronic control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005021083A JP2006209876A (en) 2005-01-28 2005-01-28 Electronic control device

Publications (1)

Publication Number Publication Date
JP2006209876A true JP2006209876A (en) 2006-08-10

Family

ID=36966543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005021083A Pending JP2006209876A (en) 2005-01-28 2005-01-28 Electronic control device

Country Status (1)

Country Link
JP (1) JP2006209876A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008140343A (en) * 2006-12-05 2008-06-19 Denso Corp Electronic apparatus
JP2018097442A (en) * 2016-12-09 2018-06-21 日立オートモティブシステムズ株式会社 Electronic controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04303247A (en) * 1991-03-29 1992-10-27 Mitsubishi Electric Corp Microcomputer device
JP2000003599A (en) * 1998-06-15 2000-01-07 Mitsubishi Electric Corp Controller for automobile
JP2000132985A (en) * 1998-10-27 2000-05-12 Hitachi Ltd Semiconductor memory apparatus and data-processing apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04303247A (en) * 1991-03-29 1992-10-27 Mitsubishi Electric Corp Microcomputer device
JP2000003599A (en) * 1998-06-15 2000-01-07 Mitsubishi Electric Corp Controller for automobile
JP2000132985A (en) * 1998-10-27 2000-05-12 Hitachi Ltd Semiconductor memory apparatus and data-processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008140343A (en) * 2006-12-05 2008-06-19 Denso Corp Electronic apparatus
JP2018097442A (en) * 2016-12-09 2018-06-21 日立オートモティブシステムズ株式会社 Electronic controller

Similar Documents

Publication Publication Date Title
JPH1069453A (en) Programmable controller provided with extension unit
JP2006209876A (en) Electronic control device
JPH11306086A (en) Memory module device
US7007181B2 (en) Microcontroller
JP2006100991A (en) Non-volatile logic circuit and system lsi having the same
JP6036719B2 (en) Electronic device having programmable logic circuit device and rewriting method
JP5381852B2 (en) Non-volatile memory power supply interruption circuit
JP4953788B2 (en) Electronic equipment
JP2005309839A5 (en)
JP5412102B2 (en) Semiconductor device
JP2004166201A5 (en)
US10020071B2 (en) Test mode setting circuit and semiconductor device including the same
JP3901143B2 (en) Inverter device
JP2009212930A (en) Input-level determination circuit
JP2006127554A (en) Information processing device and image formation device
JP2008539535A (en) Configuration decision based on the first valid NAND command
US7596717B2 (en) Microcomputer and debugging method
JP2001229664A (en) Input circuit for memory smart card
JP3912447B2 (en) Memory system and method of using external nonvolatile memory
JP2007194940A (en) Field programmable gate array
JP2015219838A (en) Information processing device
WO2010070736A1 (en) Apparatus and method for controlling programmable device
JP2005025238A (en) Microcontroller
JP6002600B2 (en) Memory element mounted circuit board and memory element rewriting system
JP2011113591A (en) Nand flash memory and method of writing data to nand flash memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100602

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100907

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110311