JP4647010B2 - Electronic control unit - Google Patents
Electronic control unit Download PDFInfo
- Publication number
- JP4647010B2 JP4647010B2 JP2009016665A JP2009016665A JP4647010B2 JP 4647010 B2 JP4647010 B2 JP 4647010B2 JP 2009016665 A JP2009016665 A JP 2009016665A JP 2009016665 A JP2009016665 A JP 2009016665A JP 4647010 B2 JP4647010 B2 JP 4647010B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- section
- constant
- memory
- written
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7202—Allocation control and policies
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/10—Programming or data input circuits
- G11C16/102—External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Description
この発明は、マイクロプロセッサと協働する揮発性のRAMメモリと不揮発データメモリを備え、RAMメモリに格納された学習制御定数を不揮発データメモリに退避しておくように構成された例えば車載エンジンの制御装置或いは変速機制御装置などの電子制御装置に関し、不揮発データメモリとして使用されたフラッシュメモリの一括消去回数を抑制するための改良に関するものである。 The present invention includes a volatile RAM memory and a non-volatile data memory that cooperate with a microprocessor, and is configured to save a learning control constant stored in the RAM memory in the non-volatile data memory, for example. The present invention relates to an electronic control device such as a device or a transmission control device, and relates to an improvement for suppressing the number of batch erases of a flash memory used as a nonvolatile data memory.
入力信号回路と出力信号回路とが接続されるマイクロプロセッサと、当該マイクロプロセッサと協働する不揮発プログラムメモリと揮発性のRAMメモリと不揮発データメモリとを備え、前記不揮発プログラムメモリに転送書込みされた入出力制御プログラムと、前記不揮発データメモリに格納された制御定数の値と、前記入力信号回路の信号状態に応動して前記出力信号回路に制御出力信号を送出する電子制御装置であって、前記不揮発データメモリとしてブロック単位で個別に一括消去が可能な複数の分割ブロックを有するフラシュメモリを使用することは公知である。 A microprocessor connected to the input signal circuit and the output signal circuit; a non-volatile program memory cooperating with the microprocessor; a volatile RAM memory; and a non-volatile data memory. An electronic control device for sending a control output signal to the output signal circuit in response to an output control program, a value of a control constant stored in the nonvolatile data memory, and a signal state of the input signal circuit, the nonvolatile memory As a data memory, it is known to use a flash memory having a plurality of divided blocks that can be individually erased in units of blocks.
又、従来、フラッシュメモリに代わるものとして、1バイト(8ビット)単位で電気的に読書が行えるEEPROMメモリを使用したものもあるが、フラッシュメモリの場合には安価で大容量のメモリ容量を得ることができる反面で、データの書込・書換を行う前に多数バイトのブロック単位で一括消去を行う必要があることと、一括消去の回数が寿命的に制限されている問題がある。 Conventionally, as an alternative to the flash memory, there is an EEPROM memory that can electrically read in units of 1 byte (8 bits). However, in the case of a flash memory, an inexpensive and large-capacity memory capacity is obtained. On the other hand, there is a problem that it is necessary to perform batch erase in units of blocks of many bytes before data writing / rewriting, and the number of batch erases is limited in terms of lifetime.
例えば下記の特許文献1「車載電子制御装置」によれば、不揮発フラッシュメモリの第一ブロックはプログラムメモリとして使用され、第二・第三ブロックがデータメモリとして使用されていて、取り扱われる制御定数は次のとおりに分類されている。先ず、制御装置固有情報は、車載電子制御装置に内蔵された定電圧電源装置の出力電圧精度やAD変換器の変換精度等の部品バラツキを補正するための校正値情報であって、製品個々では異なる値であっても初期測定値として一旦格納されるとその後の変化が無い半固定制御定数である。
For example, according to the following
次に、車両固有情報は、車載電子制御装置が搭載された車両の制御仕様を選択決定するための車種情報或いは車載電子制御装置に外部接続された車載センサの特性精度情報等の環境情報であって、搭載車両の個々では異なる値であっても初期値又は初期測定値として一旦格納されると外部接続された部品の交換が行われるまではその後の変化が無い制御定数であり、可変制御定数又は半固定制御定数の何れかに属して扱われる。 Next, the vehicle-specific information is environmental information such as vehicle type information for selecting and determining a control specification of a vehicle on which the vehicle-mounted electronic control device is mounted, or characteristic accuracy information of a vehicle-mounted sensor externally connected to the vehicle-mounted electronic control device. Even if it is a different value for each vehicle, once it is stored as an initial value or initial measured value, it is a control constant that does not change thereafter until the externally connected parts are replaced. Or they belong to either semi-fixed control constants.
更に、学習記憶情報は、車両の運転特性を実測した結果として得られる運転制御情報、或いは車載センサ・電気負荷の特性劣化情報等の変動情報であって、運転開始時に初期値として一旦格納された後、所定範囲内での変動が想定される可変制御定数である。又、異常発生履歴情報は、車両の運転中に発生した各種の異常情報を異常発生区分に基づいて集計した区分別の異常発生回数データであって、一種の可変制御定数として扱われている。 Further, the learning storage information is driving control information obtained as a result of actually measuring the driving characteristics of the vehicle, or fluctuation information such as on-vehicle sensor / electric load characteristic deterioration information, and is temporarily stored as an initial value at the start of driving. Thereafter, the variable control constant is assumed to fluctuate within a predetermined range. The abnormality occurrence history information is data on the number of occurrences of abnormality for each category obtained by aggregating various types of abnormality information generated during the operation of the vehicle based on the category of occurrence of abnormality, and is handled as a kind of variable control constant.
又、基準データは、前記半固定制御定数又は可変制御定数に対する許容上下限値と初期設定値となる初期値データであって、これは固定制御定数として扱われる。更に、プログラム固有情報は、入出力制御プログラムに付随して決定された一定不変の設計定数となる固定制御定数である。 The reference data is initial value data that is an allowable upper / lower limit value and an initial set value for the semi-fixed control variable or the variable control constant, and is treated as a fixed control constant. Further, the program specific information is a fixed control constant that is a constant design constant determined in association with the input / output control program.
前記第一ブロックには外部ツールから入出力制御プログラムと共に固定制御定数が格納され、車載電子制御装置の出荷調整運転後に半固定制御定数が追加格納される。 In the first block, fixed control constants are stored together with an input / output control program from an external tool, and semi-fixed control constants are additionally stored after the shipment adjustment operation of the in-vehicle electronic control device.
前記第二・第三ブロックの一方には可変制御定数のみが格納され、第二ブロック又は第三ブロックの一方のブロックに逐次追加書込みされた書込み回数が所定値に達した満杯状態で、他方のブロックに書込みされていた全てのデータを消去してから当該他方のブロックに対して逐次追加書込みされるように構成されている。従って、書込み頻度が少ない固定制御定数と半固定制御定数を第一ブロックに書込むことによって、第二・第三ブロックに書込まれるデータ量を削減して、可変制御定数をなるべく多くの回数で追加書込みすることができるように構成されている。 Only the variable control constant is stored in one of the second and third blocks, and when the number of times the additional writing is sequentially performed in one of the second block or the third block reaches a predetermined value, After all data written in the block is erased, additional writing is sequentially performed on the other block. Therefore, by writing fixed control constants and semi-fixed control constants with low writing frequency to the first block, the amount of data written to the second and third blocks is reduced, and variable control constants are made as many times as possible. It is configured so that additional writing can be performed.
尚、特許文献1に於いて、第一ブロックに書込まれる固定・半固定制御定数は、後述の本願発明に於ける第一・第二定数に相当し、第二・第三ブロックの一方に交替書込みされる可変制御定数は本願における第三定数に相当している。
In
更に、下記の特許文献2「フラッシュメモリの書込み回数の増加方法」には、データ記憶領域がセクタ単位(一括消去が可能な最小単位であり本願発明に於けるブロックに相当する)に分割され、前記セクタ単位でデータ消去可能なフラッシュメモリを備え、組込まれたマイクロプロセッサにより内部回路が制御される制御装置に於いて、フラッシュメモリのセクタA〜Fには制御プログラムが書込まれ、セクタGには書換頻度が少ない生産時に設定される行程調整データが書込まれ、セクタHには書換頻度が多いユーザ調整データが書込まれるようにした制御装置が示されている。
Furthermore, in the following
そして、特許文献2には、ユーザが使用時に該制御装置の最適動作を指示するため等の目的で随時与えるユーザ調整データを格納するため前記セクタHを、更に前記ユーザ調整データのデータサイズと等しいかそれ以上のサイズの記憶ブロック(書込/読出単位となるものであり本願発明に於けるセクションに相当する)に複数分割し、前記ユーザ調整データの更新毎に前記記憶ブロック単位で未書込み領域に順次前記ユーザ調整データの書込みを行い、未書込み領域が前記セクタ内に存在しない場合には、前記ユーザ調整データを格納している前記セクタ全体のデータを一括消去して再度前記ユーザ調整データの書込みを可能にするフラッシュメモリの書込み保証回数の増加方法が開示されている。
Further, in
この方法によれば、同一のフラッシュメモリに装置制御用のプログラムと装置の調整データを格納し、書換え頻度の高い調整データについては、フラッシュメモリの分割単位である1セクタを更に複数記憶ブロックに分割し、調整データの変更毎に未書込み記憶ブロックに書込んで行き、1セクタ分全て書込まれたら最新調整データをRAMメモリに退避させた後にそのセクタを一活消去して新たに記憶ブロック単位で書込めるようにすることにより、従来使用していたEEPROMが不要となり、コストダウン、部品点数の削減、高速データ読出しが可能となり、なおかつ書込み保証回数を実質的に大幅に増加させることができるので信頼性の高い制御装置を提供することが可能となるとされている。 According to this method, a device control program and device adjustment data are stored in the same flash memory. For adjustment data having a high rewrite frequency, one sector, which is a division unit of the flash memory, is further divided into a plurality of storage blocks. Each time adjustment data is changed, the data is written to an unwritten storage block. When all of one sector is written, the latest adjustment data is saved in the RAM memory, and then the sector is erased once and a new storage block unit is written. By making it possible to write in, it becomes unnecessary to use the EEPROM used in the past, cost reduction, reduction of the number of parts, high-speed data reading is possible, and the number of write guarantees can be substantially increased substantially. It is said that a highly reliable control device can be provided.
尚、特許文献2に於いて、セクタGに書込まれるステップ調整データは、後述の本願発明に於ける第一定数に相当し、セクタHに順次書込みされるユーザ調整データは本願に於ける第二定数に相当している。
In
(1) 従来技術の課題の説明
前記特許文献1による「車載電子制御装置」では、入出力制御プログラムが書込まれる第一ブロック内に固定制御定数と半固定制御定数とを書込みするように構成されているので、第二・第三ブロックのデータ量を削減することができるが、例えば保守点検を行うサービス店に於いて半固定制御定数を残したままで入出力制御プログラムのみを変更したり、入出力制御プログラムを残したままで半固定制御定数のみを一括変更することが困難となる問題点がある。
(1) Description of problems in the prior art The “on-vehicle electronic control device” according to
又、前記特許文献2による「フラッシュメモリの書込み保証回数の増加方法」によれば、制御プログラム領域と行程調整データ領域とユーザ調整データ領域とが異なる一括消去単位のセクタに書込まれているので、個別に書換変更することが容易となるけれども、未書込み領域がセクタ内に存在しない場合にセクタ全体のデータを一括消去した時点で停電すると、過去の調整データが消失する問題点がある。又、データ量の少ない行程調整データ領域のために専用のセクタGを配分する必要があって、メモリの利用効率が低下する問題点がある。
Further, according to the “method for increasing the guaranteed number of writing of flash memory” according to
(2)発明の目的の説明
この発明は、このような従来の装置に於ける問題点を解消して、フラッシュメモリである不揮発データメモリの利用効率を高め、一括消去回数を抑制して目標とする寿命を確保することができる電子制御装置を提供することを目的としてなされたものである。
(2) Description of the object of the invention The present invention eliminates the problems in the conventional apparatus, increases the use efficiency of the nonvolatile data memory, which is a flash memory, and suppresses the number of batch erases. The present invention has been made for the purpose of providing an electronic control device that can ensure a long service life.
この発明による電子制御装置は、
入力信号回路と出力信号回路とが接続されるマイクロプロセッサと、当該マイクロプロセッサと協働する不揮発プログラムメモリと揮発性のRAMメモリと不揮発データメモリとを備え、前記不揮発プログラムメモリに書込みされた入出力制御プログラムと、前記不揮発データメモリに格納された制御定数の値と、前記入力信号回路の信号状態とに応動して前記出力信号回路に制御出力信号を送出する電子制御装置であって、
前記不揮発データメモリは、ブロック単位で個別に一括消去が可能な複数の分割ブロックを有する不揮発性のメモリにより構成され、
前記各分割ブロックは、書込み頻度又は書込み時期が異なる複数のデータ格納領域に仕分けされ、
前記各データ格納領域は、読出/書込単位となる複数のセクションにより構成され、当該セクションには複数の個別データが所定順序で書込まれ、一つの前記セクションのデータ容量は、書込みされる個別データの個数に対応したバイト数に構成され、
前記複数のセクションには、対象となる前記分割ブロックの一括消去を行った後に順次新たなデータがセクション単位で格納され、当該対象分割ブロックの中のどれかのデータ格納領域が満杯となってデータが書込まれていない空セクションが無くなったときには、予め一括消去された他の分割ブロックの該当データ格納領域の先頭セクションに新たなデータが書込まれ、
元の分割ブロックの中の他のデータ格納領域に書込まれていた最新のデータは、新たな分割ブロックの該当データ格納領域の先頭セクションに転送格納され、
元の分割ブロック内のデータは、少なくとも前記新たな分割ブロックへの最新データの転送書込みが完了した後に一括消去されるものであると共に、
前記データ格納領域内のセクション数は、書込み頻度の多いものほど多くのセクションが割り当てられている
ことを特徴とするものである。
An electronic control device according to the present invention includes:
A microprocessor to which an input signal circuit and an output signal circuit are connected, a nonvolatile program memory that cooperates with the microprocessor, a volatile RAM memory, and a nonvolatile data memory, and an input / output written in the nonvolatile program memory An electronic control device for sending a control output signal to the output signal circuit in response to a control program, a value of a control constant stored in the nonvolatile data memory, and a signal state of the input signal circuit,
The non-volatile data memory is constituted by a non-volatile memory having a plurality of divided blocks that can be collectively erased in units of blocks,
Each of the divided blocks is sorted into a plurality of data storage areas having different writing frequencies or writing times,
Each of the data storage areas is composed of a plurality of sections serving as read / write units. A plurality of individual data is written in a predetermined order in the section, and the data capacity of one section is individually written. It is composed of the number of bytes corresponding to the number of data,
In the plurality of sections, new data is sequentially stored in section units after batch erasure of the target divided blocks, and any data storage area in the target divided blocks becomes full. When there is no empty section to which no data has been written, new data is written to the top section of the corresponding data storage area of another divided block that has been erased in advance,
The latest data written in the other data storage area in the original divided block is transferred and stored in the first section of the corresponding data storage area in the new divided block.
The data in the original divided block is erased at least after the transfer writing of the latest data to the new divided block is completed, and
The number of sections in the data storage area is such that a larger number of sections are allocated as the frequency of writing increases.
この発明による電子制御装置によれば、マイクロプロセッサと協働する不揮発データメモリとして、ブロック単位で個別に一括消去が可能な複数の分割ブロックを有する不揮発メモリが使用され、各分割ブロックは更に複数のセクションで構成された複数のデータ格納領域に仕分けされ、各データ格納領域内のセクションの数は書込み頻度の多いものほど多くのセクションが割り当てられているので、入出力プログラムと同じブロックに書き込まれていた半固定制御定数を不揮発データメモリの分割ブロック内のひとつのデータ格納領域に保存することが可能となり、半固定制御定数を残したままで入出力プログラムのみを変更したり、入出力制御プログラムを残したままで半固定定数のみを一括変更することが可能となる。 According to the electronic control unit of the present invention, as the nonvolatile data memory that cooperates with the microprocessor, a nonvolatile memory having a plurality of divided blocks that can be individually erased in units of blocks is used, and each divided block further includes a plurality of divided blocks. As the number of sections in each data storage area is allocated more frequently, the more sections are allocated, the data is written in the same block as the I / O program. Semi-fixed control constants can be stored in a single data storage area in a non-volatile data memory division block, and only the I / O program can be changed while the semi-fixed control constants are left. It is possible to change only the semi-fixed constants at once.
更に、書込み頻度の少ない半固定制御定数を保存するデータ格納領域のセクション数を少なく設定することにより、特定のデータ格納領域において空きセクションが無くなって、新たな分割ブロックへ移行するときに、他のデータ格納領域に残された空きセクションは残りが少なくなっていて、不必要な一括消去が行われる空セクションの数が削減され、全体としてフラッシュメモリの一括消去回数を削減して、その寿命を延長することができる効果がある。 Furthermore, by setting the number of sections in the data storage area for storing semi-fixed control constants with low writing frequency, when there is no empty section in a specific data storage area and a transition is made to a new divided block, The number of empty sections remaining in the data storage area is small, and the number of empty sections that are erased unnecessarily at one time is reduced. As a whole, the number of times flash memory is erased is reduced, extending its lifetime. There is an effect that can be done.
又、複数の分割ブロック間では最新データの転送保存を行ってから元の分割ブロックが一括消去されるので、転送処理中に停電したような場合にデータが消失しない効果がある。 In addition, since the original divided block is erased all at once after the latest data is transferred and stored between a plurality of divided blocks, there is an effect that data is not lost when a power failure occurs during the transfer process.
実施の形態1.
(1)構成の詳細な説明
以下、この発明の実施の形態1による電子制御装置の構成を、その全体構成を示すブロック図である図1と、不揮発データメモリのセクション構成図である図2に基づいて詳細に説明する。
(1) Detailed Description of Configuration Hereinafter, the configuration of the electronic control device according to
先ず、図1に於いて、電子制御装置100Aは、マイクロプロセッサ110Aと不揮発プログラムメモリ111Aと、揮発性のRAMメモリ112Aと、フラッシュメモリである不揮発データメモリ113Aを主体として構成され、実態としては例えばエンジン制御装置等の車載電子制御装置を構成しており、車載バッテリである外部電源101Aから電源リレー102を介して給電されている。尚、電源リレー102は、図示しない電源スイッチが投入されると即時に閉路し、電源スイッチが遮断されると所定の遅延給電期間をおいてから開路するように構成されている。
First, in FIG. 1, an
入力信号回路103は、図示しないコネクタを介して接続された開閉センサ或いはアナログセンサであり、当該入力信号回路103は、図示しない入力インタフェース回路と入力信号バス130を介してマイクロプロセッサ110Aに接続されている。出力信号回路104は、図示しないコネクタを介して接続された駆動機器或いは表示器等の電気負荷であり、当該出力信号回路104は、図示しない出力インタフェース回路と出力信号バス140を介してマイクロプロセッサ110Aに接続されている。
The
第一ツール105Aは、電子制御装置100Aの出荷調整・検査或いは保守点検時に、シリアル信号バス150を介してマイクロプロセッサ110Aに対して接続されるものであり、当該第一ツール105Aは、図示しないキーボード、及び表示器を備えた携帯機器により構成されている。第二ツール106Aは、第一ツール105Aに代わって電子制御装置100Aにシリアル接続されるものであり、当該第二ツール106Aは、電子制御装置100Aが組みまれる車両等の合体製品の製造メーカが当該合体製品の出荷調整を行う時点に於いて出荷調整設備として準備されものであるか、或いは電子制御装置100Aを使用するユ−ザの設備管理部門が、設備の据付調整時点で使用するものであって、図示しないキーボード、表示器を備えた携帯機器により構成されている。尚、設備管理部門と合体製品の製造メーカとは同じ範疇のものであり、以下の説明では、これらを合体製品の製造メーカと称して説明する。
The first tool 105A is connected to the
又、第二ツール106Aは、第一ツール105Aと同様の構成であり、例えば電子制御装置100Aの製造メーカから提供され、単に機能を分担して使用されるものとなっている。第一ツール105Aには電子制御装置100Aで使用される入出力制御制御プログラム107Aが格納されており、マイクロプロセッサ110AはマスクROMメモリ111aに格納されたブートプログラムによって当該入出力制御プログラム107Aを不揮発プログラムメモリ111Aへ転送するように構成されている。
The
尚、入出力制御制御プログラム107Aは、第一ツール105Aと第二ツール106Aとに対する交信処理プログラムを包含している。又、入出力制御制御プログラム107Aは、当該入出力制御プログラム107Aに対して一定不変の固定定数を包含すると共に、不揮発データメモリ112Aに格納される後述の第一定数108a、第二定数108b、第三定数108cに関連する参考定数107aとを包含している。
The input / output
この参考定数107aは、第一定数108a、第二定数108b、第三定数108cの中の変動情報の一部、又は運転特性の学習情報の一部に関する許容変動範囲である上下限値データと、前記第一定数108a、第二定数108b、第三定数108cの中の未確定定数に対して適用される初期設定データであり、当該初期値設定データは、少なくとも前記電子制御装置100Aの初回運転開始前に後述の第1分割ブロック113a、第2分割ブロック113b、第3分割ブロック113c、第4分割ブロック113dの一つの中の第一定数領域S10、第二定数領域S20、第三定数領域S300の先頭セクションに転送格納されるように構成されている。
This reference constant 107a includes upper and lower limit value data that is an allowable fluctuation range relating to a part of fluctuation information in the first constant 108a, the second constant 108b, and the third constant 108c, or a part of learning information of driving characteristics. , Initial setting data applied to uncertain constants among the first constant 108a, the second constant 108b, and the third constant 108c. The initial value setting data is at least the first time of the
第一ツール105Aは、更に、不揮発データメモリ113Aに転送される第一定数108aを包含し、当該第一定数108aは、前記電子制御装置100A自体の機種区分に対応した制御定数又は入出力制御プログラム107Aの一部の選択番号情報、或いは当該電子制御装置100Aの内部の部品特性のバラツキ変動を補正するための校正定数、当該電子制御装置の製造番号などの制御装置固有情報となっている。尚、入出力制御プログラム107Aは、様々な制御仕様を想定した様々な部分プログラムや定数テーブルを備えており、現実の制御仕様に対応してどの部分プログラムや定数テーブルを選択使用するのかを決定するのが前記選択番号情報の意味である。
The first tool 105A further includes a first constant 108a transferred to the
第一定数108aは、第一ツール105Aに設けられた転送用の操作キーを押した時点で第一ツール105Aから不揮発データメモリ113Aへ転送されるか、又は、第一ツール105Aの転送用の操作キーを押したときにRAMメモリ112Aへ転送され、電子制御装置100Aに対する電源スイッチが開路されて、電源リレー102による遅延給電が行われているタイミングでRAMメモリ112Aから不揮発データメモリ113Aへ転送される。
The first constant 108a is transferred from the first tool 105A to the
第二ツール106Aは、不揮発データメモリ113Aに転送される第二定数108bを包含し、当該第二定数108bは、電子制御装置100Aが組込まれる合体製品・設備の型名・機種に対応した制御定数、又は入出力制御プログラム107Aの一部の選択番号情報、或いは前記電子制御装置100Aに接続された入出力部品の部品特性のバラツキ変動を補正する校正定数などの合体製品固有情報となっている。
The
第二定数108bの転送タイミングは第一定数108aの場合と同様であり、第二ツール106Aに設けられた転送用の操作キーを押した時点で第二ツール106Aから不揮発データメモリ113Aへ転送されるか、又は、第二ツール106Aの転送用の操作キーを押したときにRAMメモリ112Aへ転送され、電子制御装置100Aに対する電源スイッチが開路されて、電源リレー102による遅延給電が行われているタイミングでRAMメモリ112Aから不揮発データメモリ113Aへ転送される。
The transfer timing of the second constant 108b is the same as that of the first constant 108a, and is transferred from the
不揮発プログラムメモリ111Aに格納された入出力制御プログラム107Aによって運転動作を行うマイクロプロセッサ110Aは、電子制御装置100Aの内蔵部品又は外部接続部品の特性変動情報、或いは改善された運転特性を得るための学習情報、或いは異常発生履歴情報等の第三定数108cを生成してRAMメモリ112Aに格納する。不揮発データメモリ113Aは、ブロック単位で一括消去が行われるフラッシュメモリであり、第1分割ブロック113a、第2分割ブロック113b、第3分割ブロック113c、第4分割ブロック113dを備えている。
The
各分割ブロック113a〜113d内の構成を示す図2に於いて、第1分割ブロック113a〜第4分割ブロック113dは、夫々同様の構成であり、チェック領域S0と、データ格納領域となる第一定数領域S10と、第二定数領域S20と、第三定数領域S300を備えている。チェック領域S0は、例えば16バイトのデータ容量C0を持つセクションS1と、当該セクションS1が異常となった場合に代替使用される予備セクションS2によって構成されている。
In FIG. 2 showing the configuration in each of the divided
第一定数領域S10は、例えば32バイトのデータ容量C10を持つ2つのセクションS11、S12によって構成されており、従がってセクション数N10[=2]であり、全体のデータ容量としては[C10×N10=32×2=64]バイトとなっている。 The first constant area S10 is composed of, for example, two sections S11 and S12 having a data capacity C10 of 32 bytes. Accordingly, the number of sections N10 [= 2], and the overall data capacity is [ C10 × N10 = 32 × 2 = 64] bytes.
第二定数領域S20は、例えば96バイトのデータ容量C20を持つ4つのセクションS21、S22、S23、S24によって構成されており、従がってセクション数N20[=4]であり、全体のデータ容量としては[C20×N20=96×4=384]バイトとなっている。 The second constant area S20 is composed of, for example, four sections S21, S22, S23, and S24 having a data capacity C20 of 96 bytes. Accordingly, the number of sections is N20 [= 4], and the entire data capacity Is [C20 × N20 = 96 × 4 = 384] bytes.
第三定数領域S300は、例えば384バイトのデータ容量C300を持つ20個のセクションS301、S302、S303・・・S320によって構成されており、従がってセクション数N300[=20]であり、全体のデータ容量としては[C300×N300=384×20=7680]バイトとなっている。 The third constant area S300 is composed of, for example, 20 sections S301, S302, S303,... S320 having a data capacity C300 of 384 bytes, and therefore the number of sections is N300 [= 20]. The data capacity is [C300 × N300 = 384 × 20 = 7680] bytes.
前述の各セクションは、書込/読出の最小単位となるものであり、各セクションには複数の個別データが所定順序で書込まれ、一つのセクションのデータ容量C10・C20・C300の値は書込みされる個別データの個数に対応したバイト数となっている。尚、各セクションには複数の個別データに加えて符号誤り検出のためのサムデータ、或いは誤り訂正符号データが付加されている。 Each section described above is a minimum unit of writing / reading, a plurality of individual data is written in a predetermined order in each section, and the values of the data capacities C10, C20, and C300 of one section are written. The number of bytes corresponds to the number of individual data to be processed. Each section is added with sum data for detecting a code error or error correcting code data in addition to a plurality of individual data.
又、この実施の形態1に於いては、分割ブロック113a〜113dの中で、セクション数N10・N20・N300とデータ容量C10・C20・C300の積が最も大きい主たるデータ格納領域S300の合計データ容量A[=N300×C300=20×384=7680]と、その他の従となるデータ格納領域S0・S10・S20全体のセクション数とデータ容量の積である合計データ容量B[=N0×C0+N10×C10+N20×C20=16×2+32×2+96×4=480]との比率B/(A+B)[=480/(7680+480)=0.06]は前記分割ブロックの個数N=4の逆数よりも小さい値となっている。
In the first embodiment, among the divided
図1に戻り、消去/書込制御回路114は、マイクロプロセッサ110Aから各種の指令信号COMnを受けて不揮発データメモリ113Aを制御し、不揮発データメモリ113Aから得られた回答信号ANSnをマイクロプロセッサ110Aに返信するように構成されている。指令信号のうち、指令信号COM1は一括消去指令であり、一括消去されるブロック番号はアドレス信号ADRによって消去/書込制御回路114に入力される。消去/書込制御回路114は、指定ブロック番号を記憶して不揮発データメモリ113Aの指定ブロックを一括消去し、消去が完了すると消去完了の回答信号ANS1を発生するように構成されている。
Returning to FIG. 1, the erase /
指令信号COM2は消去確認指令(ブランクチェック)であり、消去確認されるブロック番号とセクション番号とはアドレス信号ADRによって消去/書込制御回路114に入力される。消去/書込制御回路114は、指定ブロック番号と指定セクション番号を記憶して、不揮発データメモリ113Aの指定ブロックに於ける指定セクションが消去されているかどうかを点検し、点検完了すると点検結果に応じた回答信号ANS2を発生するように構成されている。
The command signal COM2 is an erase confirmation command (blank check), and the block number and section number to be confirmed for erase are input to the erase /
指令信号COM3は書込指令であり、書込対象となるブロック番号とセクション番号とはアドレス信号ADRによって消去/書込制御回路114に入力される。消去/書込制御回路114は、指定ブロック番号と指定セクション番号を記憶して不揮発データメモリ113Aの指定ブロックの指定セクションに対して書込データWRDを書込みし、書込みが完了すると書込完了の回答信号ANS3を発生するように構成されている。
The command signal COM3 is a write command, and the block number and section number to be written are input to the erase /
指令信号COM4は読出指令であり、読出対象となるブロック番号とセクション番号とはアドレス信号ADRによって消去/書込制御回路114に入力される。消去/書込制御回路114は、指定ブロック番号と指定セクション番号を記憶して不揮発データメモリ113Aの指定ブロックの指定セクションに格納されている読出データRDDを読出し、読出しが完了すると読出完了の回答信号ANS4を発生するように構成されている。
The command signal COM4 is a read command, and the block number and section number to be read are input to the erase /
尚、書込データWRDと読出データRDDとは、図示しないダイレクト・メモリアクセス・コントローラを介してRAMメモリ112Aとの間で授受が行われるように構成されている。
The write data WRD and read data RDD are configured to be exchanged with the
RAMメモリ112Aはイメージメモリ領域108を備え、このイメージメモリ108は、第一ツール105Aから第一定数108aを不揮発データメモリ113Aへ転送するときの中継メモリとして使用されたり、第二ツール106Aから第二定数108bを不揮発データメモリ113Aへ転送するときの中継メモリとして使用されたり、マイクロプロセッサ110Aの運転中に生成される第三定数108Cが格納されるように構成されている。
The
RAMメモリ112Aは、不揮発データメモリ113Aの消去・書込状態に対応したデータが書込まれるステータスメモリ112aを包含し、このステータスメモリ112aには、少なくとも現在時点で書込が進行している最新の分割ブロック113a〜113dの識別番号情報と、当該最新分割ブロック内の各データ格納領域S10・S20・S300に於いて最新データが書込まれたセクション番号情報とが格納されるように構成されている。
The
尚、イメージメモリ領域108やステータスメモリ112aは、消去/書込制御回路114の中に設けられたバッファメモリを使用することも可能である。
The
電源回路109Aは、例えば車載バッテリである外部電源101Aから運転用電源スイッチが閉路されたことによって付勢される電源リレー102の出力接点と、駆動電源端子102aとを介して給電されると共に、電源リレー102の出力接点を介在せずに外部バッテリとなる外部電源101Aから補助電源端子101aを介して給電されるように構成されている。
The
電源回路109Aは、電源リレー102が付勢されているときには、例えばDC5[V]の安定化された制御電圧Vccを発生して、マイクロプロセッサ110A、不揮発プログラムメモリ111A、RAMメモリ112A、不揮発データメモリ113Aに供給する。又、電源回路109Aは、電源リレー102が付勢されていないときには、例えばDC3[V]の安定化された保持電圧Vupを発生して、バックアップ電源としてRAMメモリ112Aに供給する。
The
電源リレー102が消勢されている期間に於いて補助電源となる車載バッテリ101Aの電圧が異常低下するか、又は補助電源回路が遮断されて、RAMメモリ112Aの記憶内容が消失したとき、又はステータスメモリ112aの内容が異常であるときに、電源リレー102が付勢されてマイクロプロセッサ110Aが運転を開始したとき、又はマイクロプロセッサ110Aの運転中に不揮発データメモリ113Aの中の少なくとも第三データ格納領域S300に書込まれた最新セクションの内容がRAMメモリ112Aのイメージメモリ領域108に転送されて、マイクロプロセッサ110Aはイメージメモリ領域108に書込まれた第三定数108cに基づいて入出力の制御を行なう。
When the voltage of the in-
尚、実態としてはマイクロプロセッサ110Aが運転開始したときには、第三定数108cだけではなく、第一・第二定数108a・108bも不揮発データメモリ113AからRAMメモリ112Aへ転送読出しして、マイクロプロセッサ110AはRAMメモリ112Aのイメージメモリ領域108を参照しながら制御を行なうように構成されている。
Actually, when the
又、ステータスメモリ112aの異常としては、現在時点で書込が進行している最新の分割ブロック113a〜113dの識別番号情報が格納されていないか、又は当該最新分割ブロック内の各データ格納領域S10・S20・S300に於いて最新データが書込まれたセクション番号情報が格納されていない状態であり、その他にRAMメモリ112A全体としての符号誤りによってビット情報の混入・欠落が発生している場合も含まれる。
Further, as an abnormality of the
次に、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの消去・書込処理について、その処理方法の概念を説明する。図3は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの消去・書込処理の説明図であり、第一ブロック113aの第三定数領域S300が満杯となった場合の書込処理の概念を、(A)、(B)、(C)の順で示したものである。
Next, the concept of a processing method for erasing / writing processing of the nonvolatile data memory in the electronic control apparatus according to
図3の(A)は、現に書込みが行われていた第一ブロック113aの内容を示しており、チェック領域S0のセクションS1には、ブランクブロックではないことを示す所定の確定定数と、過去の累積一括消去回数を示すチェックデータCが格納されている。又、第一定数領域S10のセクションS11には、第一ツール105AからRAMメモリ112Aを媒介して転送された第一定数108aが初回データF1として格納され、セクションS12は、まだデータが書込まれていない空セクション(ブランク)となっている。
(A) of FIG. 3 shows the contents of the
又、第二定数領域S20のセクションS21には、第二ツール106AからRAMメモリ112Aを媒介して転送された第二定数108bが初回データSe1として格納され、セクションS22には、2度目に転送された第二定数108bが次回データSe2として格納され、セクションS23・S24は、まだデータが書込まれていない空セクション(ブランク)となっている。
In the section S21 of the second constant area S20, the second constant 108b transferred from the
更に、第三定数領域S300のセクションS301には、RAMメモリ112Aに格納されている第三定数108cが電子制御装置100Aの運転停止の直後に初回データT1として格納され、セクションS302には、電子制御装置100Aの次回の運転停止直後に次回データT2として格納され、以下同様にして、20回目の運転停止直後の第三定数108cが20回目の格納データT20として格納され、まだデータが書込まれていない空セクションがなくなった満杯状態となっている。
Further, in the section S301 of the third constant area S300, the third constant 108c stored in the
図3の(B)は、次々順位の分割ブロック113cの内容を示しており、この分割ブロック113cには既にデータが書込まれていても、分割ブロック113aが満杯となって次のデータを書込む必要が発生した時点で次々順位の分割ブロック113cが先ず一括消去され、チェック領域S0・第一定数領域S10・第二定数領域S20・第三定数領域S300内の全てのセクションは空セクションとなっている。
FIG. 3B shows the contents of the divided
図3の(C)は、次順位の分割ブロック113bの内容を示しており、この分割ブロック113bは既に一括消去が行なわれているが、確認処理として再度一括消去を行い、続いて現在の分割ブロック113aで満杯となった次の第三定数108cが、第三定数領域S300の先頭セクションS301に書込まれる。次に、分割ブロック113aの第二定数領域S20の中の最新データ(最後に書込まれた第二定数108b)である格納データSe2が、分割ブロック113bの第二定数領域S20の中の先頭セクションS21に移動して転送される。
FIG. 3C shows the contents of the divided
次に、分割ブロック113aの第一定数領域S10の中の最新データ(最後に書込まれた第一定数108a)である格納データF1が、分割ブロック113bの第一定数領域S10の中の先頭セクションS11に転送される。最後に、分割ブロック113bのチェック領域S0には、分割ブロック113bがブランクブロックではないことを示す所定の確定定数と、一括消去回数の累積値が格納される。
Next, the stored data F1, which is the latest data (first constant 108a written last) in the first constant area S10 of the divided
このようにして分割ブロック113aは、分割ブロック113bへ移行し、分割ブロック113bが新たな現在ブロックとなるものである。
In this way, the divided
チェック領域S0内の一つのセクションS1の前半領域には、分割ブロック113a〜113dの一括消去が行われてから、データ格納領域S10・S20・S300の全てのデータ格納領域内で少なくとも一つのセクションに対して有効なデータが書込まれた時点で所定の確定定数が書込まれると共に、どれか一つのデータ格納領域であっても当該データ格納領域内のどのセクションにも有効なデータが書込まれていない場合には前記確定定数が書込まれていないブランクブロックの状態となる。
In the first half area of one section S1 in the check area S0, the divided
チェック領域S0内の一つのセクションS1の後半領域には、前記確定定数が書込まれた時点で当該分割ブロックに対する一括消去回数データが書込まれ、分割ブロックの移行が行われときには移行後の分割ブロックの一括消去回数は移行直前の現在の分割ブロックのチェック領域に書込まれていた一括消去回数に1を加算した値となる。 In the second half area of one section S1 in the check area S0, the batch erasure count data for the divided block is written when the definite constant is written, and when the divided block is transferred, the divided area after the transfer is transferred. The number of batch erases of a block is a value obtained by adding 1 to the number of batch erases written in the check area of the current divided block immediately before the transfer.
尚、各分割ブロック113a〜113dの一つは、前回の分割ブロックの移行過程と今回の分割ブロックの移行過程で一括消去が行われるが、初回の一括消去によって全セクションが消去されておれば、2回目の一括消去を行っても寿命回数に影響を与えないものであり、チェック領域S0に格納される一括消去回数は2度目の一括消去による1回分の一括消去回数となっている。
One of each of the divided
次に、この発明の実施の形態1による電子制御装置に於ける検索・読出処理について、その処理方法の概念についてを説明する。図4は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの検索・読出処理の説明図であリ、図4の(A)は、データの読出しが行われる最新ブロックの検索要領を示し、図4の(B)は、データの読出しが行われる最新セクションの検索要領を示したものである。
Next, the concept of the processing method for search / read processing in the electronic control apparatus according to
データの読出しが行われる最新ブロックの検索要領を示す図4の(A)に於ける(1)は、第1〜第4ブロックの全てが一括消去された後、第1ブロック113aにデータが書込まれている場合であり、最新ブロックNはチェック領域S0がブランクであるブランクブロックを検索し、ブランクブロックの前のブランクブロックでないブロックを最新ブロックとして検索される。
In (1) of FIG. 4A showing the search procedure for the latest block from which data is read, the data is written to the
図4の(A)に於ける(2)は、第1ブロック113aの第一・第二・第三領域S10・S20・S300のどれかが満杯となって第2ブロック113bに最新データが移行した場合の図であり、最新ブロックNはブランクブロックである第3ブロック113cの前にある第2ブロック113bとなり、第1ブロック113aは最新の一つ前のブロックN−1となっている。
In (2) in FIG. 4A, one of the first, second, and third areas S10, S20, and S300 of the
図4の(A)に於ける(3)は、第2ブロック113bのどれかの領域が満杯となって第3ブロック113cに最新データが移行した場合の図であり、最新ブロックNはブランクブロックである第4ブロック113dの前にある第3ブロック113cとなり、第1ブロック113aは最新の二つ前のブロックN−2となり、第2ブロック113bは最新の一つ前のブロックN−1となっている。
(3) in FIG. 4A is a diagram in the case where any area of the
図4の(A)に於ける(4)は、第3ブロック113cのどれかの領域が満杯となって第4ブロック113dに最新データが移行した場合の図であり、この場合にはまず第3ブロック113cの二つ後にある第1ブロック113aの一括消去を行っておいてから第4ブロックへの移行が行われる。そのため、最新ブロックNは、ブランクブロックである第1ブロック113aの前にある第4ブロック113dとなり、第2ブロック113bは最新の二つ前のブロックN−2となり、第3ブロック113cは最新の一つ前のブロックN−1となっている。
(4) in FIG. 4A is a diagram in the case where any area of the
図4の(A)に於ける(5)は、第4ブロック113dのどれかの領域が満杯となって第1ブロック113aに最新データが移行した場合の図であり、この場合にはまず第4ブロックの二つ後の第2ブロック113bの一括消去を行っておいてから第1ブロック113aへの移行が行われる。そのため、最新ブロックNは、ブランクブロックである第2ブロック113bの前にある第1ブロック113aとなり、第3ブロック113cは最新の二つ前のブロックN−2となり、第4ブロック113dは最新の一つ前のブロックN−1となっている。
(5) in FIG. 4A is a diagram in the case where any area of the
図4の(A)に於ける(6)は、第1ブロック113aのどれかの領域が満杯となって第2ブロック113bに最新データが移行した場合の図であり、この場合には先ず第1ブロックの二つ後の第3ブロック113cの一括消去を行っておいてから第2ブロック113bへの移行が行われる。そのため、最新ブロックNは、ブランクブロックである第3ブロック113cの前にある第2ブロック113bとなり、第4ブロック113dは最新の二つ前のブロックN−2となり、第1ブロック113aは最新の一つ前のブロックN−1となっている。
In FIG. 4A, (6) is a diagram when one of the areas of the
図4の(A)の(6)に於いて、第2ブロック113bのどれかの領域が満杯となって第3ブロック113cに移行する場合には、先ず第2ブロック113bの二つ後の第4ブロック113dの一括消去を行っておいてから第3ブロック113cへの移行が行われるので、図4の(A)に於ける(3)の状態へ移行することになる。
In (6) of FIG. 4A, when any area of the
尚、分割ブロックの移行を行うときには、移行先の分割ブロックも念のため一括消去
を行ってから書込みが開始されるように構成されている。
Note that when the divided block is transferred, writing is started after performing batch erasure of the transferred divided block as a precaution.
以上のとおり、不揮発データメモリ113Aは、少なくとも3個以上の分割ブロック113a〜113dを備え、現在書込みが行われている分割ブロック113aの中のどこかのデータ格納領域S10・S20・S300に於いて空セクションが無くなった場合には、先ず次次順位の分割ブロック113cの一括消去を行い、続いて確認処理として次順位の分割ブロック113bの一括消去を行い、当該次順位の分割ブロック113bの該当データ格納領域の先頭セクションに新たなデータが書込まれ、元の分割ブロック113aの中の他のデータ格納領域に書込まれていた最新のデータは、前記次順位の分割ブロック113bの該当データ格納領域の先頭セクションに転送格納され、分割ブロック113a〜113dの移行に当たっては、一括消去済であるブランクブロックの前にあるブランクブロックの分割ブロックへ移行するように構成されている。
As described above, the
データの読出しが行われる最新セクションの検索要領を示した図4の(B)に於いて、チェック領域S0にはブランクブロックではないことを示す確定定数と一括消去回数がデータCとして書込まれている。第一定数領域S10の先頭セクションS11には、第一定数108aの最新データF1が書込まれていて、続くセクションS12は未書込み状態となっている。 In FIG. 4B showing the search procedure of the latest section from which data is read, a definite constant indicating that it is not a blank block and the number of batch erases are written as data C in the check area S0. Yes. In the first section S11 of the first constant area S10, the latest data F1 of the first constant 108a is written, and the subsequent section S12 is in an unwritten state.
第二定数領域S20の先頭セクションS21には、第二定数108bの前回データSe1が書込まれ、続くセクションS22には第二定数108bの最新データSe2が書込まれ、続くセクションS23・S24は未書込み状態となっている。 In the first section S21 of the second constant area S20, the previous data Se1 of the second constant 108b is written, the latest data Se2 of the second constant 108b is written in the subsequent section S22, and the subsequent sections S23 and S24 are not yet stored. Write status.
第三定数領域S300の先頭セクションS301には、第三定数108cの初回データT1が書込まれ、続くセクションS302には第三定数108cの2回目データT2が書込まれ、続くセクションS303には第三定数108cの3回目データT3が書込まれているが、書込み途中で停電し、セクションS303の一部領域がブランクとなっている。続くセクションS304〜S320は未書込み状態となっている。
The first section T301 of the third constant 108c is written in the first section S301 of the third constant area S300, the second data T2 of the third constant 108c is written in the succeeding section S302, and the second section T303 is followed by the second section T303. The third data T3 of the three
マイクロプロセッサ110Aは、不揮発データメモリ113Aに対する一括消去指令信号とブランクチェック指令信号(消去確認指令信号)を発生し、当該ブランクチェック指令を受信した不揮発データメモリ113Aは、少なくとも前記セクション単位で消去済であるか否かの判定情報を返信する。
The
前記マイクロプロセッサ110Aは、一括消去を行うことによって、消去済となったセクションは空セクションであると判定し、一括消去を行っても消去できなかったセクションがあるか、又は不揮発データメモリ113Aに対するデータの書込み中に停電が発生したことが原因となって、一つのセクションの中でデータの書込み部分と未書込み部分が混在していることが検出された場合には、当該セクションは無効セクションであると判定すると共に、セクション内にデータが存在して無効セクションではないセクションを有効セクションであると判定する。
The
マイクロプロセッサ110Aは、不揮発データメモリ113Aの読出しを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて有効セクションを検索し、初めて検出された有効セクションに格納されたデータを読出しする。
When reading data from the
次に、この発明の実施の形態1による電子制御装置に於ける異常処理について、その処理方法の概念についてを説明する。図5は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの異常処理の説明図であり、図5の(A)は書込み異常が発生した場合の処理方法を示しており、図5の(B)は分割ブロックの一括消去に於いて消去異常が発生した場合の処理方法を示している。
Next, the concept of the processing method for abnormality processing in the electronic control apparatus according to
書込み異常が発生した場合の処理方法を示す図5の(A)に於いて、ここではセクションS302にセルの異常があるか又はデータが書込まれていて、無効セクションとなっている場合を示している。マイクロプロセッサ110Aは、不揮発データメモリ113Aの書込みを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて有効セクションを検索し、初めて検出された有効セクションから逆方向に検索して初めて検出された空セクションにデータを書込みすると共に、当該空セクションに正しくデータの書込みが行えなかった場合には、更に逆方向に検索して新たに検出された空セクションにデータを書込みするように構成されている。
In FIG. 5A showing a processing method when a writing abnormality occurs, here, a case where there is a cell abnormality in the section S302 or data has been written and an invalid section is shown. ing. When writing to the
図5の(B)に示すブロック消去で異常となったときには、1回だけリトライを実施するが、リトライしてもブロック消去が異常であればチェック領域のブランクチェックを行い、ブランクであればブロック消去正常と見なすようになっている。これは、セクション内に未消去部分があっても、次のセクションに書込みするため実害がないためである。 When an error occurs in the block erase shown in FIG. 5B, a retry is performed only once. However, if the block erase is abnormal even after retrying, a blank check is performed on the check area. The erasure is considered normal. This is because even if there is an unerased portion in a section, the next section is written and there is no actual harm.
(2)作用・動作の詳細な説明
次に、この発明の実施の形態1による電子制御装置の動作・作用について説明する。図6は、この発明の実施の形態1による電子制御装置に於ける全体動作のフローチャートである。図6に於いて、先ずステップ600aにより、図示しない電源スイッチが投入されると、電源リレー102が付勢されて電子制御装置100Aが給電駆動され、ステップ601に於いてマイクロプロセッサ110Aが動作を開始する。
(2) Detailed Description of Action / Operation Next, the operation / action of the electronic control apparatus according to
続くステップ602aは、不揮発プログラムメモリ111Aに対して入出力プログラム107Aを転送したいのかどうかを人為的に判断して、転送したいのであれば第一ツール105Aを接続してからその転送操作キーを押すことによってYesの判定が行われてステップブロック602bへ移行し、転送操作キーが押されていないか、又は不揮発プログラムメモリ111Aに対して入出力プログラム107Aが既に書込みされている場合にはNoの判定を行ってステップ603aへ移行する判定ステップである。
In the
ステップブロック602bは、マスクROMメモリ111aに格納されているブートプログラムによって第一ツール105Aに格納されている入出力プログラム107Aが不揮発プログラムメモリ111Aに転送格納して行程603aへ移行するステップであり、入出力制御プログラム107Aにはプログラムに固有の一定不変の固定定数や参考定数107aが包含されている。
Step block 602b is a step in which the input /
行程603aは、第1〜第4ブロックのどれかの分割ブロックでチェック領域S0に設定確定数値が書込まれているものがあるかどうかを判定することによって分割ブロックの初期化が行われているかどうかを判定し、初期化が行われておればYesの判定を行ってステップ604aへ移行し、初期化が行われていなければNoの判定を行ってステップ603bへ移行する判定ステップである。
In
行程603bでは先ずRAMメモリ112Aのイメージメモリ領域108に対して、第一定数108a・第二定数108b・第三定数108cの初期設定値を書込むが、この初期設定値は不揮発プログラムメモリ111Aに格納されている参考定数107aが適用され、参考定数が与えられていない個別データに関しては例えば数値0等の任意の定数が仮定数として書込まれるように構成されている。
In
ステップ604aは、RAMメモリ112Aに対して第一定数108aを転送したいのかどうかを人為的に判断して、転送したいのであれば第一ツール105Aを接続してからその転送操作キーを押すことによってYesの判定が行われてステップ605aへ移行し、転送操作キーが押されていないか又は第一ツール105Aが接続されていなければNoの判定を行ってステップ604bへ移行する判定ステップである。
ステップ605aは、第一ツール105Aから得られる第一定数108aをRAMメモリ112Aのイメージメモリ領域108へ転送してからステップ606へ移行するステップである。
ステップ604bは、RAMメモリ112Aに対して第一定数108bを転送したいのかどうかを人為的に判断して、転送したいのであれば第二ツール106Aを接続してからその転送操作キーを押すことによってYesの判定が行われてステップ605bへ移行し、転送操作キーが押されていないか又は第二ツール106Aが接続されていなければNoの判定を行ってステップ604cへ移行する判定ステップである。
Step 604b artificially determines whether or not to transfer the first constant 108b to the
行程605bは、第二ツール106Aから得られる第二定数108bをRAMメモリ112Aのイメージメモリ領域108へ転送してから行程606へ移行するステップである。行程604cは、電子制御装置100Aの実用運転中に於いて、RAMメモリ112Aに対して書込みしたい学習記憶情報が発生したときにYesの判定が行われてステップ605cへ移行し、学習記憶情報が発生していないときにばNoの判定を行ってステップ606へ移行する判定ステップである。
In
ステップ605cは、電子制御装置100Aの実用運転中に得られる学習情報を第三定数108cをRAMメモリ112Aのイメージメモリ領域108へ書込みしてからステップ606へ移行するステップである。ステップ606は、電源スイッチの投入/遮断状態を判定するステップであり、電源スイッチが投入されておればNoの判定となって動作終了行程609へ移行し、電源スイッチが遮断された所定時間内ではYesの判定が行われてステップブロック700へ移行するように構成されている。
ステップブロック700は、図7に於いて後述するデータメモリの書込み処理ステップであり、このステップブロックではステップ605a・605b・605cでRAMメモリ112Aのイメージメモリ領域108に書込まれていた第一定数108a又は第二定数108b又は第三定数108cの全てが不揮発データメモリ113Aの第一定数領域S10又は第二定数領域S20又は第三定数領域S300に転送書込みされてからステップ600cへ移行するように構成されている。
The
尚、RAMメモリ112Aのイメージメモリ領域108に対しては、ステップブロック603bに於いて仮の値である初期設定値が書込まれていて、その後にステップ605a・605b・605cに於いて順次更新書換が行われているので、ステップブロック700に於いて不揮発データメモリ113Aに転送されるデータは更新書込みされたデータであり、行程605a・605b・605cのどれかがまだ実行されていない場合には第一定数108a・第二定数108b・第三定数108cのどれかはステップ603bで設定された初期設定値となっている。
The initial setting value, which is a temporary value, is written in the
ステップ600cでは電源リレー102が消勢されて電子制御装置100Aに対する給電が停止される。動作終了ステップ609では他の制御プログラムを実行して、所定時間以内には再度動作開始ステップ601へ復帰して、以下同様の制御が繰返して実行されるように構成されている。
In
図6のフローチャートは、異なる時期で実行される各種の処理を合併して、概括表現したものである。先ず第一の処理としては、ステップ600aからステップブロック602b・ステップ603b・ステップ605a・ステップブロック700・ステップ600cが実行されて、入出力制御プログラム107Aの転送と、不揮発データメモリ113Aに対する第一定数108aの転送と、第二・第三定数に対する初期設定値の転送処理が行われる。
The flowchart of FIG. 6 is a general representation of a combination of various processes executed at different times. First, as a first process,
続く第二の処理としては、ステップ600a・ステップ605b・ステップブロック700・ステップ600cが実行されて、不揮発データメモリ113Aに対する第二定数108bが転送される。同様に、第三の処理としては、行程600a・ステップ605c・ステップブロック700・ステップ600cが実行されて、不揮発データメモリ113Aに対する第三定数108cが転送されるが、第三定数108cに関してはステップ601・ステップ605c・ステップ606・ステップ609・ステップ601を循環しながら多数の個別データが順次RAMメモリ112Aに拡充格納され、電源スイッチが遮断された直後にステップブロック700によって一括して不揮発データメモリ113Aへ転送されることになる。
As the subsequent second processing,
図7は、この発明の実施の形態1による電子制御装置に於けるデータ書込み処理の全体フローチャートである。図7に於いて、ステップ700は、データメモリに対するデータの書込み開始ステップである。続くステップ701は、不揮発データメモリ113Aの初期化を行うかどうかを判定するステップであり、このステップ701では分割ブロックの全てにデータが書込まれていて、次に書込むべき分割ブロックが特定できない状態になっているとき、又は全ブロックのどこにも有効なデータが書かれていないときに初期化要であるYesと判定してステップブロック800へ移行し、図14により後述する最新ブロックの検索が行えたときには初期化不要であるNoと判定してステップブロック900へ移行するように構成されている。
FIG. 7 is an overall flowchart of data write processing in the electronic control apparatus according to
ステップブロック800は、図8により後述するデータメモリの初期化処理ステップである。続くステップ702は、ステップブロック800による初期化処理が正常に終了したときはYesの判定を行ってステップブロック900へ移行し、非正常であったときにはNoの判定を行ってステップ707へ移行する判定ステップである。
ステップブロック900は、図9により後述するデータメモリのデータ書込処理ステップである。続くステップ703は、ステップブロック900による書込処理が正常に終了したときはYesの判定を行ってステップ704へ移行し、非正常(ブロック内に空セクションが無い)であったときにはNoの判定を行ってステップブロック1100へ移行する判定ステップである。
ステップ704は、RAMメモリ112Aに設けられたステータスメモリ112aに於ける読出しセクション番号を更新してステップ705へ移行するステップである。ステップブロック1100は、図11により後述する分割ブロックの移行処理ステップである。続くステップ706は、ステップブロック1100による移行処理が正常に終了したときはYesの判定を行ってステップ705へ移行し、非正常であったときにはNoの判定を行って行程700へ移行する判定ステップである。ステップ705は、書込み正常終了ステップであり、ステップ707は書込み異常終了ステップである。
In
この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの初期化処理のフローチャートである。図8に於いて、ステップ801は、初期化処理の開始ステップである。続くステップブロック1000は、図10により後述する全ブロックの一括消去処理ステップである。続くステップ802は、ステップブロック1000による消去処理が正常に終了したときはYesの判定を行ってステップ803へ移行し、非正常であったときにはNoの判定を行ってステップ811へ移行する判定ステップである。
It is a flowchart of the initialization process of the non-volatile data memory in the electronic control apparatus by
ステップ803は、書込みセクションを先頭ブロックである第1ブロック113aに決定してからステップブロック900へ移行するステップである。ステップブロック900は、図9により後述する書込処理ステップであり、第1ブロック113aの第一定数領域S10の先頭セクションS11と、第二定数領域S20の先頭セクションS21と、第三定数領域S300の先頭セクションS301に対して初期設定値を書込む。
In
続くステップ804は、ステップブロック900による書込処理が正常に終了したときはYesの判定を行ってステップ805へ移行し、非正常であったときにはNoの判定を行ってステップ811へ移行する判定ステップである。
In the
ステップ805は、ステップブロック900に於いて各データ格納領域の先頭セクションに対するデータの書込みが完了したかどうかを判定し、未完了であればNoとなってステップ803へ復帰移行し、完了であればYesとなってステップ806へ移行する判定ステップである。ステップ806は、第1ブロック113aのチェック領域S0に設けられたセクションS1に対して、所定の確定数値と一括消去回数「1」を書込むステップである。
In
続くステップ807は、ステップ806によるチェック領域の書込処理が正常に終了したときはYesの判定を行ってステップ808へ移行し、非正常であったときにはnoの判定を行ってステップ811へ移行する判定ステップである。ステップ808は、RAMメモリ112Aに設けられたステータスメモリ112aに於ける最新ブロックのブロック番号を先頭ブロック番号としてからステップ809へ移行するステップである。
In the
ステップ809は、RAMメモリ112Aに設けられたステータスメモリ112aに於ける読出しセクション番号を先頭先頭番号としてからステップ810へ移行するステップである。ステップ810は、初期化正常終了ステップであり、ステップ811は初期化異常終了ステップである。
Step 809 is a step in which the read section number in the
図9は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの書込み処理のフローチャートである。図9に於いて、ステップ901は、書込み処理の開始ステップである。続くステップ902は、現在の書込みブロックに空セクションがの残されているかどうかをRAMメモリ112A内のステータスメモリ112aの内容によって判定し、空セクションがあればYesの判定を行ってステップ903へ移行し、空セクションがなければNoの判定を行ってステップ911へ移行する判定ステップである。
FIG. 9 is a flowchart of the writing process of the nonvolatile data memory in the electronic control apparatus according to
ステップ903は、書込みしたいセクションが空セクションであるかどうかを確認するためのブランクチェックを行うステップである。続くステップ904は、ステップ903によるブランクチェックの結果として書込みしたいセクションが空セクションであればYesの判定を行ってステップ905へ移行し、空セクションでなければNoの判定を行ってステップ907へ移行する判定ステップである。
Step 903 is a step of performing a blank check to confirm whether the section to be written is an empty section. In the
ステップ905は、書込みセクションにデータの書込みを実施してからステップ906へ移行するステップである。ステップ906は、ステップ905によるデータの書込みが正常であればYesの判定を行ってステップ910へ移行し、非正常であればNoの判定を行ってステップ907へ移行する判定ステップである。
In
ステップ907は、書込みセクション番号を進行させてからステップ902へ復帰移行するステップであり、書込み異常である場合には書込みセクションを進め、再度ブランクチェックと書込みを実施して、ブロック内に空セクションが無くなればステップ911による異常終了となり、正常書込みされた場合はステップ910による正常終了となる。
Step 907 is a step in which the write section number is advanced and then the process returns to step 902. If the write is abnormal, the write section is advanced, blank check and write are performed again, and an empty section is found in the block. If it disappears, the process ends abnormally in
図10は、この発明の実施の形態1による電子制御装置に於ける全ブロック消去処理のフローチャートであり、指定された分割ブロックの消去処理を示している。図10に於いて、ステップ1001は、消去処理の開始ステップである。続くステップ1002は、リトライカウンタの現在値を「0」にしてからステップ1003へ移行するステップである。
FIG. 10 is a flowchart of the all block erasing process in the electronic control apparatus according to
ステップ1003は、分割ブロックの消去を実施してからステップ1004へ移行するステップである。ステップ1004は、ブランクチェックを行うことによって指定された分割ブロックの消去が行われたかどうかを判定し、消去されておればYesの判定を行ってステップ1010へ移行し、消去されていなければNoの判定を行ってステップ1005へ移行する判定ステップである。
ステップ1005は、リトライカウンタの現在値に「1」を加算してからステップ1006へ移行するステップである。ステップ1006は、リトライカウンタの現在値が「2」未満であればリトライを許可するYesの判定を行ってステップ1003へ復帰し、現在値が「2」以上であればリトライを不許可とするNoの判定を行ってステップ1007へ移行する判定ステップである。
ステップ1007は、チェック領域S0のブランクチェックを行うステップである。続くステップ1008は、ステップ1007によるブランクチェックの結果として、チェック領域S0がブランクであればYesの判定を行って正常終了ステップ1010へ移行し、チェック領域S0がブランクでなければNoの判定を行って異常終了ステップ1011へ移行する判定ステップとなっている。
尚、チェック領域がブランクであれば、最新ブロックの検索は正常に動作し、書き込み処理において空セクションでなければ次のセクションに書き込む処理があるためチェック領域以外で消去さていない部分が存在しても機能的な影響はない。そのため、リトライ後の消去異常時に、チェック領域がブランクであれば正常終了とするように構成されている。 If the check area is blank, the search for the latest block works normally, and if there is a process that writes to the next section if it is not an empty section in the write process, there are parts that are not erased outside the check area. There is no functional impact. For this reason, if the check area is blank at the time of erasure abnormality after retry, it is configured to terminate normally.
図11は、この発明の実施の形態1による電子制御装置に於ける移行処理のフローチャートであり、分割ブロックの移行処理を示している。図11に於いて、ステップ1101は、ブロック移行処理の開始ステップである。ステップブロック1000aは、図10により前述したデータメモリのブロック消去のステップであり、ここでは2つ先の分割ブロックの一括消去が行われる。
FIG. 11 is a flowchart of the migration process in the electronic control apparatus according to
続くステップ1102aは、ステップブロック1000aによる消去処理が正常に終了したときはYesの判定を行ってステップブロック1000bへ移行し、非正常であったときにはNoの判定を行って異常終了ステップ1111へ移行する判定ステップである。ステップブロック1000bは、図10により前述したデータメモリのブロック消去のステップであり、ここでは1つ先の分割ブロックの一括消去が行われる。
In the
続くステップ1102bは、ステップブロック1000bによる消去処理が正常に終了したときはYesの判定を行ってステップ1103aへ移行し、非正常であったときにはNoの判定を行って異常終了行程1111へ移行する判定ステップである。
In the
ステップ1103aは、満杯となって分割ブロックの移行が行われたデータ格納領域を指定領域として、指定領域の書込みセクション番号を先頭セクションに更新するステップである。続くステップブロック900aは図9により前述したデータ書込みのステップであり、ここでは満杯となって分割ブロックの移行が行われたデータ格納領域に関して、新たに発生したデータが書込まれるように構成されている。
続くステップ1102cは、ステップブロック900aによる書込処理が正常に終了したときはYesの判定を行ってステップ1103bへ移行し、非正常であったときにはNoの判定を行って異常終了ステップ1111へ移行する判定ステップである。ステップ1103bは、満杯となって分割ブロックの移行が行われたデータ格納領域以外のデータ格納領域の一つについて、移行前の分割ブロックに格納されていた最新データを移行後の分割ブロックの先頭セクションに転送するように書込みセクション番号を更新するステップである。
In the
続くステップブロック1200は、図12により後述するデータの検索読出処理ステップであり、ここでは移行前の分割ブロックについて正常な分割ブロックや読出しセクションの検索を行って、有効なセクションの有無を検索する。続くステップ1104は、移行前の分割ブロックについて、有効なセクションが存在すればYesの判定を行ってステップブロック900bへ移行し、有効なセクションが存在しない場合にはステップブロック900cへ移行する判定ステップである。
A
ステップブロック900bは、図9により前述した書込処理ステップであり、ここではステップブロック1200で読出しされた移行前分割ブロック内の最新データが移行後の分割ブロックの先頭セクションに転送書込みされる。ステップブロック900cは、図9により前述した書込処理ステップであり、ここでは図6のステップ603bでRAMメモリ112Aのイメージメモリ108に書込まれた初期設定値が移行後の分割ブロックの先頭セクションに転送書込みされる。
ステップブロック900b又は900cに続くステップ1102dは、ステップブロック900b・900cによる書込処理が正常に終了したときはYesの判定を行ってステップ1105へ移行し、非正常であったときにはNoの判定を行って異常終了ステップ1111へ移行する判定ステップである。
ステップ1105は、第一領域S10・第二領域S20・第三領域S300の全領域に対して最新データ又は初期値データが書込まれたかどうかを判定し、未完了であればNoの判定を行ってステップ1103bへ復帰移行し、完了であればYesの判定を行ってステップ1106へ移行する判定ステップである。ステップ1106は、移行後の分割ブロックのチェック領域S0に設けられたセクションS1に対して、所定の確定数値と一括消去回数を書込むステップであり、この一括消去回数は移行前の分割ブロックのセクションS1に書込みされていた一括消去回数に1を加算した値である。
続くステップ1102eは、ステップ1106によるチェック領域の書込処理が正常に終了したときはYesの判定を行ってステップ1107へ移行し、非正常であったときにはNoの判定を行って異常終了ステップ1111へ移行する判定ステップである。ステップ1107は、RAMメモリ112Aに設けられたステータスメモリ112aに於ける最新ブロックのブロック番号を更新してからステップ1108へ移行するステップである。ステップ1108は、RAMメモリ112Aに設けられたステータスメモリ112aに於ける読出しセクション番号を更新してから正常終了ステップ1110へ移行するステップである。
In the
図12は、この発明の実施の形態1による電子制御装置に於けるデータ読出し処理の全体フローチャートであり、不揮発データメモリからのデータ読出処理を示している。図12に於いて、ステップ1200は、データメモリに対するデータの読出し開始ステップである。続くステップブロック1300は、図13により後述する最新データ検索処理ステップである。
FIG. 12 is an overall flowchart of data reading processing in the electronic control apparatus according to
続くステップ1201は、ステップブロック1300の中の最新ブロックの検索結果として、全ての分割ブロック113a〜113cにデータが書込まれていて最新ブロックが特定できない状態であるか、又は全ての分割ブロック113a〜113cがブランクブロックであって有効なデータが検索できない状態であればYesの判定を行って読出異常終了ステップ1211へ移行し、有効ブロックが検索されたときには異常なしであるNoの判定を行ってステップ1202へ移行する判定ステップである。
In the
続くステップ1202は、ステップブロック1300の中の最新セクションの検索結果として、有効な読出ブロックと読出セクションとが特定できない状態であればYesの判定を行って読出異常終了ステップ1211へ移行し、有効な読出ブロックと読出セクションが検索されたときには異常なしであるNoの判定を行ってステップ1203へ移行する判定ステップである。ステップ1203は、検索された読出ブロックの中の読出セクションのデータを読出してRAMメモリ112Aのイメージメモリ領域108へ格納し、読出正常終了ステップ1210へ移行するステップである。
In the following
図13は、この発明の実施の形態1による電子制御装置に於ける最新データ検索処理のフローチャートであり、不揮発データメモリの最新データ検索を示している。図13に於いて、ステップ1301は、最新データ検索の開始ステップである。続くステップブロック1400は、図14により後述する最新ブロック検索ステップである。
FIG. 13 is a flowchart of the latest data search process in the electronic control apparatus according to
続くステップ1302は、ステップブロック1400による最新ブロックの検索結果として、全ての分割ブロック113a〜113cにデータが書込まれていて最新ブロックが特定できない状態であるか、又は全ての分割ブロック113a〜113cがブランクブロックであって有効なデータが検索できない状態であればYesの判定を行って読出異常終了ステップ1311へ移行し、有効ブロックが検索されたときには異常なしであるNoの判定を行ってステップ1303へ移行する判定ステップである。
In the
ステップ1303は、検索された最新ブロック番号をRAMメモリ112Aの中のステータスメモリ112aに格納してからステップ1500aへ移行するステップである。ステップブロック1500aは、図15により後述する最新セクションの検索ステップであり、ここではステップ1303により記憶された最新ブロックの中の最新セクションの検索が行われる。続くステップ1304は、ステップブロック1500aによる最新セクションの検索結果として、有効なセクションが存在しなかった場合にはYesの判定を行ってステップ1305へ移行し、有効なセクションが発見された場合にはNoの判定を行ってステップ1306aへ移行する判定ステップである。
ステップ1306aは、検索された番号情報をRAMメモリ112Aの中のステータスメモリ112aに格納してからステップ1307へ移行するステップであり、検索番号情報として、読出ブロック番号はステップ1303により格納された最新ブロック番号の現在番号とし、読出セクション番号はステップブロック1500aにより検索された最新セクション番号の現在番号であり、書込セクションは読出セクション番号の次のセクション番号となっている。
ステップ1305は、ステップ1303で記憶された最新ブロック番号の前の分割ブロックがブランクブロックであるかどうかを判定し、ブランクブロックでなければYesの判定を行ってステップブロック1500bへ移行し、ブランクブロックであればNoの判定を行ってステップ1306bへ移行する判定ステップである。
In
ステップ1306bは、検索された番号情報をRAMメモリ112Aの中のステータスメモリ112aに格納してからステップ1307へ移行するステップであり、検索番号情報として、読出ブロック番号は検索不能を示す異常番号とし、読出セクション番号は検索不能を示す異常番号とし、書込セクションは先頭セクション番号となっている。
ステップブロック1500bは、図15により後述する最新セクションの検索ステップであり、ここではステップ1303により記憶された最新ブロックの前の分割ブロックの中の最新セクションの検索が行われる。ステップ1306cは、検索された番号情報をRAMメモリ112Aの中のステータスメモリ112aに格納してからステップ1307へ移行するステップであり、検索番号情報として、読出ブロック番号はステップ1303で格納された最新ブロック番号の前の番号とし、読出セクション番号はステップブロック1500bにより検索された最新セクション番号の現在番号であり、書込セクションはステップ1303により記憶された最新ブロック番号の先頭セクションとなっている。
ステップ1307は、第一定数領域S10・第二定数領域S20・第三定数領域S300の全ての検索が完了したかどうかを判定し、未完了であればNoの判定を行ってステップブロック1500aへ復帰移行し、完了であればYesの判定を行って検索正常終了ステップ1310へ移行する判定ステップである。
In
図14は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの最新ブロック検索処理のフローチャートである。図14に於いて、ステップ1401は、最新ブロック検索の開始ステップである。続くステップ1402は、全ての分割ブロック113a〜113dのチェック領域S0のブランクチェックを行ってからステップ1403aへ移行するステップである。
FIG. 14 is a flowchart of the latest block search processing of the nonvolatile data memory in the electronic control apparatus according to
ステップ1403aは、ステップ1402によるブランクチェックの結果として、全ての分割ブロック113a〜113dがブランクブロックであればYesとなってステップ1404へ移行し、どれかの分割ブロックがブランクブロックではないときにはNoの判定を行ってステップ1403bへ移行する判定ステップである。
In
ステップ1404は、全ブロックがブランクブロックであることをステータスメモリ112aにより記憶するステップである。ステップ1403bは、ステップ1402によるブランクチェックの結果として、全ての分割ブロック113a〜113dがブランクブロックではないときにはYesとなってステップ1406へ移行し、どれかの分割ブロックがブランクブロックであればNoの判定を行ってステップ1405へ移行する判定ステップである。
ステップ1405は、ブランクブロックの一つ前のブランクではない分割ブロックの番号を最新ブロック番号としてステータスメモリ112aにより記憶するステップである。ステップ1406は、各分割ブロックのチェック領域S0のうち、所定の確定定数と一括消去回数が最大となっている分割ブロックが一つだけ存在するかどうかを判定し、存在すればYesの判定を行ってステップ1407へ移行し、存在しなければNoの判定を行ってステップ1408へ移行する判定ステップである。
In
ステップ1407は、所定の確定定数と最大の一括消去回数であった分割ブロックの番号を最新ブロック番号としてステータスメモリ112aにより記憶するステップである。ステップ1408は、全ての分割ブロックにデータが有って、最新ブロック番号が特定できない異常状態であることをステータスメモリ112aにより記憶するステップである。ステップ1404又はステップ1405又はステップ1407又はステップ1408からは、いずれも正常終了ステップ1410へ移行するように構成されている。
図15は、この発明の実施の形態1による電子制御装置に於ける不揮発データメモリの最新セクション検索処理のフローチャートである。図15に於いて、ステップ1501は、最新セクション検索の開始ステップである。続くステップ1502は、対象となっている分割ブロック内のデータ格納領域S10・S20・S300のどれかに関するセクション数N10・N20・N300を最大セクション番号としてワーキングメモリに記憶して、ステップ1503へ移行するステップである。ステップ1503は、記憶した最大セクション番号のセクションに関するブランクチェックを行い、空セクションや無効セクションではない有効セクションであるかどうかをチェックしてからステップ1504へ移行するステップである。
FIG. 15 is a flowchart of the latest section search process of the nonvolatile data memory in the electronic control apparatus according to
ステップ1504は、ステップ1503によりチェックされたセクションが有効セクションであるか否かによって、有効セクションであればYesの判定を行ってステップ1505へ移行し、有効セクションでなければNoの判定を行ってステップ1506へ移行する判定ステップである。ステップ1505は、ステップ1503により記憶されたセクション番号を有効セクション番号としてステータスメモリ112aにより記憶してから終了ステップ1510へ移行するステップである。
In
ステップ1506は、ステップ1503により記憶されたセクション番号が先頭セクション番号を超過しているかどうかを判定し、先頭セクション番号を超過しておればYesの判定を行ってステップ1507へ移行し、先頭セクション番号に合致すればNoの判定を行ってステップ1508へ移行する判定ステップである。ステップ1507は、ワーキングメモリの値を、現在記憶しているセクション番号から「1」を減じた値に更新してからステップ1503へ復帰移行し、ステップ1503では減少したセクション番号のセクションに関するブランクチェックを実施するように構成されている。
In
ステップ1503・ステップ1504・ステップ1506・ステップ1507・ステップ1503を循環実行する過程で、有効セクションが検出されればステップ1504がYesの判定を行って循環動作が停止し、ステップ1504がYesの判定を行う前にステップ1506がNoの判定を行えばステップ1508へ移行して循環動作が停止する。ステップ1508は、有効セクションが存在しないことをステータスメモリ112aにより記憶してから終了ステップ1510へ移行するステップである。
In the process of cyclically executing
以上説明した図7〜図15の制御フローに於ける動作開始ステップは、サブルーチンブログラムの開始ステップであって、これ等の制御フローが正常終了した場合にはサブルーチンコールが行われた元の制御ステップの次のステップに移行する。しかし、異常終了であった場合には、これらの制御フローの上位に位置する図示しない制御フローによって異常処理が実行される。例えば、全ての分割ブロック113a〜113dがブランクブロックでは無かった場合には、所定の異常コード番号の異常履歴情報(累積異常発生回数)が第三定数108aの中の特定の個別データとして保存されてから、分割ブロックの初期化処理が行われるように構成されている。
The operation start step in the control flow of FIGS. 7 to 15 described above is a subroutine program start step. When these control flows are normally completed, the original control in which the subroutine call was performed is performed. Move to the next step after the step. However, in the case of an abnormal end, an abnormal process is executed by a control flow (not shown) positioned above these control flows. For example, if all the divided
その他、以上で説明した個々の制御フローの上位に位置する図示しない制御フローについて補足すると以下のとおりである。先ず、RAMメモリ112Aのイメージメモリ領域108から不揮発データメモリ113Aへのデータの転送は次のように制御されている。
(一)全分割ブロック113a〜113dの初期化と第1ブロック113aの書込み開始のときには、第一ツール105Aからの第一定数108aのみならず、イメージメモリ領域108に格納された第二定数108bと第三定数108cの初期値も転送可能であり、このときには第二ツール106Aは接続されていない。
(二)第二ツール106Aから第二定数108bを転送するときは、第二定数108bのみが転送され、イメージメモリ領域108内の第一定数108a・第三定数108cは、不揮発データメモリ113Aへは転送されることは無い。
(三)第一・第二ツール105A・106Aが接続されていないときには、イメージメモリ領域108内の第一定数108a・第二定数108bがデータメモリ113Aへ転送されることはなく、第三定数108cのみが転送可能である。
In addition, a supplemental description of a control flow (not shown) positioned above the individual control flows described above is as follows. First, data transfer from the
(1) When initializing all the divided
(2) When the second constant 108b is transferred from the
(3) When the first and
次に、不揮発データメモリ113AからRAMメモリ112Aのイメージメモリ領域108へのデータの転送は次のように制御されている。
(一)外部電源101Aの「異常電圧低下」、又は「電源線の断線」が電源投入時点で検出されるか、或いは制御電源109Aが補助電圧Vup出力も持たない形式である場合には、電源リレー102が閉路してマイクロプロセッサ110Aが動作を開始した時点において、不揮発データメモリ113Aの第一定数領域S10・第二定数領域S20・第三定数領域S300からRAMメモリ112Aのイメージメモリ領域108へ第一定数108a・第二定数108b・第三定数108cの最新データが転送される。
(二)外部電源101Aの異常電圧低下が発生せず、電源線の断線も検出されず、制御電源109Aが正常な補助電圧Vupを発生している場合でも、イメージメモリ領域108内のデータに符号誤りが検出された場合には、電源投入直後又は運転中において不揮発データメモリ113Aからイメージメモリ領域108に対して、対象となるデータ格納領域内の最新データが転送される。
(三)電源投入直後に不揮発データメモリ113Aの状態チェックを行って、電源遮断前にステータスメモリ112aに格納されていたステータス情報と、新たにチェックされたステータス情報とが合致しているかどうかを点検し、不一致であればイメージメモリ領域108内のデータにも誤りが発生していると判断して、電源投入直後に不揮発データメモリ113Aからイメージメモリ領域108に対して最新データが転送される。
Next, data transfer from the
(1) If an “abnormal voltage drop” or “disconnection of the power supply line” of the
(2) Even when the abnormal voltage drop of the
(3) Immediately after the power is turned on, the state of the
以上の説明では、電子制御装置100Aは、例えばエンジン制御装置などの車載電子制御装置であるとして説明したが、その他に一般市販される自動化機器における専用制御装置として適用することも可能である。その場合、自動化機器の製造メーカが書込みするべき第二定数について、その内容が電子制御装置のメーカに通知され、電子制御装置のメーカ側において第一・第二定数をまとめて第一定数領域S10に格納し、第二定数領域S20を省略することも可能である。
In the above description, the
又、外部電源101Aは、バッテリではなく、一般の商用交流電源が使用され、電源回路109Aは、供給された交流電圧から制御電圧Vccを生成し、保持電圧Vupは内蔵バッテリから得ることも可能である。或いは、補助電源となる外部バッテリや内臓バッテリを持たず、RAMメモリ112Aのイメージメモリ領域108に格納されたデータは不揮発データメモリ113Aによって停電記憶され、運転開始時には必ず不揮発データメモリ113Aからイメージメモリ領域108へ転送復帰するようにしてもよい。
The
(3)実施の形態1の要点及び特徴
[請求項1対応]
以上の説明で明らかなとおり、この発明の実施の形態1による電子制御装置は、入力信号回路103と出力信号回路104とが接続されるマイクロプロセッサ110Aと、当該マイクロプロセッサと協働する不揮発プログラムメモリ111Aと揮発性のRAMメモリ112Aと不揮発データメモリ113Aとを備え、前記前記不揮発プログラムメモリ111Aに書込みされた入出力制御プログラム107Aと、前記不揮発データメモリ113Aに格納された制御定数の値と、前記入力信号回路103の信号状態に応動して前記出力信号回路104に制御出力信号を送出する電子制御装置100Aであって、
前記不揮発データメモリ113Aは、ブロック単位で個別に一括消去が可能な複数の分割ブロック113a〜113dを有する不揮発性のメモリによって構成されている。
前記各分割ブロック113a〜113dは、更に、書込み頻度又は書込み時期が異なる複数のデータ格納領域S10・S20・S300に仕分けされている。
前記各データ格納領域S10・S20・S300は、更に、読出/書込単位となる複数のセクションS11・S12、S21〜S24、S301〜S320によって構成され、当該セクションには複数の個別データが所定順序で書込まれ、一つのセクションのデータ容量C10・C20・C300は、書込みされる個別データの個数に対応したバイト数となっている。
前記複数のセクションS11・S12、S21〜S24、S301〜S320には、対象となる分割ブロックの一括消去を行った後に順次新たなデータがセクション単位で格納され、当該対象分割ブロックの中のどれかのデータ格納領域が満杯となってデータが書込まれていない空 セクションが無くなったときには、予め一括消去された他の分割ブロックの該当データ格納領域の先頭セクションに新たなデータが書込まれ、元の分割ブロックの中の他のデータ格納領域に書込まれていた最新のデータは、新たな分割ブロックの該当データ格納領域の先頭セクションに転送格納される。
元の分割ブロック内のデータは少なくとも前記新たな分割ブロックへの最新データの転送書込みが完了した後に一括消去されるものであると共に、前記データ格納領域S10・S20・S300内のセクション数N10・N20・N300は書込み頻度の多いものほど多くのセクションが割り当てられている。
(3) Main points and features of Embodiment 1 [Claim 1]
As is apparent from the above description, the electronic control device according to the first embodiment of the present invention includes a
The
Each of the divided
Each of the data storage areas S10, S20, and S300 is further composed of a plurality of sections S11, S12, S21 to S24, and S301 to S320 serving as read / write units. The data capacity C10, C20, C300 of one section is the number of bytes corresponding to the number of individual data to be written.
In the plurality of sections S11, S12, S21 to S24, and S301 to S320, new data is sequentially stored in section units after batch erasing of the target divided blocks, and any of the target divided blocks is stored. When the data storage area becomes full and there are no empty sections in which no data has been written, new data is written to the first section of the corresponding data storage area of another divided block that has been erased in advance. The latest data written in the other data storage area in the divided block is transferred and stored in the head section of the corresponding data storage area in the new divided block.
The data in the original divided block is erased at least after the transfer and writing of the latest data to the new divided block is completed, and the number of sections in the data storage areas S10, S20, and S300 is N10 and N20. -N300 is assigned more sections as it is written more frequently.
[請求項2対応]
前記分割ブロック113a〜113dの中で、セクション数N10・N20・N300とデータ容量C10・C20・C300の積が最も大きい主たるデータ格納領域の合計データ容量Aと、その他の従となるデータ格納領域全体のセクション数とデータ容量の積である合計データ容量Bとの比率B/(A+B)は、前記分割ブロックの個数Nの逆数よりも小さい値となっている。
以上のとおり、本願の請求項2の発明に関連して、主たるデータ格納領域の合計データ容量とその他の従となるデータ格納領域の合計データ容量との比率は分割ブロックの個数の逆数に関連して制限されている。
従って、主たるデータ格納領域が満杯になって次の分割ブロックに移行するときに、他のデータ格納領域の最新データを転送移動させる必要はあるが、他のデータ格納領域のために専用の分割ブロックを備えるよりは、一つの分割ブロックに対する一括消去回数を削減することができる特徴がある。
[Claim 2]
Among the divided
As described above, in relation to the invention of
Therefore, when the main data storage area becomes full and moves to the next divided block, it is necessary to transfer and move the latest data in the other data storage area, but a dedicated divided block for the other data storage area. Is characterized in that the number of batch erasures for one divided block can be reduced.
[請求項3対応]
前記不揮発データメモリ113Aの各分割ブロック113a〜113d内に設けられた前記データ格納領域は、第一・第二・第三定数領域S10・S20・S300又は少なくとも第一・第三定数領域S10・S300の複数領域に仕分けされている。
前記第一定数領域S10は、前記電子制御装置100Aの製造メーカが当該電子制御装置の出荷調整を行う時点において、出荷調整設備として準備された第一ツール105Aから転送書込みされる第一定数108aの格納領域である。
当該第一定数108aは、前記電子制御装置100A自体の機種区分に対応した制御定数又は前記入出力制御プログラム107Aの一部の選択番号情報、或いは当該電子制御装置内部の部品特性のバラツキ変動を補正するための校正定数、当該電子制御装置の製造番号の少なくとも一つを包含している。
前記第二定数領域S20は、前記電子制御装置100Aが組込まれる合体製品又は合体設備の製造メーカ又は設備管理部門が、当該合体製品・設備の試運転調整を行う時点において、検査調整設備として準備された第二ツール106Aから転送書込みされる第二定数108bの格納領域である。
当該第二定数108bは、前記電子制御装置100Aが組込まれる合体製品・設備の型名・機種に対応した制御定数又は前記入出力制御プログラム107Aの一部の選択番号情報、或いは前記電子制御装置100Aに接続された入出力部品の部品特性のバラツキ変動を補正するための校正定数の少なくとも一つを包含している。
前記第三定数領域S300は、前記電子制御装置100Aの実働運転中に於いて、前記RAMメモリ112Aに格納された第三定数108cが、少なくとも前記電子制御装置100Aの運転停止の直後又は運転中の適時に転送書込みされる第三定数の格納領域である。
当該第三定数108cは、前記電子制御装置100Aの内蔵部品又は外部接続部品の特性変動情報、或いは改善された運転特性を得るための学習情報、或いは異常発生履歴情報の少なくとも一つを包含している。
以上のとおり、本願の請求項3の発明に関連して、不揮発データメモリの各分割ブロック内に設けられたデータ格納領域は、第一・第二・第三定数領域又は少なくとも第一・第三定数領域の複数領域に仕分けされ、各定数領域のセクション数と当該セクションのデータ容量であるバイト数が予め決定されている。
従って、各定数領域空きセクションに対して、異なる時と場所においてデータの書込みを行うのが容易となると共に、各定数領域の書込み頻度が容易に推定され、各定数領域のセクション数とバイト数の決定が容易となる特徴がある。
[Corresponding to claim 3]
The data storage area provided in each of the divided
The first constant area S10 is a first constant that is transferred and written from the first tool 105A prepared as the shipping adjustment facility when the manufacturer of the
The first constant 108a is a control constant corresponding to the model classification of the
The second constant region S20 was prepared as an inspection adjustment facility when the manufacturer or facility management department of the combined product or combined equipment in which the
The second constant 108b is a control constant corresponding to the model name / model of the combined product / equipment in which the
In the third constant area S300, during the actual operation of the
The third constant 108c includes at least one of characteristic variation information of built-in parts or external connection parts of the
As described above, in relation to the invention of
Therefore, it becomes easy to write data to each constant area empty section at different times and locations, and the writing frequency of each constant area can be easily estimated, and the number of sections and bytes of each constant area can be estimated. There is a feature that makes the decision easy.
[請求項4対応]
前記不揮発データメモリ113A;113Bの各分割ブロック内に設けられた前記データ格納領域は、前記第一・第二・第三定数領域S10・S20・S300又は第一・第三定数領域S10・S300に加えてチェック領域S0となる一つのセクションS1が付加されている。
当該チェック領域S0内の一つのセクションS1の前半領域には、前記分割ブロック113a〜113dの一括消去が行われてから、前記データ格納領域S10・S20・S300の全てのデータ格納領域内で少なくとも一つのセクションに対して有効なデータが書込まれた時点で所定の確定定数が書込まれると共に、どれか一つのデータ格納領域であっても当該データ格納領域内のどのセクションにも有効なデータが書込まれていない場合には前記確定定数が書込まれていないブランクブロックの状態となるものである。
以上のとおり、本願の請求項4の発明に関連して、不揮発データメモリの各分割ブロック内にはチェック領域が設けられ、当該チェック領域には分割ブロック内の全てのデータ格納領域に少なくとも一つの書込済セクションがあるかどうかの判別情報が格納されるようになっている。
従って、分割ブロックの移行過程では、次ブロックの全データ格納領域に最新データを書込んでから、当該次ブロックのチェック領域の書込みが行われるので、チェック領域がブランクでない場合は、全データ格納領域に最新データが書込まれたことが確認されると共に、多数の分割ブロックを有する場合にはチェック領域の内容を監視することによって容易に最新ブロックの検索が行えるようにすることができる特徴がある。
[Corresponding to claim 4]
The data storage area provided in each divided block of the
In the first half area of one section S1 in the check area S0, after the
As described above, in relation to the invention of
Therefore, in the transition process of the divided block, since the latest data is written in the entire data storage area of the next block and then the check area of the next block is written, if the check area is not blank, the entire data storage area It is confirmed that the latest data has been written in, and when there are a large number of divided blocks, the latest block can be easily searched by monitoring the contents of the check area. .
[請求項5対応]
前記チェック領域S0内の一つのセクションS1の後半領域には、前記確定定数が書込まれた時点で当該分割ブロックに対する一括消去回数データが書込まれ、分割ブロックの移行が行われときには移行後の分割ブロックの一括消去回数は移行直前 の現在の分割ブロックのチェック領域に書込まれていた一括消去回数に1を加算した値となっている。
以上のとおり、本願の請求項5の発明に関連して、不揮発データメモリの各分割ブロック内のチェック領域には一括消去回数データが書込まれるようになっている。
従って、不揮発データメモリの寿命管理が容易に行えると共に、複数の分割ブロックの中では一括消去回数が大きい方の分割ブロックが最新の分割ブロックであると判別することができる特徴がある。
[Claim 5]
In the latter half of one section S1 in the check area S0, the batch erase count data for the divided block is written at the time when the definite constant is written, and when the divided block is transferred, The number of batch erases of the divided block is a value obtained by adding 1 to the number of batch erases written in the check area of the current divided block immediately before the transfer.
As described above, in relation to the invention of
Therefore, the lifetime management of the nonvolatile data memory can be easily performed, and among the plurality of divided blocks, it is possible to determine that the divided block having the larger number of batch erases is the latest divided block.
[請求項6対応]
前記チェック領域S0内には前記確定定数と一括消去回数データが書込まれる一つのセクションS1に加えて、少なくとも1個の予備セクションS2が付加されていて、分割ブロックの一括消去を行ったときに前記チェック領域S0内の一つのセクションS1の消去が行えなかった場合には、再度の一括消去を行ったうえでなお消去できなかったセクションに替わって前記予備セクションS2が適用されるものである。
以上のとおり、本願の請求項6の発明に関連して、不揮発データメモリの各分割ブロック内のチェック領域には一つのセクションが消去不良となった場合の予備セクションが設けられている。
従って、一つのセクションが不良となったことによって一つの分割ブロック全体が使用
不可能にならないようにすることができる特徴がある。
[Corresponding to claim 6]
In the check area S0, at least one spare section S2 is added in addition to one section S1 in which the fixed constant and the batch erase count data are written, and when the divided block is batch erased When one section S1 in the check area S0 cannot be erased, the spare section S2 is applied in place of the section that could not be erased after performing batch erase again.
As described above, in relation to the invention of
Therefore, there is a feature that one whole divided block cannot be made unusable due to one section becoming defective.
[請求項7対応]
前記不揮発データメモリ113Aは、少なくとも3個以上の分割ブロック113a〜113dを備え、現在書込みが行われている分割ブロック113aの中のどこかのデータ格納領域S10・S20・S300(例えば第三定数領域S300)に於いて空セクションが無くなった場合には、まず次次順位の分割ブロック113cの一括消去を行い、続いて確認処理として次順位の分割ブロック113bの一括消去を行い、当該次順位の分割ブロック113bの該当データ格納領域(第三定数領域S300)の先頭セクションに新たなデータが書込まれ、元の分割ブロック113aの中の他のデータ格納領域(第一定数領域S10と第二定数領域S20)に書込まれていた最新のデータは、前記次順位の分割ブロック113bの該当データ格納領域(第一定数領域S10と第二定数領域S20)の先頭セクションに転送格納され、前記分割ブロック113a〜113dの移行に当たっては、一括消去済であるブランクブロックの前にあるブランクブロックの分割ブロックへ移行するようになっている。
以上のとおり、本願の請求項7の発明に関連して、不揮発データメモリは3個以上の分割ブロックを備え、分割ブロック間の移行時には次次順位の分割ブロックを先行して一括消去しておくようになっている。
従って、例えば次順位の分割ブロックに対するデータの書込み中に停電が発生し、再度電源がONされた状態に於いては、先に一括消去されてブランクブロックとなっている次々順位の分割ブロックを検索し、その前にある分割ブロックに対してデータの書込みを行えばよく、常に一個のブランクブロックを確保しておくことによって書込み対象となる分割ブロックの検索が容易となる特徴がある。
又、一括消去が未完了となった分割ブロックが次順位の分割ブロックとなった場合には確認処理としての一括消去が実施されてからデータの書込みが開始されるので、無効なセクションの介在を除去することができる特徴がある。
尚、一括消去済の分割ブロックを再度一括消去した場合には寿命に影響がないので、チェック領域に書込まれる一括消去回数データは当該分割ブロックにデータの書込みが行われ、チェック領域に対して確定定数が書込まれた時点で1回の一括消去として計上されるようになっている。
[Corresponding to claim 7]
The
As described above, in relation to the invention of claim 7 of the present application, the nonvolatile data memory has three or more divided blocks, and at the time of transition between the divided blocks, the next-order divided blocks are preliminarily erased in advance. It is like that.
Therefore, for example, when a power failure occurs while data is being written to the next-order divided block and the power is turned on again, the next-order divided block that has been erased all at once and becomes a blank block is searched. However, it suffices to write data to the previous divided block, and by always ensuring one blank block, it is easy to search for the divided block to be written.
In addition, if the divided block for which batch erasure has not been completed becomes the next-ranked divided block, data writing is started after the batch erasure is performed as a confirmation process. There are features that can be eliminated.
Note that if the batch erased divided block is erased once again, there is no effect on the life, so the batch erase count data written to the check area is written to the check block and the data is written to the check area. When a definite constant is written, it is counted as one batch erasure.
[請求項8対応]
前記不揮発プログラムメモリ111Aには、前記入出力制御プログラム107Aと、当該入出力制御プログラムに対して一定不変の固定定数を包含すると共に、前記不揮発データメモリ113Aに格納される前記第一定数108a又は第二定数108b又は第三定数108cに関連する参考定数107aが格納されている。
前記参考定数107aは、前記第一・第二・第三定数108a・108b・108cの中の変動情報の一部、又は運転特性の学習情報の一部に関する許容変動範囲である上下限値データと、前記第一・第二・第三定数の中の未確定定数に対して適用される初期設定データであり、当該初期値設定データは、少なくとも前記電子制御装置100Aの初回運転開始前に前記分割ブロック113a〜113dの一つの中の第一・第二・第三定数領域S10・S20・S300の先頭セクションに転送格納されるようになっている。
以上のとおり、本願の請求項8の発明に関連して、不揮発プログラムメモリには固定定数と参考定数とが格納されている。
従って、一定不変の固定定数が不揮発データメモリに格納されないので、不揮発データメモリの容量を削減することができると共に、電子制御装置の運転中に逐次定数が決定される特性変動情報や運転特性の学習情報については予め初期設定値を不揮発データメモリに格納して、次善の定数によって運転開始することができる特徴がある。
又、電子制御装置の運転中に逐次定数が決定される特性変動情報や運転特性の学習情報について、決定された定数が所定の上下限値以内であるかどうかを判定したり、RAMメモリに格納されるこれらの定数にエラーが発生していないかどうかを判定することができる特徴がある。
更に、第一・第二の定数の一部が未確定である場合に仮の定数として参考定数の中の初期値データを適用することができる特徴がある。
[Corresponding to claim 8]
The
The reference constant 107a includes upper and lower limit value data that is an allowable fluctuation range relating to a part of the fluctuation information in the first, second, and
As described above, in relation to the invention of claim 8 of the present application, the fixed constant and the reference constant are stored in the nonvolatile program memory.
Therefore, since a fixed constant that does not change is not stored in the nonvolatile data memory, it is possible to reduce the capacity of the nonvolatile data memory and to learn characteristic variation information and operational characteristics in which the constant is determined sequentially during operation of the electronic control unit. The information has a feature that an initial set value is stored in advance in a nonvolatile data memory, and operation can be started by a suboptimal constant.
In addition, for characteristic variation information for which constants are sequentially determined during operation of the electronic control unit and learning information for operating characteristics, it is determined whether the determined constant is within a predetermined upper and lower limit value, or stored in a RAM memory. It is possible to determine whether or not an error has occurred in these constants.
Further, there is a feature that the initial value data in the reference constant can be applied as a temporary constant when some of the first and second constants are uncertain.
[請求項9対応]
前記マイクロプロセッサ110Aは、前記不揮発データメモリ113Aに対する一括消去指令信号と、ブランクチェック指令信号を発生し、当該ブランクチェック指令を受信した前記不揮発データメモリ113Aは、少なくとも前記セクション単位で消去済であるか否かの判定情報を返信する。
前記マイクロプロセッサ110Aは、一括消去を行うことによって、消去済となったセクションは空セクションであると判定する。
前記マイクロプロセッサ110Aは、一括消去を行っても消去できなかったセクションがあるか、又は前記不揮発データメモリ113Aに対するデータの書込み中に停電が発生したことが原因となって、一つのセクションの中でデータの書込み部分と未書込み部分が混在していることが検出された場合には、当該セクションは無効セクションであると判定すると共に、セクション内にデータが存在して無効セクションではないセクションを有効セクションであると判定する。
前記マイクロプロセッサ110Aは、前記不揮発データメモリ113Aの読出しを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションに格納されたデータを読出する。
前記マイクロプロセッサ110Aは、前記不揮発データメモリ113Aの書込みを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションから逆方向に検索して初めて検出された空セクションにデータを書込みする。
以上のとおり、本願の請求項9の発明に関連して、マイクロプロセッサは不揮発データメモリに関して空セクション、無効セクション、有効セクションを判別し、各データ格納領域の最終セクションから順次検索して読出しセクションと書込みセクションを確定するように構成されている。
従って、無効セクションが存在しても、直ちに分割ブロックの更新や一括消去が行われず、空セクションを残さないようにしながら次の空セクションにデータが書込まれるので、不揮発データメモリの一括消去回数を削減することができる特徴がある。
又、不揮発データメモリの読出しにおいては無効セクションは除外して最新の有効セクションから読出しを行うことができる特徴がある。
[Corresponding to claim 9]
The
The
The
When reading data from the
When the
As described above, in relation to the invention of claim 9 of the present application, the microprocessor determines an empty section, an invalid section, and a valid section with respect to the nonvolatile data memory, and sequentially searches from the last section of each data storage area to obtain a read section. It is configured to determine the writing section.
Therefore, even if an invalid section exists, divided blocks are not updated or erased immediately, and data is written to the next empty section without leaving an empty section. There are features that can be reduced.
Further, in the reading of the nonvolatile data memory, there is a feature that the invalid section can be excluded and the latest valid section can be read.
[請求項10対応]
前記マイクロプロセッサ110Aは、前記不揮発データメモリ113Aの書込みを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションから逆方向に検索して初めて検出された空セクションにデータを書込みすると共に、当該空セクションに正しくデータの書込みが行えなかった場合には更に逆方向に検索して新たに検出された空セクションにデータを書込みする。
以上のとおり、本願の請求項10の発明に関連して、不揮発データメモリの各セクションに対する書込み失敗が発生したときには、次のセクションに書込むように構成されている。
従って、書込みセクションの一部にセルの異常があった場合でも、次のセクションに対して正しいデータを書込むことができる特徴がある。
[Corresponding to claim 10]
When the
As described above, in relation to the invention of claim 10 of the present application, when a write failure occurs in each section of the nonvolatile data memory, the next section is written.
Therefore, even if there is a cell abnormality in a part of the write section, there is a feature that correct data can be written in the next section.
[請求項11対応]
前記RAMメモリ112Aは、前記不揮発データメモリ113Aの消去・書込状態に対応したデータが書込まれるステータスメモリ112aを包含している。
前記ステータスメモリ112aには、少なくとも現在時点で書込が進行している最新の分割ブロック113a〜113dの識別番号情報と、当該最新分割ブロック内の各データ格納領域S10・S20・S300に於いて最新データが書込まれたセクション番号情報とが格納されている。
以上のとおり、本願の請求項11の発明に関連して、RAMメモリは不揮発データメモリの消去・書込状態に対応したデータが書込まれるステータスメモリを包含している。
従って、最新データが格納されている読出しセクション番号を検索したり、最新データを書込むための書込みセクション番号を検索するのは電源投入直後の一回だけ行えばよいので処理速度が高速となる特徴がある。
[Corresponding to claim 11]
The
In the
As described above, in relation to the invention of claim 11 of the present application, the RAM memory includes a status memory in which data corresponding to the erase / write state of the nonvolatile data memory is written.
Therefore, searching for the read section number in which the latest data is stored or searching for the write section number for writing the latest data needs to be performed only once immediately after the power is turned on. There is.
[請求項12対応]
前記マイクロプロセッサ110A、RAMメモリ112A、不揮発プログラムメモリ111A、不揮発データメモリ113Aは、外部電源101Aから運転用電源スイッチが閉路されたことによって付勢される電源リレー102の出力接点と、駆動電源端子102aとを介して給電される。
前記電源リレー102は、前記電源スイッチが開路されてから所定の遅延給電時間をおいて消勢されるものであると共に、前記RAMメモリ112Aは前記駆動電源端子102aに給電されていない期間においても補助電源によって給電されるか、又は前記駆動電源端子102aに給電されていない期間においては当該RAMメモリに対する給電も遮断される。
前記補助電源は補助電源端子101aに直接接続された外部バッテリ101Aであるか、又は内蔵バッテリである。
前記電源リレー102が消勢されている期間において、前記RAMメモリ112Aに対する給電が停止される場合、又は給電が持続される場合であっても前記補助電源の電圧が異常低下するか、又は補助電源回路が遮断されて、前記RAMメモリ112Aの記憶内容が消失したとき、又は前記ステータスメモリ112aの内容が異常であるときに、前記電源リレー102が付勢されて前記マイクロプロセッサ110Aが「運転開始」した時点、又は前記マイクロプロセッサ110Aの「実働運転中」に前記不揮発データメモリ113Aの中の少なくとも第三データ格納領域S300に書込まれた最新セクションの内容が前記RAMメモリ112Aのイメージメモリ領域108に転送され、前記マイクロプロセッサ110Aは前記イメージメモリ領域108に書込まれた第三定数108cに基づいて入出力の制御を行なうように構成されている。
以上のとおり、本願の請求項12の発明に関連して、RAMメモリの記憶状態を維持するための補助電源の有無に関わらず、RAMメモリの内容が異常であるとき、又はRAMメモリの内容が疑わしいときには不揮発データメモリに格納された第三定数を読出し使用することができる特徴がある。
又、運転中にRAMメモリに更新書込みされた学習データや異常発生履歴情報は、電源リレーの遅延給電期間に不揮発データメモリに転送退避することができる特徴がある。
[Corresponding to claim 12]
The
The
The auxiliary power supply is an
Even when the power supply to the
As described above, in relation to the invention of claim 12 of the present application, regardless of the presence or absence of an auxiliary power supply for maintaining the storage state of the RAM memory, the content of the RAM memory is abnormal or the content of the RAM memory is When in doubt, the third constant stored in the nonvolatile data memory can be read and used.
Further, the learning data and abnormality occurrence history information updated and written in the RAM memory during operation can be transferred and saved to the nonvolatile data memory during the delay power feeding period of the power relay.
実施の形態2.
(1)構成の詳細な説明
以下、この発明の実施の形態2による電子制御装置の構成を、その全体構成を示すブロック図である図16と、不揮発データメモリのセクション構成図である図17に基づいて詳細に説明する。尚、各図に於いて同一符号は同一又は相当部分を示している。
(1) Detailed Description of Configuration Hereinafter, the configuration of an electronic control apparatus according to
先ず、図16に於いて、電子制御装置100Bは、マイクロプロセッサ110Bと不揮発プログラムメモリ111Bと揮発性のRAMメモリ112Bとフラッシュメモリである不揮発データメモリ113Bを主体として構成され、実態としては例えば工場設備に使用される特殊なプログラマブルコントローラを構成していて、一般商用交流電源である外部電源101Bから電源リレー102を介して給電されている。尚、電源リレー102は、図示しない電源スイッチが投入されると即時に閉路し、電源スイッチが遮断されると所定の遅延給電期間をおいてから開路するように構成されている。
First, in FIG. 16, an
入力信号回路103は、図示しないコネクタを介して接続された開閉センサ或いはアナログセンサであり、当該入力信号回路103は、図示しない入力インタフェース回路と入力信号バス130を介してマイクロプロセッサ110Bに接続されている。出力信号回路104は、図示しないコネクタを介して接続された駆動機器或いは表示器等の電気負荷であり、当該出力信号回路104は図示しない出力インタフェース回路と出力信号バス140を介してマイクロプロセッサ110Bに接続されている。
The
第一ツール105Bは、電子制御装置100Bの出荷調整・検査或いは保守点検時に、シリアル信号バス150を介してマイクロプロセッサ110Bに対して接続されるものであり、当該第一ツールは図示しないキーボード、表示器を備えた携帯機器となっている。第二ツール106Bは、第一ツール105Bに代わって電子制御装置100Bにシリアル接続され、当該第二ツール106Bは、電子制御装置100Bが組みまれる設備機器等の合体製品の製造メーカが当該合体製品の出荷調整を行う時点において出荷調整設備として準備されものであるか、或いは電子制御装置100Bを使用するユ−ザの設備管理部門が、設備の据付調整時点で使用ものであって、図示しないキーボード、表示器を備えた携帯機器となっている。尚、設備管理部門は合体製品の製造メーカとは同じ範疇のものであり、以下の説明では合体製品の製造メーカとして説明する。
The
第二ツール106Bには電子制御装置100Bにて使用される入出力制御制御プログラム107Bが格納されており、この入出力制御プログラム107Bは例えばシーケンス制御に適したユーザ言語が使用されている。マイクロプロセッサ110Bは、マスクROMメモリ111bによるシステムプログラムによって上記ユーザ言語でプログラムされた入出力制御プログラム107Bをマイクロプロセッサ110Bに適した機械言語に置き直して入出力制御を行なうように構成されている。
The
このシステムプログラムは更に、第一ツール105B・第二ツール106Bとの交信制御プログラムを包含しており、マイクロプロセッサ110Bはこのシステムプログラムによって第一ツール105Bに格納されている第一定数108aを不揮発データメモリ113Bの第一定数領域S10へ転送する。マイクロプロセッサ110Bはまた、マスクROMメモリ111bによるシステムプログラムによって第二ツール106Bに格納されている入出力制御プログラム107Bを不揮発プログラムメモリ111Bへ転送すると共に、第二ツール106Bに格納されている第二定数108bを不揮発データメモリ113Bの第二定数領域S20へ転送する。
This system program further includes a communication control program for the
尚、入出力制御制御プログラム107Bは、当該入出力制御プログラムに対して一定不変の固定定数を包含すると共に、不揮発データメモリ113Bに格納される後述の第一・第二・第三定数108a・108b・108cに関連する参考定数107aとを包含している。この参考定数107aは、第一・第二・第三定数108a・108b・108cの中の変動情報の一部、又は運転特性の学習情報の一部に関する許容変動範囲である上下限値データと、前記第一・第二・第三定数の中の未確定定数に対して適用される初期設定データであり、当該初期値設定データは少なくとも前記電子制御装置100Bの初回運転開始前に後述の分割ブロック113e・113fの一つの中の第一・第二・第三定数領域S10・S20・S300の先頭セクションに転送格納されるように構成されている。
The input / output
第一ツール105Bは、更に、不揮発データメモリ113Aに転送される第一定数108aを包含し、当該第一定数108aは、前記電子制御装置100A自体の機種区分に対応した制御定数又は入出力制御プログラム107Aの一部の選択番号情報、或いは当該電子制御装置内部の部品特性のバラツキ変動を補正するための校正定数、当該電子制御装置の製造番号などの制御装置固有情報となっている。
The
尚、第一定数108aを第一ツール105Bから不揮発データメモリ113Bへ転送するタイミングは、第一ツール105Bに設けられた転送用の操作キーを押した時点であるか、又は転送用の操作キーを押したときにはRAMメモリ112Bへ転送され、電子制御装置100Bに対する電源スイッチが開路されて、電源リレー102による遅延給電が行われているタイミングでRAMメモリ112Bから不揮発データメモリ113Bへ転送されるように構成されている。
The timing for transferring the first constant 108a from the
第二ツール106Bは、不揮発データメモリ113Bに転送される第二定数108bを包含し、当該第二定数108bは、電子制御装置100Bが組込まれる合体製品・設備の型名・機種に対応した制御定数、或いは前記電子制御装置100Bに接続された入出力部品の部品特性のバラツキ変動を補正する校正定数などの合体製品固有情報となっている。第二定数108bの転送タイミングは、第二ツール106Bの転送用操作キーの操作時点又は電子制御装置100Bの電源スイッチ遮断時点となっている。
The
不揮発プログラムメモリ111Bに格納された入出力制御プログラム107Bによって運転動作を行うマイクロプロセッサ110Bは、電子制御装置100Bの内蔵部品又は外部接続部品の特性変動情報、或いは改善された運転特性を得るための学習情報、或いは異常発生履歴情報等の第三定数112aを生成してRAMメモリ112Bに格納する。不揮発データメモリ113Bは、ブロック単位で一括消去が行われるフラッシュメモリであり、第1・第2の分割ブロック113e・113fを備えている。
The
次に、図17には各分割ブロック内の構成が示されている。図17に於いて、分割ブロック113e・113fの夫々は、チェック領域S0と、データ格納領域となる第一・第二・第三定数領域S10・S20・S300を備えている。チェック領域S0は、例えば16バイトのデータ容量C0を持つセクションS1と、当該セクションS1が異常となった場合に代替使用される予備セクションS2によって構成されている。
Next, FIG. 17 shows a configuration in each divided block. In FIG. 17, each of the divided
第一定数領域S10は、例えば32バイトのデータ容量C10を持ち、セクション数N10[=4]であるセクションS11〜S14によって構成されていて、全体のデータ容量としては[C10×N10=32×4=128バイト]となっている。第二定数領域S20は、例えば96バイトのデータ容量C20を持ち、セクション数N20[=8]であるセクションS21〜S28によって構成されていて、全体のデータ容量としては[C20×N20=96×8=768]バイトとなっている。 The first constant area S10 has a data capacity C10 of 32 bytes, for example, and is composed of sections S11 to S14 having the number of sections N10 [= 4]. The total data capacity is [C10 × N10 = 32 × 4 = 128 bytes]. The second constant area S20 has a data capacity C20 of 96 bytes, for example, and is composed of sections S21 to S28 having the number of sections N20 [= 8]. The total data capacity is [C20 × N20 = 96 × 8]. = 768] bytes.
第三定数領域S300は、例えば384バイトのデータ容量C300を持ち、セクション数N300[=40]であるセクションS301〜S340によって構成されていて、全体のデータ容量としては[C300×N300=384×40=15360]バイトとなっている。 The third constant area S300 has a data capacity C300 of 384 bytes, for example, and is composed of sections S301 to S340 having the number of sections N300 [= 40]. The total data capacity is [C300 × N300 = 384 × 40]. = 15360] bytes.
各セクションは、書込/読出の最小単位となるものであり、各セクションには複数の個別データが所定順序で書込まれ、一つのセクションのデータ容量C10・C20・C300の値は書込みされる個別データの個数に対応したバイト数となっている。尚、各セクションには複数の個別データに加えて符号誤り検出のためのサムデータ、或いは誤り訂正符号データが付加されている。 Each section is a minimum unit of writing / reading, a plurality of individual data is written in a predetermined order in each section, and the values of the data capacities C10, C20, and C300 of one section are written. The number of bytes corresponds to the number of individual data. Each section is added with sum data for detecting a code error or error correcting code data in addition to a plurality of individual data.
又、この実施の形態2に於いては、分割ブロック113e・113fの中で、セクション数N10・N20・N300とデータ容量C10・C20・C300の積が最も大きい主たるデータ格納領域S300の合計データ容量A[=N300×C300=40×384=15360]と、その他の従となるデータ格納領域S0・S10・S20全体のセクション数とデータ容量の積である合計データ容量B[=N0×C0+N10×C10+N20×C20=16×2+32×4+96×8=928]との比率B/(A+B)[=928/(15360+928)=0.057]は前記分割ブロックの個数N[=2]の逆数よりも小さい値となっている。
In the second embodiment, the total data capacity of the main data storage area S300 having the largest product of the number of sections N10, N20, and N300 and the data capacity C10, C20, and C300 in the divided
図16に戻り、消去/書込制御回路114は、マイクロプロセッサ110Bから各種の指令信号COMnを受けて不揮発データメモリ113Bを制御し、不揮発データメモリ113Bから得られた回答信号ANSnをマイクロプロセッサ110Bに返信するように構成されている。指令信号COM1〜COM4の内容と回答信号ANS1〜ANS4の内容は図1の場合と同様である。
Returning to FIG. 16, the erase /
RAMメモリ112Bは、イメージメモリ領域108を備え、このイメージメモリ108は第一ツール105Bから第一定数108aを不揮発データメモリ113Bへ転送するときの中継メモリとして使用されたり、第二ツール106Bから第二定数108bを不揮発データメモリ113Bへ転送するときの中継メモリとして使用されたり、マイクロプロセッサ110Bの運転中に生成される第三定数108cが格納されるように構成されている。
The
RAMメモリ112Bは、不揮発データメモリ113Bの消去・書込状態に対応したデータが書込まれるステータスメモリ112bを包含し、このステータスメモリ112bには、少なくとも現在時点で書込が進行している最新の分割ブロック113e・113fの識別番号情報と、当該最新分割ブロック内の各データ格納領域S10・S20・S300において最新データが書込まれたセクション番号情報とが格納されるように構成されている。
The
電源回路109Bは、例えば商用交流電源である外部電源101Bから運転用電源スイッチが閉路されたことによって付勢される電源リレー102の出力接点と、駆動電源端子102aとを介して給電されると共に、内蔵バッテリ109bからRAMメモリ112Bに給電するように構成されている。電源回路109Bは、電源リレー102が付勢されているときには、例えばDC5Vの安定化された制御電圧Vccを発生して、マイクロプロセッサ110B、不揮発プログラムメモリ111B、RAMメモリ112B、不揮発データメモリ113Bに供給する。電源リレー102が付勢されていないときには、内蔵バッテリ109bがバックアップ電源としてRAMメモリ112Bに給電する。
The
電源リレー102が消勢されている期間に於いて補助電源となる内蔵バッテリ109bの電圧が異常低下するか、又は補助電源回路が断線して、RAMメモリ112Bの記憶内容が消失したとき、又はステータスメモリ112bの内容が異常であるときに、電源リレー102が付勢されてマイクロプロセッサ110Bが運転を開始したとき、又はマイクロプロセッサ110Bの運転中に不揮発データメモリ113Bの中の少なくとも第三データ格納領域S300に書込まれた最新セクションの内容がRAMメモリ112Bのイメージメモリ領域108に転送され、マイクロプロセッサ110Bはイメージメモリ領域108に書込まれた第三定数108cに基づいて入出力の制御を行なう。
When the voltage of the built-in battery 109b serving as the auxiliary power supply is abnormally reduced during the period when the
尚、実態としてはマイクロプロセッサ110Bが運転開始したときには、第三定数108cだけではなく、第一・第二定数108a・108bも不揮発データメモリ113BからRAMメモリ112Bへ転送読出しして、マイクロプロセッサ110BはRAMメモリ112Bのイメージメモリ領域108を参照しながら制御を行なうように構成されている。
Actually, when the
又、ステータスメモリ112bの異常としては、現在時点で書込が進行している最新の分割ブロック113e・113fの識別番号情報が格納されていないか、又は当該最新分割ブロック内の各データ格納領域S10・S20・S300に於いて最新データが書込まれたセクション番号情報が格納されていない状態であり、その他にRAMメモリ112B全体としての符号誤りによってビット情報の混入・欠落が発生している場合も含まれる。
Further, as an abnormality of the
(2)作用・動作の詳細な説明
次に、この発明の実施の形態2による電子制御装置の動作・作用について、実施の形態1との相違点を中心にして説明する。
(2) Detailed Description of Action / Operation Next, the operation / action of the electronic control apparatus according to the second embodiment of the present invention will be described with a focus on differences from the first embodiment.
先ず、前述の図3で示された消去・書込処理に関連して、図16・図17に示す実施の形態2では分割ブロックが2個となっており一方の分割ブロックの第一定数領域S10又は第二定数領域S20又は第三定数領域S300のどれかが満杯(空セクションが無い状態)になれば他方の分割ブロックへ移行し、移行直前において当該移行先の分割ブロックが一括消去されるように構成されている。 First, in relation to the erasing / writing process shown in FIG. 3 described above, in the second embodiment shown in FIGS. 16 and 17, there are two divided blocks, and the first constant of one of the divided blocks. If any of the area S10, the second constant area S20, or the third constant area S300 is full (there is no empty section), the process proceeds to the other divided block. It is comprised so that.
従って、分割ブロックの一括消去中に停電状態が発生しても、他方の分割ブロックに最新データが格納されているので、貴重なデータを消失することはない。又、チェック領域S0の扱いは実施の形態1に於ける図1・図2の場合と同じであり、全てのデータ格納領域S10・S20・S300に対するデータの書込みが完了してから確定定数と一括消去回数とが書込まれるように構成されている。 Therefore, even if a power failure occurs during the batch erasure of the divided blocks, the latest data is stored in the other divided block, so that valuable data is not lost. Further, the handling of the check area S0 is the same as in the case of FIGS. 1 and 2 in the first embodiment, and the definite constants and the batch are collectively written after the data writing to all the data storage areas S10, S20, S300 is completed. The number of times of erasure is written.
次に、図4により示された検索・読出処理に関連して、最新の分割ブロックはチェック領域S0内の一括消去回数が大きい方が最新ブロックであり、この最新ブロックの中の最新セクションは図4の場合と同様に最終セクション側から順次検索して決定されるように構成されている。又、図5で示した異常処理は、実施の形態2に於ける図16・図17のものにおいても同様である。 Next, in relation to the search / read processing shown in FIG. 4, the latest divided block is the latest block when the number of batch erases in the check area S0 is larger, and the latest section in this latest block is shown in FIG. In the same manner as in the case of No. 4, the last section side is sequentially searched and determined. Further, the abnormality process shown in FIG. 5 is the same as that in FIGS. 16 and 17 in the second embodiment.
一方、前述の実施の形態1に於ける図6から図15に至る制御フローに対応した実施の形態2に於ける制御プログラムは、マスクROMメモリ111bに格納されていて、分割ブロックの個数が少ないことに伴う最新ブロックの検索要領が上記のとおりに変更されている。特に、実施の形態1の場合と実施の形態2の場合とでは、図6の全体フローに関しては実行される順番が異なったものとなっている。
On the other hand, the control program in the second embodiment corresponding to the control flow from FIG. 6 to FIG. 15 in the first embodiment is stored in the
図6のフローチャートは、異なる時期で実行される各種の処理を合併して、概括表現したものである。先ず、第一の処理としてはステップ600aからステップ605a・ステップブロック700・ステップ600cが実行されて、第一定数108aが不揮発データメモリ113Bに転送され、この時点では第二・第三定数に対しては例えば架空の初期設定値としてデータ0の転送処理が行われる。
The flowchart of FIG. 6 is a general representation of a combination of various processes executed at different times. First, as the first processing,
続く第二の処理としては、ステップ600aからステップブロック602b・ステップ603b・ステップ605b・ステップブロック700・ステップ600cが実行されて、入出力制御プログラム107Bの転送と、不揮発データメモリ113Bに対する第二定数108bの転送と、第二・第三定数に対する初期設定値の転送処理が行われる。
As subsequent second processing,
同様に、第三の処理としては、ステップ600a・ステップ605c・ステップブロック700・ステップ600cが実行されて、不揮発データメモリ113Bに対する第三定数108cが転送されるが、第三定数108cに関してはステップ601・ステップ605c・ステップ606・ステップ609・ステップ601を循環しながら多数の個別データが順次RAMメモリ112Bに拡充格納され、電源スイッチが遮断された直後に行程ブロック700によって一括して不揮発データメモリ113Bへ転送されることになる。
Similarly, as the third processing,
以上の説明では、RAMメモリ112Bは内蔵バッテリ109bでバックアップされているものとしたが、補助電源となる外部バッテリや内臓バッテリを持たず、RAMメモリ112Bのイメージメモリ領域108に格納されたデータは不揮発データメモリ113Bによって停電記憶され、運転開始時には必ず不揮発データメモリ113Bからイメージメモリ領域108へ転送復帰するようにしてもよい。
In the above description, the
又、第一定数108aと第二定数108bとは、常に不揮発データメモリ113A・113Bから直接読出しするようにしてイメージメモリ108のデータを使用しないようにすることもできる。
Further, the first constant 108a and the second constant 108b can always be read directly from the
以上の説明では、電源スイッチが遮断された直後にイメージメモリ領域108内の少なくとも第三定数108cが不揮発データメモリ113A・113Bに転送されるものとしたが、電子制御装置100A・100Bの実働運転中に於いて何らかの異常が発生した時点で第三定数108cを転送保存することも可能である。
In the above description, it is assumed that at least the third constant 108c in the
又、電子制御装置100A・100Bは、補助電源となる外部バッテリ又は内臓バッテリを備えると共に、低消費電力の計時カウンタを備え、電源遮断されていた時間を含めて経過時間の計測を行い、所定時間間隔で第三定数108cを不揮発データメモリ113A・113Bに転送退避することも可能である。この場合、転送退避は電源スイッチが遮断された後の遅延給電期間において実行され、前回の電源スイッチ遮断から今回の電源スイッチ遮断までの経過時間が短小である場合には、第三定数108cを不揮発データメモリ113A・113Bに転送退避するのを省略するようにしてもよい。
The
(3)実施形態2の要点及び特徴
[請求項1対応]
以上の説明で明らかなとおり、この発明の実施形態2による電子制御装置は、入力信号回路103と出力信号回路104とが接続されるマイクロプロセッサ110Bと、当該マイクロプロセッサと協働する不揮発プログラムメモリ111Bと揮発性のRAMメモリ112Bと不揮発データメモリ113Bとを備え、前記前記不揮発プログラムメモリ111Bに書込みされた入出力制御プログラム107Bと、前記不揮発データメモリ113Bに格納された制御定数の値と、前記入力信号回路103の信号状態に応動して前記出力信号回路104に制御出力信号を送出する電子制御装置100Bであって、
前記不揮発データメモリ113Bは、ブロック単位で個別に一括消去が可能な複数の分割ブロック113e・113fを有する不揮発性のメモリによって構成されている。
前記各分割ブロック113e・113fは更に、書込み頻度又は書込み時期が異なる複数のデータ格納領域S10・S20・S300に仕分けされている。
前記各データ格納領域S10・S20・S300は更に、読出/書込単位となる複数のセクションS11〜S14、S21〜S28、S301〜S340によって構成され、当該セクションには複数の個別データが所定順序で書込まれ、一つのセクションのデータ容量C10・C20・C300は書込みされる個別データの個数に対応したバイト数となっている。
前記複数のセクションS11〜S14、S21〜S28、S301〜S340には、対象となる分割ブロックの一括消去を行った後に順次新たなデータがセクション単位で格納され、当該対象分割ブロックの中のどれかのデータ格納領域が満杯となってデータが書込まれていない空セクションが無くなったときには、予め一括消去された他の分割ブロックの該当データ格納領域の先頭セクションに新たなデータが書込まれ、
元の分割ブロックの中の他のデータ格納領域に書込まれていた最新のデータは、新たな分割ブロックの該当データ格納領域の先頭セクションに転送格納される。
元の分割ブロック内のデータは、少なくとも前記新たな分割ブロックへの最新データの転送書込みが完了した後に一括消去されるものであると共に、前記データ格納領域S10・S20・S300内のセクション数N10・N20・N300は、書込み頻度の多いものほど多くのセクションが割り当てられている。
(3) Main points and features of the second embodiment [corresponding to claim 1]
As is apparent from the above description, the electronic control apparatus according to
The
Each of the divided
Each of the data storage areas S10, S20, and S300 is further composed of a plurality of sections S11 to S14, S21 to S28, and S301 to S340 serving as read / write units. The data capacity C10, C20, C300 of one section is the number of bytes corresponding to the number of individual data to be written.
In the plurality of sections S11 to S14, S21 to S28, and S301 to S340, new data is sequentially stored in section units after batch erasure of the target divided blocks, and any of the target divided blocks is stored. When the data storage area is full and there are no empty sections in which no data is written, new data is written to the first section of the corresponding data storage area of another divided block that has been erased in advance,
The latest data written in the other data storage area in the original divided block is transferred and stored in the head section of the corresponding data storage area in the new divided block.
The data in the original divided block is erased at least after the transfer and writing of the latest data to the new divided block is completed, and the number of sections in the data storage areas S10, S20, S300 is N10. N20 and N300 are assigned more sections as the writing frequency is higher.
[請求項2対応]
前記分割ブロック113e・113fの中で、セクション数N10・N20・N300とデータ容量C10・C20・C300の積が最も大きい主たるデータ格納領域の合計データ容量Aと、その他の従となるデータ格納領域全体のセクション数とデータ容量の積である合計データ容量Bとの比率[B/(A+B)]は、前記分割ブロックの個数Nの逆数よりも小さい値となっている。
以上のとおり、本願の請求項2の発明に関連して、主たるデータ格納領域の合計データ容量とその他の従となるデータ格納領域の合計データ容量との比率は分割ブロックの個数の逆数に関連して制限されている。
従って、主たるデータ格納領域が満杯になって次の分割ブロックに移行するときに、他のデータ格納領域の最新データを転送移動させる必要はあるが、他のデータ格納領域のために専用の分割ブロックを備えるよりは、一つの分割ブロックに対する一括消去回数を削減することができる特徴がある。
[Claim 2]
Among the divided
As described above, in relation to the invention of
Therefore, when the main data storage area becomes full and moves to the next divided block, it is necessary to transfer and move the latest data in the other data storage area, but a dedicated divided block for the other data storage area. Is characterized in that the number of batch erasures for one divided block can be reduced.
[請求項3対応]
前記不揮発データメモリ113Bの各分割ブロック113e・113f内に設けられた前記データ格納領域は、第一・第二・第三定数領域S10・S20・S300又は少なくとも第一・第三定数領域S10・S300の複数領域に仕分けされている。
前記第一定数領域S10は、前記電子制御装置100Bの製造メーカが当該電子制御装置の出荷調整を行う時点に於いて、出荷調整設備として準備された第一ツール105Bから転送書込みされる第一定数108aの格納領域である。
当該第一定数108aは、前記電子制御装置100B自体の機種区分に対応した制御定数、或いは当該電子制御装置内部の部品特性のバラツキ変動を補正するための校正定数、当該電子制御装置の製造番号の少なくとも一つを包含している。
前記第二定数領域S20は、前記電子制御装置100Bが組込まれる合体製品又は合体設備の製造メーカ又は設備管理部門が、当該合体製品・設備の試運転調整を行う時点に於いて、検査調整設備として準備された第二ツール106Bから転送書込みされる第二定数108bの格納領域である。
当該第二定数108bは、前記電子制御装置100Bが組込まれる合体製品・設備の型名・機種に対応した制御定数又は前記入出力制御プログラム107Bの一部の選択番号情報、或いは前記電子制御装置100Bに接続された入出力部品の部品特性のバラツキ変動を補正するための校正定数の少なくとも一つを包含している。
前記第三定数領域S300は、前記電子制御装置100Bの実働運転中に於いて、前記RAMメモリ112Bに格納された第三定数108cが、少なくとも前記電子制御装置100Bの運転停止の直後又は運転中の適時に転送書込みされる第三定数の格納領域である。
当該第三定数108cは、前記電子制御装置100Bの内蔵部品又は外部接続部品の特性変動情報、或いは改善された運転特性を得るための学習情報、或いは異常発生履歴情報の少なくとも一つを包含している。
以上のとおり、本願の請求項3に関連して、不揮発データメモリの各分割ブロック内に設けられたデータ格納領域は、第一・第二・第三定数領域又は少なくとも第一・第三定数領域の複数領域に仕分けされ、各定数領域のセクション数と当該セクションのデータ容量であるバイト数が予め決定されている。
従って、各定数領域空きセクションに対して、異なる時と場所においてデータの書込みを行うのが容易となると共に、各定数領域の書込み頻度が容易に推定され、各定数領域のセクション数とバイト数の決定が容易となる特徴がある。
[Claim 3]
The data storage areas provided in the respective divided
The first constant area S10 is first written and transferred from the
The first constant 108a is a control constant corresponding to the model classification of the
The second constant area S20 is prepared as an inspection adjustment facility when the manufacturer or facility management department of the united product or united equipment in which the
The second constant 108b is a control constant corresponding to the model name / model of the combined product / equipment in which the
In the third constant area S300, during the actual operation of the
The third constant 108c includes at least one of characteristic variation information of built-in parts or external connection parts of the
As described above, in relation to claim 3 of the present application, the data storage area provided in each divided block of the nonvolatile data memory is the first / second / third constant area or at least the first / third constant area. The number of sections in each constant area and the number of bytes as the data capacity of the section are determined in advance.
Therefore, it becomes easy to write data to each constant area empty section at different times and locations, and the writing frequency of each constant area can be easily estimated, and the number of sections and bytes of each constant area can be estimated. There is a feature that makes the decision easy.
[請求項9対応]
前記マイクロプロセッサ110Bは、前記不揮発データメモリ113Bに対する一括消去指令信号とブランクチェック指令信号を発生し、当該ブランクチェック指令を受信した前記不揮発データメモリ113Bは、少なくとも前記セクション単位で消去済であるか否かの判定情報を返信する。
前記マイクロプロセッサ110Bは、一括消去を行うことによって、消去済となったセクションは空セクションであると判定する。
前記マイクロプロセッサ110Bは、一括消去を行っても消去できなかったセクションがあるか、又は前記不揮発データメモリ113Bに対するデータの書込み中に停電が発生したことが原因となって、一つのセクションの中でデータの書込み部分と未書込み部分が混在していることが検出された場合には、当該セクションは無効セクションであると判定すると共に、セクション内にデータが存在して無効セクションではないセクションを有効セクションであると判定する。
前記マイクロプロセッサ110Bは、前記不揮発データメモリ113Bの読出しを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションに格納されたデータを読出する。
[Corresponding to claim 9]
The
The
The
When reading data from the
前記マイクロプロセッサ110Bは、前記不揮発データメモリ113Bの書込みを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションから逆方向に検索して初めて検出された空セクションにデータを書込みする。
以上のとおり、本願の請求項9の発明に関連して、マイクロプロセッサは不揮発データメモリに関して空セクション、無効セクション、有効セクションを判別し、各データ格納領域の最終セクションから順次検索して読出しセクションと書込みセクションを確定するように構成されている。
従って、無効セクションが存在しても、直ちに分割ブロックの更新や一括消去が行われず、空セクションを残さないようにしながら次の空セクションにデータが書込まれるので、不揮発データメモリの一括消去回数を削減することができる特徴がある。
又、不揮発データメモリの読出しにおいては無効セクションは除外して最新の有効セクションから読出しを行うことができる特徴がある。
When writing to the
As described above, in relation to the invention of claim 9 of the present application, the microprocessor determines an empty section, an invalid section, and a valid section with respect to the nonvolatile data memory, and sequentially searches from the last section of each data storage area to obtain a read section. It is configured to determine the writing section.
Therefore, even if an invalid section exists, divided blocks are not updated or erased immediately, and data is written to the next empty section without leaving an empty section. There are features that can be reduced.
Further, in the reading of the nonvolatile data memory, there is a feature that the invalid section can be excluded and the latest valid section can be read.
100A、100B 電子制御装置 COMn 指令信号
101a 補助電源端子 ANSn 回答信号
102 電源リレー ADR ブロック番号又はセクション番号指定
102a 駆動電源端子 WRD 書込データ
103 入力信号回路 RDD 読出データ
104 出力信号回路 105A、105B 第一ツール
S0 チェック領域 106A、106B 第二ツール
S10 第一定数領域 107A、107B 入出力制御プログラム
S20 第二定数領域 107a、107b 参考定数
S300 第三定数領域 108 イメージメモリ領域
108a 第一定数 S1 セクション(チェック領域)
108b 第二定数 S2 予備セクション(チェック領域)
108c 第三定数 S11〜S14 セクション(第一定数領域)
109b 内蔵バッテリ S21〜S28 セクション(第二定数領域)
110A、110B マイクロプロセッサ
S301〜S340 セクション(第三定数領域)
111A、111B 不揮発プログラムメモリ
112A、112B RAMメモリ 112a、112b ステータスメモリ
113A、113B 不揮発データメモリ
113a、113e 第1ブロック 113b、113f 第2ブロック
113c 第3ブロック 113d 第4ブロック
100A, 100B Electronic control unit
108b Second constant S2 Reserved section (check area)
108c Third constant S11 to S14 section (first constant region)
109b Built-in battery S21 to S28 section (second constant area)
110A, 110B Microprocessors S301 to S340 Section (third constant area)
111A, 111B
Claims (12)
前記不揮発データメモリは、ブロック単位で個別に一括消去が可能な複数の分割ブロックを有する不揮発性のメモリにより構成され、
前記各分割ブロックは、書込み頻度又は書込み時期が異なる複数のデータ格納領域に仕分けされ、
前記各データ格納領域は、読出/書込単位となる複数のセクションにより構成され、当該セクションには複数の個別データが所定順序で書込まれ、一つの前記セクションのデータ容量は、書込みされる個別データの個数に対応したバイト数に構成され、
前記複数のセクションには、対象となる前記分割ブロックの一括消去を行った後に順次新たなデータがセクション単位で格納され、当該対象分割ブロックの中のどれかのデータ格納領域が満杯となってデータが書込まれていない空セクションが無くなったときには、予め一括消去された他の分割ブロックの該当データ格納領域の先頭セクションに新たなデータが書込まれ、
元の分割ブロックの中の他のデータ格納領域に書込まれていた最新のデータは、新たな分割ブロックの該当データ格納領域の先頭セクションに転送格納され、
元の分割ブロック内のデータは、少なくとも前記新たな分割ブロックへの最新データの転送書込みが完了した後に一括消去されるものであると共に、
前記データ格納領域内のセクション数は、書込み頻度の多いものほど多くのセクションが割り当てられている
ことを特徴とする電子制御装置。 A microprocessor to which an input signal circuit and an output signal circuit are connected, a nonvolatile program memory that cooperates with the microprocessor, a volatile RAM memory, and a nonvolatile data memory, and an input / output written in the nonvolatile program memory An electronic control device for sending a control output signal to the output signal circuit in response to a control program, a value of a control constant stored in the nonvolatile data memory, and a signal state of the input signal circuit,
The non-volatile data memory is constituted by a non-volatile memory having a plurality of divided blocks that can be collectively erased in units of blocks,
Each of the divided blocks is sorted into a plurality of data storage areas having different writing frequencies or writing times,
Each of the data storage areas is composed of a plurality of sections serving as read / write units. A plurality of individual data is written in a predetermined order in the section, and the data capacity of one section is individually written. It is composed of the number of bytes corresponding to the number of data,
In the plurality of sections, new data is sequentially stored in section units after batch erasure of the target divided blocks, and any data storage area in the target divided blocks becomes full. When there is no empty section to which no data has been written, new data is written to the top section of the corresponding data storage area of another divided block that has been erased in advance,
The latest data written in the other data storage area in the original divided block is transferred and stored in the first section of the corresponding data storage area in the new divided block.
The data in the original divided block is erased at least after the transfer writing of the latest data to the new divided block is completed, and
The number of sections in the data storage area is assigned to a larger number of sections as the frequency of writing increases.
ことを特徴とする請求項1に記載の電子制御装置。 The total data capacity A of the main data storage area where the product of the number of sections and the data capacity is the largest among the divided blocks, and the total data capacity B which is the product of the number of sections and the data capacity of the other subordinate data storage areas 2. The electronic control according to claim 1, wherein a ratio [B / (A + B)] of the total data capacity A and the total data capacity B is smaller than a reciprocal of the number N of the divided blocks. apparatus.
当該第一定数は、前記電子制御装置自体の機種区分に対応した制御定数又は前記入出力制御プログラムの一部の選択番号情報又は当該電子制御装置内部の部品特性のバラツキ変動を補正するための校正定数と、前記電子制御装置の製造番号とのうちの少なくとも一つを包含し、
前記第二定数領域は、前記電子制御装置が組込まれる合体製品又は合体設備の製造メーカ又は設備管理部門が、当該合体製品又は合体設備の試運転調整を行う時点に於いて、検査調整設備として準備された第二ツールから転送書込みされる第二定数の格納領域であり、当該第二定数は、前記電子制御装置が組込まれる合体製品若しくは設備の型名、又は機種に対応した制御定数、又は前記入出力制御プログラムの一部の選択番号情報、又は前記電子制御装置に接続された入出力部品の部品特性のバラツキ変動を補正するための校正定数のうちの少なくとも一つを包含し、
前記第三定数領域は、前記電子制御装置の実働運転中に於いて、前記RAMメモリに格納された第三定数が、少なくとも前記電子制御装置の運転停止の直後又は運転中の適時に転送書込みされる第三定数の格納領域であり、当該第三定数は、前記電子制御装置の内蔵部品若しくは外部接続部品の特性変動情報、又は改善された運転特性を得るための学習情報、又は異常発生履歴情報のうちの少なくとも一つを包含している
ことを特徴とする請求項1又は請求項2に記載の電子制御装置。 The data storage area provided in each divided block of the nonvolatile data memory includes a plurality of first constant areas, second constant areas, and third constant areas, or at least a first constant area and a third constant area. The first constant area is transferred and written from a first tool prepared as a shipping adjustment facility at the time when the electronic control device manufacturer adjusts the shipping of the electronic control apparatus. Storage area for the first constant,
The first constant is used to correct variations in variation of the control constant corresponding to the model classification of the electronic control device itself, part of the input / output control program, or part characteristics inside the electronic control device. Including at least one of a calibration constant and a serial number of the electronic control unit;
The second constant area is prepared as an inspection and adjustment facility at the time when the manufacturer or facility management department of the united product or united facility in which the electronic control device is incorporated performs trial operation adjustment of the united product or united facility. This is a storage area for the second constant transferred and written from the second tool. The second constant is the type name of the combined product or equipment in which the electronic control unit is incorporated, the control constant corresponding to the model, or the input Including at least one of selection number information of a part of the output control program or a calibration constant for correcting variation in the component characteristics of the input / output components connected to the electronic control unit;
In the third constant area, during actual operation of the electronic control unit, the third constant stored in the RAM memory is transferred and written at least immediately after the electronic control unit is shut down or at an appropriate time during operation. The third constant is a storage area of the third constant, and the third constant is characteristic variation information of the internal component or external connection component of the electronic control device, learning information for obtaining improved operating characteristics, or abnormality occurrence history information. The electronic control device according to claim 1, wherein at least one of the electronic control devices is included.
当該チェック領域内の一つのセクションの前半領域には、前記分割ブロックの一括消去が行われてから、前記データ格納領域の全てのデータ格納領域内で少なくとも一つのセクションに対して有効なデータが書込まれた時点で所定の確定定数が書込まれると共に、どれか一つのデータ格納領域であっても当該データ格納領域内のどのセクションにも有効なデータが書込まれていない場合には、前記確定定数が書込まれていないブランクブロックの状態となる
ことを特徴とする請求項3に記載の電子制御装置。 In addition to the first constant area, the second constant area, and the third constant area, the data storage area provided in each divided block of the non-volatile data memory has a section added as a check area. And
In the first half area of one section in the check area, after the divided blocks are collectively erased, valid data for at least one section is written in all the data storage areas of the data storage area. When a predetermined fixed constant is written at the time of loading, and no valid data is written in any section in the data storage area even in any one data storage area, 4. The electronic control device according to claim 3, wherein the electronic control device is in a blank block state in which a definite constant is not written.
前記分割ブロックの移行が行われときには移行後の分割ブロックの一括消去回数は、移行直前の現在の分割ブロックのチェック領域に書込まれていた一括消去回数に「1」を加算した値である
ことを特徴とする請求項4に記載の電子制御装置。 In the second half area of one section in the check area, the batch erase count data for the divided block is written when the definite constant is written,
When the divided block is transferred, the number of batch erases of the divided blocks after the transfer is a value obtained by adding “1” to the number of batch erases written in the check area of the current divided block immediately before the transfer. The electronic control device according to claim 4.
前記分割ブロックの一括消去を行ったときに前記チェック領域内の一つのセクションの消去が行えなかった場合には、再度の一括消去を行った上でもなお消去できなかったセクションに替わって前記予備セクションが適用されるものである
ことを特徴とする請求項4又は請求項5に記載の電子制御装置。 In the check area, at least one spare section is added in addition to one section in which the definite constant and batch erase count data are written,
If one section in the check area cannot be erased when the divided block is erased at once, the spare section replaces the section that could not be erased even after performing batch erase again. The electronic control device according to claim 4, wherein: is applied.
現在書込みが行われている分割ブロックの中のどこかのデータ格納領域に於いて空セクションが無くなった場合には、先ず次次順位の分割ブロックの一括消去を行い、続いて確認処理として次順位の分割ブロックの一括消去を行い、
当該次順位の分割ブロックの該当データ格納領域の先頭セクションに新たなデータが書込まれ、元の分割ブロックの中の他のデータ格納領域に書込まれていた最新のデータは、前記次順位の分割ブロックの該当データ格納領域の先頭セクションに転送格納され、
前記分割ブロックの移行に当たっては、一括消去済であるブランクブロックの前にあるブランクブロックの分割ブロックへ移行する
ことを特徴とする請求項4乃至6のうち何れか1項に記載の電子制御装置。 The nonvolatile data memory includes at least three divided blocks,
If there is no empty section in any data storage area in the divided block currently being written, the divided blocks of the next order are first erased at a time, and then the next order is used as a confirmation process. Erase all the divided blocks at once,
New data is written in the first section of the corresponding data storage area of the divided block of the next order, and the latest data written in the other data storage areas in the original divided block is the data of the next order. It is transferred and stored in the first section of the corresponding data storage area of the divided block,
The electronic control device according to any one of claims 4 to 6, wherein when the divided block is transferred, the divided block is transferred to a divided block of a blank block preceding a blank block that has been erased in a batch.
前記不揮発データメモリに格納される前記第一定数又は第二定数又は第三定数に関連する参考定数が格納され、
前記参考定数は、前記第一定数と第二定数と第三定数との中の変動情報の一部又は運転特性の学習情報の一部に関する許容変動範囲である上下限値データと、前記第一定数と第二定数と第三定数との中の未確定定数に対して適用される初期設定データとのうちの少なくとも一方を含み、
当該初期値設定データは、少なくとも前記電子制御装置の初回運転開始前に前記分割ブロックの一つの中の第一定数領域と第二定数領域と第三定数領域との先頭セクションに転送格納される
ことを特徴とする請求項3に記載の電子制御装置。 The nonvolatile program memory includes the input / output control program and a fixed constant that does not change with respect to the input / output control program.
Reference constants related to the first constant, the second constant, or the third constant stored in the nonvolatile data memory are stored,
The reference constant includes upper and lower limit value data that is an allowable fluctuation range relating to a part of fluctuation information in the first constant, the second constant, and the third constant or a part of learning information of operation characteristics; Including at least one of initial setting data applied to an indeterminate constant among the first constant, the second constant, and the third constant;
The initial value setting data is transferred and stored in the first section of the first constant area, the second constant area, and the third constant area in one of the divided blocks at least before the first operation of the electronic control device is started. The electronic control device according to claim 3.
前記マイクロプロセッサは、一括消去を行うことによって、消去済となったセクションは空セクションであると判定し、
前記マイクロプロセッサは、一括消去を行っても消去できなかったセクションがあるか、又は前記不揮発データメモリに対するデータの書込み中に停電が発生したことが原因となって、一つのセクションの中でデータの書込み部分と未書込み部分が混在していることが検出された場合には、当該セクションは無効セクションであると判定すると共に、セクション内にデータが存在して無効セクションではないセクションを有効セクションであると判定し、
前記マイクロプロセッサは、前記不揮発データメモリの読出しを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションに格納されたデータを読出し、
前記マイクロプロセッサは、前記不揮発データメモリの書込みを行うときには、各データ格納領域の最終セクションから先頭セクションにかけて前記有効セクションを検索し、初めて検出された有効セクションから逆方向に検索して初めて検出された空セクションにデータを書込みする
ことを特徴とする請求項1又は請求項2に記載の電子制御装置。 The microprocessor generates a batch erase command signal and a blank check command signal for the nonvolatile data memory, and determines whether or not the nonvolatile data memory that has received the blank check command has been erased at least in the section unit. Reply
The microprocessor determines that the erased section is an empty section by performing batch erase,
The microprocessor has a section that could not be erased even after batch erasure, or because a power failure occurred while writing data to the nonvolatile data memory. When it is detected that a written part and an unwritten part are mixed, it is determined that the relevant section is an invalid section, and a section which is not an invalid section because data exists in the section is a valid section. And
When reading the nonvolatile data memory, the microprocessor searches the valid section from the last section to the first section of each data storage area, reads the data stored in the valid section detected for the first time,
The microprocessor searches the valid section from the last section to the top section of each data storage area when writing to the nonvolatile data memory, and searches for the first time from the valid section detected for the first time. 3. The electronic control device according to claim 1, wherein data is written in the empty section.
ことを特徴とする請求項9に記載の電子制御装置。 The microprocessor searches the valid section from the last section to the top section of each data storage area when writing to the nonvolatile data memory, and searches for the first time from the valid section detected for the first time. The data is written in the empty section, and when data cannot be correctly written in the empty section, the search is further performed in the reverse direction and the data is written in the newly detected empty section. 9. The electronic control device according to 9.
前記ステータスメモリには、少なくとも現在時点で書込が進行している最新の分割ブロックの識別番号情報と、当該最新分割ブロック内の各データ格納領域に於いて最新データが書込まれたセクション番号情報とが格納されている
ことを特徴とする請求項9に記載の電子制御装置。 The RAM memory includes a status memory in which data corresponding to the erase / write state of the nonvolatile data memory is written,
In the status memory, at least the identification number information of the latest divided block that is currently being written, and the section number information in which the latest data is written in each data storage area in the latest divided block And the electronic control device according to claim 9.
前記電源リレーは、前記電源スイッチが開路されてから所定の遅延給電時間をおいて消勢されるものであると共に、
前記RAMメモリは、前記駆動電源端子に給電されていない期間に於いても補助電源によって給電されるか、又は前記駆動電源端子に給電されていない期間においては当該RAMメモリに対する給電も遮断され、
前記補助電源は、補助電源端子に直接接続された外部バッテリであるか、又は内蔵バッテリであり、
前記電源リレーが消勢されている期間に於いて、前記RAMメモリに対する給電が停止される場合、又は給電が持続される場合であっても前記補助電源の電圧が異常低下するか、又は補助電源回路が遮断されて、前記RAMメモリの記憶内容が消失したとき、又は前記ステータスメモリの内容が異常であるときに、前記電源リレーが付勢されて前記マイクロプロセッサが運転開始した時点、又は前記マイクロプロセッサの実働運転中に前記不揮発データメモリの中の少なくとも第三データ格納領域に書込まれた最新セクションの内容が前記RAMメモリのイメージメモリ領域に転送され、
前記マイクロプロセッサは、前記イメージメモリ領域に書込まれた第三定数に基づいて入出力の制御を行なう
ことを特徴とする請求項11に記載の電子制御装置。 The microprocessor, the RAM memory, the non-volatile program memory, and the non-volatile data memory are connected via an output contact of a power supply relay and a drive power supply terminal that are energized when an operation power switch is closed from an external power source. Powered,
The power relay is de-energized after a predetermined delay power feeding time after the power switch is opened,
The RAM memory is powered by an auxiliary power source even during a period when power is not supplied to the driving power supply terminal, or power supply to the RAM memory is also interrupted during a period when power is not supplied to the driving power supply terminal,
The auxiliary power supply is an external battery directly connected to an auxiliary power supply terminal or an internal battery,
Even when the power supply to the RAM memory is stopped or the power supply is continued during the period when the power supply relay is turned off, the voltage of the auxiliary power supply is abnormally reduced, or the auxiliary power supply When the circuit is shut down and the stored contents of the RAM memory are lost, or when the contents of the status memory are abnormal, the power relay is energized and the microprocessor starts operating, or the micro The content of the latest section written in at least the third data storage area in the nonvolatile data memory during the actual operation of the processor is transferred to the image memory area of the RAM memory,
The electronic control device according to claim 11, wherein the microprocessor performs input / output control based on a third constant written in the image memory area.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009016665A JP4647010B2 (en) | 2009-01-28 | 2009-01-28 | Electronic control unit |
DE102009038641.6A DE102009038641B4 (en) | 2009-01-28 | 2009-08-24 | control unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009016665A JP4647010B2 (en) | 2009-01-28 | 2009-01-28 | Electronic control unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010176280A JP2010176280A (en) | 2010-08-12 |
JP4647010B2 true JP4647010B2 (en) | 2011-03-09 |
Family
ID=42309052
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009016665A Active JP4647010B2 (en) | 2009-01-28 | 2009-01-28 | Electronic control unit |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP4647010B2 (en) |
DE (1) | DE102009038641B4 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5643708B2 (en) * | 2011-03-30 | 2014-12-17 | 株式会社ケーヒン | Electronic control unit |
JP5930940B2 (en) * | 2012-10-31 | 2016-06-08 | 株式会社ケーヒン | Electronic control device for vehicle |
CN103699030B (en) * | 2013-12-06 | 2016-04-06 | 中联重科股份有限公司 | Running parameter save set, the system and method for the working mechanism of engineering machinery |
CN114637469A (en) * | 2022-03-21 | 2022-06-17 | 上海美仁半导体有限公司 | Data read-write method, system, medium and equipment of Flash memory |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007172447A (en) * | 2005-12-26 | 2007-07-05 | Jatco Ltd | Flash memory |
JP2007179460A (en) * | 2005-12-28 | 2007-07-12 | Denso Corp | Electronic control device |
JP2008146254A (en) * | 2006-12-07 | 2008-06-26 | Sony Corp | Storage device, computer system and data processing method for storage device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002007221A (en) * | 2000-06-26 | 2002-01-11 | Matsushita Electric Ind Co Ltd | Method for increasing write guarantee frequency of flash memory |
JP3969494B2 (en) * | 2004-08-31 | 2007-09-05 | 三菱電機株式会社 | In-vehicle electronic control unit |
-
2009
- 2009-01-28 JP JP2009016665A patent/JP4647010B2/en active Active
- 2009-08-24 DE DE102009038641.6A patent/DE102009038641B4/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007172447A (en) * | 2005-12-26 | 2007-07-05 | Jatco Ltd | Flash memory |
JP2007179460A (en) * | 2005-12-28 | 2007-07-12 | Denso Corp | Electronic control device |
JP2008146254A (en) * | 2006-12-07 | 2008-06-26 | Sony Corp | Storage device, computer system and data processing method for storage device |
Also Published As
Publication number | Publication date |
---|---|
DE102009038641A1 (en) | 2010-08-05 |
JP2010176280A (en) | 2010-08-12 |
DE102009038641B4 (en) | 2015-05-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7246268B2 (en) | Method and apparatus for dynamic degradation detection | |
EP1564755B1 (en) | Data management apparatus and method of flash memory | |
CN101763894B (en) | Semiconductor storage device and storage controlling method | |
US6883060B1 (en) | Microcomputer provided with flash memory and method of storing program into flash memory | |
KR101660985B1 (en) | Semiconductor memory device and method of operation the same | |
EP1403771A1 (en) | Non-volatile memory control method | |
EP1683027A2 (en) | Internal maintenance schedule request for non-volatile memory system | |
US20090187305A1 (en) | Method of detecting manipulation of a programmable memory device of a digital controller | |
CN101246738A (en) | Memory system with backup circuit and programming method | |
JP4647010B2 (en) | Electronic control unit | |
JP2006294143A (en) | Nonvolatile semiconductor memory apparatus | |
US8667348B2 (en) | Data writing method for non-volatile memory module and memory controller and memory storage apparatus using the same | |
EP2977907B1 (en) | Data storage device, method for storing data, and onboard control device | |
CN107766174A (en) | Electronic-controlled installation and its information storage means | |
JP5660521B2 (en) | Nonvolatile semiconductor memory device and memory management method | |
JPS623516B2 (en) | ||
JP4153535B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP6040895B2 (en) | Microcomputer and non-volatile memory block management method | |
JPH0817192A (en) | Position storage method by flash memory | |
JP2001056787A (en) | Device and method for write for memory | |
EP2916232B1 (en) | Electronic control device for vehicle | |
US20060123205A1 (en) | Control data storage apparatus and process | |
CN117573155B (en) | Product information processing method and chip | |
CN103064756A (en) | Electronic system and memorizer management method thereof | |
CN114490453A (en) | EEPROM data storage protection control method, computer storage medium and vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20101116 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101207 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131217 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4647010 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131217 Year of fee payment: 3 |
|
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 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |