JP6898186B2 - How to write control devices for automobiles and non-volatile memory - Google Patents
How to write control devices for automobiles and non-volatile memory Download PDFInfo
- Publication number
- JP6898186B2 JP6898186B2 JP2017175706A JP2017175706A JP6898186B2 JP 6898186 B2 JP6898186 B2 JP 6898186B2 JP 2017175706 A JP2017175706 A JP 2017175706A JP 2017175706 A JP2017175706 A JP 2017175706A JP 6898186 B2 JP6898186 B2 JP 6898186B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- operating state
- pkb
- storage block
- writing
- 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
Description
本発明は、データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリを有する自動車用制御装置及び不揮発性メモリの書き込み方法に関する。 The present invention relates to an automobile control device having a non-volatile memory provided with a plurality of storage blocks for redundantly storing data, and a method for writing the non-volatile memory.
特許文献1には、制御対象機器の動作状況に関するデータを不揮発性メモリに書き込み、制御対象機器が障害によって停止した場合に、不揮発性メモリに記憶されているデータから停止前の動作状況を確認して正しく回復するための処理を実行することが開示されている。
In
ところで、不揮発性メモリのデータを冗長に格納するための複数の記憶ブロックに、制御対象機器の作動状態などを示すデータを書き込む処理において、書き込み前に空き領域が無いと判断したときに記憶ブロック単位で消去を行い、消去終了後に書き込み待ちのデータを記憶ブロックに書き込む構成とした場合、制御装置が消去中の一時的なシャットダウンから再起動したときに、格納データが不整合になる可能性があった。 By the way, in the process of writing data indicating the operating state of the controlled device to a plurality of storage blocks for redundantly storing data in the non-volatile memory, when it is determined that there is no free area before writing, the storage block unit. If the data is erased with and the data waiting to be written is written to the storage block after the erase is completed, the stored data may become inconsistent when the control device is restarted from a temporary shutdown during erasure. It was.
本発明は、従来の実情に鑑みてなされたものであり、その目的は、データの書き込み待ちが発生することで格納データが不整合になることを抑制できる、自動車用制御装置及び不揮発性メモリの書き込み方法を提供することを目的とする。 The present invention has been made in view of the conventional circumstances, and an object of the present invention is to provide an automobile control device and a non-volatile memory capable of suppressing inconsistency of stored data due to waiting for data to be written. The purpose is to provide a writing method.
本発明によれば、その1つの態様において、データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリと、前記不揮発性メモリへのアクセスを行う制御部と、を有する、自動車用制御装置であって、前記制御部は、規定のデータを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行し、前記規定データ以外のデータを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない。 According to the present invention, in one aspect thereof , for automobiles, the non-volatile memory having a plurality of storage blocks for storing data redundantly and a control unit for accessing the non-volatile memory. In the control device, the control unit writes the specified data to each of the plurality of storage blocks, then erases the storage blocks whose number of free areas is less than the set number, and performs a plurality of data other than the specified data. After writing to each storage block, the storage block is not erased.
本発明によれば、データの書き込み待ちが発生することを抑制できるため、書き込み待ちによって格納データが不整合になることを抑制できる。 According to the present invention, it is possible to suppress the occurrence of waiting for writing of data, so that it is possible to suppress the inconsistency of stored data due to waiting for writing.
以下、本発明に係る自動車用制御装置及び不揮発性メモリの書き込み方法の実施形態を図面に基づいて説明する。
図1は、自動車1のブレーキシステムの一態様を示す構成図である。
油圧ユニット10は、油圧ユニット10用の電子制御装置(以下、油圧ユニットECU11と称する。)からの指令に応じて、各輪FL,FR,RL,RRのホイルシリンダ圧を調整し、ブレーキキャリパ3FL,3FR,3RL,3RRの作動を制御する。
Hereinafter, embodiments of a control device for an automobile and a method of writing a non-volatile memory according to the present invention will be described with reference to the drawings.
FIG. 1 is a configuration diagram showing one aspect of the brake system of the
The
油圧ユニットECU11は、CPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read-Only Memory)などを含んで構成されるマイクロコンピュータを有して構成される。
また、油圧ユニットECU11には、車輪速センサ12により検出された各車輪速、加速度・角速度センサ13により検出された車両の横方向加速度、前後方向加速度及びヨーレイト、マスタシリンダ圧センサ14により検出されたマスタシリンダ圧の信号などが入力される。
The
Further, in the
また、油圧ユニットECU11には、通信ライン15を介してブレーキストロークセンサ16により検出されたブレーキストロークの信号などが入力される。
また、油圧ユニットECU11とともに、電制ブースタ20用の電子制御装置(以下、電制ブースタECU21と称する。)、電動式パーキングブレーキ装置30用の電子制御装置(以下、電動パーキングECU31と称する。)などが自動車1に備えられている。
Further, a brake stroke signal or the like detected by the
Further, together with the
そして、油圧ユニットECU11、電制ブースタECU21、及び電動パーキングECU31は、通信ライン15を介して相互通信を行う。
電制ブースタECU21は、ブレーキストロークセンサ16により検出されたブレーキストロークの信号などを入力して、係る入力信号に基づき電制ブースタ20を制御し、ブレーキ操作をアシストする力を発生させる。
Then, the
The electronically controlled
左右の後輪RL,RRには、リアキャリパ3RL,3RRを作動させる電動モータ32RL,32RRが設けられていて、リアキャリパ3RL,3RRと、アクチュエータとしての電動モータ32RL,32RRとによって電動式パーキングブレーキ装置30の駆動機構が構成される。
電動パーキングECU31は、自動車1の運転者によりパーキングブレーキスイッチ33がオン側に操作されたとき、又は、油圧ユニットECU11からの作動要求に応じて、電動モータ32RL,32RRを駆動し、電動式パーキングブレーキ装置30を締結状態とする。
The left and right rear wheels RL and RR are provided with electric motors 32RL and 32RR for operating the rear calipers 3RL and 3RR, and the electric
The
図2は、自動車用制御装置である電動パーキングECU31の構成を示すブロック図である。
電動パーキングECU31は、マイクロコンピュータ34を含んで構成され、マイクロコンピュータ34は、CPU(Central Processing Unit)35、不揮発性メモリであるフラッシュEEPROM(Electrically Erasable Programmable Read-Only Memory)36、揮発性メモリであるRAM(Random Access Memory)37を有する。
FIG. 2 is a block diagram showing a configuration of an
The electric parking ECU 31 includes a
CPU35においては、ベーシックソフトウェア35aによってパーキングブレーキスイッチ33の指示状態及び油圧ユニットECU11の指示状態などをアプリケーションプログラム35bに渡す。
そして、アプリケーションプログラム35bは、パーキングブレーキ指示に応じて電動モータ32RL,32RRの制御指示をベーシックソフトウェア35aに通知し、RAM37上のパーキングブレーキ(電動モータ32RL,32RR)の作動状態(以下、PKB作動状態と称する。)を示すデータを更新させる。
In the
Then, the
更に、CPU35において、ベーシックソフトウェア35aはRAM37上のPKB作動状態を示すデータの更新を検出すると、フラッシュEEPROM36に対しPKB作動状態の書き込み処理を実施する。
このように、CPU35は、不揮発性メモリであるフラッシュEEPROM36へのアクセスを行う制御部としての機能を備える。
Further, when the
As described above, the
図3は、フラッシュEEPROM36のデータ構成の一態様を示す。
フラッシュEEPROM36は、図3(A)に示すように、複数の記憶ブロックに分割され、プログラムなどが格納される記憶ブロックの他、PKB作動状態を示すデータを冗長に格納するための2つの記憶ブロックA,Bを備えている。
つまり、CPU35は、PKB作動状態を示すデータを、記憶ブロックA、記憶ブロックBの双方に書き込むよう構成されている。
なお、フラッシュEEPROM36における消去は、記憶ブロックA,Bの単位で実施される。
FIG. 3 shows an aspect of the data structure of the flash EEPROM 36.
As shown in FIG. 3A, the flash EEPROM 36 is divided into a plurality of storage blocks, and in addition to a storage block for storing programs and the like, two storage blocks for redundantly storing data indicating a PKB operating state. It has A and B.
That is, the
The erasing in the flash EEPROM 36 is performed in units of the storage blocks A and B.
図3(B)は、記憶ブロックA,Bに共通するデータ構成の一態様を示す。
記憶ブロックA,Bは、電動パーキングECU31のセルフシャットオフ時に故障情報、診断情報、学習情報などを書き込む領域と、PKB作動状態を記録する領域とに分けられる。
FIG. 3B shows an aspect of the data structure common to the storage blocks A and B.
The storage blocks A and B are divided into an area for writing failure information, diagnostic information, learning information, etc. at the time of self-shut-off of the
更に、記憶ブロックA,BのPKB作動状態を記録する領域は、複数領域(PKB作動状態(1)〜PKB作動状態(256))に分けられている。
そして、CPU35は、PKB作動状態が変化する毎に、記憶ブロックA,Bの空き領域にPKB作動状態を示すデータをそれぞれ書き込む。
Further, the areas for recording the PKB operating states of the storage blocks A and B are divided into a plurality of areas (PKB operating states (1) to PKB operating states (256)).
Then, each time the PKB operating state changes, the
図4は、フラッシュEEPROM36の記憶ブロックA,BのPKB作動状態を記録する領域に書き込まれるデータの一態様を示す。
記憶ブロックA,BのPKB作動状態を記録する領域には、PKB作動状態を示すデータである、左後輪RLのリアキャリパ3RLの状態を示すデータ、右後輪RRのリアキャリパ3RRの状態を示すデータとともに、各種制御データ(1)〜(4)や誤り検出のためのチェックサムなどが書き込まれる。
FIG. 4 shows an aspect of the data written in the area for recording the PKB operating state of the storage blocks A and B of the flash EEPROM 36.
In the area for recording the PKB operating state of the storage blocks A and B, data indicating the PKB operating state, data indicating the state of the rear caliper 3RL of the left rear wheel RL, and data indicating the state of the rear caliper 3RR of the right rear wheel RR. At the same time, various control data (1) to (4) and a checksum for error detection are written.
PKB作動状態を示すデータは、リアキャリパ3RL,3RRがブレーキパッドをブレーキローターに抑え付け制動力を発生させている状態に対応する「保持(締結)」のデータ(第1データ)と、リアキャリパ3RL,3RRがブレーキパッドをブレーキローターから離間させ制動力を発生させていない状態に対応する「非保持(解放)」のデータ(第2データ)と、締結状態(締結位置)と解放状態(解放位置)との間の動作状態(保持、非保持のいずれでもない不定状態)に対応する「動作中(不定)」のデータ(第3データ)とを含む。 The data indicating the PKB operating state includes the "holding (fastening)" data (first data) corresponding to the state in which the rear calipers 3RL and 3RR hold the brake pads against the brake rotor to generate braking force, and the rear calipers 3RL, "Non-holding (release)" data (second data) corresponding to the state in which 3RR separates the brake pads from the brake rotor and does not generate braking force, and the tightened state (fastened position) and released state (release position). Includes "operating (indefinite)" data (third data) corresponding to the operating state (indefinite state that is neither held nor non-held) between and.
つまり、CPU35は、PKB作動状態を「保持(締結)」「非保持(解放)」「動作中(不定)」の3種類に区別して、フラッシュEEPROM36の記憶ブロックA,Bに冗長に書き込むよう構成される。
CPU35は、締結から解放に向けての動作開始前及び解放から締結に向けての動作開始前にフラッシュEEPROM36の記憶ブロックA,Bに「動作中(不定)」のデータを書き込み、動作終了時には動作方向に応じてフラッシュEEPROM36の記憶ブロックA,Bに「保持(締結)」又は「非保持(解放)」のデータを書き込む。
That is, the
The
図5は、電動パーキングECU31が起動時に実施するPKB作動状態の出力処理パターン(RAM37への展開パターン)を例示する。
電動パーキングECU31の電源遮断状態においてPKB作動状態を示すデータがフラッシュEEPROM36に保存され、電動パーキングECU31は、起動時に、フラッシュEEPROM36に格納されているデータから図5に示すパターンでPKB作動状態を認識して電動式パーキングブレーキ装置30の制御を開始し、制御開始後は、PKB作動状態が更新される毎にPKB作動状態を示すデータをフラッシュEEPROM36に冗長に書き込み、電源遮断に備える。
FIG. 5 illustrates an output processing pattern (expansion pattern to the RAM 37) of the PKB operating state executed by the
Data indicating the PKB operating state is stored in the flash EEPROM 36 when the power of the
図5に示すように、記憶ブロックA,BにおけるPKB作動状態の書き込み状態は、ブランク(消去中を含む)、サム値異常、サム値正常に区別され、CPU35は、これらの組み合わせに基づき、電動式パーキングブレーキ装置30の制御に用いるPKB作動状態を決定する。
以下では、ブランク、サム値異常、サム値正常の組み合わせに応じた出力パターンを詳述する。
記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBのPKB作動状態の記憶領域が同じくブランクである場合、CPU35は、PKB作動状態を示すデータをとして「動作中(不定)」のデータを出力する。
As shown in FIG. 5, the writing state of the PKB operating state in the storage blocks A and B is distinguished from blank (including during erasing), abnormal sum value, and normal sum value, and the
In the following, the output pattern according to the combination of blank, abnormal thumb value, and normal thumb value will be described in detail.
When the storage area of the storage block A in the PKB operating state is blank and the storage area of the storage block B in the PKB operating state is also blank, the
また、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が異常である場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
また、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が正常である場合、CPU35は、記憶ブロックBに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
Further, when the storage area of the storage block A in the PKB operating state is blank and the sum value of the recorded data in the storage block B is abnormal, the
Further, when the storage area of the storage block A in the PKB operating state is blank and the sum value of the recorded data in the storage block B is normal, the
一方、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBのPKB作動状態の記憶領域がブランクである場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
また、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBの記憶データのサム値も異常である場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
On the other hand, when the sum value of the stored data of the storage block A is abnormal and the storage area of the storage block B in the PKB operating state is blank, the
Further, when the sum value of the stored data of the storage block A is abnormal and the sum value of the stored data of the storage block B is also abnormal, the
また、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBの記憶データのサム値が正常である場合、CPU35は、記憶ブロックBに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
一方、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBのPKB作動状態の記憶領域がブランクである場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
Further, when the sum value of the stored data in the storage block A is abnormal and the sum value of the stored data in the storage block B is normal, the
On the other hand, when the sum value of the stored data of the storage block A is normal and the storage area of the PKB operating state of the storage block B is blank, the
また、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBの記憶データのサム値が異常である場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
また、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBの記憶データのサム値も正常である場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータと記憶ブロックBに格納されているPKB作動状態を示すデータとが同じ値であればその値を出力し、記憶ブロックAに格納されているPKB作動状態を示すデータと記憶ブロックBに格納されているPKB作動状態を示すデータとが異なればPKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
なお、起動時に「動作中(不定)」のデータを出力した場合、CPU35は、パーキングブレーキスイッチ33の操作位置に応じて締結位置又は解放位置に向けて電動モータ32RL,32RRを駆動制御する。
Further, when the sum value of the stored data in the storage block A is normal and the sum value of the stored data in the storage block B is abnormal, the
Further, when the sum value of the stored data of the storage block A is normal and the sum value of the stored data of the storage block B is also normal, the
When the data of "operating (indefinite)" is output at the time of starting, the
ところで、CPU35は、PKB作動状態を示すデータの更新要求に基づき記憶ブロックA,Bへの書き込みを行うときに、記憶ブロックA,Bに空き領域がないと、記憶ブロック単位での消去を行ってから書き込みを行うことになるが、消去に時間を要するために書き込み待ち時間が長くなってしまう。
係る書き込み待ちの状態で、電動パーキングECU31のオフ指令が発生しても、電動パーキングECU31は、書き込み完了までセルフシャットダウンを遅らせることで、制御停止時の作動状態をフラッシュEEPROM36に保存することができる。
By the way, when writing to the storage blocks A and B based on the update request of the data indicating the PKB operating state, the
Even if an off command of the
しかし、書き込み待ちの間に電動パーキングECU31における電源瞬停などが発生し、電動パーキングECU31が一時的なシャットダウン状態になった場合は、フラッシュEEPROM36への書き込みが未完であり、RAM37上のデータは消えてしまうため、電動パーキングECU31が再起動したときには、フラッシュEEPROM36の格納データに基づき認識されるPKB作動状態と実際のPKB作動状態とが整合しないことになり、電動パーキングECU31は、不適切な制御を実施してしまう可能性がある。
ここで、CPU35が、例えばPKB作動状態が「動作中(不定)」に変化するときに、記憶ブロックA,Bの消去完了まで電動モータ32RL,32RRの動作開始を遅らせれば、実際の作動状態と記憶ブロックA,Bに格納されているPKB作動状態とを一致させることができるが、この場合、電動式パーキングブレーキ装置30の操作性、応答性が低下することになる。
However, if a momentary power failure occurs in the
Here, if the
図6は、PKB作動状態の誤判断が生じる様子を説明するための図である。
図6(A)は、CPU35が、「非保持(解放)」から「保持(締結)」に向けた動作が終了し(電動式パーキングブレーキ装置30が締結位置になり)、動作終了時に「保持(締結)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしたときに、記憶ブロックA,Bに空き領域(書き込み可能領域)が無かった状態を例示する。
FIG. 6 is a diagram for explaining how an erroneous determination of the PKB operating state occurs.
In FIG. 6A, the
この場合、CPU35は、まず記憶ブロックAを消去して、消去終了後に「保持(締結)」のデータを記憶ブロックAに書き込もうとするが、係る消去処理の途中で電源瞬停などによる一時的なシャットダウンで処理が中断され、その後に電動パーキングECU31が再起動された場合、各記憶ブロックA,Bには図6(B)に示すようにPKB作動状態が格納されていることになる。
ここで、記憶ブロックBの記録データのサム値が正常であれば、記憶ブロックA,Bからの出力パターンは、図5に示した、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が正常である場合に相当し、CPU35は、記憶ブロックBに格納されている「動作中(不定)」のデータを出力する(RAM37に展開する)ことになる。
In this case, the
Here, if the sum value of the recorded data of the storage block B is normal, the output patterns from the storage blocks A and B are stored because the storage area of the storage block A in the PKB operating state shown in FIG. 5 is blank. Corresponding to the case where the sum value of the recorded data in the block B is normal, the
つまり、CPU35は、動作終了時で「保持(締結)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしていたのに、再起動されたときには記憶ブロックBの格納データに基づき「動作中(不定)」であると誤判断する。
上記例は、CPU35が、動作終了時で「保持(締結)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしたときに空き領域が無かった場合の例であるが、CPU35が、動作開始前に「動作中(不定)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしたときに空き領域が無かった場合の消去途中で、電源瞬停などが発生して電動パーキングECU31が再起動された場合、CPU35は、実際には「動作中(不定)」であるのに「保持(締結)」又は「非保持(解放)」であると誤判断することになる。
That is, the
The above example is an example in which there is no free area when the
例えば、電動式パーキングブレーキ装置30が締結状態から解放状態に向けて動作している途中で電動パーキングECU31が再起動される場合、CPU35は、再起動後に途中の状態から解放方向に電動モータ32RL,32RRを動作させる必要があるが、記憶ブロックAが消去中で記憶ブロックBに動作開始前の「保持(締結)」が記憶されていると、CPU35は、締結状態からの操作量で解放制御を再実行してしまう。
この場合、実際には電動式パーキングブレーキ装置30が解放位置に達しているのに、CPU35は、更に解放方向に向けて電動モータ32RL,32RRを制御することになり、これによって、電動モータ32RL,32RR(駆動機構)に大きな負荷が加わって故障が生じる惧れがある。
For example, when the
In this case, although the electric
つまり、ブレーキが解放された状態では電動モータ32RL,32RRの駆動トルク変化が小さいため、CPU35は駆動トルク変化による解放位置の検出を行えず、実際には解放位置に制御されているのに解放位置が検出されないことで更に解放方向に向けて駆動力を発生させ、これによって電動モータ32RL,32RRを故障させてしまう惧れがある。
また、PKB作動状態をランプの点灯/消灯などによって運転者に知らせるシステムの場合、消去中の再起動に伴い、実際にはPKB作動状態が「動作中(不定)」であって、規定の締結トルク(制動力)が確保されておらず車両が動ける状態であるのに、運転者に締結状態である(規定の締結トルク(制動力)が確保されている)と誤って知らせてしまう惧れがある。
That is, since the change in the drive torque of the electric motors 32RL and 32RR is small when the brake is released, the
Further, in the case of a system that notifies the driver of the PKB operating state by turning on / off the lamp, the PKB operating state is actually "operating (indefinite)" due to the restart during erasing, and the specified conclusion is concluded. There is a risk that the driver will be erroneously notified that the vehicle is in a fastened state (the specified fastening torque (braking force) is secured) even though the torque (braking force) is not secured and the vehicle can move. There is.
係る不具合の発生を抑制するため、CPU35は、PKB作動状態を示すデータを記憶ブロックA,Bそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロックA,B毎に消去を実行することで、常に空き領域が確保されるようにする。
つまり、CPU35は、常に空き領域が確保されるようにすることで、PKB作動状態の更新要求が発生したときに、記憶ブロックA,BにPKB作動状態のデータを直ちに(消去動作を待たずに)書き込めるようにし、消去が必要になる場合でも、一方の消去中に他方に最新のPKB作動状態が保存されるようにする。
In order to suppress the occurrence of such a problem, the
That is, by ensuring that the free area is always secured, the
図7は、上記の消去処理を実施するときの記憶ブロックA,Bにおけるデータ構成を例示する。
CPU35は、図7(A)に示すように記憶ブロックA,Bに「保持(締結)」を書き込んだ後に「非保持(解放)」に向けて動作を開始させる場合、図7(B)に示すように記憶ブロックA,Bそれぞれの空き領域に「動作中(不定)」のデータを書き込む。
FIG. 7 illustrates the data structure in the storage blocks A and B when the above erasing process is performed.
When the
そして、データ書き込み後に、CPU35は、記憶ブロックA,Bにおける空き領域数が設定数(設定数>1)よりも少なくなっているか否かを判断し、空き領域数が設定数よりも少なければ、ブロック単位の消去を実行する。換言すれば、CPU35は、書き込み後に次回のデータを書き込める空き領域が少なくとも残っている状態で、記憶ブロックA,Bの消去を実行する。
ここで、例えば記憶ブロックAの消去中に電源瞬停などによる一時的なシャットダウンで処理が中断された後、電動パーキングECU31が再起動されたときには、記憶ブロックA,Bは図7(C)に示すデータ構成になる。
Then, after writing the data, the
Here, for example, when the
つまり、記憶ブロックBに「動作中(不定)」のデータが保存されているから、CPU35は「動作中(不定)」であることを正しく認識して、パーキングブレーキの解放制御を途中から再開させることができ、また、PKB作動状態の表示を「動作中(不定)」に対応する表示(例えば、ランプ点滅)に制御することができる。
なお、CPU35は、記憶ブロックAの消去が完了すると、消去前に書き込んだPKB作動状態を再度記憶ブロックAに書き込み、記憶ブロックBについても消去が必要であれば、記憶ブロックBについての消去を行う。
That is, since the data of "operating (indefinite)" is stored in the storage block B, the
When the erasure of the storage block A is completed, the
そして、記憶ブロックBの消去中に電動パーキングECU31が一時的にシャットダウンされた場合には、記憶ブロックAに格納されているPKB作動状態が出力されることになる。
これに対し、空き領域が無くなってから消去を行い、消去終了後に書き込みを行う構成では、書き込み前の消去中に電源瞬停などにより処理が中断されると、変化後のPKB作動状態(「動作中(不定)」)のデータが保存されず、CPU35は、再起動時に変化前のPKB作動状態(「保持(締結)」)であると誤判断して、締結状態から解放させる処理を最初から実行したり、また、運転者に対しPKB作動状態を誤って知らせてしまう惧れがある。
Then, when the
On the other hand, in the configuration in which erasing is performed after the free area is exhausted and writing is performed after erasing is completed, if the processing is interrupted due to a momentary power failure during erasing before writing, the PKB operating state after the change (“operation”). Medium (indefinite) ”) data is not saved, and the
図8−図10は、CPU35による記憶ブロックA,Bの消去処理及びPKB作動状態を示すデータの書き込み処理を詳細に示すフローチャートである。
図8のフローチャートにおいて、CPU35は、ステップS101でフラッシュEEPROM36上のPKB作動状態を示すデータの更新要求が発生したか否かを判断する。
8 to 10 are flowcharts showing in detail the erasing process of the storage blocks A and B and the writing process of the data indicating the PKB operating state by the
In the flowchart of FIG. 8, the
PKB作動状態を示すデータの更新要求がない場合、CPU35は、図8のフローチャートに示す処理を終了させる。
一方、PKB作動状態を示すデータの更新要求が発生すると、CPU35は、ステップS102に進み、フラッシュEEPROM36の記憶ブロックAの空き領域に、変化後のPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。
When there is no request to update the data indicating the PKB operating state, the
On the other hand, when a request for updating the data indicating the PKB operating state is generated, the
更に、CPU35は、ステップS103に進み、フラッシュEEPROM36の記憶ブロックBの空き領域に、ステップS102で記憶ブロックAに書き込んだデータと同じPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。
Further, the
図9のフローチャートは、ステップS102、ステップS103におけるPKB作動状態を示すデータの書き込み処理の詳細を示す。
まず、CPU35は、ステップS201で、記憶ブロックA,BにおいてPKB作動状態を記録する複数領域(PKB作動状態(1)〜PKB作動状態(256))について順に書き込み可能であるか否かを判断するために、PKB作動状態(1)〜PKB作動状態(256)の1つを指定するための書き込みインデックスIDxを零に初期化する。
The flowchart of FIG. 9 shows the details of the data writing process indicating the PKB operating state in steps S102 and S103.
First, in step S201, the
次いで、CPU35は、ステップS202に進み、書き込みインデックスIDxが最大値を超えたか否かを判断することで、記憶ブロックA,BにおいてPKB作動状態を記録する複数領域の全てについて書き込みの可否を判断したかを検出する。
そして、書き込みインデックスIDxが最大値を超えておらず、書き込みの可否を判断する領域が残っている場合、CPU35は、ステップS203に進み、書き込みインデックスIDxで指定される領域が、書き込み可能な空き領域であるか否かを判断する。
Next, the
Then, when the write index IDx does not exceed the maximum value and there is an area for determining whether or not to write, the
書き込みインデックスIDxで指定される領域が書き込み可能な空き領域である場合、CPU35は、ステップS204に進み、書き込みインデックスIDxで指定される領域にPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。
PKB作動状態を示すデータの書き込みを行うと、CPU35は、ステップS205で書き込みが正常に行われたか書き込み異常が発生したかの判別結果を保存した後に、本ルーチンを終了させる。
When the area specified by the write index IDx is a writable free area, the
When the data indicating the PKB operating state is written, the
一方、書き込みインデックスIDxで指定される領域が書き込み可能な空き領域でなくデータ書き込み済の領域である場合、CPU35は、ステップS203からステップS206に進み、書き込みインデックスIDxを、次の領域を指定させるように更新(インクリメント)した後、ステップS202に戻る。
上記のように、CPU35は、記憶ブロックA,Bに書き込み可能な空き領域があるか否かを探索し、空き領域があればPKB作動状態を示すデータの書き込みを行う。
On the other hand, when the area specified by the write index IDx is not a writable free area but an area in which data has been written, the
As described above, the
ここで、記憶ブロックA,Bに書き込み可能な空き領域がない場合、CPU35は、ステップS202、ステップS203、ステップS206の処理を繰り返し、書き込みインデックスIDxを最大値にまで増加させても書き込みが行えないことになる。
この場合、CPU35は、ステップS202で書き込みインデックスIDxが最大値を超えている、換言すれば、PKB作動状態を示すデータが全ての領域に書き込まれていて新たにデータを書き込める空き領域がないと判断するようになり、ステップS202からステップS207に進む。
Here, if there is no writable free area in the storage blocks A and B, the
In this case, the
CPU35は、ステップS207で、PKB作動状態を示すデータが全ての領域に書き込まれていて新たにデータを書き込める空き領域がないという判断結果を保存し、本ルーチンを終了させる。
このようにして、CPU35は、図8のフローチャートのステップS102、ステップ103でPKB作動状態を示すデータを記憶ブロックA及び記憶ブロックBに書き込むこで、PKB作動状態を示すデータは、フラッシュEEPROM36に冗長に格納されることになる。
In step S207, the
In this way, the
そして、CPU35は、PKB作動状態を示すデータの記憶ブロックA,Bへの書き込み処理を終えると、まず、記憶ブロックAに関する処理を実施するためにステップS104に進む。
なお、ステップS104−ステップS107が記憶ブロックAに関する処理で、ステップS108−ステップS111が記憶ブロックBに関する処理で、CPU35は、記憶ブロックAについての処理を行った後、記憶ブロックBについても同様の処理を実施する。
Then, when the
It should be noted that step S104-step S107 is the processing related to the storage block A, step S108-step S111 is the processing related to the storage block B, and the
ステップS104で、CPU35は、PKB作動状態を示すデータの記憶ブロックAへの書き込み結果が正常であるか異常であるかを判断する。
ここで、書き込み結果の異常には、書き込み異常とともに、記憶ブロックAに空き領域が無くPKB作動状態を示すデータの書き込みを行えなかった異常が含まれる。
In step S104, the
Here, the abnormality of the writing result includes not only the writing abnormality but also the abnormality that the storage block A has no free area and the data indicating the PKB operating state cannot be written.
PKB作動状態を示すデータの記憶ブロックAへの書き込みが正常に行われた場合、CPU35は、ステップS105に進み、今回記憶ブロックAに書き込んだPKB作動状態を示すデータが、規定データである「動作中(不定)」を示すデータであるか否かを判断する。
そして、今回記憶ブロックAに書き込んだPKB作動状態を示すデータが、「保持(締結)」又は「非保持(解放)」を示すデータであって「動作中(不定)」を示すデータではなかった場合、CPU35は、後述する空き領域数の判定に基づく記憶ブロックAの消去処理を行うことなく、ステップS108以降の記憶ブロックBの処理に進む。
When the data indicating the PKB operating state is normally written to the storage block A, the
The data indicating the PKB operating state written in the storage block A this time is data indicating "holding (conclusion)" or "non-holding (release)", not data indicating "operating (indefinite)". In this case, the
記憶ブロックAに書き込まれたPKB作動状態を示すデータが「保持(締結)」又は「非保持(解放)」を示すデータである場合は、電動式パーキングブレーキ装置30の動作確定状態であり、係る書き込み後に記憶ブロックAの消去を実行している間に、パーキングブレーキスイッチ33が操作されて動作開始要求(締結から解放、又は、解放から締結への切換え要求)が発生する可能性がある。
係る動作開始要求が発生すると、CPU35は動作要求に応じて電動モータ32RL,32RRの駆動制御を開始するが、消去中の記憶ブロックAには書き込みを行えず、「動作中(不定)」の書き込みが遅れる(書き込み待ちが生じる)ことになり、実際のPKB作動状態と記憶ブロックAに格納されているPKB作動状態とが整合しない状態になってしまう。
When the data indicating the PKB operating state written in the storage block A is the data indicating "holding (fastening)" or "non-holding (release)", it means that the operation of the electric
When the operation start request is generated, the
そこで、CPU35は、「保持(締結)」又は「非保持(解放)」を記憶ブロックAに書き込んだ後は、記憶ブロックAの消去を実行せず、消去中に動作開始要求が発生することによる書き込み遅れ(書き込み待ち)の発生を抑制する。
一方、記憶ブロックAに書き込まれたPKB作動状態を示すデータが「動作中(不定)」である場合、動作中に記憶ブロックAの消去を進めることができる。
Therefore, after the
On the other hand, when the data indicating the PKB operating state written in the storage block A is "operating (indefinite)", the erasing of the storage block A can proceed during the operation.
このため、締結から解放又は解放から締結への切換えに要する時間が記憶ブロックAの消去に要する時間よりも長ければ、動作中に記憶ブロックAの消去を完了させることができ、消去中に「保持(締結)」又は「非保持(解放)」の書き込み要求が発生して書き込み遅れ(書き込み待ち)が生じることが抑制される。
また、締結から解放又は解放から締結への切換えに要する時間が記憶ブロックAの消去に要する時間よりも短く、動作終了までに記憶ブロックAの消去が終了しなかった場合でも、書き込み遅れ(書き込み待ち)を充分に短くできる。
Therefore, if the time required for switching from fastening to releasing or from releasing to fastening is longer than the time required for erasing the storage block A, the erasing of the storage block A can be completed during operation, and "holding" during erasing. It is possible to prevent a write delay (waiting for writing) from occurring due to a writing request of "(conclusion)" or "non-holding (release)".
Further, the time required for switching from fastening to releasing or releasing to fastening is shorter than the time required for erasing the storage block A, and even if the erasing of the storage block A is not completed by the end of the operation, the writing delay (waiting for writing). ) Can be shortened sufficiently.
また、動作開始後の記憶ブロックAの消去中にパーキングブレーキスイッチ33が動作方向とは逆となる方向に操作された場合も、消去中に「保持(締結)」又は「非保持(解放)」の書き込み要求が発生して書き込み遅れ(書き込み待ち)が生じることを抑制できる。
そこで、CPU35は、PKB作動状態として「動作中(不定)」を記憶ブロックAに書き込んだときに記憶ブロックAの消去を実行し、PKB作動状態として「保持(締結)」又は「非保持(解放)」を記憶ブロックAに書き込んだときには記憶ブロックAの消去を実行しないよう構成されている。
Further, even if the
Therefore, when the
そして、CPU35は、PKB作動状態として「動作中(不定)」を記憶ブロックAに書き込んだとき、ステップS106に進み、今回の「動作中(不定)」の書き込み処理前での記憶ブロックAにおけるPKB作動状態の書き込み領域の空き数NVが設定数NTH(例えば、設定数=8)以下であるか否かを判断する。
上記の設定数NTHは、データの書き込みが可能な空き領域数の確保数を規定するもので、例えば、締結、解放動作が左右でタイミングをずらして実行される場合は、「保持(締結)」又は「非保持(解放)」の書き込みが連続して実施される場合があり、係る連続した書き込みでも消去を行うことなく書き込みを行えるように、最大連続書き込み回数に余裕分を付加した値として上記の設定数NTHは決められる。
Then, when the
The above-mentioned set number NTH defines the number of secured free areas in which data can be written. For example, when the fastening and releasing operations are executed at different timings on the left and right, "holding (fastening)" is performed. Alternatively, "non-holding (release)" writing may be continuously performed, and the above is set as a value obtained by adding a margin to the maximum number of continuous writings so that writing can be performed without erasing even in such continuous writing. The set number NTH of is determined.
書き込み領域の空き数NVが設定数NTHを超えている場合、CPU35は、記憶ブロックAの消去を実行することなく、ステップS108以降に進む。
一方、書き込み領域の空き数が設定数以下であって、PKB作動状態を示すデータの更新要求が発生したときに空き領域がなく、記憶ブロックAを消去して書き込みを行う必要が生じる可能性がある場合、CPU35は、ステップS107に進む。
When the number of free spaces NV in the write area exceeds the set number NTH, the
On the other hand, when the number of free writing areas is less than or equal to the set number and a request to update the data indicating the PKB operating state occurs, there is no free space, and it may be necessary to erase the storage block A and perform writing. If so, the
また、CPU35は、ステップS104で、記憶ブロックAへの書き込み異常、若しくは、記憶ブロックAに空き領域が無いと判断した場合も、ステップS107に進む。
CPU35は、ステップS107で、記憶ブロックAを消去し、消去後にステップS102で書き込んだデータと同じデータを再度記憶ブロックAに書き込む処理を実施する。
Further, when the
In step S107, the
つまり、CPU35は、空き数NVが設定数NTH以下になるまでは、PKB作動状態のデータを新たに書き込める空き領域が記憶ブロックAに確保されているとして記憶ブロックAを消去せず、空き数NVが設定数NTH以下になると、PKB作動状態を示すデータの書き込みに先立って消去動作が必要になる可能性があると判断して、予め記憶ブロックAの消去を実行し、書き込みに先立つ消去動作が必要になることを抑制する。
これにより、記憶ブロックAへの「動作中(不定)」の書き込み回数に対し消去動作の頻度を必要最小限とし、CPU35の処理負担を軽減できる。
That is, the
As a result, the frequency of the erasing operation can be minimized with respect to the number of "operating (indefinite)" writings to the storage block A, and the processing load of the
また、空き数NVが設定数NTH以下になったときに、換言すれば、次のPKB作動状態を示すデータの書き込みが可能な状態で記憶ブロックAを消去するから、PKB作動状態を示すデータの更新要求が発生したときに、書き込みに先立って消去処理が必要になることを抑制でき、書き込み遅れ(書き込み待ち)が発生して記憶ブロックAの格納データと実際のPKB作動状態とが不整合になることを抑制できる。 Further, when the number of free spaces NV becomes the set number NTH or less, in other words, the storage block A is erased in a state in which the data indicating the next PKB operating state can be written, so that the data indicating the PKB operating state can be written. When an update request occurs, it is possible to suppress the need for erasing processing prior to writing, and a write delay (waiting for writing) occurs, causing inconsistency between the stored data in storage block A and the actual PKB operating state. It can be suppressed.
また、記憶ブロックAの消去中は記憶ブロックBの消去が実行されず、記憶ブロックBにPKB作動状態を示すデータとして最新の「動作中(不定)」が保存されているので、記憶ブロックAの消去中に電源瞬停などによる一時的シャットダウンが生じても、CPU35は再起動時に記憶ブロックBの保存データに基づき「動作中(不定)」であることを認識できる。
Further, while the storage block A is being erased, the storage block B is not erased, and the latest "operating (indefinite)" is stored in the storage block B as data indicating the PKB operating state. Even if a temporary shutdown occurs due to a momentary power failure during erasing, the
したがって、CPU35は、電動式パーキングブレーキ装置30が「動作中(不定)」であることを運転者に通知することで、パーキングブレーキスイッチ33の再操作を促したり、電動式パーキングブレーキ装置30を初期位置となる締結位置に駆動させたりすることが可能になる。
これにより、解放位置に向けた動作中に一時的シャットダウンが生じても、CPU35は、電動モータ32RL,32RRを一旦締結位置に駆動してから解放位置に向けて駆動できるので、駆動トルク変化に基づく適正な操作量で電動モータ32RL,32RRを駆動でき、電動モータ32RL,32RRに過度な負荷が加わって故障することを抑制できる。
Therefore, the
As a result, even if a temporary shutdown occurs during the operation toward the release position, the
図10のフローチャートは、上記ステップS107及び後述するステップS111におけるCPU35の処理内容を詳細に示すものであり、記憶ブロックAと記憶ブロックBとに共通する処理である。
CPU35は、ステップS301で、記憶ブロックAの強制消去の指示があるか否かを判断する。
The flowchart of FIG. 10 shows in detail the processing contents of the
In step S301, the
CPU35は、図8のフローチャートのステップS107に進んだ場合、記憶ブロックAの強制消去を指定するので、ステップS107に進んで図10のフローチャートに示すルーチンが実行される場合は、記憶ブロックAについての強制消去の指示があると判断し、ステップS302に進む。
つまり、セルフシャットオフ時の故障情報を書き込むときで、強制消去の指示が無い場合、CPU35は、ステップS302−ステップS304を迂回してステップS305に進み、記憶ブロックAの消去は実施しない。
When the
That is, when writing the failure information at the time of self-shut-off, if there is no instruction for forced erasure, the
CPU35は、ステップS302で記憶ブロックAの消去を実行し、次のステップS303では、記憶ブロックAの累計消去回数を更新する。
なお、ステップS302で記憶ブロックA(記憶ブロックB)の消去を実行している間は、消去中でない側の記憶ブロックB(記憶ブロックA)についてはPKB作動状態を示すデータの書き込みが停止される構成としてある。これにより、記憶ブロックA,B間で、PKB作動状態のデータの最新値が不整合になることが抑制される。
The
While the storage block A (storage block B) is being erased in step S302, the writing of data indicating the PKB operating state is stopped for the storage block B (storage block A) on the side that is not being erased. It is a configuration. As a result, it is possible to prevent the latest values of the PKB operating state data from becoming inconsistent between the storage blocks A and B.
CPU35は、記憶ブロックAの消去終了後に、ステップS304で、PKB作動状態を示すデータを改めて書き込む。
つまり、CPU35は、図8のフローチャートのステップS102で、PKB作動状態を示すデータを記憶ブロックAに正常に書き込むことができた場合でも、書き込み領域の空き数が設定数以下になっていれば、それまでに書き込んだPKB作動状態を示すデータやセルフシャットオフ時に書き込んだ故障情報などを全て消去し、消去後に、ステップS102で記憶ブロックAに書き込んだデータと同じPKB作動状態を示すデータを記憶ブロックAに書き込む。
After the erasure of the storage block A is completed, the
That is, even if the
記憶ブロックAを消去してPKB作動状態を示す最新データを改めて書き込めば、書き込み領域の空き数NVが設定数NTHを超える数に復帰するため、PKB作動状態を示すデータの更新要求が発生したときに係る更新データを書き込める空き領域が確保される。したがって、CPU35は、PKB作動状態を示すデータを、消去処理を待たずに直ちに書き込むことができるようになる。
ここで、記憶ブロックAの消去が行われているときに、電源瞬停による一時的なシャットダウンが発生しても、記憶ブロックBには、「動作中(不定)」を示すデータが最新データとして保存されているから、CPU35は、再起動したときに、記憶ブロックBに保存されている「動作中(不定)」を示すデータに基づき、動作途中であったことを正しく認識できる。
If the storage block A is erased and the latest data indicating the PKB operating state is written again, the number of free NVs in the writing area returns to the number exceeding the set number NTH. Therefore, when a request to update the data indicating the PKB operating state occurs. Free space is secured for writing the update data related to. Therefore, the
Here, even if a temporary shutdown occurs due to a momentary power failure while the storage block A is being erased, the data indicating "operating (indefinite)" is the latest data in the storage block B. Since it is saved, the
したがって、CPU35は、電動モータ32RL,32RR(駆動機構)に大きな負荷が加わる操作量の出力を抑制でき、また、電動式パーキングブレーキ装置30の作動状態が動作中であるのに、CPU35が、規定の締結トルク(制動力)が確保されている「保持(締結)」状態であると車両の運転者に誤って知らせてしまうことを抑止できる。
CPU35は、消去後の記憶ブロックAにPKB作動状態のデータを書き込んだ後、ステップS305に進み、RAM37に展開させていた故障情報などを記憶ブロックAに書き込んで保存されるようにする。
Therefore, the
After writing the data of the PKB operating state to the erased storage block A, the
上記のように、CPU35は、PKB作動状態のデータを記憶ブロックA及び記憶ブロックBに更新要求発生時に直ちに書き込んだ後、記憶ブロックAについて書き込み結果を検証し、記憶ブロックAに「動作中(不定)」を示すデータを書き込み、かつ、記憶ブロックAにおける書き込み領域の空き数NVが設定数NTH以下になっている場合には、記憶ブロックAを消去して、「動作中(不定)」を示すデータを改めて記憶ブロックAに書き込む。
As described above, the
係る記憶ブロックAについての書き込み結果の検証処理が終了すると、CPU35は、ステップS108以降に進んで、記憶ブロックBについても同様な検証処理を実施する。
つまり、CPU35は、ステップS108で、記憶ブロックBへのPKB作動状態のデータの書き込みが正常に行われたか否かを判断する。
When the verification process of the writing result for the storage block A is completed, the
That is, in step S108, the
そして、正常に書き込みが行われた場合、CPU35は、ステップS109に進んで、記憶ブロックBに書き込んだデータが「動作中(不定)」を示すデータであったか否かを判別する。
記憶ブロックBに「動作中(不定)」のデータを書き込んだ場合、CPU35は、ステップS110に進み、記憶ブロックBにおける書き込み領域の空き数NVが設定数NTH以下になっているか否かを判断する。
Then, when the writing is normally performed, the
When "operating (indefinite)" data is written to the storage block B, the
書き込み領域の空き数NVが設定数NTH以下になっている場合、CPU35は、ステップS111に進んで記憶ブロックBを消去し、消去後に「動作中(不定)」のデータを記憶ブロックBに再度書き込む。
この記憶ブロックBの消去中に電源瞬停などによって処理が中断された場合、再起動時には記憶ブロックAに「動作中(不定)」のデータが保存されていて、CPU35は、「動作中(不定)」であることを正しく認識できる。
When the free space NV of the writing area is less than or equal to the set number NTH, the
If the process is interrupted due to a momentary power failure or the like while erasing the storage block B, the data of "operating (undefined)" is saved in the storage block A at the time of restarting, and the
上記実施形態で説明した各技術的思想は、矛盾が生じない限りにおいて、適宜組み合わせて使用することができる。
また、好ましい実施形態を参照して本発明の内容を具体的に説明したが、本発明の基本的技術思想及び教示に基づいて、当業者であれば、種々の変形態様を採り得ることは自明である。
例えば、前述の一態様において、CPU35は、「動作中(不定)」のデータを書き込んだときに書き込み領域の空き数が設定数以下であれば、記憶ブロックA,B毎に消去を実行するが、「保持(締結)」又は「非保持(解放)」を書き込んだときにも、書き込み領域の空き数が設定数以下であれば、記憶ブロックA,B毎に消去を実行する構成とすることができる。
The technical ideas described in the above embodiments can be used in combination as appropriate as long as there is no contradiction.
In addition, although the contents of the present invention have been specifically described with reference to preferred embodiments, it is obvious that those skilled in the art can adopt various modifications based on the basic technical idea and teaching of the present invention. Is.
For example, in the above-described embodiment, the
また、前述の一態様において、自動車の駆動機構として電動式パーキングブレーキ装置30を例示したが、電動式パーキングブレーキ装置30に限定されず、書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術は、作動状態を記憶させる公知の駆動機構に適用することができる。
また、前述の一態様において、不揮発性メモリであるフラッシュEEPROM36は、データを冗長に格納するための2つの記憶ブロックA,Bを備えるが、3つ以上の記憶ブロックを備えてそれぞれにデータを格納させる構成においても、書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術を適用できる。
Further, in the above-described aspect, the electric
Further, in the above-described aspect, the flash EEPROM 36, which is a non-volatile memory, includes two storage blocks A and B for redundantly storing data, but includes three or more storage blocks and stores data in each. Even in the configuration of writing, a technique of executing erasing for each storage block in a state where the next data can be written after writing can be applied.
また、前述の一態様において、フラッシュEEPROM36は、マイクロコンピュータ34内蔵の不揮発性メモリであるが、マイクロコンピュータ34の外部に備えられたフラッシュEEPROMなどの不揮発性メモリが、データを冗長に格納するための複数の記憶ブロックを備える構成において、データの書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術を適用できる。
Further, in the above-described aspect, the flash EEPROM 36 is a non-volatile memory built in the
ここで、上述した実施形態から把握し得る技術的思想について、以下に記載する。
自動車用制御装置は、その一態様において、自動車の電動式パーキングブレーキ装置を制御する制御装置であって、前記電動式パーキングブレーキ装置の作動状態を示すデータを冗長に格納するための2つの記憶ブロックを備えた不揮発性メモリと、前記2つの不揮発性メモリへのアクセスを行う制御部と、を有し、前記制御部が前記2つの記憶ブロックに書き込む作動状態のデータは、締結状態を示す第1データと、解放状態を示す第2データと、締結状態と解放状態との間の動作状態を示す第3データとのいずれかであり、前記制御部は、前記第3データを前記2つの記憶ブロックそれぞれに書き込んだ後に、空き領域が設定値を下回る記憶ブロックについて消去を実行してデータの再書き込みを行う、自動車用制御装置。
Here, the technical ideas that can be grasped from the above-described embodiments will be described below.
In one aspect, the automobile control device is a control device that controls an electric parking brake device of an automobile, and is two storage blocks for redundantly storing data indicating an operating state of the electric parking brake device. The data of the operating state, which includes a non-volatile memory provided with the above and a control unit for accessing the two non-volatile memories, and the control unit writes to the two storage blocks, is a first state indicating a fastening state. The data, the second data indicating the released state, and the third data indicating the operating state between the fastened state and the released state, and the control unit stores the third data in the two storage blocks. A control device for automobiles that erases and rewrites data for storage blocks whose free space is less than the set value after writing to each.
31…電動パーキングECU(自動車用制御装置)、35…CPU(制御部)、36…フラッシュEEPROM(不揮発性メモリ) 31 ... Electric parking ECU (automobile control unit), 35 ... CPU (control unit), 36 ... Flash EEPROM (nonvolatile memory)
Claims (4)
前記不揮発性メモリへのアクセスを行う制御部と、
を有する、自動車用制御装置であって、
前記制御部は、
規定のデータを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行し、前記規定データ以外のデータを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない、
自動車用制御装置。 Non-volatile memory with multiple storage blocks for redundant data storage,
A control unit that accesses the non-volatile memory and
To have a, a motor vehicle control device,
The control unit
After writing the specified data to each of the plurality of storage blocks, erasing is executed for the storage blocks whose number of free areas is less than the set number, and after writing the data other than the specified data to each of the plurality of storage blocks, the storage blocks Do not erase,
Control device for automobiles.
前記不揮発性メモリへのアクセスを行う制御部と、
を有し、自動車の駆動機構を制御する自動車用制御装置であって、
前記制御部は、
前記駆動機構の作動状態を示すデータのうちの規定のデータを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行し、前記規定データ以外のデータを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない、
自動車用制御装置。 Non-volatile memory with multiple storage blocks for redundant data storage,
A control unit that accesses the non-volatile memory and
It is a control device for automobiles that controls the drive mechanism of the automobile.
The control unit
After writing the specified data among the data indicating the operating state of the drive mechanism to each of the plurality of storage blocks, the storage blocks whose number of free areas is less than the set number are erased, and a plurality of data other than the specified data are stored. After writing to each of the storage blocks, the storage blocks are not erased.
Control device for automobiles.
前記不揮発性メモリへのアクセスを行う制御部と、
を有し、自動車の電動式パーキングブレーキ装置を制御する自動車用制御装置であって、
前記制御部は、
前記電動式パーキングブレーキ装置の作動状態を示すデータのうちの規定のデータを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行し、前記規定データ以外のデータを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない、
自動車用制御装置。 Non-volatile memory with multiple storage blocks for redundant data storage,
A control unit that accesses the non-volatile memory and
It is an automobile control device that controls an electric parking brake device of an automobile.
The control unit
After writing the specified data among the data indicating the operating state of the electric parking brake device to each of the plurality of storage blocks, the storage blocks whose number of free areas is less than the set number are erased, and the data other than the specified data are deleted. After writing data to each of multiple storage blocks, do not erase the storage blocks,
Control device for automobiles.
前記電動式パーキングブレーキ装置の作動状態を示すデータは、締結状態を示す第1データと、解放状態を示す第2データと、締結状態と解放状態との間の動作状態を示す第3データとのいずれかであり、
前記電動式パーキングブレーキ装置の作動状態を示すデータを複数の記憶ブロックそれぞれに書き込み、
前記第3データを各記憶ブロックに書き込んだときにデータ書き込み後の記憶ブロックの空き領域数と設定数とを比較し、
空き領域数が設定数を下回る記憶ブロックについて消去を実行する、
不揮発性メモリの書き込み方法。 A method of writing a non-volatile memory for writing data indicating an operating state of an electric parking brake device of an automobile to a non-volatile memory provided with a plurality of storage blocks for redundantly storing data.
The data indicating the operating state of the electric parking brake device includes the first data indicating the engaged state, the second data indicating the released state, and the third data indicating the operating state between the engaged state and the released state. Is either
Data indicating the operating state of the electric parking brake device is written in each of the plurality of storage blocks, and the data is written in each of the plurality of storage blocks.
When the third data is written to each storage block, the number of free areas in the storage block after the data is written is compared with the set number.
Erases storage blocks whose free space is less than the set number.
How to write non-volatile memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017175706A JP6898186B2 (en) | 2017-09-13 | 2017-09-13 | How to write control devices for automobiles and non-volatile memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017175706A JP6898186B2 (en) | 2017-09-13 | 2017-09-13 | How to write control devices for automobiles and non-volatile memory |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019053396A JP2019053396A (en) | 2019-04-04 |
JP6898186B2 true JP6898186B2 (en) | 2021-07-07 |
Family
ID=66013391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017175706A Active JP6898186B2 (en) | 2017-09-13 | 2017-09-13 | How to write control devices for automobiles and non-volatile memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6898186B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3268130B2 (en) * | 1994-07-20 | 2002-03-25 | 株式会社東芝 | Data processing device using flash EEPROM |
JP2002073425A (en) * | 2000-08-31 | 2002-03-12 | Hitachi Ltd | Reproducing unit for medium |
JP4143952B2 (en) * | 2001-03-12 | 2008-09-03 | オムロン株式会社 | Memory backup method and apparatus |
JP4662743B2 (en) * | 2004-09-13 | 2011-03-30 | Necインフロンティア株式会社 | Data duplex system |
JP4466582B2 (en) * | 2006-02-17 | 2010-05-26 | トヨタ自動車株式会社 | Electric parking brake device |
JP2008225922A (en) * | 2007-03-13 | 2008-09-25 | Rinnai Corp | Nonvolatile storage device |
JP6244780B2 (en) * | 2013-09-27 | 2017-12-13 | 日産自動車株式会社 | Engine start control device and engine start control method for hybrid vehicle |
-
2017
- 2017-09-13 JP JP2017175706A patent/JP6898186B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019053396A (en) | 2019-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4227149B2 (en) | Information storage method for electronic control unit | |
US6430662B1 (en) | Method and device for changing memory contents in a control unit, especially of a motor vehicle | |
JPH11107846A (en) | Vehicular controller | |
CN105700419A (en) | Control method and device of whole vehicle controller and whole vehicle control method and system | |
JP4789420B2 (en) | Data processing apparatus for vehicle control system | |
JP6898186B2 (en) | How to write control devices for automobiles and non-volatile memory | |
JP4001088B2 (en) | Electronic control unit | |
JP6512065B2 (en) | Electronic control unit | |
JP2002041367A (en) | Vehicle controller | |
JP4281808B2 (en) | VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD | |
WO2018079537A1 (en) | Electronic control unit and data protection method therefor | |
JP2007316800A (en) | Onboard program rewriting controller | |
JP2004151944A (en) | Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller | |
JP4707411B2 (en) | Electronic control device for vehicle | |
JPH0793006A (en) | Electronic control unit for vehicle | |
JP5516509B2 (en) | Program writing system | |
JP2006193017A (en) | Vehicle information recording device and vehicle information recording method | |
JP2006134016A (en) | Installation method for firmware of firmware built-in equipment, and boot program | |
JPH09171459A (en) | Electronic control equipment | |
JP6699591B2 (en) | Engine controller | |
WO2022215402A1 (en) | Vehicle electronic control device and program rewriting method | |
KR101284657B1 (en) | method for storing diagnosis data in electric brake system | |
JP2006018594A (en) | Information processor | |
JP3947643B2 (en) | Data control device | |
JP2001229014A (en) | Non-volatile memory rewriting device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191121 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200911 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201013 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201211 |
|
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: 20210511 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210610 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6898186 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |