JP2009026183A - Electronic control apparatus for automobile - Google Patents

Electronic control apparatus for automobile Download PDF

Info

Publication number
JP2009026183A
JP2009026183A JP2007190666A JP2007190666A JP2009026183A JP 2009026183 A JP2009026183 A JP 2009026183A JP 2007190666 A JP2007190666 A JP 2007190666A JP 2007190666 A JP2007190666 A JP 2007190666A JP 2009026183 A JP2009026183 A JP 2009026183A
Authority
JP
Japan
Prior art keywords
control
program
constant
version
control program
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
JP2007190666A
Other languages
Japanese (ja)
Inventor
Toshinaka Arai
敏央 新井
Toshikazu Sasaki
利和 佐々木
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 Ltd
Original Assignee
Hitachi 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 Ltd filed Critical Hitachi Ltd
Priority to JP2007190666A priority Critical patent/JP2009026183A/en
Publication of JP2009026183A publication Critical patent/JP2009026183A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To make it possible to rewrite a rewritten control constant to a suitable control constant again without executing boot rewriting even when a control constant stored in a nonvolatile memory capable of electrically erasing and writing data is rewritten to a version which does not suit to a control program. <P>SOLUTION: An electronic control apparatus for an automobile compares a version of a control program stored in the nonvolatile memory with that of a control constant when starting, and executes the control program when both the versions are suited to each other, or executes a memory rewriting program when both the versions are not suited to each other. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、電気的にデータの消去及び書き込みが可能であって、メモリ書き換えプログラムと制御プログラムと該制御プログラムに用いる制御定数とがそれぞれの領域に格納される不揮発性メモリを備えた自動車用電子制御装置に関する。   The present invention relates to an automotive electronic device comprising a nonvolatile memory in which data can be electrically erased and written, and a memory rewrite program, a control program, and control constants used for the control program are stored in respective areas. The present invention relates to a control device.

特許文献1には、電気的にデータの消去及び書き込みが可能な不揮発性メモリであるフラッシュメモリを備えた自動車用電子制御装置が開示されている。
前記フラッシュメモリは、メモリセルのブロック単位で消去・書き込みが行われるようになっており、メモリ書き込みプログラム領域、制御プログラム領域、制御定数領域に分けられている。
特開2000−257502号公報
Patent Document 1 discloses an electronic control device for a vehicle including a flash memory that is a nonvolatile memory capable of electrically erasing and writing data.
The flash memory is designed to be erased / written in block units of memory cells, and is divided into a memory writing program area, a control program area, and a control constant area.
JP 2000-257502 A

ところで、前述のように、フラッシュメモリの領域が、メモリ書き込みプログラム領域、制御プログラム領域、制御定数領域に分けられ、領域毎に別々に消去・書き込みが可能であると、例えば、制御プログラムとはバージョンが異なる制御定数に書き換えられてしまう可能性がある。
制御プログラムと制御定数とのバージョンが異なると、制御プログラムが読みに行くアドレスと実際に制御定数が記憶されているアドレスとにずれが生じるなどして、制御プログラムを正常に実行することができなくなるため、フラッシュメモリの書き換え要求を判断してメモリ書き込みプログラムを実行させることもできなくなってしまう。
By the way, as described above, the area of the flash memory is divided into a memory writing program area, a control program area, and a control constant area, and each area can be erased and written separately. May be rewritten to a different control constant.
If the versions of the control program and the control constant are different, the control program cannot be executed normally due to a difference between the address where the control program reads and the address where the control constant is actually stored. Therefore, it becomes impossible to execute a memory writing program by judging a rewrite request of the flash memory.

従って、バージョンが適合しない書き換えが行われてしまうと、ブートピンを備えない自動車用電子制御装置では、正しいバージョンへの再書き換えが不可能になり、電子制御装置全体を交換せざるを得なくなるという問題があった。
前記ブートピンとは、該ブートピンに入力される信号の組み合わせにより、接続されるホストプロセッサから全てのメモリ空間へのデータ・プログラムの転送を可能にするためのものであり、このブートピンを備えていれば、バージョンが適合しない書き換えが行われてしまっても、正しいバージョンへの再書き換えが可能である。
Therefore, if rewriting that does not match the version is performed, the electronic control device for a car that does not have a boot pin cannot be rewritten to the correct version, and the entire electronic control device must be replaced. was there.
The boot pin is for enabling a data program to be transferred from the connected host processor to all memory spaces by a combination of signals input to the boot pin. Even if rewriting that does not match the version is performed, rewriting to the correct version is possible.

しかし、例えば自動車用電子制御装置を防水仕様とする場合などには、前記ブートピンが省略されることがあり、この場合、バージョンが適合しない書き換えが行われてしまうと再書き換えが不能になってしまうものである。
本発明は上記問題点に鑑みなされたものであり、適合しない制御プログラムと制御定数との組み合わせに書き換えられてしまった場合でも、ブート書き換えを行う必要なく、適合する制御プログラム或いは制御定数への再書き換えを行える自動車用電子制御装置を提供することを目的とする。
However, for example, when the electronic control device for automobiles is waterproof, the boot pin may be omitted. In this case, if rewriting that does not match the version is performed, rewriting becomes impossible. Is.
The present invention has been made in view of the above problems, and even when the program is rewritten to a combination of a non-conforming control program and a control constant, it is not necessary to rewrite the boot, and the control program or control constant can be restored. An object of the present invention is to provide an automotive electronic control device that can be rewritten.

そのため請求項1記載の発明は、自動車用電子制御装置が、起動時に、不揮発性メモリに格納されている制御プログラムと制御定数との適合を判断し、適合する場合には前記制御プログラムを実行し、適合しない場合には同じく不揮発性メモリに格納されているメモリ書き換えプログラムを実行するようにした。
上記発明によると、例えば、制御定数の書き換え後に自動車用電子制御装置を起動させると、書き換えた制御定数が制御プログラムと適合するかが判断され、適合していて正常な制御が行える場合には制御プログラムを実行させるが、適合しない場合には、メモリ書き換えプログラムを実行させることで、制御定数の再書き換えを可能にする。
Therefore, according to the first aspect of the present invention, the electronic control device for an automobile determines whether the control program stored in the nonvolatile memory matches the control constant at the time of start-up, and executes the control program if it matches. If not, the memory rewrite program stored in the non-volatile memory is executed.
According to the above invention, for example, when the automotive electronic control device is started after rewriting the control constant, it is determined whether the rewritten control constant is compatible with the control program. If the program is executed but does not fit, the control constant can be rewritten by executing the memory rewriting program.

従って、誤ってバージョンの異なる制御プログラムと制御定数との組み合わせに書き換えられることがあっても、ブート書き換えを行うことなく、正しいバージョンの組み合わせへの再書き換えを行うことができるから、制御異常を防止でき、また、電子制御装置全体の交換を不要にできる。
請求項2記載の発明では、制御プログラム及び制御定数がそれぞれに備える識別情報を照合することで、制御プログラムと制御定数との適合を判断するようにした。
Therefore, even if it is accidentally rewritten to a combination of control program and control constant with different versions, it is possible to rewrite to the correct version combination without rewriting the boot, preventing control abnormality It is also possible to eliminate the need to replace the entire electronic control unit.
In the invention described in claim 2, the matching between the control program and the control constant is determined by collating the identification information included in each of the control program and the control constant.

上記発明によると、制御プログラムに付与された識別情報と、制御定数に付与された識別情報とを照合することで、バージョンの一致などの適合を判断する。
従って、バージョンの一致などの適合を、的確かつ容易に判断できる。
請求項3記載の発明では、前記制御プログラム及び制御定数における識別情報を、バージョン情報とするようにした。
According to the above invention, matching such as version matching is determined by comparing the identification information given to the control program with the identification information given to the control constant.
Therefore, it is possible to accurately and easily determine conformity such as version matching.
In the invention of claim 3, identification information in the control program and control constant is version information.

上記発明によると、制御定数や制御プログラムのバージョン情報が、不揮発性メモリに格納される制御プログラム及び制御定数に備えられ、それぞれバージョンを比較することで、適合・不適合が判断される。
従って、バージョンが異なることで、不適合となる制御定数と制御プログラムとの組み合わせが格納されたときに、正しいバージョンへの再書き換えを可能にして、制御異常となることを防止できる。
According to the above invention, the control constant and the version information of the control program are provided in the control program and the control constant stored in the nonvolatile memory, and conformity / non-conformity is determined by comparing the versions.
Therefore, when a combination of a control constant and a control program that are incompatible due to different versions is stored, it is possible to rewrite the correct version and prevent a control abnormality.

請求項4記載の発明では、前記制御プログラムと前記制御定数とが適合しない場合に前記メモリ書き換えプログラムを実行すると共に、前記制御プログラム及び/又は前記制御定数の書き込みが正常に完了していない場合にも前記メモリ書き換えプログラムを実行するようにした。
上記発明によると、制御プログラム及び/又は制御定数の書き込みが正常に行われずに、制御異常となる可能性があるときにも、起動時に制御プログラムではなくメモリ書き換えプログラムを実行させる。
According to a fourth aspect of the invention, when the control program and the control constant do not match, the memory rewriting program is executed, and when the writing of the control program and / or the control constant is not normally completed. Also, the memory rewriting program is executed.
According to the above invention, the memory rewriting program is executed instead of the control program at the start-up even when the control program and / or the control constant is not normally written and there is a possibility that the control is abnormal.

従って、書き込みが正常に行われずに再書き込みを行わせる必要があるときに、書き込み異常で制御プログラムが正常に動作しなくても、メモリ書き換えプログラムを実行させて、再書き込みを行わせることができる。
請求項5記載の発明では、前記メモリ書き換えプログラムによって、前記自動車用電子制御装置に接続される外部の書き換えツールとの間で通信を行い、前記制御プログラム及び/又は制御定数を書き換えるようにした。
Therefore, when it is necessary to rewrite without writing normally, even if the control program does not operate normally due to a write error, the memory rewriting program can be executed to perform rewriting. .
According to a fifth aspect of the present invention, the memory rewriting program communicates with an external rewriting tool connected to the automobile electronic control device to rewrite the control program and / or control constant.

上記発明によると、制御プログラムと前記制御定数とが適合しないと判断されて、メモリ書き換えプログラムを実行させると、前記自動車用電子制御装置に接続される外部の書き換えツールとの間で通信が行われ、前記ツールから書き換えデータを読み込んで、不揮発性メモリに格納される制御プログラム及び/又は制御定数を書き換える。
従って、制御プログラムと制御定数とが適合しないために制御プログラムが正規に動作しない場合であっても、外部ツールとの通信を可能として、外部ツールを用いた書き換えが可能になる。
According to the above invention, when it is determined that the control program and the control constant do not match and the memory rewriting program is executed, communication is performed with an external rewriting tool connected to the automotive electronic control device. The rewrite data is read from the tool, and the control program and / or control constant stored in the nonvolatile memory is rewritten.
Therefore, even when the control program does not normally operate because the control program and the control constant do not match, it is possible to communicate with the external tool and rewrite using the external tool.

以下に、本発明の一実施形態を図面に基づいて詳細に説明する。
図1は、実施の形態における自動車用電子制御装置(ECU)1の構成を示す。
自動車用電子制御装置1は、自動車に搭載される制御対象(エンジン,自動変速機など)を制御するものであり、電気的にデータの消去及び書き込みが可能な不揮発性メモリであるフラッシュメモリ2、RAM3、及び、マイクロコンピュータ4を含んで構成される。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 shows a configuration of an automotive electronic control unit (ECU) 1 according to an embodiment.
The electronic control device 1 for an automobile controls a control target (engine, automatic transmission, etc.) mounted on the automobile, and a flash memory 2 which is a nonvolatile memory capable of electrically erasing and writing data. The RAM 3 and the microcomputer 4 are included.

前記マイクロコンピュータ4は、CPU,内蔵RAM,タイマ,A/Dコンバータ,SCI等を備えて構成され、RAM3やフラッシュメモリ2に格納された各種のプログラムを実行する。
前記フラッシュメモリ2は、記憶領域が3つのブロックA,B,Cに分割され、書き換え時には、前記ブロック単位で記憶データの消去及び書き込みが実行される。
The microcomputer 4 includes a CPU, a built-in RAM, a timer, an A / D converter, an SCI, and the like, and executes various programs stored in the RAM 3 and the flash memory 2.
In the flash memory 2, the storage area is divided into three blocks A, B, and C, and at the time of rewriting, the stored data is erased and written in units of the blocks.

前記フラッシュメモリ2のブロックAにはフラッシュ書き換えプログラム(メモリ書き換えプログラム)が、ブロックBには制御定数(適合定数)が、ブロックCには制御プログラム(アプリケーションプログラム)がそれぞれに格納される。
尚、前記制御定数,制御プログラムは、そのバージョンを示す識別情報IDと共にブロックB,Cにそれぞれ格納される。
A flash rewrite program (memory rewrite program) is stored in block A of the flash memory 2, a control constant (compatible constant) is stored in block B, and a control program (application program) is stored in block C.
The control constant and the control program are stored in the blocks B and C together with the identification information ID indicating the version.

前記ブロックAのフラッシュ書き換えプログラムは、前記ブロックB,Cに格納される制御定数,制御プログラムの消去・書き込みを制御するためのプログラムであり、ブロックBの制御プログラムは、ブロックCに格納されている制御定数及び各種入力信号を用いた演算処理によって、自動車に搭載される制御対象(エンジン,自動変速機など)の制御装置(燃料噴射弁,ソレノイド等)に操作信号を出力する。   The flash rewrite program of the block A is a program for controlling the control constants stored in the blocks B and C and the erasing / writing of the control program, and the control program of the block B is stored in the block C. An operation signal is output to a control device (fuel injection valve, solenoid, etc.) of a control target (engine, automatic transmission, etc.) mounted on the automobile by arithmetic processing using control constants and various input signals.

上記各種入力信号としては、各種の操作装置7からの操作信号や車両の運転状態を検出する検出装置8からの検出信号などが含まれる。
前記自動車用電子制御装置1がエンジンを制御する装置である場合、前記操作装置7には、エンジンのイグニッションスイッチが含まれ、前記検出装置8には、エンジンの回転センサや負荷センサなどが含まれる。
Examples of the various input signals include operation signals from various operation devices 7 and detection signals from a detection device 8 that detects a driving state of the vehicle.
When the automobile electronic control device 1 is a device for controlling an engine, the operation device 7 includes an engine ignition switch, and the detection device 8 includes an engine rotation sensor, a load sensor, and the like. .

前記フラッシュメモリ2に対して制御定数及び制御プログラムを記憶させた後、前記制御定数及び/又は制御プログラムが更新(バージョンアップ)された場合に、前記フラッシュ書き換えプログラムによって制御定数及び/又は制御プログラムを書き換えることで、自動車用電子制御装置1のバージョンを更新させることができるようになっている。
前記書き換えを行う際には、図1に示すように、書き換え用の外部ツールであるフラッシュ書き込みツール5を、前記自動車用電子制御装置1に対して通信回線6を介して接続する。
After the control constant and the control program are stored in the flash memory 2, when the control constant and / or the control program is updated (upgraded), the flash rewrite program executes the control constant and / or the control program. By rewriting, the version of the automotive electronic control device 1 can be updated.
When performing the rewriting, as shown in FIG. 1, a flash writing tool 5, which is an external tool for rewriting, is connected to the automobile electronic control device 1 via a communication line 6.

フラッシュ書き込みツール5と前記自動車用電子制御装置1とが接続された状態で、前記自動車用電子制御装置1側で前記フラッシュ書き換えプログラムが実行されると、前記自動車用電子制御装置1と前記フラッシュ書き込みツール5との間で通信が行われ、前記フラッシュ書き込みツール5に備えられたフラッシュメモリ5aに保存されている新たなバージョンの制御定数及び/又は制御プログラムが前記自動車用電子制御装置1に読み込まれ、前記ブロックB,Cに格納される制御定数及び/又は制御プログラムが新たなバージョンのものに書き換えられる。   When the flash rewriting program is executed on the vehicle electronic control device 1 side in a state where the flash writing tool 5 and the vehicle electronic control device 1 are connected, the vehicle electronic control device 1 and the flash writing are executed. Communication with the tool 5 is performed, and a new version of the control constant and / or control program stored in the flash memory 5a provided in the flash writing tool 5 is read into the automotive electronic control device 1. The control constants and / or control programs stored in the blocks B and C are rewritten with new versions.

尚、前記フラッシュ書き込みツール5を用いた制御定数・制御プログラムの書き換え時においても、新たに書き込まれた制御定数・制御プログラムのバージョンを示す識別情報IDがブロックB,Cに記憶されるようにしてある。
換言すれば、バージョンを示す識別情報IDが予め制御定数・制御プログラムに付与されており、この識別情報IDが付与された制御定数・制御プログラムが、前記フラッシュメモリ2に記憶されるようになっている。
Even when the control constant / control program is rewritten using the flash writing tool 5, the identification information ID indicating the newly written control constant / control program version is stored in the blocks B and C. is there.
In other words, the identification information ID indicating the version is previously assigned to the control constant / control program, and the control constant / control program to which the identification information ID is assigned is stored in the flash memory 2. Yes.

ここで、前記フラッシュ書き込みツール5による制御定数・制御プログラムの書き換え処理の様子を、図2のフローチャートに従って説明する。
フラッシュ書き込みツール5を自動車用電子制御装置1に接続した状態で、自動車用電子制御装置1がフラッシュ書き込みツール5からの書き込み要求を判断すると、前記フラッシュ書き換えプログラムが実行され、自動車用電子制御装置1がフラッシュ書き換えモードに移行する(ステップS101)。
Here, how the flash writing tool 5 rewrites control constants and control programs will be described with reference to the flowchart of FIG.
When the automotive electronic control device 1 determines a write request from the flash writing tool 5 with the flash writing tool 5 connected to the automotive electronic control device 1, the flash rewriting program is executed, and the automotive electronic control device 1. Shifts to the flash rewrite mode (step S101).

