JP2019053396A - Motor vehicle control device and non-volatile memory writing method - Google Patents

Motor vehicle control device and non-volatile memory writing method Download PDF

Info

Publication number
JP2019053396A
JP2019053396A JP2017175706A JP2017175706A JP2019053396A JP 2019053396 A JP2019053396 A JP 2019053396A JP 2017175706 A JP2017175706 A JP 2017175706A JP 2017175706 A JP2017175706 A JP 2017175706A JP 2019053396 A JP2019053396 A JP 2019053396A
Authority
JP
Japan
Prior art keywords
data
storage block
state
storage
pkb
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.)
Granted
Application number
JP2017175706A
Other languages
Japanese (ja)
Other versions
JP6898186B2 (en
Inventor
亮治 渡邉
Ryoji Watanabe
亮治 渡邉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2017175706A priority Critical patent/JP6898186B2/en
Publication of JP2019053396A publication Critical patent/JP2019053396A/en
Application granted granted Critical
Publication of JP6898186B2 publication Critical patent/JP6898186B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To provide a motor vehicle control device and a non-volatile memory writing method capable of suppressing occurrence of data write waiting.SOLUTION: A motor vehicle control device includes a non-volatile memory including a plurality of storage blocks for redundantly storing data and a control part for performing access to the non-volatile memory. After writing data in each of the plurality of storage blocks, the control part executes erasing for each storage block in a state where the next data can be written.SELECTED DRAWING: Figure 8

Description

本発明は、データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリを有する自動車用制御装置及び不揮発性メモリの書き込み方法に関する。   The present invention relates to an automotive control device having a nonvolatile memory having a plurality of storage blocks for storing data redundantly and a method for writing to the nonvolatile memory.

特許文献1には、制御対象機器の動作状況に関するデータを不揮発性メモリに書き込み、制御対象機器が障害によって停止した場合に、不揮発性メモリに記憶されているデータから停止前の動作状況を確認して正しく回復するための処理を実行することが開示されている。   In Patent Document 1, data related to the operation status of the control target device is written in the nonvolatile memory, and when the control target device is stopped due to a failure, the operation status before the stop is confirmed from the data stored in the nonvolatile memory. It is disclosed to execute a process for correctly recovering.

特開2000−035922号公報JP 2000-035922 A

ところで、不揮発性メモリのデータを冗長に格納するための複数の記憶ブロックに、制御対象機器の作動状態などを示すデータを書き込む処理において、書き込み前に空き領域が無いと判断したときに記憶ブロック単位で消去を行い、消去終了後に書き込み待ちのデータを記憶ブロックに書き込む構成とした場合、制御装置が消去中の一時的なシャットダウンから再起動したときに、格納データが不整合になる可能性があった。   By the way, when it is determined that there is no free space before writing in the process of writing data indicating the operating state of the control target device in a plurality of storage blocks for storing data in the nonvolatile memory redundantly, the storage block unit If data is awaited to be written to the memory block after erasing is completed, the stored data may become inconsistent when the control unit restarts from a temporary shutdown during erasure. It was.

本発明は、従来の実情に鑑みてなされたものであり、その目的は、データの書き込み待ちが発生することで格納データが不整合になることを抑制できる、自動車用制御装置及び不揮発性メモリの書き込み方法を提供することを目的とする。   The present invention has been made in view of conventional circumstances, and an object of the present invention is to provide a control device for an automobile and a non-volatile memory capable of suppressing stored data from becoming inconsistent due to waiting for data writing. An object is to provide a writing method.

本発明によれば、その1つの態様において、データを複数の記憶ブロックそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行する。   According to the present invention, in one aspect thereof, after data is written in each of the plurality of storage blocks, erasure is executed for each storage block in a state where the next data can be written.

本発明によれば、データの書き込み待ちが発生することを抑制できるため、書き込み待ちによって格納データが不整合になることを抑制できる。   According to the present invention, it is possible to suppress the occurrence of waiting for data writing, and therefore it is possible to suppress stored data from becoming inconsistent due to waiting for writing.

車両のブレーキシステムを示す構成図である。It is a block diagram which shows the brake system of a vehicle. 電動パーキングECUの構成を示すブロック図である。It is a block diagram which shows the structure of electric parking ECU. フラッシュEEPROMのデータ構成を示す図である。It is a figure which shows the data structure of flash EEPROM. PKB作動状態を示すデータの構成を示す図である。It is a figure which shows the structure of the data which show a PKB operation state. PKB作動状態の出力パターンを示す図である。It is a figure which shows the output pattern of a PKB operation state. 空き領域が無くなってから消去を実行する場合におけるPKB作動状態のデータの格納状態を例示する図である。It is a figure which illustrates the storage state of the data of the PKB operation state in the case of executing erasure after there is no free space. 次のデータの書き込みが可能な状態で記憶ブロック毎に消去する場合におけるPKB作動状態のデータの格納状態を例示する図である。It is a figure which illustrates the storage state of the data of the PKB operation state in the case of deleting for every storage block in the state where the next data can be written. PKB作動状態の書き込み処理及び消去処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the write-in process of PKB operating state, and an erasure | elimination process. PKB作動状態の書き込み処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the write-in process of a PKB operation state. 記憶ブロックの消去処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the erasure | elimination process of a storage block.

以下、本発明に係る自動車用制御装置及び不揮発性メモリの書き込み方法の実施形態を図面に基づいて説明する。
図1は、自動車1のブレーキシステムの一態様を示す構成図である。
油圧ユニット10は、油圧ユニット10用の電子制御装置(以下、油圧ユニットECU11と称する。)からの指令に応じて、各輪FL,FR,RL,RRのホイルシリンダ圧を調整し、ブレーキキャリパ3FL,3FR,3RL,3RRの作動を制御する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of an automotive control device and a nonvolatile memory writing method according to the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration diagram showing an aspect of a brake system of an automobile 1.
The hydraulic unit 10 adjusts the wheel cylinder pressure of each wheel FL, FR, RL, RR in response to a command from an electronic control unit for the hydraulic unit 10 (hereinafter referred to as a hydraulic unit ECU 11), and generates a brake caliper 3FL. , 3FR, 3RL, 3RR are controlled.

油圧ユニットECU11は、CPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read-Only Memory)などを含んで構成されるマイクロコンピュータを有して構成される。
また、油圧ユニットECU11には、車輪速センサ12により検出された各車輪速、加速度・角速度センサ13により検出された車両の横方向加速度、前後方向加速度及びヨーレイト、マスタシリンダ圧センサ14により検出されたマスタシリンダ圧の信号などが入力される。
The hydraulic unit ECU 11 includes a microcomputer including a CPU (Central Processing Unit), a RAM (Random Access Memory), a ROM (Read-Only Memory), and the like.
The hydraulic unit ECU 11 detects the wheel speed detected by the wheel speed sensor 12, the lateral acceleration of the vehicle detected by the acceleration / angular velocity sensor 13, the longitudinal acceleration and yaw rate, and the master cylinder pressure sensor 14. A master cylinder pressure signal is input.

また、油圧ユニットECU11には、通信ライン15を介してブレーキストロークセンサ16により検出されたブレーキストロークの信号などが入力される。
また、油圧ユニットECU11とともに、電制ブースタ20用の電子制御装置(以下、電制ブースタECU21と称する。)、電動式パーキングブレーキ装置30用の電子制御装置(以下、電動パーキングECU31と称する。)などが自動車1に備えられている。
Also, a brake stroke signal detected by the brake stroke sensor 16 is input to the hydraulic unit ECU 11 via the communication line 15.
In addition to the hydraulic unit ECU 11, an electronic control device for the electric control booster 20 (hereinafter referred to as an electric control booster ECU 21), an electronic control device for the electric parking brake device 30 (hereinafter referred to as an electric parking ECU 31), and the like. Is provided in the automobile 1.

そして、油圧ユニットECU11、電制ブースタECU21、及び電動パーキングECU31は、通信ライン15を介して相互通信を行う。
電制ブースタECU21は、ブレーキストロークセンサ16により検出されたブレーキストロークの信号などを入力して、係る入力信号に基づき電制ブースタ20を制御し、ブレーキ操作をアシストする力を発生させる。
The hydraulic unit ECU 11, the electric control booster ECU 21, and the electric parking ECU 31 communicate with each other via the communication line 15.
The electric booster ECU 21 inputs a brake stroke signal detected by the brake stroke sensor 16 and controls the electric booster 20 based on the input signal to generate a force for assisting a brake operation.

左右の後輪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, RR are provided with electric motors 32RL, 32RR for operating the rear calipers 3RL, 3RR. The drive mechanism is configured.
The electric parking ECU 31 drives the electric motors 32RL, 32RR when the parking brake switch 33 is operated to the on side by the driver of the automobile 1 or in response to an operation request from the hydraulic unit ECU 11, and the electric parking brake. The apparatus 30 is set to a fastening state.

図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 electric parking ECU 31 that is an automobile control device.
The electric parking ECU 31 includes a microcomputer 34. The microcomputer 34 is a CPU (Central Processing Unit) 35, a flash EEPROM (Electrically Erasable Programmable Read-Only Memory) 36 that is a nonvolatile memory, and a volatile memory. A RAM (Random Access Memory) 37 is included.

CPU35においては、ベーシックソフトウェア35aによってパーキングブレーキスイッチ33の指示状態及び油圧ユニットECU11の指示状態などをアプリケーションプログラム35bに渡す。
そして、アプリケーションプログラム35bは、パーキングブレーキ指示に応じて電動モータ32RL,32RRの制御指示をベーシックソフトウェア35aに通知し、RAM37上のパーキングブレーキ(電動モータ32RL,32RR)の作動状態(以下、PKB作動状態と称する。)を示すデータを更新させる。
In the CPU 35, the basic software 35a passes the instruction state of the parking brake switch 33, the instruction state of the hydraulic unit ECU 11, and the like to the application program 35b.
Then, the application program 35b notifies the basic software 35a of a control instruction for the electric motors 32RL and 32RR in response to the parking brake instruction, and the operating state of the parking brake (electric motors 32RL and 32RR) on the RAM 37 (hereinafter referred to as the PKB operating state). Data) is updated.

更に、CPU35において、ベーシックソフトウェア35aはRAM37上のPKB作動状態を示すデータの更新を検出すると、フラッシュEEPROM36に対しPKB作動状態の書き込み処理を実施する。
このように、CPU35は、不揮発性メモリであるフラッシュEEPROM36へのアクセスを行う制御部としての機能を備える。
Further, in the CPU 35, when the basic software 35 a detects the update of the data indicating the PKB operating state on the RAM 37, the basic software 35 a performs the writing process of the PKB operating state on the flash EEPROM 36.
As described above, the CPU 35 has a function as a control unit for accessing the flash EEPROM 36 which is a nonvolatile memory.

図3は、フラッシュEEPROM36のデータ構成の一態様を示す。
フラッシュEEPROM36は、図3(A)に示すように、複数の記憶ブロックに分割され、プログラムなどが格納される記憶ブロックの他、PKB作動状態を示すデータを冗長に格納するための2つの記憶ブロックA,Bを備えている。
つまり、CPU35は、PKB作動状態を示すデータを、記憶ブロックA、記憶ブロックBの双方に書き込むよう構成されている。
なお、フラッシュEEPROM36における消去は、記憶ブロックA,Bの単位で実施される。
FIG. 3 shows an aspect of the data configuration 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 in which a program and the like are stored, two storage blocks for redundantly storing data indicating a PKB operating state A and B are provided.
That is, the CPU 35 is configured to write data indicating the PKB operating state in both the storage block A and the storage block B.
Note that erasure in the flash EEPROM 36 is performed in units of storage blocks A and B.

図3(B)は、記憶ブロックA,Bに共通するデータ構成の一態様を示す。
記憶ブロックA,Bは、電動パーキングECU31のセルフシャットオフ時に故障情報、診断情報、学習情報などを書き込む領域と、PKB作動状態を記録する領域とに分けられる。
FIG. 3B shows one mode of a data configuration 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, and the like when the electric parking ECU 31 is self-shut off, and an area for recording the PKB operating state.

更に、記憶ブロックA,BのPKB作動状態を記録する領域は、複数領域(PKB作動状態(1)〜PKB作動状態(256))に分けられている。
そして、CPU35は、PKB作動状態が変化する毎に、記憶ブロックA,Bの空き領域にPKB作動状態を示すデータをそれぞれ書き込む。
Furthermore, the area for recording the PKB operation state of the storage blocks A and B is divided into a plurality of areas (PKB operation state (1) to PKB operation state (256)).
Then, every time the PKB operating state changes, the CPU 35 writes data indicating the PKB operating state in the empty areas of the storage blocks A and B, respectively.

図4は、フラッシュEEPROM36の記憶ブロックA,BのPKB作動状態を記録する領域に書き込まれるデータの一態様を示す。
記憶ブロックA,BのPKB作動状態を記録する領域には、PKB作動状態を示すデータである、左後輪RLのリアキャリパ3RLの状態を示すデータ、右後輪RRのリアキャリパ3RRの状態を示すデータとともに、各種制御データ(1)〜(4)や誤り検出のためのチェックサムなどが書き込まれる。
FIG. 4 shows one mode of 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 “holding (fastening)” data (first data) corresponding to a state in which the rear calipers 3RL, 3RR hold the brake pads against the brake rotor and generate a braking force, and the rear calipers 3RL, “Non-hold (release)” data (second data), engagement state (engagement position), and release state (release position) corresponding to a state in which the 3RR separates the brake pad from the brake rotor and generates no braking force And “in operation (indeterminate)” data (third data) corresponding to the operation state between (1) and (indefinite state in which neither hold nor non-hold) is included.

つまり、CPU35は、PKB作動状態を「保持(締結)」「非保持(解放)」「動作中(不定)」の3種類に区別して、フラッシュEEPROM36の記憶ブロックA,Bに冗長に書き込むよう構成される。
CPU35は、締結から解放に向けての動作開始前及び解放から締結に向けての動作開始前にフラッシュEEPROM36の記憶ブロックA,Bに「動作中(不定)」のデータを書き込み、動作終了時には動作方向に応じてフラッシュEEPROM36の記憶ブロックA,Bに「保持(締結)」又は「非保持(解放)」のデータを書き込む。
That is, the CPU 35 distinguishes the PKB operating state into three types of “holding (fastening)”, “non-holding (released)”, and “in operation (indefinite)”, and redundantly writes in the storage blocks A and B of the flash EEPROM 36. Is done.
The CPU 35 writes “in operation (indeterminate)” data to the storage blocks A and B of the flash EEPROM 36 before starting the operation from the fastening to the releasing and before starting the operation from the releasing to the fastening. Depending on the direction, data of “hold (fastened)” or “non-hold (release)” is written in the storage blocks A and B of the flash EEPROM 36.

図5は、電動パーキングECU31が起動時に実施するPKB作動状態の出力処理パターン(RAM37への展開パターン)を例示する。
電動パーキングECU31の電源遮断状態においてPKB作動状態を示すデータがフラッシュEEPROM36に保存され、電動パーキングECU31は、起動時に、フラッシュEEPROM36に格納されているデータから図5に示すパターンでPKB作動状態を認識して電動式パーキングブレーキ装置30の制御を開始し、制御開始後は、PKB作動状態が更新される毎にPKB作動状態を示すデータをフラッシュEEPROM36に冗長に書き込み、電源遮断に備える。
FIG. 5 exemplifies an output processing pattern (development pattern to the RAM 37) in the PKB operating state that the electric parking ECU 31 performs at the time of activation.
Data indicating the PKB operating state when the electric parking ECU 31 is turned off is stored in the flash EEPROM 36, and the electric parking ECU 31 recognizes the PKB operating state in the pattern shown in FIG. 5 from the data stored in the flash EEPROM 36 at the time of activation. Then, the control of the electric parking brake device 30 is started. After the control is started, data indicating the PKB operating state is redundantly written in the flash EEPROM 36 every time the PKB operating state is updated to prepare for the power shutdown.

図5に示すように、記憶ブロックA,BにおけるPKB作動状態の書き込み状態は、ブランク(消去中を含む)、サム値異常、サム値正常に区別され、CPU35は、これらの組み合わせに基づき、電動式パーキングブレーキ装置30の制御に用いるPKB作動状態を決定する。
以下では、ブランク、サム値異常、サム値正常の組み合わせに応じた出力パターンを詳述する。
記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBのPKB作動状態の記憶領域が同じくブランクである場合、CPU35は、PKB作動状態を示すデータをとして「動作中(不定)」のデータを出力する。
As shown in FIG. 5, the writing state in the PKB operation state in the storage blocks A and B is distinguished as blank (including erasing), abnormal sum value, and normal sum value. The PKB operating state used for control of the type parking brake device 30 is determined.
Hereinafter, an output pattern corresponding to a combination of blank, abnormal sum value, and normal sum value will be described in detail.
When the storage area of the storage block A in the PKB operation state is blank and the storage area of the storage block B in the PKB operation state is also blank, the CPU 35 uses the data indicating the PKB operation state as “in operation (undefined)”. Output data.

また、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が異常である場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
また、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が正常である場合、CPU35は、記憶ブロックBに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
Further, when the storage area of the storage block A in the PKB operation state is blank and the sum value of the recording data in the storage block B is abnormal, the CPU 35 sets “in operation (undefined)” data as the data indicating the PKB operation state. Is output.
When the storage area of the storage block A in the PKB operation state is blank and the sum value of the recording data in the storage block B is normal, the CPU 35 stores data indicating the PKB operation state stored in the storage block B (“ "Hold (fastened)", "Non-hold (released)", "Operating (undefined)") is output.

一方、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBのPKB作動状態の記憶領域がブランクである場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
また、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBの記憶データのサム値も異常である場合、CPU35は、PKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
On the other hand, when the sum value of the storage 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 CPU 35 stores “in operation (undefined)” data as the data indicating the PKB operating state. Is output.
Further, when the sum value of the storage data in the storage block A is abnormal and the sum value of the storage data in the storage block B is also abnormal, the CPU 35 sets the data indicating “operating (undefined)” as the data indicating the PKB operating state. Output.

また、記憶ブロックAの記憶データのサム値が異常で、記憶ブロックBの記憶データのサム値が正常である場合、CPU35は、記憶ブロックBに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
一方、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBのPKB作動状態の記憶領域がブランクである場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
In addition, when the sum value of the storage data in the storage block A is abnormal and the sum value of the storage data in the storage block B is normal, the CPU 35 stores data indicating the PKB operation state stored in the storage block B (“holding” (Fastening), "Non-hold (released)" or "In operation (undefined)") is output.
On the other hand, when the sum value of the storage data in the storage block A is normal and the storage area of the storage block B in the PKB operation state is blank, the CPU 35 stores data indicating the PKB operation state stored in the storage block A (“ "Hold (fastened)", "Non-hold (released)", "Operating (undefined)") is output.

また、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBの記憶データのサム値が異常である場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を出力する。
また、記憶ブロックAの記憶データのサム値が正常で、記憶ブロックBの記憶データのサム値も正常である場合、CPU35は、記憶ブロックAに格納されているPKB作動状態を示すデータと記憶ブロックBに格納されているPKB作動状態を示すデータとが同じ値であればその値を出力し、記憶ブロックAに格納されているPKB作動状態を示すデータと記憶ブロックBに格納されているPKB作動状態を示すデータとが異なればPKB作動状態を示すデータとして「動作中(不定)」のデータを出力する。
なお、起動時に「動作中(不定)」のデータを出力した場合、CPU35は、パーキングブレーキスイッチ33の操作位置に応じて締結位置又は解放位置に向けて電動モータ32RL,32RRを駆動制御する。
When the sum value of the storage data in the storage block A is normal and the sum value of the storage data in the storage block B is abnormal, the CPU 35 stores data indicating the PKB operating state stored in the storage block A (“holding” (Fastening), "Non-hold (released)" or "In operation (undefined)") is output.
Further, when the sum value of the storage data in the storage block A is normal and the sum value of the storage data in the storage block B is also normal, the CPU 35 stores the data indicating the PKB operation state stored in the storage block A and the storage block. If the data indicating the PKB operation state stored in B is the same value, the value is output, and the data indicating the PKB operation state stored in the storage block A and the PKB operation stored in the storage block B are output. If the data indicating the state is different, data indicating “operating (undefined)” is output as data indicating the PKB operating state.
Note that, when data indicating “in operation (indefinite)” is output at the time of activation, the CPU 35 drives and controls the electric motors 32RL and 32RR toward the engagement position or the release position according to the operation position of the parking brake switch 33.

ところで、CPU35は、PKB作動状態を示すデータの更新要求に基づき記憶ブロックA,Bへの書き込みを行うときに、記憶ブロックA,Bに空き領域がないと、記憶ブロック単位での消去を行ってから書き込みを行うことになるが、消去に時間を要するために書き込み待ち時間が長くなってしまう。
係る書き込み待ちの状態で、電動パーキングECU31のオフ指令が発生しても、電動パーキングECU31は、書き込み完了までセルフシャットダウンを遅らせることで、制御停止時の作動状態をフラッシュEEPROM36に保存することができる。
By the way, when the CPU 35 performs writing to the storage blocks A and B based on the data update request indicating the PKB operation state, if there is no free space in the storage blocks A and B, the CPU 35 performs erasure in units of storage blocks. However, since it takes time to erase, the write waiting time becomes long.
Even when the electric parking ECU 31 is turned off while waiting for writing, the electric parking ECU 31 can store the operation state at the time of control stop in the flash EEPROM 36 by delaying the self-shutdown until the writing is completed.

しかし、書き込み待ちの間に電動パーキング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 or the like occurs in the electric parking ECU 31 while waiting for writing, and the electric parking ECU 31 is temporarily shut down, writing to the flash EEPROM 36 is incomplete and data on the RAM 37 is erased. Therefore, when the electric parking ECU 31 is restarted, the PKB operating state recognized based on the data stored in the flash EEPROM 36 does not match the actual PKB operating state, and the electric parking ECU 31 performs improper control. May be implemented.
Here, if the CPU 35 delays the operation start of the electric motors 32RL and 32RR until the erasure of the storage blocks A and B is completed, for example, when the PKB operation state changes to “in operation (undefined)”, the actual operation state And the PKB operation state stored in the storage blocks A and B can be matched, but in this case, the operability and responsiveness of the electric parking brake device 30 are lowered.

図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 CPU 35 finishes the operation from “non-holding (release)” to “holding (fastening)” (the electric parking brake device 30 is in the fastening position), and “holds” when the operation ends. An example of a state in which there is no empty area (writable area) in the storage blocks A and B when attempting to write the data of (conclude) to the storage blocks A and B, respectively.

この場合、CPU35は、まず記憶ブロックAを消去して、消去終了後に「保持(締結)」のデータを記憶ブロックAに書き込もうとするが、係る消去処理の途中で電源瞬停などによる一時的なシャットダウンで処理が中断され、その後に電動パーキングECU31が再起動された場合、各記憶ブロックA,Bには図6(B)に示すようにPKB作動状態が格納されていることになる。
ここで、記憶ブロックBの記録データのサム値が正常であれば、記憶ブロックA,Bからの出力パターンは、図5に示した、記憶ブロックAのPKB作動状態の記憶領域がブランクで、記憶ブロックBの記録データのサム値が正常である場合に相当し、CPU35は、記憶ブロックBに格納されている「動作中(不定)」のデータを出力する(RAM37に展開する)ことになる。
In this case, the CPU 35 first erases the storage block A and tries to write “hold (fastened)” data to the storage block A after the end of the erasure. When the process is interrupted by the shutdown and then the electric parking ECU 31 is restarted, the PKB operation state is stored in each of the storage blocks A and B as shown in FIG. 6B.
If the sum value of the recording data in the storage block B is normal, the output pattern from the storage blocks A and B is stored in the storage area of the storage block A in the PKB operation state shown in FIG. Corresponding to the case where the sum value of the recording data of block B is normal, the CPU 35 outputs the data “in operation (undefined)” stored in the storage block B (developed in the RAM 37).

つまり、CPU35は、動作終了時で「保持(締結)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしていたのに、再起動されたときには記憶ブロックBの格納データに基づき「動作中(不定)」であると誤判断する。
上記例は、CPU35が、動作終了時で「保持(締結)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしたときに空き領域が無かった場合の例であるが、CPU35が、動作開始前に「動作中(不定)」のデータを記憶ブロックA,Bにそれぞれ書き込もうとしたときに空き領域が無かった場合の消去途中で、電源瞬停などが発生して電動パーキングECU31が再起動された場合、CPU35は、実際には「動作中(不定)」であるのに「保持(締結)」又は「非保持(解放)」であると誤判断することになる。
In other words, the CPU 35 tried to write the data “held (fastened)” to the storage blocks A and B at the end of the operation, but when the CPU 35 was restarted, the “operation in progress (indefinite) ) ”.
The above example is an example in the case where there is no free space when the CPU 35 tries to write “hold (fastened)” data to the storage blocks A and B at the end of the operation. In the middle of erasing when there is no free space when trying to write data “in operation (indeterminate)” to the storage blocks A and B, the electric parking ECU 31 was restarted due to a power interruption etc. In this case, the CPU 35 erroneously determines that it is “holding (fastening)” or “non-holding (release)” although it is actually “operating (undefined)”.

例えば、電動式パーキングブレーキ装置30が締結状態から解放状態に向けて動作している途中で電動パーキングECU31が再起動される場合、CPU35は、再起動後に途中の状態から解放方向に電動モータ32RL,32RRを動作させる必要があるが、記憶ブロックAが消去中で記憶ブロックBに動作開始前の「保持(締結)」が記憶されていると、CPU35は、締結状態からの操作量で解放制御を再実行してしまう。
この場合、実際には電動式パーキングブレーキ装置30が解放位置に達しているのに、CPU35は、更に解放方向に向けて電動モータ32RL,32RRを制御することになり、これによって、電動モータ32RL,32RR(駆動機構)に大きな負荷が加わって故障が生じる惧れがある。
For example, when the electric parking ECU 31 is restarted while the electric parking brake device 30 is operating from the engaged state to the released state, the CPU 35 changes the electric motors 32RL, It is necessary to operate the 32RR, but if the storage block A is being erased and “hold (fastened)” before the start of operation is stored in the memory block B, the CPU 35 performs release control with the operation amount from the fastened state. Will be re-executed.
In this case, although the electric parking brake device 30 has actually reached the release position, the CPU 35 further controls the electric motors 32RL, 32RR in the release direction, whereby the electric motors 32RL, There is a risk that a large load is applied to 32RR (driving mechanism) and a failure occurs.

つまり、ブレーキが解放された状態では電動モータ32RL,32RRの駆動トルク変化が小さいため、CPU35は駆動トルク変化による解放位置の検出を行えず、実際には解放位置に制御されているのに解放位置が検出されないことで更に解放方向に向けて駆動力を発生させ、これによって電動モータ32RL,32RRを故障させてしまう惧れがある。
また、PKB作動状態をランプの点灯/消灯などによって運転者に知らせるシステムの場合、消去中の再起動に伴い、実際にはPKB作動状態が「動作中(不定)」であって、規定の締結トルク(制動力)が確保されておらず車両が動ける状態であるのに、運転者に締結状態である(規定の締結トルク(制動力)が確保されている)と誤って知らせてしまう惧れがある。
That is, since the change in the driving torque of the electric motors 32RL and 32RR is small when the brake is released, the CPU 35 cannot detect the release position due to the change in the drive torque, but the release position is actually controlled to the release position. If this is not detected, a driving force is further generated in the release direction, which may cause the electric motors 32RL and 32RR to fail.
In the case of a system that informs the driver of the PKB operating state by turning on / off the lamp, etc., the PKB operating state is actually “operating (indeterminate)” due to the restart during erasing, and the prescribed fastening Although the torque (braking force) is not secured and the vehicle can move, the driver may be erroneously informed that it is in the engaged state (the specified fastening torque (braking force) is secured) There is.

係る不具合の発生を抑制するため、CPU35は、PKB作動状態を示すデータを記憶ブロックA,Bそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロックA,B毎に消去を実行することで、常に空き領域が確保されるようにする。
つまり、CPU35は、常に空き領域が確保されるようにすることで、PKB作動状態の更新要求が発生したときに、記憶ブロックA,BにPKB作動状態のデータを直ちに(消去動作を待たずに)書き込めるようにし、消去が必要になる場合でも、一方の消去中に他方に最新のPKB作動状態が保存されるようにする。
In order to suppress the occurrence of such a malfunction, the CPU 35 writes data indicating the PKB operating state in each of the storage blocks A and B, and then executes erasure for each of the storage blocks A and B in a state where the next data can be written. By doing so, a free area is always secured.
In other words, the CPU 35 always secures an empty area, so that when the update request for the PKB operation state is generated, the data of the PKB operation state is immediately stored in the storage blocks A and B (without waiting for the erase operation). ) Allow writing, even if erasure is required, ensure that the latest PKB operating state is saved in one during erasure.

図7は、上記の消去処理を実施するときの記憶ブロックA,Bにおけるデータ構成を例示する。
CPU35は、図7(A)に示すように記憶ブロックA,Bに「保持(締結)」を書き込んだ後に「非保持(解放)」に向けて動作を開始させる場合、図7(B)に示すように記憶ブロックA,Bそれぞれの空き領域に「動作中(不定)」のデータを書き込む。
FIG. 7 exemplifies a data configuration in the storage blocks A and B when the above erasure process is performed.
When the CPU 35 starts the operation toward “non-hold (release)” after writing “hold (fastened)” in the storage blocks A and B as shown in FIG. As shown in the drawing, “in operation (indefinite)” data is written in the free areas of the storage blocks A and B.

そして、データ書き込み後に、CPU35は、記憶ブロックA,Bにおける空き領域数が設定数(設定数>1)よりも少なくなっているか否かを判断し、空き領域数が設定数よりも少なければ、ブロック単位の消去を実行する。換言すれば、CPU35は、書き込み後に次回のデータを書き込める空き領域が少なくとも残っている状態で、記憶ブロックA,Bの消去を実行する。
ここで、例えば記憶ブロックAの消去中に電源瞬停などによる一時的なシャットダウンで処理が中断された後、電動パーキングECU31が再起動されたときには、記憶ブロックA,Bは図7(C)に示すデータ構成になる。
After the data is written, the CPU 35 determines whether or not the number of free areas in the storage blocks A and B is smaller than the set number (set number> 1). If the number of free areas is less than the set number, Perform block-wise erase. In other words, the CPU 35 executes the erasure of the storage blocks A and B in a state where at least a free area where the next data can be written remains after writing.
Here, for example, when the electric parking ECU 31 is restarted after the processing is interrupted by a temporary shutdown such as a momentary power interruption during erasing of the storage block A, the storage blocks A and B are shown in FIG. It becomes the data structure shown.

つまり、記憶ブロックBに「動作中(不定)」のデータが保存されているから、CPU35は「動作中(不定)」であることを正しく認識して、パーキングブレーキの解放制御を途中から再開させることができ、また、PKB作動状態の表示を「動作中(不定)」に対応する表示(例えば、ランプ点滅)に制御することができる。
なお、CPU35は、記憶ブロックAの消去が完了すると、消去前に書き込んだPKB作動状態を再度記憶ブロックAに書き込み、記憶ブロックBについても消去が必要であれば、記憶ブロックBについての消去を行う。
That is, since “in operation (indeterminate)” data is stored in the memory block B, the CPU 35 correctly recognizes that it is “in operation (indeterminate)” and restarts the parking brake release control from the middle. In addition, the display of the PKB operating state can be controlled to a display corresponding to “in operation (indeterminate)” (for example, lamp blinking).
When the erasure of the storage block A is completed, the CPU 35 writes the PKB operation state written before the erasure to the storage block A again. If the erasure of the storage block B is necessary, the CPU 35 erases the storage block B. .

そして、記憶ブロックBの消去中に電動パーキングECU31が一時的にシャットダウンされた場合には、記憶ブロックAに格納されているPKB作動状態が出力されることになる。
これに対し、空き領域が無くなってから消去を行い、消去終了後に書き込みを行う構成では、書き込み前の消去中に電源瞬停などにより処理が中断されると、変化後のPKB作動状態(「動作中(不定)」)のデータが保存されず、CPU35は、再起動時に変化前のPKB作動状態(「保持(締結)」)であると誤判断して、締結状態から解放させる処理を最初から実行したり、また、運転者に対しPKB作動状態を誤って知らせてしまう惧れがある。
When the electric parking ECU 31 is temporarily shut down while the storage block B is being erased, the PKB operating state stored in the storage block A is output.
On the other hand, in a configuration in which erasure is performed after there is no free space and writing is performed after erasing is completed, if the processing is interrupted due to a momentary power interruption or the like during erasing before writing, the PKB operating state after change ( "Indeterminate (undefined)") data is not stored, and the CPU 35 erroneously determines that the PKB operating state before the change ("holding (fastening)") is not changed at the time of restart, and starts the process of releasing from the fastening state from the beginning. There is a risk that it will be executed or the PKB operating state will be erroneously notified to the driver.

図8−図10は、CPU35による記憶ブロックA,Bの消去処理及びPKB作動状態を示すデータの書き込み処理を詳細に示すフローチャートである。
図8のフローチャートにおいて、CPU35は、ステップS101でフラッシュEEPROM36上のPKB作動状態を示すデータの更新要求が発生したか否かを判断する。
FIGS. 8 to 10 are flowcharts showing in detail the erasure processing of the storage blocks A and B and the data writing processing indicating the PKB operating state by the CPU 35.
In the flowchart of FIG. 8, the CPU 35 determines whether or not a data update request indicating the PKB operating state on the flash EEPROM 36 has occurred in step S101.

PKB作動状態を示すデータの更新要求がない場合、CPU35は、図8のフローチャートに示す処理を終了させる。
一方、PKB作動状態を示すデータの更新要求が発生すると、CPU35は、ステップS102に進み、フラッシュEEPROM36の記憶ブロックAの空き領域に、変化後のPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。
When there is no data update request indicating the PKB operating state, the CPU 35 ends the process shown in the flowchart of FIG.
On the other hand, when a data update request indicating the PKB operating state is generated, the CPU 35 proceeds to step S102, and the data indicating the PKB operating state after the change (“hold (fastened)”) in the free area of the storage block A of the flash EEPROM 36. "Non-hold (release)" or "In operation (undefined)") is written.

更に、CPU35は、ステップS103に進み、フラッシュEEPROM36の記憶ブロックBの空き領域に、ステップS102で記憶ブロックAに書き込んだデータと同じPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。   Further, the CPU 35 proceeds to step S103, and the data indicating the same PKB operating state as the data written in the storage block A in step S102 ("holding (fastening)" "non-holding") in the free area of the storage block B of the flash EEPROM 36. "Release)" or "In operation (undefined)").

図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 CPU 35 determines whether or not it is possible to sequentially write in a plurality of areas (PKB operating state (1) to PKB operating state (256)) where the PKB operating state is recorded in the storage blocks A and B. Therefore, the write index IDx for designating one of the PKB operation state (1) to the PKB operation state (256) is initialized to zero.

次いで、CPU35は、ステップS202に進み、書き込みインデックスIDxが最大値を超えたか否かを判断することで、記憶ブロックA,BにおいてPKB作動状態を記録する複数領域の全てについて書き込みの可否を判断したかを検出する。
そして、書き込みインデックスIDxが最大値を超えておらず、書き込みの可否を判断する領域が残っている場合、CPU35は、ステップS203に進み、書き込みインデックスIDxで指定される領域が、書き込み可能な空き領域であるか否かを判断する。
Next, the CPU 35 proceeds to step S202, and determines whether or not writing is possible for all of the plurality of areas in which the PKB operation state is recorded in the storage blocks A and B by determining whether or not the writing index IDx exceeds the maximum value. To detect.
If the write index IDx does not exceed the maximum value and there is an area for determining whether or not writing is possible, the CPU 35 proceeds to step S203, and the area specified by the write index IDx is a writable free area. It is determined whether or not.

書き込みインデックスIDxで指定される領域が書き込み可能な空き領域である場合、CPU35は、ステップS204に進み、書き込みインデックスIDxで指定される領域にPKB作動状態を示すデータ(「保持(締結)」「非保持(解放)」「動作中(不定)」のいずれか)を書き込む。
PKB作動状態を示すデータの書き込みを行うと、CPU35は、ステップS205で書き込みが正常に行われたか書き込み異常が発生したかの判別結果を保存した後に、本ルーチンを終了させる。
If the area specified by the write index IDx is a writable free area, the CPU 35 proceeds to step S204, where data indicating the PKB operating state ("hold (concluded)""non-display" is specified in the area specified by the write index IDx. "Hold (release)" or "In operation (undefined)") is written.
When the data indicating the PKB operating state is written, the CPU 35 ends the routine after saving the determination result of whether the writing is normally performed or the writing abnormality has occurred in step S205.

一方、書き込みインデックスIDxで指定される領域が書き込み可能な空き領域でなくデータ書き込み済の領域である場合、CPU35は、ステップS203からステップS206に進み、書き込みインデックスIDxを、次の領域を指定させるように更新(インクリメント)した後、ステップS202に戻る。
上記のように、CPU35は、記憶ブロックA,Bに書き込み可能な空き領域があるか否かを探索し、空き領域があればPKB作動状態を示すデータの書き込みを行う。
On the other hand, if the area designated by the write index IDx is not a writable free area but an area where data has been written, the CPU 35 proceeds from step S203 to step S206, and causes the write index IDx to designate the next area. After updating (incrementing), the process returns to step S202.
As described above, the CPU 35 searches whether there is a writable free area in the storage blocks A and B, and if there is a free area, writes data indicating the PKB operating state.

ここで、記憶ブロックA,Bに書き込み可能な空き領域がない場合、CPU35は、ステップS202、ステップS203、ステップS206の処理を繰り返し、書き込みインデックスIDxを最大値にまで増加させても書き込みが行えないことになる。
この場合、CPU35は、ステップS202で書き込みインデックスIDxが最大値を超えている、換言すれば、PKB作動状態を示すデータが全ての領域に書き込まれていて新たにデータを書き込める空き領域がないと判断するようになり、ステップS202からステップS207に進む。
Here, when there is no writable free area in the storage blocks A and B, the CPU 35 repeats the processing of step S202, step S203, and step S206, and writing cannot be performed even if the write index IDx is increased to the maximum value. It will be.
In this case, the CPU 35 determines in step S202 that the write index IDx exceeds the maximum value, in other words, data indicating the PKB operating state has been written in all areas and there is no free area in which new data can be written. The process proceeds from step S202 to step S207.

CPU35は、ステップS207で、PKB作動状態を示すデータが全ての領域に書き込まれていて新たにデータを書き込める空き領域がないという判断結果を保存し、本ルーチンを終了させる。
このようにして、CPU35は、図8のフローチャートのステップS102、ステップ103でPKB作動状態を示すデータを記憶ブロックA及び記憶ブロックBに書き込むこで、PKB作動状態を示すデータは、フラッシュEEPROM36に冗長に格納されることになる。
In step S207, the CPU 35 stores the determination result that the data indicating the PKB operating state has been written in all areas and there is no free area in which data can be newly written, and ends this routine.
In this manner, the CPU 35 writes the data indicating the PKB operating state in the storage block A and the storage block B in step S102 and step 103 of the flowchart of FIG. 8 so that the data indicating the PKB operating state is redundantly stored in the flash EEPROM 36. Will be stored.

そして、CPU35は、PKB作動状態を示すデータの記憶ブロックA,Bへの書き込み処理を終えると、まず、記憶ブロックAに関する処理を実施するためにステップS104に進む。
なお、ステップS104−ステップS107が記憶ブロックAに関する処理で、ステップS108−ステップS111が記憶ブロックBに関する処理で、CPU35は、記憶ブロックAについての処理を行った後、記憶ブロックBについても同様の処理を実施する。
Then, when the CPU 35 finishes writing the data indicating the PKB operating state to the storage blocks A and B, first, the CPU 35 proceeds to step S104 in order to execute the processing relating to the storage block A.
Steps S104 to S107 are processes related to the storage block A, steps S108 to S111 are processes related to the storage block B, and the CPU 35 performs the same process for the storage block B after performing the process for the storage block A. To implement.

ステップS104で、CPU35は、PKB作動状態を示すデータの記憶ブロックAへの書き込み結果が正常であるか異常であるかを判断する。
ここで、書き込み結果の異常には、書き込み異常とともに、記憶ブロックAに空き領域が無くPKB作動状態を示すデータの書き込みを行えなかった異常が含まれる。
In step S104, the CPU 35 determines whether the result of writing the data indicating the PKB operating state to the storage block A is normal or abnormal.
Here, the abnormality in the writing result includes an abnormality in which the storage block A has no free space and data indicating the PKB operation state cannot be written together with the writing abnormality.

PKB作動状態を示すデータの記憶ブロックAへの書き込みが正常に行われた場合、CPU35は、ステップS105に進み、今回記憶ブロックAに書き込んだPKB作動状態を示すデータが、規定データである「動作中(不定)」を示すデータであるか否かを判断する。
そして、今回記憶ブロックAに書き込んだPKB作動状態を示すデータが、「保持(締結)」又は「非保持(解放)」を示すデータであって「動作中(不定)」を示すデータではなかった場合、CPU35は、後述する空き領域数の判定に基づく記憶ブロックAの消去処理を行うことなく、ステップS108以降の記憶ブロックBの処理に進む。
When the data indicating the PKB operation state is normally written to the storage block A, the CPU 35 proceeds to step S105, and the data indicating the PKB operation state written in the storage block A this time is the prescribed data “Operation It is determined whether the data indicates “medium (undefined)”.
The data indicating the PKB operating state written in the memory block A this time is data indicating “holding (fastening)” or “non-holding (releasing)”, but not “in operation (indefinite)”. In this case, the CPU 35 proceeds to the processing of the storage block B after step S108 without performing the erasure processing of the storage block A based on the determination of the number of free areas described later.

記憶ブロックAに書き込まれたPKB作動状態を示すデータが「保持(締結)」又は「非保持(解放)」を示すデータである場合は、電動式パーキングブレーキ装置30の動作確定状態であり、係る書き込み後に記憶ブロックAの消去を実行している間に、パーキングブレーキスイッチ33が操作されて動作開始要求(締結から解放、又は、解放から締結への切換え要求)が発生する可能性がある。
係る動作開始要求が発生すると、CPU35は動作要求に応じて電動モータ32RL,32RRの駆動制御を開始するが、消去中の記憶ブロックAには書き込みを行えず、「動作中(不定)」の書き込みが遅れる(書き込み待ちが生じる)ことになり、実際のPKB作動状態と記憶ブロックAに格納されているPKB作動状態とが整合しない状態になってしまう。
When the data indicating the PKB operation state written in the storage block A is data indicating “hold (engaged)” or “non-hold (release)”, the operation of the electric parking brake device 30 is confirmed, and While the storage block A is being erased after writing, the parking brake switch 33 may be operated to generate an operation start request (request for switching from engagement to release, or switching from release to engagement).
When such an operation start request is generated, the CPU 35 starts drive control of the electric motors 32RL and 32RR in response to the operation request, but cannot write to the memory block A being erased and writes “in operation (undefined)”. Will be delayed (waiting to be written), and the actual PKB operating state and the PKB operating state stored in the storage block A will not match.

そこで、CPU35は、「保持(締結)」又は「非保持(解放)」を記憶ブロックAに書き込んだ後は、記憶ブロックAの消去を実行せず、消去中に動作開始要求が発生することによる書き込み遅れ(書き込み待ち)の発生を抑制する。
一方、記憶ブロックAに書き込まれたPKB作動状態を示すデータが「動作中(不定)」である場合、動作中に記憶ブロックAの消去を進めることができる。
Therefore, the CPU 35 does not execute the erasure of the storage block A after writing “holding (fastening)” or “non-holding (release)” in the storage block A, and an operation start request is generated during the erasing. Suppresses the occurrence of write delay (write wait).
On the other hand, when the data indicating the PKB operation state written in the storage block A is “in operation (indefinite)”, the erasure of the storage block A can be advanced during the operation.

このため、締結から解放又は解放から締結への切換えに要する時間が記憶ブロックAの消去に要する時間よりも長ければ、動作中に記憶ブロックAの消去を完了させることができ、消去中に「保持(締結)」又は「非保持(解放)」の書き込み要求が発生して書き込み遅れ(書き込み待ち)が生じることが抑制される。
また、締結から解放又は解放から締結への切換えに要する時間が記憶ブロックAの消去に要する時間よりも短く、動作終了までに記憶ブロックAの消去が終了しなかった場合でも、書き込み遅れ(書き込み待ち)を充分に短くできる。
Therefore, if the time required for switching from engagement to release or release to engagement is longer than the time required for erasing the storage block A, the erasure of the storage block A can be completed during operation. (Conclusion) "or" Non-hold (release) "write requests are prevented from causing a write delay (waiting for writing).
In addition, even if the time required for switching from engagement to release or release to engagement is shorter than the time required for erasing the storage block A and the erasure of the storage block A is not completed by the end of the operation, a write delay (waiting for writing) ) Can be made sufficiently short.

また、動作開始後の記憶ブロックAの消去中にパーキングブレーキスイッチ33が動作方向とは逆となる方向に操作された場合も、消去中に「保持(締結)」又は「非保持(解放)」の書き込み要求が発生して書き込み遅れ(書き込み待ち)が生じることを抑制できる。
そこで、CPU35は、PKB作動状態として「動作中(不定)」を記憶ブロックAに書き込んだときに記憶ブロックAの消去を実行し、PKB作動状態として「保持(締結)」又は「非保持(解放)」を記憶ブロックAに書き込んだときには記憶ブロックAの消去を実行しないよう構成されている。
Further, when the parking brake switch 33 is operated in the direction opposite to the operation direction during the erasure of the storage block A after the operation starts, “hold (fastened)” or “non-hold (release)” during the erasure. It is possible to suppress the occurrence of a write delay (waiting for writing) due to the generation of the write request.
Therefore, the CPU 35 erases the storage block A when “in operation (undefined)” is written to the storage block A as the PKB operation state, and “hold (fastened)” or “non-hold (release) as the PKB operation state. ) "Is written to the storage block A, the storage block A is not erased.

そして、CPU35は、PKB作動状態として「動作中(不定)」を記憶ブロックAに書き込んだとき、ステップS106に進み、今回の「動作中(不定)」の書き込み処理前での記憶ブロックAにおけるPKB作動状態の書き込み領域の空き数NVが設定数NTH(例えば、設定数=8)以下であるか否かを判断する。
上記の設定数NTHは、データの書き込みが可能な空き領域数の確保数を規定するもので、例えば、締結、解放動作が左右でタイミングをずらして実行される場合は、「保持(締結)」又は「非保持(解放)」の書き込みが連続して実施される場合があり、係る連続した書き込みでも消去を行うことなく書き込みを行えるように、最大連続書き込み回数に余裕分を付加した値として上記の設定数NTHは決められる。
Then, when the CPU 35 writes “in operation (undefined)” in the storage block A as the PKB operating state, the CPU 35 proceeds to step S106, and the PKB in the storage block A before the current “in operation (indefinite)” write processing is performed. It is determined whether or not the number of empty write areas NV in the operating state is equal to or less than a set number NTH (for example, set number = 8).
The set number NTH defines the number of reserved 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)” Alternatively, there may be cases where “non-retained (released)” writing is continuously performed, and the value obtained by adding a margin to the maximum number of consecutive writes so that writing can be performed without erasing even with such continuous writing. The set number NTH is determined.

書き込み領域の空き数NVが設定数NTHを超えている場合、CPU35は、記憶ブロックAの消去を実行することなく、ステップS108以降に進む。
一方、書き込み領域の空き数が設定数以下であって、PKB作動状態を示すデータの更新要求が発生したときに空き領域がなく、記憶ブロックAを消去して書き込みを行う必要が生じる可能性がある場合、CPU35は、ステップS107に進む。
If the number NV of free write areas exceeds the set number NTH, the CPU 35 proceeds to step S108 and subsequent steps without executing the erasure of the storage block A.
On the other hand, there is a possibility that when the number of free areas in the writing area is equal to or less than the set number and there is a free area when a data update request indicating the PKB operating state occurs, it is necessary to erase the storage block A and perform writing. If there is, the CPU 35 proceeds to step S107.

また、CPU35は、ステップS104で、記憶ブロックAへの書き込み異常、若しくは、記憶ブロックAに空き領域が無いと判断した場合も、ステップS107に進む。
CPU35は、ステップS107で、記憶ブロックAを消去し、消去後にステップS102で書き込んだデータと同じデータを再度記憶ブロックAに書き込む処理を実施する。
If the CPU 35 determines in step S104 that there is an abnormality in writing to the storage block A or that there is no free space in the storage block A, the process proceeds to step S107.
In step S107, the CPU 35 erases the storage block A, and executes a process of writing again the same data as the data written in step S102 to the storage block A after erasure.

つまり、CPU35は、空き数NVが設定数NTH以下になるまでは、PKB作動状態のデータを新たに書き込める空き領域が記憶ブロックAに確保されているとして記憶ブロックAを消去せず、空き数NVが設定数NTH以下になると、PKB作動状態を示すデータの書き込みに先立って消去動作が必要になる可能性があると判断して、予め記憶ブロックAの消去を実行し、書き込みに先立つ消去動作が必要になることを抑制する。
これにより、記憶ブロックAへの「動作中(不定)」の書き込み回数に対し消去動作の頻度を必要最小限とし、CPU35の処理負担を軽減できる。
That is, the CPU 35 does not erase the storage block A until the free space NV is reserved in the storage block A until the free space NV becomes equal to or smaller than the set number NTH. Is less than the set number NTH, it is determined that an erase operation may be required prior to the writing of data indicating the PKB operating state, and the storage block A is erased in advance, and the erase operation prior to the write is performed. Control what is needed.
As a result, the frequency of the erasing operation can be minimized with respect to the number of times “in operation (indefinite)” is written to the storage block A, and the processing load on the CPU 35 can be reduced.

また、空き数NVが設定数NTH以下になったときに、換言すれば、次のPKB作動状態を示すデータの書き込みが可能な状態で記憶ブロックAを消去するから、PKB作動状態を示すデータの更新要求が発生したときに、書き込みに先立って消去処理が必要になることを抑制でき、書き込み遅れ(書き込み待ち)が発生して記憶ブロックAの格納データと実際のPKB作動状態とが不整合になることを抑制できる。   In addition, when the empty number NV becomes equal to or less than the set number NTH, in other words, the storage block A is erased in a state where data indicating the next PKB operating state can be written, so that the data indicating the PKB operating state is stored. When an update request is generated, it is possible to suppress the necessity of erasure processing prior to writing, and a writing delay (waiting for writing) occurs and the stored data in the storage block A and the actual PKB operating state are inconsistent. Can be suppressed.

また、記憶ブロックAの消去中は記憶ブロックBの消去が実行されず、記憶ブロックBにPKB作動状態を示すデータとして最新の「動作中(不定)」が保存されているので、記憶ブロックAの消去中に電源瞬停などによる一時的シャットダウンが生じても、CPU35は再起動時に記憶ブロックBの保存データに基づき「動作中(不定)」であることを認識できる。   In addition, during the erasure of the storage block A, the erasure of the storage block B is not executed, and the latest “in operation (undefined)” is stored in the storage block B as data indicating the PKB operating state. Even if a temporary shutdown due to an instantaneous power failure or the like occurs during erasure, the CPU 35 can recognize that it is “in operation (indeterminate)” based on the data stored in the storage block B at the time of restart.

したがって、CPU35は、電動式パーキングブレーキ装置30が「動作中(不定)」であることを運転者に通知することで、パーキングブレーキスイッチ33の再操作を促したり、電動式パーキングブレーキ装置30を初期位置となる締結位置に駆動させたりすることが可能になる。
これにより、解放位置に向けた動作中に一時的シャットダウンが生じても、CPU35は、電動モータ32RL,32RRを一旦締結位置に駆動してから解放位置に向けて駆動できるので、駆動トルク変化に基づく適正な操作量で電動モータ32RL,32RRを駆動でき、電動モータ32RL,32RRに過度な負荷が加わって故障することを抑制できる。
Accordingly, the CPU 35 notifies the driver that the electric parking brake device 30 is “operating (indefinite)”, thereby prompting the parking brake switch 33 to be re-operated or initializing the electric parking brake device 30. It is possible to drive to a fastening position as a position.
As a result, even if a temporary shutdown occurs during the operation toward the release position, the CPU 35 can drive the electric motors 32RL and 32RR once to the fastening position and then toward the release position. The electric motors 32RL and 32RR can be driven with an appropriate operation amount, and it is possible to suppress a failure caused by applying an excessive load to the electric motors 32RL and 32RR.

図10のフローチャートは、上記ステップS107及び後述するステップS111におけるCPU35の処理内容を詳細に示すものであり、記憶ブロックAと記憶ブロックBとに共通する処理である。
CPU35は、ステップS301で、記憶ブロックAの強制消去の指示があるか否かを判断する。
The flowchart in FIG. 10 shows details of processing performed by the CPU 35 in step S107 and step S111 described later, and is a process common to the storage block A and the storage block B.
In step S301, the CPU 35 determines whether there is an instruction to forcibly erase the storage block A.

CPU35は、図8のフローチャートのステップS107に進んだ場合、記憶ブロックAの強制消去を指定するので、ステップS107に進んで図10のフローチャートに示すルーチンが実行される場合は、記憶ブロックAについての強制消去の指示があると判断し、ステップS302に進む。
つまり、セルフシャットオフ時の故障情報を書き込むときで、強制消去の指示が無い場合、CPU35は、ステップS302−ステップS304を迂回してステップS305に進み、記憶ブロックAの消去は実施しない。
When the CPU 35 proceeds to step S107 in the flowchart of FIG. 8, it designates forced erasure of the storage block A. Therefore, when the routine proceeds to step S107 and the routine shown in the flowchart of FIG. It is determined that there is a forced erasure instruction, and the process proceeds to step S302.
That is, when the failure information at the time of self-shutoff is written and there is no instruction for forced erasure, the CPU 35 bypasses steps S302 to S304 and proceeds to step S305, and the storage block A is not erased.

CPU35は、ステップS302で記憶ブロックAの消去を実行し、次のステップS303では、記憶ブロックAの累計消去回数を更新する。
なお、ステップS302で記憶ブロックA(記憶ブロックB)の消去を実行している間は、消去中でない側の記憶ブロックB(記憶ブロックA)についてはPKB作動状態を示すデータの書き込みが停止される構成としてある。これにより、記憶ブロックA,B間で、PKB作動状態のデータの最新値が不整合になることが抑制される。
The CPU 35 erases the storage block A in step S302, and updates the cumulative number of erases of the storage block A in the next step S303.
Note that while erasure of the storage block A (storage block B) is being executed in step S302, writing of data indicating the PKB operating state is stopped for the storage block B (storage block A) that is not being erased. As a configuration. Thereby, it is suppressed that the newest value of the data of the PKB operation state becomes inconsistent between the storage blocks A and B.

