JP6415990B2 - Electronic control unit for automobile - Google Patents

Electronic control unit for automobile Download PDF

Info

Publication number
JP6415990B2
JP6415990B2 JP2015002223A JP2015002223A JP6415990B2 JP 6415990 B2 JP6415990 B2 JP 6415990B2 JP 2015002223 A JP2015002223 A JP 2015002223A JP 2015002223 A JP2015002223 A JP 2015002223A JP 6415990 B2 JP6415990 B2 JP 6415990B2
Authority
JP
Japan
Prior art keywords
microcomputer
communication interface
program
electronic control
nonvolatile memory
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.)
Active
Application number
JP2015002223A
Other languages
Japanese (ja)
Other versions
JP2016126699A (en
Inventor
浩行 高田
浩行 高田
直人 長谷川
直人 長谷川
真由美 前田
真由美 前田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2015002223A priority Critical patent/JP6415990B2/en
Publication of JP2016126699A publication Critical patent/JP2016126699A/en
Application granted granted Critical
Publication of JP6415990B2 publication Critical patent/JP6415990B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、自動車用電子制御装置に関し、詳しくは、電気的に消去及び書き込みが可能な不揮発性メモリに外部からデータを書き込む処理に関する。   The present invention relates to an automotive electronic control device, and more particularly, to a process for writing data from the outside into an electrically erasable and writable nonvolatile memory.

特許文献1には、プログラムが記憶されていない状態のROMを実装した場合又はプログラム更新のために旧プログラムに上書きする必要がある場合に、ROMの内容に依存せずに外部通信インターフェース手段を通して直接CPUに命令を与えて動作させ制御装置がプログラムをもっていなくてもROMに書き込むことができるようにした、BOOTローダー回路が開示されている。   In Patent Document 1, when a ROM in which a program is not stored is mounted or when it is necessary to overwrite an old program for program update, it is directly through an external communication interface means without depending on the contents of the ROM. A BOOT loader circuit is disclosed in which an instruction is given to a CPU so that it can be written in a ROM even if the control device does not have a program.

特許文献2には、動作モードを選択する動作モード選択スイッチによりIPL(イニシャル・プログラム・ローディング)動作モードが選択された場合に、CPUの動作を停止させ、RAMをIPL動作モードに応じたエリアにマッピングし、通信手段を介して外部より転送されるIPLプログラムをRAMに書き込んだ後に、CPUの動作の停止を解除する動作モード制御ユニットを備え、RAMに書き込まれたIPLプログラムをCPUにより実行して、システムプログラムをダウンロードする、プロセッサシステムが開示されている。   In Patent Document 2, when an IPL (Initial Program Loading) operation mode is selected by an operation mode selection switch for selecting an operation mode, the CPU operation is stopped and the RAM is set in an area corresponding to the IPL operation mode. An operation mode control unit is provided that maps and writes an IPL program transferred from the outside via a communication means to the RAM, and then releases the suspension of the operation of the CPU. The CPU executes the IPL program written to the RAM. A processor system for downloading a system program is disclosed.

特開平11−149376号公報JP-A-11-149376 特許第4908665号公報Japanese Patent No. 4908665

ところで、電気的に消去及び書き込みが可能な不揮発性メモリを備えたマイクロコンピュータ(以下、マイコンという)を含む自動車用電子制御装置において、例えば、不揮発性メモリのユーザ領域に格納されている制御プログラムの不具合によりプログラムリセットと復帰とが繰り返されるループ状態になると、マイコンは、外部からの制御プログラムの書き換え要求に応答して書き換えを実行することができなくなり、結果、不具合プログラムの書き換えが不能になって電子制御装置が使用不能になるという問題があった。   By the way, in an automobile electronic control device including a microcomputer (hereinafter referred to as a microcomputer) having a nonvolatile memory that can be electrically erased and written, for example, a control program stored in a user area of the nonvolatile memory. If the program enters a loop state in which program reset and return are repeated due to a problem, the microcomputer cannot execute rewriting in response to a request to rewrite the control program from the outside, and as a result, the problem program cannot be rewritten. There was a problem that the electronic control unit could not be used.

本発明は上記問題点に鑑みなされたものであり、制御プログラムの不具合などによりマイコンが正常動作しない場合であっても外部からのプログラムの書き換えを可能にできる、自動車用電子制御装置を提供することを目的とする。   The present invention has been made in view of the above problems, and provides an automotive electronic control device capable of rewriting an external program even when the microcomputer does not operate normally due to a malfunction of the control program. With the goal.

そのため、本願発明に係る自動車用電子制御装置は、電気的に消去及び書き込みが可能な不揮発性メモリを備えたマイクロコンピュータを含む自動車用電子制御装置であって、前記マイクロコンピュータが外部機器からの前記不揮発性メモリのユーザ領域の書き込み要求に応答しない状態が所定回数以上に継続するときに、前記マイクロコンピュータを、前記マイクロコンピュータが特定処理を繰り返すループ状態になったときに、前記不揮発性メモリのユーザ領域の書き換えを可能とするブートモードに設定するブートモード設定ユニットを有する。 Therefore, an automotive electronic control device according to the present invention is an automotive electronic control device including a microcomputer including an electrically erasable and writable nonvolatile memory, and the microcomputer is connected to the external device from the external device. When the microcomputer does not respond to a write request in the user area of the nonvolatile memory for a predetermined number of times or more, the microcomputer is changed to a loop state in which the microcomputer repeats a specific process. A boot mode setting unit for setting a boot mode that enables rewriting of the area is provided.

上記発明によると、制御プログラムの不具合などによりマイコンが正常動作しない場合であっても外部からのプログラムの書き換えを可能にできる。 According to the above invention, it is possible to rewrite the program from the outside even when the microcomputer does not operate normally due to a malfunction of the control program.

本発明に係る自動車用電子制御装置の一例を示す概略構成図である。It is a schematic block diagram which shows an example of the electronic control apparatus for motor vehicles based on this invention. 本発明に係る自動車用電子制御装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the electronic control apparatus for motor vehicles based on this invention.

以下に本発明の実施の形態を説明する。
図1は、本発明に係る自動車用電子制御装置の一例を示すブロック図である。
図1の自動車用電子制御装置1は、エンジン、自動変速機、エアコンディショナーなどの車両搭載機器を制御する装置であり、マイクロコンピュータ2、監視IC3、外部通信インターフェース4(ブートモード設定ユニット)などを備える。
Embodiments of the present invention will be described below.
FIG. 1 is a block diagram showing an example of an automotive electronic control device according to the present invention.
1 is a device that controls on-vehicle equipment such as an engine, an automatic transmission, and an air conditioner, and includes a microcomputer 2, a monitoring IC 3, an external communication interface 4 (boot mode setting unit), and the like. Prepare.

マイクロコンピュータ(以下、「マイコン」という)2は、CPU(中央演算処理装置)21、フラッシュROM(不揮発性メモリ)22、RAM(揮発性メモリ)23などを含んで構成される。
フラッシュROM22は電気的に消去及び書き込みが可能な不揮発性メモリであり、フラッシュROMに代えてEEPROMなどの他の不揮発性メモリを用いることができる。
The microcomputer (hereinafter referred to as “microcomputer”) 2 includes a CPU (central processing unit) 21, a flash ROM (nonvolatile memory) 22, a RAM (volatile memory) 23, and the like.
The flash ROM 22 is an electrically erasable and writable nonvolatile memory, and other nonvolatile memories such as an EEPROM can be used instead of the flash ROM.

監視IC(ウォッチドッグタイマ)3は、マイコン2が出力するプログラムラン信号P−RUNを入力し、プログラムラン信号P−RUNに異常が生じるとマイコン2にリセット信号を出力する。
外部通信インターフェース4には、フラッシュROM22に格納されている制御プログラムやデータなどを書き換えるための外部機器である書き込みツール6などが直接又はCAN(Controller Area Network)を介して接続される。
A monitoring IC (watchdog timer) 3 receives a program run signal P-RUN output from the microcomputer 2 and outputs a reset signal to the microcomputer 2 when an abnormality occurs in the program run signal P-RUN.
The external communication interface 4 is connected to a writing tool 6 that is an external device for rewriting a control program, data, and the like stored in the flash ROM 22 directly or via a CAN (Controller Area Network).

書き込みツール6は、書き込みデータをマイコン2に転送する外部ツールであり、例えば、自動車の組み立て工場や整備工場などに配備され、フラッシュROM22に格納されているプログラムやデータを書き換える場合に電子制御装置1に接続され、書き込みツール6とマイコン2との間における信号の送受信は外部通信インターフェース4を介して行われる。   The writing tool 6 is an external tool that transfers write data to the microcomputer 2. For example, the electronic control device 1 is provided when a program or data stored in the flash ROM 22 is rewritten in an automobile assembly factory or a maintenance factory. The signal transmission / reception between the writing tool 6 and the microcomputer 2 is performed via the external communication interface 4.

書き込みツール6とマイコン2との間で送受信される信号には、書き込みツール6がマイコン2に向けて送信する書き込みデータ(更新プログラム、修正データなど)の他、書き込みツール6がマイコン2に向けて送信する書き込み要求信号や、マイコン2が書き込みツール6に向けて送信する応答信号などが含まれる。
外部通信インターフェース4は、書き込みツール6からの書き込みデータや書き込み要求信号を入力してこれらの信号をマイコン2に送信し、マイコン2からの応答信号を入力して係る応答信号を書き込みツール6に送信する。
Signals transmitted and received between the writing tool 6 and the microcomputer 2 include write data (update program, correction data, etc.) transmitted from the writing tool 6 to the microcomputer 2, and the writing tool 6 toward the microcomputer 2. A write request signal to be transmitted and a response signal transmitted from the microcomputer 2 to the write tool 6 are included.
The external communication interface 4 inputs write data and a write request signal from the writing tool 6 and transmits these signals to the microcomputer 2, and inputs a response signal from the microcomputer 2 and transmits the response signal to the writing tool 6. To do.

マイコン2は、書き込みツール6から送信された書き込み要求信号に基づき書き込みプログラムを起動し、フラッシュROM22のユーザ領域のデータを書き込みツール6から送信される書き込みデータに基づき書き換えると共に、書き込みツール6に向けて応答信号(書き込みデータの送信要求信号、書き込み単位領域毎の書き込み完了信号など)を送信する。
なお、フラッシュROM22には、データ書き換えを行わない書き換え禁止領域(システム領域、システムメモリ領域)が設定され、この書き換え禁止領域には、フラッシュROM22のユーザ領域(ユーザメモリ領域、書き換え領域)でのデータの消去・書き込みを制御する書き込みプログラムが格納される。
The microcomputer 2 starts a write program based on the write request signal transmitted from the write tool 6, rewrites data in the user area of the flash ROM 22 based on the write data transmitted from the write tool 6, and toward the write tool 6. A response signal (write data transmission request signal, write completion signal for each write unit area, etc.) is transmitted.
The flash ROM 22 has a rewrite prohibition area (system area, system memory area) where data rewrite is not performed, and data in the user area (user memory area, rewrite area) of the flash ROM 22 is set in this rewrite prohibition area. A writing program for controlling erasing / writing is stored.

そして、マイコン2は、不揮発性メモリ22の書き換え禁止領域に格納されている書き込みプログラムに従って不揮発性メモリ22のユーザ領域に格納されているデータや制御プログラムなどの書き換えを行う。
また、外部通信インターフェース4は、監視IC3によるリセット信号を入力し、マイコン2の起動時のROM読み出しを指定するモード切替要求信号を出力する機能(ブートモード設定ユニット、ROM読み出し選択回路としての機能)を有している。
Then, the microcomputer 2 rewrites data and control programs stored in the user area of the nonvolatile memory 22 in accordance with a write program stored in the rewrite prohibition area of the nonvolatile memory 22.
The external communication interface 4 also receives a reset signal from the monitoring IC 3 and outputs a mode switching request signal for designating ROM reading when the microcomputer 2 is started up (function as a boot mode setting unit and ROM read selection circuit). have.

起動時のROM読み出しとして、ユーザ領域(ユーザフラッシュメモリ)からプログラムを読み出し始める通常モードと、システム領域(システムメモリ)からプログラムを読み始めることでユーザ領域の書き換えを可能にするブートモード(書き換えモード)とのいずれかがモード切替要求信号(ブートモード制御信号)により設定される。
そして、外部通信インターフェース4は、マイコン2のリセット信号やマイコン2が書き込みツール6に向けて送信する応答信号などに基づいて、通常モードとブートモードとのいずれかを選択し、当該選択に応じたモード切替要求信号をマイコン2に送信する。
Normal mode that starts reading a program from the user area (user flash memory) and ROM boot mode (rewrite mode) that allows the user area to be rewritten by starting reading the program from the system area (system memory). Is set by a mode switching request signal (boot mode control signal).
Then, the external communication interface 4 selects either the normal mode or the boot mode based on the reset signal of the microcomputer 2 or the response signal transmitted from the microcomputer 2 to the writing tool 6, and the selection is made according to the selection. A mode switching request signal is transmitted to the microcomputer 2.

このように、外部通信インターフェース4は、マイコン2と外部の書き込みツール6との間での通信を媒介する本来的な機能の他に、マイコン2の起動時におけるモードを決定し、当該決定に基づきマイコン2の起動時のROM読み出しを制御するブートモード設定ユニットとしての機能を有している。   As described above, the external communication interface 4 determines the mode at the time of starting the microcomputer 2 in addition to the original function that mediates communication between the microcomputer 2 and the external writing tool 6, and based on the determination. It has a function as a boot mode setting unit that controls ROM reading when the microcomputer 2 is activated.

次に、マイコン2の起動時のROM読み出しを選択する制御、換言すれば、通常モードとブートモードとの選択制御の一例を、図2のフローチャートに従って詳述する。
図2のフローチャートは、外部通信インターフェース4によるブートモード設定ユニットとしての処理の流れを示す。
Next, an example of control for selecting ROM reading when the microcomputer 2 is activated, in other words, an example of selection control between the normal mode and the boot mode will be described in detail with reference to the flowchart of FIG.
The flowchart of FIG. 2 shows the flow of processing as a boot mode setting unit by the external communication interface 4.

まず、外部通信インターフェース4は、ステップS101にて、書き込みツール6の書き込み要求(不揮発性メモリ22の書き換え要求、更新要求)がマイコン2に向けて送信されているか否かを検出する。
そして、書き込み要求がない場合、つまり、書き込みツール6を用いたメモリ書き換えが行われない場合、外部通信インターフェース4は、ステップS102に進み、マイコン2をリセットするリセット信号が発生しているか否か(監視IC3がリセット信号をマイコン2に出力しているか否か)を検出する。
First, in step S101, the external communication interface 4 detects whether or not a write request from the writing tool 6 (rewrite request or update request for the nonvolatile memory 22) is transmitted to the microcomputer 2.
When there is no write request, that is, when the memory rewrite using the write tool 6 is not performed, the external communication interface 4 proceeds to step S102 and determines whether or not a reset signal for resetting the microcomputer 2 is generated ( Whether the monitoring IC 3 is outputting a reset signal to the microcomputer 2) is detected.

書き込み要求がなくかつリセット信号の発生がない場合、外部通信インターフェース4は、ステップS103にて、起動モードとして通常モードを選択するモード切替要求信号を出力する。つまり、不揮発性メモリ22の書き換えが行われず、マイコン2が正常に動作する状態(監視IC3によってマイコン2がリセットされない状態)では、外部通信インターフェース4は、マイコン2が通常モードで起動するように設定する。   If there is no write request and no reset signal is generated, the external communication interface 4 outputs a mode switching request signal for selecting the normal mode as the activation mode in step S103. That is, in the state where the nonvolatile memory 22 is not rewritten and the microcomputer 2 operates normally (the microcomputer 2 is not reset by the monitoring IC 3), the external communication interface 4 is set so that the microcomputer 2 starts in the normal mode. To do.

一方、マイコン2をリセットするリセット信号が発生している場合、外部通信インターフェース4は、ステップS104に進み、リセット信号の発生が所定以上に継続しているか否かを検出する。
外部通信インターフェース4は、例えば、所定時間mの間でリセット信号の発生数を計数し、リセット信号がn(n≧2)回以上連続して発生したときに、リセット信号の発生が所定以上に継続していることを検出する。
なお、リセット信号の発生が所定以上に継続している状態は、マイコン2が特定処理(リセットと起動)を繰り返すループ状態である。
On the other hand, when the reset signal for resetting the microcomputer 2 is generated, the external communication interface 4 proceeds to step S104 and detects whether or not the generation of the reset signal continues for a predetermined time or more.
For example, the external communication interface 4 counts the number of reset signals generated during a predetermined time m, and when the reset signal is generated continuously n (n ≧ 2) times or more, the generation of the reset signal exceeds a predetermined value. Detect that it continues.
The state in which the generation of the reset signal continues for a predetermined value or more is a loop state in which the microcomputer 2 repeats specific processing (reset and activation).

リセット信号が発生したものの、所定以上の継続状態に達していない単発的なリセット信号の発生状態である場合、制御プログラムの不具合やユーザ領域の故障などに因り今後もリセットが繰り返される場合と、リセット信号の発生が制御プログラムの不具合などに因る恒常的なものではなく、リセット信号の発生が一時的であってリセット信号の発生が途絶える場合との双方の可能性がある。
そこで、外部通信インターフェース4は、リセット信号の発生数の計数値を保持したままステップS101へ戻り、書き込み要求の有無を検出し、書き込み要求が無い状態であれば、リセット信号の発生が所定以上継続しているか否かを再度検出する。
If a reset signal has been generated but a single reset signal that has not reached a predetermined continuous state has been generated, the reset may be repeated due to a malfunction in the control program or a failure in the user area. There is a possibility that the generation of the signal is not constant due to a malfunction of the control program or the like, and the generation of the reset signal is temporary and the generation of the reset signal is interrupted.
Therefore, the external communication interface 4 returns to step S101 while holding the count value of the number of occurrences of the reset signal, detects whether there is a write request, and if there is no write request, the generation of the reset signal continues for a predetermined time or more. It is detected again whether or not.

そして、書き込み要求がなく、かつ、リセット信号の発生が所定以上継続しているループ状態になると、外部通信インターフェース4は、ステップS107に進み、ブートモードの設定を指令するモード切替要求信号をマイコン2に出力する。
つまり、リセット信号の発生が所定以上継続していてマイコン2がループ状態になっている場合、フラッシュROM22のユーザ領域に格納されている制御プログラムの不具合(無限ループやゼロ割りなど)によって、監視IC3によるリセットが繰り返し実施されている可能性がある。
When the external communication interface 4 enters a loop state in which there is no write request and the generation of the reset signal continues for a predetermined time or more, the external communication interface 4 proceeds to step S107 and sends a mode switching request signal for instructing the boot mode setting to the microcomputer 2. Output to.
In other words, if the generation of the reset signal continues for a predetermined time or more and the microcomputer 2 is in a loop state, the monitoring IC 3 is caused by a malfunction (such as an infinite loop or zero division) of the control program stored in the user area of the flash ROM 22. There is a possibility that reset by is repeated.

そこで、外部通信インターフェース4は、ブートモードでのマイコン2の起動を要求するモード切替要求信号を出力して、マイコン2の起動時にフラッシュROM22のシステム領域(システムメモリ)からプログラムを読み始めるようにする。フラッシュROM22のシステム領域は、フラッシュROM22のユーザ領域を書き換えるための書き換えプログラム(フラッシュブートローダ)が格納される領域であり、マイコン2を書き換えモードで起動させることで、フラッシュROM22のユーザ領域の書き換えが可能になる。   Therefore, the external communication interface 4 outputs a mode switching request signal for requesting activation of the microcomputer 2 in the boot mode, and starts reading the program from the system area (system memory) of the flash ROM 22 when the microcomputer 2 is activated. . The system area of the flash ROM 22 is an area in which a rewrite program (flash boot loader) for rewriting the user area of the flash ROM 22 is stored. The user area of the flash ROM 22 can be rewritten by starting the microcomputer 2 in the rewrite mode. become.

制御プログラムの無限ループやゼロ割りなどの不具合によってマイコン2のリセットが継続して繰り返されるループ状態になると、マイコン2は外部通信インターフェース4を介して書き込みツール6と通信することができなくなるため、不具合プログラムの書き換え(書き込み要求の受信に基づく書き込みプログラムの実行)が不能となる。   If the microcomputer 2 is in a loop state in which the reset of the microcomputer 2 continues and is repeated due to a problem such as an infinite loop or zero division of the control program, the microcomputer 2 cannot communicate with the writing tool 6 via the external communication interface 4. Program rewriting (execution of a write program based on reception of a write request) becomes impossible.

これに対し、外部通信インターフェース4は、マイコン2のリセットが継続的に繰り返されるループ状態になると、マイコン2をブートモードに移行させるので、マイコン2は、リセットによる再起動時においてフラッシュROM22のシステム領域(システムメモリ)からプログラムを読み始めるようになる。
つまり、マイコン2は、書き換えプログラムに基づいて書き込みツール6と通信して、フラッシュROM22のユーザ領域に格納されている不具合プログラムを書き換えることができるようになる。
On the other hand, when the external communication interface 4 enters a loop state in which the reset of the microcomputer 2 is continuously repeated, the microcomputer 2 shifts to the boot mode. The program starts to be read from (system memory).
That is, the microcomputer 2 can rewrite the trouble program stored in the user area of the flash ROM 22 by communicating with the writing tool 6 based on the rewriting program.

一方、書き込みツール6の書き込み要求が発生すると、外部通信インターフェース4は、ステップS101からステップS105に進み、書き込みツール6の書き込み要求に呼応して、マイコン2が書き込みツール6に向けて応答信号を出力しているか否かを検出する。
マイコン2が書き込みツール6に向けて所期の応答信号を出力している状態は、正常に不揮発性メモリ22の書き換えが進められる状態であり、マイコン2をブートモードに移行させる必要はない。
On the other hand, when a write request from the write tool 6 is generated, the external communication interface 4 proceeds from step S101 to step S105, and the microcomputer 2 outputs a response signal to the write tool 6 in response to the write request from the write tool 6. It is detected whether it is doing.
The state in which the microcomputer 2 is outputting the intended response signal toward the writing tool 6 is a state in which rewriting of the nonvolatile memory 22 is normally proceeded, and there is no need to shift the microcomputer 2 to the boot mode.

そこで、外部通信インターフェース4は、ステップS103に進み、通常モードを選択するモード切替要求信号をマイコン2に出力する。
つまり、ステップS105からステップS103に進む状況は、通常モードで起動したマイコン2が、書き込みツール6からの書き込み要求を受けて応答信号を書き込みツール6側に返信し、フラッシュROM22のシステム領域から書き込みプログラムを読み出してフラッシュROM22のユーザ領域の制御プログラムなどを書き替えることができる状態である。そこで、外部通信インターフェース4は、マイコン2の起動モードを通常モードに保持させる。
Therefore, the external communication interface 4 proceeds to step S103 and outputs a mode switching request signal for selecting the normal mode to the microcomputer 2.
That is, in the situation where the process proceeds from step S105 to step S103, the microcomputer 2 activated in the normal mode receives a write request from the write tool 6 and returns a response signal to the write tool 6 side. Is read and the user area control program of the flash ROM 22 can be rewritten. Therefore, the external communication interface 4 keeps the startup mode of the microcomputer 2 in the normal mode.

一方、マイコン2が書き込みツール6に向けて所期の応答信号を出力していない場合、換言すれば、マイコン2と書き込みツール6との間での通信が成立していない場合、外部通信インターフェース4は、ステップS106に進み、マイコン2の応答信号がなかった状態が所定回数x(x≧2)以上連続しているか否かを検出する。
なお、書き込みツール6の書き込み要求に対してマイコン2が応答しない状態が所定以上に継続している状態は、マイコン2が特定処理(リセットと起動)を繰り返すループ状態である。
On the other hand, when the microcomputer 2 does not output an intended response signal toward the writing tool 6, in other words, when communication between the microcomputer 2 and the writing tool 6 is not established, the external communication interface 4 Advances to step S106 to detect whether or not the state in which there is no response signal from the microcomputer 2 continues for a predetermined number of times x (x ≧ 2).
The state where the microcomputer 2 does not respond to the write request of the writing tool 6 continues for a predetermined time or more is a loop state in which the microcomputer 2 repeats specific processing (reset and activation).

ここで、マイコン2からの応答がない状態が所定回数x以上連続していない場合、つまり、無応答状態の連続回数が所定回数x未満である場合、応答信号が出力されない状態が一時的であってマイコン2が応答信号を出力するようになる可能性があると共に、このまま無応答の状態を継続する可能性もある。
そこで、外部通信インターフェース4は、無応答の連続回数の計数値を保持したまま、ステップS101に戻り、書き込みツール6からの書き込み要求が継続していれば、再度ステップS105に進んで、マイコン2が無応答であるか否かを検出する。
Here, when the state where there is no response from the microcomputer 2 does not continue for the predetermined number of times x or more, that is, when the continuous number of times of no response is less than the predetermined number x, the state where no response signal is output is temporary. There is a possibility that the microcomputer 2 will output a response signal, and there is also a possibility that the non-response state will continue as it is.
Therefore, the external communication interface 4 returns to step S101 while holding the count value of the continuous number of times of no response. If the write request from the writing tool 6 continues, the process proceeds to step S105 again, and the microcomputer 2 Detect whether there is no response.

一方、マイコン2からの応答がない状態が所定回数x以上連続している場合、マイコン2が不具合プログラムによって書き込みツール6に対して所期の応答をできない状態であって、マイコン2と書き込みツール6との間で通信によってフラッシュROM22のユーザ領域を書き換えることは不能である可能性が高い。
そこで、外部通信インターフェース4は、マイコン2からの応答がない状態が所定回数x以上連続している場合、ステップS107に進み、ブートモードを選択するモード切替要求信号を出力する。
On the other hand, if there is no response from the microcomputer 2 for a predetermined number of times x or more, the microcomputer 2 cannot respond to the writing tool 6 due to the malfunction program, and the microcomputer 2 and the writing tool 6 There is a high possibility that it is impossible to rewrite the user area of the flash ROM 22 through communication.
Therefore, when there is no response from the microcomputer 2 for a predetermined number of times x or more, the external communication interface 4 proceeds to step S107 and outputs a mode switching request signal for selecting a boot mode.

これにより、マイコン2は、起動時にフラッシュROM22のシステム領域からプログラムの読み出しを開始し、システム領域に格納される書き換えプログラムによってフラッシュROM22のユーザ領域の書き換えを行えるようになる。
フラッシュROM22のユーザ領域に格納される制御プログラムの不具合によってマイコン2のリセットが繰り返されるループ状態では、マイコン2は、書き込みツール6と通信が行えず、書き込み要求に対して所期の応答信号を出力することができなくなり、書き換え処理が不能となる。
Thereby, the microcomputer 2 starts reading the program from the system area of the flash ROM 22 at the time of activation, and can rewrite the user area of the flash ROM 22 by the rewriting program stored in the system area.
In a loop state where the reset of the microcomputer 2 is repeated due to a defect in the control program stored in the user area of the flash ROM 22, the microcomputer 2 cannot communicate with the writing tool 6 and outputs an intended response signal to the write request. Cannot be performed, and the rewriting process becomes impossible.

外部通信インターフェース4は、係る書き換え不能状態を、書き込み要求に対してマイコン2が連続して応答しないループ状態として検出し、マイコン2をブートモードに強制的に移行させる。
これにより、マイコン2は、リセットされたときにフラッシュROM22のシステム領域(書き換えプログラムの格納領域)からプログラムの読み出しを開始し、書き換えプログラムを読み出して、書き込みツール6との通信及びフラッシュROM22のユーザ領域の書き換えが行えるようになる。
The external communication interface 4 detects the non-rewritable state as a loop state in which the microcomputer 2 does not continuously respond to the write request, and forcibly shifts the microcomputer 2 to the boot mode.
Thereby, the microcomputer 2 starts reading the program from the system area (rewrite program storage area) of the flash ROM 22 when it is reset, reads the rewrite program, communicates with the writing tool 6, and the user area of the flash ROM 22 Can be rewritten.

以上、好ましい実施形態を参照して本発明の内容を具体的に説明したが、本発明の基本的技術思想及び教示に基づいて、当業者であれば種々の変形態様を採り得ることは自明である。
外部通信インターフェース4は、リセット信号の発生が所定以上に継続しているか否かに基づく起動モードの設定と、書き込みツール6の書き込み要求に対する無応答状態が所定以上に継続しているか否かに基づく起動モードの設定とのいずれか一方のみを実施することができる。
Although the contents of the present invention have been specifically described above with reference to the preferred embodiments, it is obvious that those skilled in the art can take various modifications based on the basic technical idea and teachings of the present invention. is there.
The external communication interface 4 sets the start mode based on whether or not the generation of the reset signal continues for a predetermined value or more and whether or not the non-response state for the write request of the writing tool 6 continues for the predetermined value or more. Only one of the setting of the start mode can be performed.

また、外部通信インターフェース4とは別に、上記のブートモード設定ユニットを、マイコン2と対を成すように設けることができる。この場合、ブートモード設定ユニットは、マイコン2側からリセット信号を入力し、また、マイコン2から外部通信インターフェース4に向けて送信される“書き込み要求に対する応答信号”を読み込み、マイコン2にモード切替要求信号を出力する。
更に、外部通信インターフェース4以外の監視IC3などのマイコン周辺装置が、上記のブートモード設定ユニットとしての機能を備えることができる。
In addition to the external communication interface 4, the boot mode setting unit can be provided so as to make a pair with the microcomputer 2. In this case, the boot mode setting unit inputs a reset signal from the microcomputer 2 side, reads a “response signal for write request” transmitted from the microcomputer 2 to the external communication interface 4, and requests the microcomputer 2 to switch the mode. Output a signal.
Further, a microcomputer peripheral device such as the monitoring IC 3 other than the external communication interface 4 can have a function as the boot mode setting unit.

1…自動車用電子制御装置、2…マイクロコンピュータ、3…監視IC、4…外部通信インターフェース、6…書き込みツール、21…CPU、22…フラッシュROM、23…RAM   DESCRIPTION OF SYMBOLS 1 ... Automotive electronic control device, 2 ... Microcomputer, 3 ... Monitoring IC, 4 ... External communication interface, 6 ... Writing tool, 21 ... CPU, 22 ... Flash ROM, 23 ... RAM

Claims (3)

電気的に消去及び書き込みが可能な不揮発性メモリを備えたマイクロコンピュータを含む自動車用電子制御装置であって、
前記マイクロコンピュータが外部機器からの前記不揮発性メモリのユーザ領域の書き込み要求に応答しない状態が所定回数以上に継続するときに、前記マイクロコンピュータを、前記不揮発性メモリのユーザ領域の書き換えを可能とするブートモードに設定するブートモード設定ユニットを有する、自動車用電子制御装置。
An automotive electronic control device including a microcomputer having a nonvolatile memory that can be electrically erased and written,
When the microcomputer does not respond to a write request to the user area of the nonvolatile memory from an external device for a predetermined number of times or more, the microcomputer can rewrite the user area of the nonvolatile memory. An automotive electronic control device having a boot mode setting unit for setting a boot mode.
前記ブートモード設定ユニットは、前記マイクロコンピュータが前記外部機器からの前記不揮発性メモリのユーザ領域の書き込み要求に応答しない状態が所定回数以上に継続するときに、前記マイクロコンピュータを、前記不揮発性メモリのユーザ領域の書き換えを可能とするブートモードに設定するとともに、前記マイクロコンピュータのリセット信号の発生が所定回数以上に継続するときに、前記マイクロコンピュータを、前記不揮発性メモリのユーザ領域の書き換えを可能とするブートモードに設定する、請求項1記載の自動車用電子制御装置。 When the microcomputer does not respond to the write request of the user area of the nonvolatile memory from the external device for a predetermined number of times or more, the boot mode setting unit causes the microcomputer to store the nonvolatile memory. The boot mode that enables rewriting of the user area is set, and when the reset signal generation of the microcomputer continues for a predetermined number of times or more, the microcomputer can rewrite the user area of the nonvolatile memory. The automotive electronic control device according to claim 1, wherein the electronic control device is set to a boot mode . 前記ブートモード設定ユニットは、前記外部機器と前記マイクロコンピュータとの間での通信を媒介する通信インターフェースを構成し、前記通信インターフェースは、前記マイクロコンピュータのリセット信号及び前記マイクロコンピュータが前記外部機器に向けて送信する応答信号を入力し、前記マイクロコンピュータを前記ブートモードに設定するための制御信号を出力する、請求項2記載の自動車用電子制御装置。 The boot mode setting unit constitutes a communication interface that mediates communication between the external device and the microcomputer. The communication interface includes a reset signal of the microcomputer and the microcomputer directed to the external device. The vehicle electronic control device according to claim 2, wherein a response signal to be transmitted is input and a control signal for setting the microcomputer to the boot mode is output .
JP2015002223A 2015-01-08 2015-01-08 Electronic control unit for automobile Active JP6415990B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015002223A JP6415990B2 (en) 2015-01-08 2015-01-08 Electronic control unit for automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015002223A JP6415990B2 (en) 2015-01-08 2015-01-08 Electronic control unit for automobile

Publications (2)

Publication Number Publication Date
JP2016126699A JP2016126699A (en) 2016-07-11
JP6415990B2 true JP6415990B2 (en) 2018-10-31

Family

ID=56359582

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015002223A Active JP6415990B2 (en) 2015-01-08 2015-01-08 Electronic control unit for automobile

Country Status (1)

Country Link
JP (1) JP6415990B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10936236B2 (en) 2017-04-12 2021-03-02 Yazaki Corporation Rewriting system, rewriting device and computer
JP2018180869A (en) * 2017-04-12 2018-11-15 矢崎総業株式会社 Rewrite system, rewrite device and computer
WO2020032118A1 (en) * 2018-08-10 2020-02-13 株式会社デンソー Vehicular master device, vehicular electronic control system, activation request instruction method, and activation request instruction program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272498A (en) * 1998-03-25 1999-10-08 Denso Corp Electronic controller
JP3672755B2 (en) * 1998-12-17 2005-07-20 三菱電機株式会社 Control program rewriting system
JP3835969B2 (en) * 2000-04-13 2006-10-18 本田技研工業株式会社 Rewriting system for vehicle control device
JP2008055980A (en) * 2006-08-30 2008-03-13 Hitachi Ltd Electronic control device for automobile
JP2009223449A (en) * 2008-03-14 2009-10-01 Hitachi Ltd Vehicular electronic controller
JP5355210B2 (en) * 2009-05-07 2013-11-27 ヤンマー株式会社 Control device for work vehicle installation

Also Published As

Publication number Publication date
JP2016126699A (en) 2016-07-11

Similar Documents

Publication Publication Date Title
JP4302113B2 (en) In-vehicle control device
JP6415990B2 (en) Electronic control unit for automobile
WO2019123747A1 (en) Electronic control device for automobile and control method thereof
JP2008254484A (en) On-vehicle communication system
JP4753929B2 (en) Non-volatile memory rewriting system for in-vehicle control unit
KR101601751B1 (en) Ecu of vehicle and boot software re-programming method thereof
JP6895373B2 (en) Electronic control device for automobiles
JP6899719B2 (en) Electronic control device for automobiles
JP2007316800A (en) Onboard program rewriting controller
JP6708596B2 (en) Electronic control device and control program verification method
JP5590069B2 (en) Microcomputer
JP2009026183A (en) Electronic control apparatus for automobile
US6973530B2 (en) Method for writing and erasing a non-volatile memory area
JP3489524B2 (en) Non-volatile memory rewriting device for vehicle
JP6408450B2 (en) Electronic control unit for automobile
JP2002175193A (en) Device and method for rewriting program
JP2009087107A (en) Control system for vehicle
JP5158883B2 (en) Firmware update method and firmware update apparatus
JP2003271420A (en) Electronic control device
JP6702161B2 (en) In-vehicle electronic control unit
US7596717B2 (en) Microcomputer and debugging method
JP2006039876A (en) Data storage device
WO2022215402A1 (en) Vehicle electronic control device and program rewriting method
JP2004287712A (en) Electronic device
JP2016081150A (en) Electronic controller for automatic vehicle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180411

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181003

R150 Certificate of patent or registration of utility model

Ref document number: 6415990

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250