そして、フラッシュ書き換えモードでは、フラッシュ書き込みツール5と自動車用電子制御装置1との間での通信によって書き換え処理が行われ、まず、書き換えを行う領域を判断する(ステップS102)。
そして、制御定数のみを書き換える場合には、ブロックBを消去してから、フラッシュ書き込みツール5から送信される新たなバージョンの制御定数を、そのバージョンを示す識別情報IDと共にブロックBに書き込む(ステップS103)。
In the flash rewrite mode, rewrite processing is performed by communication between the flash writing tool 5 and the automotive electronic control device 1, and first, an area to be rewritten is determined (step S102).
When rewriting only the control constant, after erasing the block B, a new version of the control constant transmitted from the flash writing tool 5 is written into the block B together with the identification information ID indicating the version (step S103). ).

一方、制御定数と共に制御プログラムを書き換える場合には、ブロックBを消去してから、フラッシュ書き込みツール5から送信される新たなバージョンの制御定数を、そのバージョンを示す識別情報IDと共にブロックBに書き込み、更に、ブロックCを消去してから、フラッシュ書き込みツール5から送信される新たなバージョンの制御プログラムを、そのバージョンを示す識別情報IDと共にブロックCに書き込む(ステップS104)。   On the other hand, when rewriting the control program together with the control constant, after erasing the block B, a new version of the control constant transmitted from the flash writing tool 5 is written into the block B together with the identification information ID indicating the version, Further, after erasing the block C, a new version of the control program transmitted from the flash writing tool 5 is written into the block C together with the identification information ID indicating the version (step S104).

尚、各ブロックにおける消去・書き込みの順番は、上記のブロックB→ブロックCの順に限定されるものでないことは明らかであり、ブロックC→ブロックBの順で消去・書き込みを行わせることができる。
各ブロックのフラッシュメモリ内の配置も、上記の順に限るものではない。
また、制御プログラムのみを書き換える場合には、ブロックCを消去してから、フラッシュ書き込みツール5から送信される新たなバージョンの制御プログラムを、そのバージョンを示す識別情報IDと共にブロックCに書き込む(ステップS105)。
It is obvious that the order of erasing / writing in each block is not limited to the order of block B → block C, and erasing / writing can be performed in the order of block C → block B.
The arrangement of the blocks in the flash memory is not limited to the above order.
When rewriting only the control program, after erasing the block C, a new version of the control program transmitted from the flash writing tool 5 is written in the block C together with the identification information ID indicating the version (step S105). ).

上記のように、制御定数と制御プログラムとの双方が同時にバージョンアップされ、制御定数と共に制御プログラムを同時に書き換える場合には、制御定数のバージョンと制御プログラムのバージョンとが書き換え後も一致することになるが、例えば、制御定数のみ又は制御プログラムのみを書き換える場合には、フラッシュ書き込みツール5側にバージョン情報の確認機能がないと、書き換えない制御プログラムのバージョンと、書き換えられる制御定数のバージョンとが一致しなくなる可能性がある。   As described above, when both the control constant and the control program are upgraded at the same time, and the control program is rewritten at the same time as the control constant, the version of the control constant and the version of the control program match even after rewriting. However, for example, when only the control constant or only the control program is rewritten, the version of the control program that is not rewritten matches the version of the control constant that is rewritten unless the flash writing tool 5 has a version information confirmation function. There is a possibility of disappearing.

ここで、制御プログラムのバージョンと制御定数のバージョンとが異なることで、例えば、実際に制御定数が書き込まれているアドレスと、制御プログラムが読みに行くアドレスとがずれると、制御ルーチンが無限ループになったり、0での割り算が発生したり、通信設定の初期値やレジスタの設定値が変わったりすることで、制御の異常動作や、リセット・通信の不能が生じ、引いては、再書き換えを行うことが不可能になってしまう。   Here, because the version of the control program is different from the version of the control constant, for example, if the address where the control constant is actually written deviates from the address where the control program goes to read, the control routine enters an infinite loop. , Division by zero, or the initial value of the communication setting or the register setting value may change, resulting in abnormal control operation or reset / communication failure. It becomes impossible to do.

そこで、本実施形態では、フラッシュメモリ2に格納されている制御プログラムと制御定数とのバージョンが、誤った書き換えによって不一致になっても、フラッシュメモリ2の再書き換えが行えるようにしてあり、再書き換えを可能にするための処理を、図3のフローチャートに従って説明する。
まず、前記自動車用電子制御装置1が起動(パワーオンリセット)されると(ステップS201)、フラッシュメモリ2に対する制御プログラム及び/又は制御定数の書き込みが正常に行われていて、かつ、制御プログラムのバージョンを示す識別情報IDと、制御定数のバージョンを示す識別情報IDとが一致していて、制御プログラムと制御定数とが適合しているかを判別する(ステップS202)。
Therefore, in this embodiment, even if the versions of the control program and the control constant stored in the flash memory 2 become inconsistent due to erroneous rewriting, the flash memory 2 can be rewritten and rewritten. A process for enabling the above will be described with reference to the flowchart of FIG.
First, when the automotive electronic control device 1 is activated (power-on reset) (step S201), the control program and / or control constants are normally written to the flash memory 2, and the control program It is determined whether the identification information ID indicating the version matches the identification information ID indicating the version of the control constant, and the control program and the control constant match (step S202).