CPU35は、記憶ブロックAの消去終了後に、ステップS304で、PKB作動状態を示すデータを改めて書き込む。
つまり、CPU35は、図8のフローチャートのステップS102で、PKB作動状態を示すデータを記憶ブロックAに正常に書き込むことができた場合でも、書き込み領域の空き数が設定数以下になっていれば、それまでに書き込んだPKB作動状態を示すデータやセルフシャットオフ時に書き込んだ故障情報などを全て消去し、消去後に、ステップS102で記憶ブロックAに書き込んだデータと同じPKB作動状態を示すデータを記憶ブロックAに書き込む。
After erasing the storage block A, the CPU 35 rewrites data indicating the PKB operating state in step S304.
That is, even if the CPU 35 can normally write the data indicating the PKB operation state in the storage block A in step S102 of the flowchart of FIG. 8, if the number of empty write areas is equal to or less than the set number, All the data indicating the PKB operating state written so far and the failure information written at the time of self-shutoff are erased, and after erasing, the data indicating the same PKB operating state as the data written in the storage block A in step S102 is stored in the storage block. Write to A.

記憶ブロック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 empty NV in the writing area returns to a number exceeding the set number NTH, so that a data update request indicating the PKB operating state occurs. An empty area in which update data related to can be written is secured. Therefore, the CPU 35 can immediately write data indicating the PKB operating state without waiting for the erasing process.
Here, even if a temporary shutdown due to a momentary power failure occurs while the storage block A is being erased, the data indicating “operating (undefined)” is stored in the storage block B as the latest data. Since it is stored, the CPU 35 can correctly recognize that the operation was in progress based on the data indicating “in operation (indefinite)” stored in the storage block B when the CPU 35 is restarted.

したがって、CPU35は、電動モータ32RL,32RR(駆動機構)に大きな負荷が加わる操作量の出力を抑制でき、また、電動式パーキングブレーキ装置30の作動状態が動作中であるのに、CPU35が、規定の締結トルク(制動力)が確保されている「保持(締結)」状態であると車両の運転者に誤って知らせてしまうことを抑止できる。
CPU35は、消去後の記憶ブロックAにPKB作動状態のデータを書き込んだ後、ステップS305に進み、RAM37に展開させていた故障情報などを記憶ブロックAに書き込んで保存されるようにする。
Therefore, the CPU 35 can suppress the output of the operation amount that applies a large load to the electric motors 32RL, 32RR (drive mechanism), and the CPU 35 is in a specified state even though the operating state of the electric parking brake device 30 is operating. It is possible to prevent the vehicle driver from being informed erroneously in the “holding (fastening)” state in which the fastening torque (braking force) is secured.
The CPU 35 writes the data of the PKB operation state in the storage block A after erasure, and then proceeds to step S305 to write and save the failure information developed in the RAM 37 in the storage block A.

上記のように、CPU35は、PKB作動状態のデータを記憶ブロックA及び記憶ブロックBに更新要求発生時に直ちに書き込んだ後、記憶ブロックAについて書き込み結果を検証し、記憶ブロックAに「動作中(不定)」を示すデータを書き込み、かつ、記憶ブロックAにおける書き込み領域の空き数NVが設定数NTH以下になっている場合には、記憶ブロックAを消去して、「動作中(不定)」を示すデータを改めて記憶ブロックAに書き込む。   As described above, the CPU 35 immediately writes the data of the PKB operating state to the storage block A and the storage block B when the update request is generated, and then verifies the writing result for the storage block A and ) ”Is written, and when the number NV of empty write areas in the storage block A is equal to or less than the set number NTH, the storage block A is erased and“ in operation (undefined) ”is indicated. The data is written again to the storage block A.

係る記憶ブロックAについての書き込み結果の検証処理が終了すると、CPU35は、ステップS108以降に進んで、記憶ブロックBについても同様な検証処理を実施する。
つまり、CPU35は、ステップS108で、記憶ブロックBへのPKB作動状態のデータの書き込みが正常に行われたか否かを判断する。
When the verification process of the writing result for the storage block A is completed, the CPU 35 proceeds to step S108 and subsequent steps, and performs the same verification process for the storage block B.
That is, the CPU 35 determines whether or not the data in the PKB operating state is normally written in the storage block B in step S108.

そして、正常に書き込みが行われた場合、CPU35は、ステップS109に進んで、記憶ブロックBに書き込んだデータが「動作中(不定)」を示すデータであったか否かを判別する。
記憶ブロックBに「動作中(不定)」のデータを書き込んだ場合、CPU35は、ステップS110に進み、記憶ブロックBにおける書き込み領域の空き数NVが設定数NTH以下になっているか否かを判断する。
If the data has been normally written, the CPU 35 proceeds to step S109 to determine whether or not the data written in the storage block B is data indicating “in operation (indefinite)”.
When the data “in operation (undefined)” is written in the storage block B, the CPU 35 proceeds to step S110, and determines whether or not the number NV of free write areas in the storage block B is equal to or less than the set number NTH. .

書き込み領域の空き数NVが設定数NTH以下になっている場合、CPU35は、ステップS111に進んで記憶ブロックBを消去し、消去後に「動作中(不定)」のデータを記憶ブロックBに再度書き込む。
この記憶ブロックBの消去中に電源瞬停などによって処理が中断された場合、再起動時には記憶ブロックAに「動作中(不定)」のデータが保存されていて、CPU35は、「動作中(不定)」であることを正しく認識できる。
When the number of vacant areas NV in the writing area is equal to or smaller than the set number NTH, the CPU 35 proceeds to step S111 to erase the storage block B, and after the erasure, rewrites the data “in operation (undefined)” to the storage block B. .
If the processing is interrupted due to an instantaneous power failure or the like during the erasure of the storage block B, the data “in operation (undefined)” is stored in the storage block A at the time of restart, and the CPU 35 determines that “in operation (indefinite). ) ”.

上記実施形態で説明した各技術的思想は、矛盾が生じない限りにおいて、適宜組み合わせて使用することができる。
また、好ましい実施形態を参照して本発明の内容を具体的に説明したが、本発明の基本的技術思想及び教示に基づいて、当業者であれば、種々の変形態様を採り得ることは自明である。
例えば、前述の一態様において、CPU35は、「動作中(不定)」のデータを書き込んだときに書き込み領域の空き数が設定数以下であれば、記憶ブロックA,B毎に消去を実行するが、「保持(締結)」又は「非保持(解放)」を書き込んだときにも、書き込み領域の空き数が設定数以下であれば、記憶ブロックA,B毎に消去を実行する構成とすることができる。
The technical ideas described in the above embodiments can be used in appropriate combination as long as no contradiction arises.
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 take various modifications based on the basic technical idea and teachings of the present invention. It is.
For example, in one aspect described above, the CPU 35 executes erasure for each of the storage blocks A and B if the number of vacant areas in the writing area is less than or equal to the set number when writing “in operation (undefined)” data. Even when “Hold (Concluded)” or “Non-Hold (Release)” is written, if the number of free areas in the writing area is less than or equal to the set number, erasure is executed for each of the storage blocks A and B. Can do.

また、前述の一態様において、自動車の駆動機構として電動式パーキングブレーキ装置30を例示したが、電動式パーキングブレーキ装置30に限定されず、書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術は、作動状態を記憶させる公知の駆動機構に適用することができる。
また、前述の一態様において、不揮発性メモリであるフラッシュEEPROM36は、データを冗長に格納するための2つの記憶ブロックA,Bを備えるが、3つ以上の記憶ブロックを備えてそれぞれにデータを格納させる構成においても、書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術を適用できる。
Further, in the above-described aspect, the electric parking brake device 30 is illustrated as the driving mechanism of the automobile. However, the electric parking brake device 30 is not limited to the electric parking brake device 30, and each storage block is in a state where the next data can be written after the writing. The technique for causing the computer to execute erasing can be applied to a known drive mechanism that stores the operating state.
In the above-described embodiment, the flash EEPROM 36, which is a non-volatile memory, includes two storage blocks A and B for storing data redundantly, but includes three or more storage blocks and stores data in each. Even in such a configuration, it is possible to apply a technique in which erasure is performed for each storage block in a state where the next data can be written after the writing.

また、前述の一態様において、フラッシュEEPROM36は、マイクロコンピュータ34内蔵の不揮発性メモリであるが、マイクロコンピュータ34の外部に備えられたフラッシュEEPROMなどの不揮発性メモリが、データを冗長に格納するための複数の記憶ブロックを備える構成において、データの書き込み後に次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行させる技術を適用できる。   In the above-described embodiment, the flash EEPROM 36 is a nonvolatile memory built in the microcomputer 34. However, a nonvolatile memory such as a flash EEPROM provided outside the microcomputer 34 stores data redundantly. In a configuration including a plurality of storage blocks, it is possible to apply a technique in which erasure is executed for each storage block in a state where the next data can be written after the data is written.