書き換えが正常に完了した場合に、書換えの正常完了を示す識別情報をブロックB,C毎に記憶させるようにしておき、前記正常完了識別情報を判別することで、書き込みが正常に行われたか否かの判断を行う。
また、制御プログラムのバージョンを示す識別情報IDと、制御定数のバージョンを示す識別情報IDとが一致しているか否かは、ブロックB,C毎に記憶されるバージョンを示す識別情報IDを読み出して照合することで判断される。
When rewriting is normally completed, identification information indicating the normal completion of rewriting is stored for each of the blocks B and C, and whether or not writing has been normally performed by determining the normal completion identification information. Judgment is made.
Whether the identification information ID indicating the version of the control program matches the identification information ID indicating the version of the control constant is determined by reading the identification information ID indicating the version stored for each of the blocks B and C. Judged by matching.

尚、書き込みが正常に完了したときに、バージョンを示す識別情報IDを記憶させるようにして、バージョンを示す識別情報IDが何ら記憶されていないときに、書き込みが正常に行われなかったことを判定させることができる。
書き込みが正常に完了していて、しかも、制御プログラムのバージョンと制御定数のバージョンとが一致している場合には、正常に制御プログラムを実行させることができるので、通常に制御プログラム(アプリケーションプログラム)を実行させる(ステップS203)。
When the writing is completed normally, the identification information ID indicating the version is stored, and when no identification information ID indicating the version is stored, it is determined that the writing has not been performed normally. Can be made.
If the writing is completed normally and the version of the control program matches the version of the control constant, the control program can be executed normally, so that the control program (application program) is normally executed. Is executed (step S203).

一方、書き込みが正常に完了していない場合には、たとえバージョンが一致していても、正常な制御動作を行わせることができないので、再度の書き込み動作によって書き込みを正常に完了させるべく、フラッシュ書き換えプログラム(メモリ書き換えプログラム)を実行させる(ステップS204)。
また、制御プログラムのバージョンと制御定数のバージョンとが一致していない場合には、たとえ制御プログラム及び/又は制御定数の書き換えが正常に完了していても、正常な制御動作を行わせることができないので、この場合も、フラッシュ書き換えプログラム(メモリ書き換えプログラム)を実行させる(ステップS204)。
On the other hand, if writing has not been completed normally, even if the versions match, normal control operation cannot be performed, so flash rewriting is required to complete writing normally by re-writing operation. A program (memory rewriting program) is executed (step S204).
In addition, when the version of the control program and the version of the control constant do not match, normal control operation cannot be performed even if rewriting of the control program and / or control constant is completed normally. Therefore, also in this case, the flash rewrite program (memory rewrite program) is executed (step S204).

フラッシュ書き換えプログラム(メモリ書き換えプログラム)が実行されると、フラッシュ書き換え制御でフラッシュ書き込みツール5との間での通信が行われ、前記図2のフローチャートに示すような書き込み処理によって、正しいバージョンの制御プログラム及び/又は制御定数への再書き換えが可能となる。
例えば、制御プログラムのバージョンに対して、制御定数のバージョンが古い場合には、制御プログラムのバージョンに対応するバージョンの制御定数に書き換えることで、制御プログラムを正常に動作させることができるようになる。
When the flash rewrite program (memory rewrite program) is executed, communication with the flash writing tool 5 is performed in the flash rewrite control, and the correct version of the control program is performed by the write processing shown in the flowchart of FIG. And / or rewriting to the control constant becomes possible.
For example, if the version of the control constant is older than the version of the control program, the control program can be operated normally by rewriting the version of the control constant corresponding to the version of the control program.

上記実施形態によれば、フラッシュ書き込みツール5側からの書き換え要求を判断することなく、バージョンの不一致に基づいてフラッシュ書き換えプログラム(メモリ書き換えプログラム)が実行されるから、たとえバージョンの不一致によって前記制御プログラムが正常に動作しない状況であっても、フラッシュ書き換えプログラムを動作させて再書き換えを可能にできる。   According to the above embodiment, the flash rewrite program (memory rewrite program) is executed based on the version mismatch without determining the rewrite request from the flash writing tool 5 side. Even if the system does not operate normally, it can be rewritten by running the flash rewrite program.

従って、バージョンが一致しない制御定数に書き換えてしまっても、制御異常・書き換え不能になって、自動車用電子制御装置1の交換が必要になることがない。
また、バージョンの不一致によって制御異常になっても、ブートピンへの信号入力によって書き換えを可能にする必要がないので、ブートピンを設ける必要がなく、ブートピンを削除した例えば防水仕様の自動車用電子制御装置1においても、バージョンの不一致による装置交換が不要となる。
Therefore, even if the version is rewritten to a control constant whose version does not match, the control abnormality / rewriting cannot be performed, and the automobile electronic control device 1 does not need to be replaced.
Further, even if a control error occurs due to a version mismatch, there is no need to enable rewriting by inputting a signal to the boot pin, so there is no need to provide a boot pin, and the waterproof electronic electronic control device 1 with a waterproof specification, for example, is deleted. In this case, it is not necessary to replace the apparatus due to version mismatch.

尚、例えば、制御プログラムのバージョンに対して、適合可能な制御定数のバージョンが複数存在する場合には、前記複数の適合バージョンのうちの1つであれば、当然にこれを適合と見なして、再書き換えを行わせる必要はない。
また、制御定数と制御プログラムのバージョンの不一致によって、前記フラッシュ書き換えプログラムを実行させた場合に、フラッシュメモリ2に書き込むべきバージョンの情報を、フラッシュ書き込みツール5側に送信し、これを表示させることができる。
For example, when there are a plurality of control constant versions that can be adapted to the version of the control program, if it is one of the plurality of conforming versions, this is naturally regarded as conforming, There is no need to rewrite.
Also, when the flash rewrite program is executed due to a mismatch between the control constant and the control program version, information on the version to be written to the flash memory 2 can be transmitted to the flash writing tool 5 and displayed. it can.

実施形態における自動車用電子制御装置のシステム図。The system diagram of the electronic controller for vehicles in an embodiment. 実施形態における書き換え処理を示すフローチャート。The flowchart which shows the rewriting process in embodiment. 実施形態におけるバージョン判断によるフラッシュ書き換えプログラムの実行処理を示すフローチャート。6 is a flowchart showing execution processing of a flash rewrite program based on version determination in the embodiment.

符号の説明Explanation of symbols

1…自動車用電子制御装置、2…フラッシュメモリ、3…RAM、4…マイコン、5…フラッシュ書き込みツール、7…操作装置、8…検出装置   DESCRIPTION OF SYMBOLS 1 ... Electronic control apparatus for motor vehicles, 2 ... Flash memory, 3 ... RAM, 4 ... Microcomputer, 5 ... Flash writing tool, 7 ... Operation apparatus, 8 ... Detection apparatus

Claims (5)

電気的にデータの消去及び書き込みが可能な不揮発性メモリであって、メモリ書き換えプログラムと制御プログラムと該制御プログラムに用いる制御定数とがそれぞれの領域に格納される不揮発性メモリを備えた自動車用電子制御装置であって、
起動時に前記制御プログラムと前記制御定数との適合を判断し、適合する場合には前記制御プログラムを実行し、適合しない場合には前記メモリ書き換えプログラムを実行することを特徴とする自動車用電子制御装置。
A non-volatile memory capable of electrically erasing and writing data, and an automotive electronic device comprising a non-volatile memory in which a memory rewrite program, a control program, and control constants used for the control program are stored in respective areas A control device,
An electronic control apparatus for an automobile which determines conformity between the control program and the control constant at startup, executes the control program when it conforms, and executes the memory rewrite program when it does not conform .
前記制御プログラム及び制御定数がそれぞれに識別情報を持ち、これらの識別情報を照合することで、前記制御プログラムと前記制御定数との適合を判断することを特徴とする請求項1記載の自動車用電子制御装置。   2. The automobile electronic device according to claim 1, wherein the control program and the control constant each have identification information, and matching of the control program and the control constant is determined by collating the identification information. Control device. 前記制御プログラム及び制御定数における識別情報が、バージョン情報であることを特徴とする請求項2記載の自動車用電子制御装置。   3. The electronic control apparatus for an automobile according to claim 2, wherein the identification information in the control program and the control constant is version information. 前記制御プログラムと前記制御定数とが適合しない場合に前記メモリ書き換えプログラムを実行すると共に、前記制御プログラム及び/又は前記制御定数の書き込みが正常に完了していない場合にも前記メモリ書き換えプログラムを実行することを特徴とする請求項1〜3のいずれか1つに記載の自動車用電子制御装置。   The memory rewriting program is executed when the control program and the control constant do not match, and the memory rewriting program is also executed when the writing of the control program and / or the control constant is not normally completed. The automobile electronic control device according to any one of claims 1 to 3. 前記メモリ書き換えプログラムによって、前記自動車用電子制御装置に接続される外部の書き換えツールとの間で通信を行い、前記制御プログラム及び/又は制御定数を書き換えることを特徴とする請求項1〜4のいずれか1つに記載の自動車用電子制御装置。   5. The communication program according to claim 1, wherein the memory rewriting program communicates with an external rewriting tool connected to the automobile electronic control device to rewrite the control program and / or the control constant. The electronic control apparatus for motor vehicles described in any one.
JP2007190666A 2007-07-23 2007-07-23 Electronic control apparatus for automobile Pending JP2009026183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007190666A JP2009026183A (en) 2007-07-23 2007-07-23 Electronic control apparatus for automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007190666A JP2009026183A (en) 2007-07-23 2007-07-23 Electronic control apparatus for automobile