ここで、上述した実施形態から把握し得る技術的思想について、以下に記載する。
自動車用制御装置は、その一態様において、自動車の電動式パーキングブレーキ装置を制御する制御装置であって、前記電動式パーキングブレーキ装置の作動状態を示すデータを冗長に格納するための2つの記憶ブロックを備えた不揮発性メモリと、前記2つの不揮発性メモリへのアクセスを行う制御部と、を有し、前記制御部が前記2つの記憶ブロックに書き込む作動状態のデータは、締結状態を示す第1データと、解放状態を示す第2データと、締結状態と解放状態との間の動作状態を示す第3データとのいずれかであり、前記制御部は、前記第3データを前記2つの記憶ブロックそれぞれに書き込んだ後に、空き領域が設定値を下回る記憶ブロックについて消去を実行してデータの再書き込みを行う、自動車用制御装置。
Here, the technical idea that can be understood from the above-described embodiment will be described below.
In one aspect, the control device for an automobile is a control device that controls an electric parking brake device of an automobile, and two storage blocks for redundantly storing data indicating an operating state of the electric parking brake device And an operation state data written in the two storage blocks by the control unit is a first state indicating a fastening state. Any one of data, second data indicating a release state, and third data indicating an operation state between a fastening state and a release state, and the control unit stores the third data in the two storage blocks A control apparatus for an automobile which performs erasure on a storage block whose free space is lower than a set value and rewrites data after writing to each.

31…電動パーキングECU(自動車用制御装置)、35…CPU(制御部)、36…フラッシュEEPROM(不揮発性メモリ)   31 ... Electric parking ECU (control device for automobile), 35 ... CPU (control unit), 36 ... Flash EEPROM (nonvolatile memory)

Claims (7)

データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリと、
前記不揮発性メモリへのアクセスを行う制御部と、
を有し、
前記制御部は、データを複数の記憶ブロックそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行する、
自動車用制御装置。
A non-volatile memory having a plurality of storage blocks for storing data redundantly;
A control unit for accessing the nonvolatile memory;
Have
The controller writes data to each of the plurality of storage blocks, and then performs erasure for each storage block in a state where the next data can be written.
Automotive control device.
データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリと、
前記不揮発性メモリへのアクセスを行う制御部と、
を有し、自動車の駆動機構を制御する自動車用制御装置であって、
前記制御部は、前記駆動機構の作動状態を示すデータを複数の記憶ブロックそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行する、
自動車用制御装置。
A non-volatile memory having a plurality of storage blocks for storing data redundantly;
A control unit for accessing the nonvolatile memory;
An automobile control device that controls a drive mechanism of the automobile,
The controller, after writing data indicating the operating state of the drive mechanism in each of the plurality of storage blocks, to execute erasure for each storage block in a state in which the next data can be written,
Automotive control device.
データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリと、
前記不揮発性メモリへのアクセスを行う制御部と、
を有し、自動車の電動式パーキングブレーキ装置を制御する自動車用制御装置であって、
前記制御部は、前記電動式パーキングブレーキ装置の作動状態を示すデータを複数の記憶ブロックそれぞれに書き込んだ後、次のデータの書き込みが可能な状態で記憶ブロック毎に消去を実行する、
自動車用制御装置。
A non-volatile memory having a plurality of storage blocks for storing data redundantly;
A control unit for accessing the nonvolatile memory;
An automobile control device for controlling an electric parking brake device of an automobile,
The controller, after writing data indicating the operating state of the electric parking brake device to each of a plurality of storage blocks, to execute the erasure for each storage block in a state where the next data can be written,
Automotive control device.
前記制御部は、
データを複数の記憶ブロックそれぞれに書き込んだ後の状態での空き領域数が設定数を下回る記憶ブロックについて消去を実行する、請求項1から請求項3のいずれか1つに記載の自動車用制御装置。
The controller is
The vehicle control device according to any one of claims 1 to 3, wherein erasure is executed for a storage block in which the number of free areas in a state after data is written to each of the plurality of storage blocks is less than a set number. .
前記制御部は、
規定のデータを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行し、前記規定データ以外のデータを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない、
請求項1から請求項3のいずれか1つに記載の自動車用制御装置。
The controller is
After writing the prescribed data to each of the plurality of storage blocks, erasing the storage block whose number of free areas is less than the set number, and after writing data other than the prescribed data to each of the plurality of storage blocks, Do not erase,
The control apparatus for motor vehicles as described in any one of Claims 1-3.
前記電動式パーキングブレーキ装置の作動状態を示すデータは、締結状態を示す第1データと、解放状態を示す第2データと、締結状態と解放状態との間の動作状態を示す第3データとのいずれかであり、
前記制御部は、
第3データを複数の記憶ブロックそれぞれに書き込んだ後に、空き領域数が設定数を下回る記憶ブロックについて消去を実行してデータの書き込みを行い、第1データ又は第2データを複数の記憶ブロックそれぞれに書き込んだ後は記憶ブロックの消去を行わない、
請求項3記載の自動車用制御装置。
The data indicating the operating state of the electric parking brake device includes: first data indicating an engaged state; second data indicating a released state; and third data indicating an operation state between the engaged state and the released state. Either
The controller is
After writing the third data to each of the plurality of storage blocks, erasure is performed on the storage block whose number of free areas is less than the set number, and data is written, and the first data or the second data is stored in each of the plurality of storage blocks. Do not erase storage block after writing,
The automobile control device according to claim 3.
データを冗長に格納するための複数の記憶ブロックを備えた不揮発性メモリに、自動車の電動式パーキングブレーキ装置の作動状態を示すデータを書き込む方法であって、
前記電動式パーキングブレーキ装置の作動状態を示すデータは、締結状態を示す第1データと、解放状態を示す第2データと、締結状態と解放状態との間の動作状態を示す第3データとのいずれかであり、
前記電動式パーキングブレーキ装置の作動状態を示すデータを複数の記憶ブロックそれぞれに書き込み、
第3データを各記憶ブロックに書き込んだときにデータ書き込み後の記憶ブロックの空き領域数と設定数とを比較し、
空き領域数が設定数を下回る記憶ブロックについて消去を実行する、
不揮発性メモリの書き込み方法。
A method of writing data indicating an operating state of an electric parking brake device of an automobile into a non-volatile memory having a plurality of storage blocks for storing data redundantly,
The data indicating the operating state of the electric parking brake device includes: first data indicating an engaged state; second data indicating a released state; and third data indicating an operation state between the engaged state and the released state. Either
Write data indicating the operating state of the electric parking brake device to each of a plurality of storage blocks,
When the third data is written to each storage block, the number of free areas in the storage block after data writing is compared with the set number,
Execute erasure for storage blocks whose number of free areas is less than the set number.
Non-volatile memory writing method.
JP2017175706A 2017-09-13 2017-09-13 How to write control devices for automobiles and non-volatile memory Active JP6898186B2 (en)

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 true JP2019053396A (en) 2019-04-04
JP6898186B2 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)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0830515A (en) * 1994-07-20 1996-02-02 Toshiba Corp Data processor using flash eeprom
JP2002073425A (en) * 2000-08-31 2002-03-12 Hitachi Ltd Reproducing unit for medium
JP2002268955A (en) * 2001-03-12 2002-09-20 Omron Corp Method and device of memory backup
JP2006079522A (en) * 2004-09-13 2006-03-23 Nec Infrontia Corp Data duplicating system
JP2007216896A (en) * 2006-02-17 2007-08-30 Toyota Motor Corp Electric parking brake device
JP2008225922A (en) * 2007-03-13 2008-09-25 Rinnai Corp Nonvolatile storage device
JP2015067008A (en) * 2013-09-27 2015-04-13 日産自動車株式会社 Engine starting control device of hybrid vehicle and engine starting control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0830515A (en) * 1994-07-20 1996-02-02 Toshiba Corp Data processor using flash eeprom
JP2002073425A (en) * 2000-08-31 2002-03-12 Hitachi Ltd Reproducing unit for medium
JP2002268955A (en) * 2001-03-12 2002-09-20 Omron Corp Method and device of memory backup
JP2006079522A (en) * 2004-09-13 2006-03-23 Nec Infrontia Corp Data duplicating system
JP2007216896A (en) * 2006-02-17 2007-08-30 Toyota Motor Corp Electric parking brake device
JP2008225922A (en) * 2007-03-13 2008-09-25 Rinnai Corp Nonvolatile storage device
JP2015067008A (en) * 2013-09-27 2015-04-13 日産自動車株式会社 Engine starting control device of hybrid vehicle and engine starting control method

Also Published As

Publication number Publication date
JP6898186B2 (en) 2021-07-07

Similar Documents

Publication Publication Date Title
EP3200077B1 (en) Vehicle control device, reprogramming system
JP4227149B2 (en) Information storage method for electronic control unit
JP4480815B2 (en) Memory rewriting method and computer system
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
KR101601751B1 (en) Ecu of vehicle and boot software re-programming method thereof
JP6898186B2 (en) How to write control devices for automobiles and non-volatile memory
JP6066201B2 (en) Electronic control unit
WO2006051692A1 (en) Nonvolatile memory system
JP2007316800A (en) Onboard program rewriting controller
JP2019016086A (en) Automobile electronic control device
WO2018079537A1 (en) Electronic control unit and data protection method therefor
JP3805195B2 (en) Program rewriting apparatus and program rewriting method
JP3708914B2 (en) Method and apparatus for rewriting a program executed in a disk storage device
US7783824B2 (en) Data processing device having flash ROM, and a flash ROM data erasing method
JP4558393B2 (en) Information processing device
JP3915411B2 (en) Electronic control device for vehicle
JP5516509B2 (en) Program writing system
WO2022215402A1 (en) Vehicle electronic control device and program rewriting method
JPH09171459A (en) Electronic control equipment
KR101284657B1 (en) method for storing diagnosis data in electric brake system
JP6699591B2 (en) Engine controller
JP3947643B2 (en) Data control device
JP2019160080A (en) Controller and abnormality detection method
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 Request for written amendment filed

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