Publications (1)

Publication Number Publication Date
JP2009026183A true JP2009026183A (en) 2009-02-05

Family

ID=40397916

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007190666A Pending JP2009026183A (en) 2007-07-23 2007-07-23 Electronic control apparatus for automobile

Country Status (1)

Country Link
JP (1) JP2009026183A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212272A (en) * 2011-03-31 2012-11-01 Keihin Corp Electronic control device for vehicle
JP2013123983A (en) * 2011-12-14 2013-06-24 Hino Motors Ltd Vehicle control device for prevention of neutral lock release
CN102736586B (en) * 2012-05-21 2016-12-14 奇瑞新能源汽车技术有限公司 The entire car controller of a kind of pure electric automobile and system boot method
WO2021186987A1 (en) * 2020-03-16 2021-09-23 Fdk株式会社 Control device and method for rewriting control program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0651961A (en) * 1992-07-28 1994-02-25 Chubu Nippon Denki Software Kk Version managing system in program collection/delivery system
JPH09128229A (en) * 1995-11-06 1997-05-16 Denso Corp Electronic controller
JP2002055837A (en) * 2000-08-08 2002-02-20 Nippon Signal Co Ltd:The Data processing system and its manufacturing method
JP2006202203A (en) * 2005-01-24 2006-08-03 Denso Corp Ecu, data writing program, and data writing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0651961A (en) * 1992-07-28 1994-02-25 Chubu Nippon Denki Software Kk Version managing system in program collection/delivery system
JPH09128229A (en) * 1995-11-06 1997-05-16 Denso Corp Electronic controller
JP2002055837A (en) * 2000-08-08 2002-02-20 Nippon Signal Co Ltd:The Data processing system and its manufacturing method
JP2006202203A (en) * 2005-01-24 2006-08-03 Denso Corp Ecu, data writing program, and data writing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212272A (en) * 2011-03-31 2012-11-01 Keihin Corp Electronic control device for vehicle
JP2013123983A (en) * 2011-12-14 2013-06-24 Hino Motors Ltd Vehicle control device for prevention of neutral lock release
CN102736586B (en) * 2012-05-21 2016-12-14 奇瑞新能源汽车技术有限公司 The entire car controller of a kind of pure electric automobile and system boot method
WO2021186987A1 (en) * 2020-03-16 2021-09-23 Fdk株式会社 Control device and method for rewriting control program
JP7477328B2 (en) 2020-03-16 2024-05-01 Fdk株式会社 Control device and control program rewriting method

Similar Documents

Publication Publication Date Title
JP5176728B2 (en) Electronic control device for vehicle
JP2003256228A (en) Program rewriting device
US8036786B2 (en) On-vehicle control apparatus
JP4552982B2 (en) Electronic control unit
JP2006323776A (en) Information processor
JP2006268176A (en) Data validity/invalidity deciding method for flash eeprom
JP4973642B2 (en) In-vehicle electronic control unit
JP2009026183A (en) Electronic control apparatus for automobile
JP4001088B2 (en) Electronic control unit
JP6415990B2 (en) Electronic control unit for automobile
US7869917B2 (en) Vehicle control apparatus and control method of same
JP2005338955A (en) Electronic control device
US11169828B2 (en) Electronic control unit and method for verifying control program
JP6869743B2 (en) Electronic control device for automobiles
JP2019008693A (en) Vehicle-purpose electronic control unit
US20050034034A1 (en) Control device with rewriteable control data
JP5516509B2 (en) Program writing system
JP2003271420A (en) Electronic control device
JPH09171459A (en) Electronic control equipment
JP2000257502A (en) Electronic controller for automobile
JP6699591B2 (en) Engine controller
JP2002323990A (en) Electronic controller and method for initializing nonvolatile memory
JP2014035729A (en) Vehicle control device
JP6952006B2 (en) Electronic control device for vehicles and starting method
JP4812278B2 (en) Data rewriting method for electronic control unit

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20090925

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090925

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120207

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120330

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120515