JP2005275889A - Electronic controller and memory control method therefor - Google Patents

Electronic controller and memory control method therefor Download PDF

Info

Publication number
JP2005275889A
JP2005275889A JP2004089203A JP2004089203A JP2005275889A JP 2005275889 A JP2005275889 A JP 2005275889A JP 2004089203 A JP2004089203 A JP 2004089203A JP 2004089203 A JP2004089203 A JP 2004089203A JP 2005275889 A JP2005275889 A JP 2005275889A
Authority
JP
Japan
Prior art keywords
information
nonvolatile memory
bank
storage
banks
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.)
Withdrawn
Application number
JP2004089203A
Other languages
Japanese (ja)
Inventor
Hiroyuki Hida
裕之 肥田
Yuzuru Hashime
譲 橋目
Naoto Hiyamizu
直人 冷水
Hiroyuki Fukunaga
浩之 福永
Tomohiro Teramura
友宏 寺村
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.)
Daihatsu Motor Co Ltd
Original Assignee
Daihatsu Motor Co 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 Daihatsu Motor Co Ltd filed Critical Daihatsu Motor Co Ltd
Priority to JP2004089203A priority Critical patent/JP2005275889A/en
Publication of JP2005275889A publication Critical patent/JP2005275889A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To restore holding information of a RAM as a main storage device without erroneously performing initialization or the like of a nonvolatile memory, to prevent losing of the information by easy memory control even when sudden power shutoff is generated, and to update the storage information of the nonvolatile memory. <P>SOLUTION: The RAM 4b is provided with areas of main and sub banks 7m, 7s of capacity of an EEPROM 5, a bank monitoring means recognizes a request of information storage of the EEPROM 5 on the basis of discordance detection of bit inversion states of the banks 7m, 7s by the bank monitoring means, the holding state of the regular bank 7m is written in the EEPROM 5, and the holding information of the banks 7m, 7s is rewritten into the latest storage information of the EEPROM 5 after the update. When the bank monitoring means detects discordance except the bit inversion state to recognize bank abnormality, a bank information correction means writes the storage information of the EEPROM 5 into the banks 7m, 7s. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、書き換え可能な不揮発性メモリの記憶情報を主記憶装置としてのランダムアクセスメモリに読み出して処理し、情報記憶の要求に基いてランダムアクセスメモリの保持情報が書き込まれる前記不揮発性メモリにより、コンピュータの電源遮断時等に情報が失われないようにしたコンピュータ構成の電子制御装置及びそのメモリ制御方法に関するものである。   The present invention reads and processes storage information of a rewritable nonvolatile memory to a random access memory as a main storage device, and the nonvolatile memory to which the information stored in the random access memory is written based on a request for information storage, The present invention relates to a computer-configured electronic control device and a memory control method thereof in which information is not lost when a computer is turned off.

従来、自動車産業の分野においては、車両の安全性、快適性等の向上を図るため、コンピュータ構成の電子制御装置としてのマイクロコンピュータのECUが使用され、加速、変速、制動等の車両制御や、ワイパー制御、ライト制御等のボディー制御の電子制御化が図られている。   Conventionally, in the field of the automobile industry, in order to improve vehicle safety, comfort, etc., a microcomputer ECU as an electronic control device of a computer configuration is used, and vehicle control such as acceleration, gear shifting, braking, Electronic control of body control such as wiper control and light control has been attempted.

これらの電子制御化にあっては、イグニッションキーのオフ等による電源遮断中の情報消失を防止するため、イー・イー・ピー・ロム(EEPROM(Electrically・Erasable・Programmable・Read−Only・Memory))に代表される書き換え可能な不揮発性メモリが、電源遮断中の情報記憶に用いられる。   In these electronic control, in order to prevent the information loss during the power cut-off due to the ignition key being turned off, the EEPROM (Electrically-Erasable-Programmable-Ready-Only-Memory) A rewritable nonvolatile memory represented by the above is used for storing information during power shut-off.

そして、イー・イー・ピー・ロム(以下、EEPROMという)を用いて電源遮断中の情報記憶を行なう電子制御装置は例えば図3に示すように構成され、マイクロコンピュータ構成のECU1のCPU1a、主記憶装置であるランダムアクセスメモリ(以下、RAMという)1b及びEEPROM2がバス3によって接続されている。   An electronic control device for storing information during power shut-off using an EE ROM ROM (hereinafter referred to as an EEPROM) is configured as shown in FIG. 3, for example, and includes a CPU 1a of the ECU 1 having a microcomputer configuration, a main memory. A random access memory (hereinafter referred to as “RAM”) 1 b and an EEPROM 2, which are devices, are connected by a bus 3.

そして、イグニッションキーのオンによってECU1の給電が開始されたときに、EEPROM2の各アドレスのデータ1、2、…、nの記憶情報d21、d22、…、d2nがRAM1bに読み出されて展開され、ECU1の給電動作中はRAM1bに展開されたデータ1、2、…、nの情報d11、d12、…、d2nに基いて、前記の車両制御やボディー制御が行なわれる。   When the power supply of the ECU 1 is started by turning on the ignition key, the stored data d21, d22,..., D2n of the addresses 1, 2,..., N of the EEPROM 2 are read and expanded in the RAM 1b. During the power feeding operation of the ECU 1, the vehicle control and the body control are performed based on the information d11, d12, ..., d2n of the data 1, 2, ..., n developed in the RAM 1b.

また、車両走行中等に新たなデータが得られ、EEPROM2の情報記憶の要求が発生してRAM1bの保持情報が書き換えられると、その都度あるいはイグニッションキーがオフして電源が遮断される直前まで待って、RAM1bの保持内容がEEPROM2に書き込まれてEEPROM2の記憶内容が更新される。   Also, when new data is obtained while the vehicle is running, etc., a request to store information in the EEPROM 2 occurs and the information held in the RAM 1b is rewritten, each time or until just before the power is shut off by turning off the ignition key The contents held in the RAM 1b are written into the EEPROM 2, and the stored contents in the EEPROM 2 are updated.

なお、情報記憶の要求が発生する都度、RAM1bの保持情報をEEPROM2に書き込んで記憶するメモリ制御の場合、例えばヒューズの溶断やバッテリ端子からの給電ケーブルの脱離等による突発的な電源遮断に基づく情報の消失が防止される利点がある。   In the case of memory control in which information stored in the RAM 1b is written and stored in the EEPROM 2 each time a request for information storage occurs, for example, it is based on a sudden power interruption due to, for example, a fuse being blown or a power supply cable being disconnected from a battery terminal. There is an advantage that loss of information is prevented.

また、電源が遮断される直前まで待って、RAM1bの保持情報をEEPROM2に書き込んで記憶するメモリ制御の場合、ECU1の他の処理の中断等が発生せず、また、EEPROM2の書き換え回数が少なく、書き換え回数に制限があるEEPROM2の長寿命化が図られる利点がある(例えば、特許文献1参照。)。   Further, in the case of memory control in which the information held in the RAM 1b is written and stored in the EEPROM 2 until just before the power is cut off, other processing of the ECU 1 is not interrupted, and the number of times the EEPROM 2 is rewritten is small. There is an advantage that the life of the EEPROM 2 having a limited number of rewrites can be extended (for example, see Patent Document 1).

つぎに、この種電子制御装置においては、RAM1bに展開された情報(保持情報)の破壊等の異常を監視、検出して修復するため、本来の記憶情報とともに、そのビット反転情報や、チェックサムの情報等も同時にEEPROM2に書き込んで記憶し、EEPROM2からRAM1bに記憶情報を読み出すときに、ビット反転情報、チェックサムの情報も読み出し、ビット比較、チェックサム処理を実行することでRAM1bの保持情報の破壊等の異常の発生を検出している。   Next, in this type of electronic control device, in order to monitor, detect and repair abnormalities such as destruction of information (retained information) developed in the RAM 1b, in addition to the original stored information, its bit inversion information and checksum Are simultaneously written and stored in the EEPROM 2, and when the stored information is read out from the EEPROM 2 to the RAM 1b, the bit inversion information and check sum information are also read out, and the bit comparison and check sum processing are executed, thereby The occurrence of abnormality such as destruction is detected.

そして、EEPROM2等の書き換え可能な不揮発性メモリを使用して電源遮断時の主記憶装置としてのRAMの情報消失を防止することは、種々の分野のコンピュータ構成の電子制御装置において行なわれ、それらの装置にあっても、ほぼ前記のような情報の書き込み、読み出しのメモリ制御が行なわれる。   The use of a rewritable non-volatile memory such as EEPROM 2 to prevent the loss of information in the RAM as the main storage device when the power is shut off is performed in electronic control devices having various computer configurations. Even in the apparatus, the memory control for writing and reading information as described above is performed.

特開2000−20407号公報(段落[0002]、図7)JP 2000-20407 (paragraph [0002], FIG. 7)

前記従来のこの種の電子制御装置の場合、例えば前記図3のEEPROM2からRAM1bに読み出された情報につき、前記のビット比較、チェックサム処理等から、RAM1bの保持情報の破壊等の異常を検出しても、この異常が、EEPROM2の記憶情報の破壊によるものか、RAM1bでの書き込み、読み出し等(以下、RAM側異常という)によって生じたものかを、区別して認識することができず、とくに、RAM側異常によって生じたときに、EEPROM2の記憶が誤って初期化等されてしまう問題がある。   In the case of the conventional electronic control device of this type, for example, for information read from the EEPROM 2 of FIG. 3 to the RAM 1b, an abnormality such as destruction of information held in the RAM 1b is detected from the bit comparison, checksum processing, etc. Even if this abnormality is caused by destruction of information stored in the EEPROM 2 or caused by writing / reading in the RAM 1b (hereinafter referred to as an abnormality on the RAM side), it cannot be recognized separately. There is a problem that the memory of the EEPROM 2 is erroneously initialized when it occurs due to an abnormality on the RAM side.

また、情報記憶の要求が発生したときに、その都度EEPROM2に情報を書き込んでEEPROM2の記憶情報を更新する場合、従来、RAM1bにランダムに情報が保持されることから、EEPROM2の書き込みによる他の処理の中断等の影響を極力少なくするため、変化した一部の情報をEEPROM2に書き込むことが望ましいが、この場合、情報をEEPROM2のどこに(どのアドレスに)書き込むのかを、メモリ制御のプログラム側で常に管理して認識する必要があり、メモリ制御が極めて複雑化する問題がある。   In addition, when information is written to the EEPROM 2 each time a request for information storage is generated and the stored information in the EEPROM 2 is updated, the information is conventionally held randomly in the RAM 1b, so that other processing by writing to the EEPROM 2 is performed. In order to minimize the influence of interruptions, etc., it is desirable to write some changed information in the EEPROM 2. In this case, the memory control program always determines where (to which address) the information is written in the EEPROM 2. It is necessary to manage and recognize, and there is a problem that memory control becomes extremely complicated.

なお、メモリ制御を簡素化するため、情報記憶の要求が発生したときに、RAM1bの保持情報の変化の有無等によらず、無条件にEEPROM2の記憶情報を書き換えて更新すると、EEPROM2の書き込み回数が多くなることから、EEPROM2の長寿命化が図られない問題が生じる。   In order to simplify the memory control, the number of times the EEPROM 2 is written when the information stored in the EEPROM 2 is rewritten and updated unconditionally regardless of whether there is a change in the information held in the RAM 1b when a request for information storage occurs. Therefore, there is a problem that the life of the EEPROM 2 cannot be extended.

一方、電源が遮断される直前まで待ってEEPROM2の記憶情報を更新する場合は、EEPROM2の書き込み時間がほとんど問題にならず、RAM1bのすべての保持情報を無条件にEEPROM2に書き戻せばよく、メモリ制御のプログラム側での前記のアドレス管理が不要になり、書メモリ制御の簡素化は図られるが、前記の突発的な電源遮断が発生したときには対応することができず、情報が消失するおそれがある。   On the other hand, when the information stored in the EEPROM 2 is updated until just before the power is turned off, the writing time of the EEPROM 2 hardly becomes a problem, and all the stored information in the RAM 1b may be written back to the EEPROM 2 unconditionally. The above address management on the control program side becomes unnecessary, and the writing memory control can be simplified. However, when the sudden power interruption occurs, it is not possible to deal with it, and there is a possibility that information may be lost. is there.

そして、EEPROM2等の不揮発性メモリを使用して電源遮断時の情報消失を防止する種々の電子制御装置において、前記の種々の問題がある。   Various electronic control devices that use a non-volatile memory such as EEPROM 2 to prevent information loss when the power is turned off have the above-mentioned various problems.

本発明は、上記の諸点に留意してなされたものであり、この種の電子制御装置において、RAM側異常が発生したときに、不揮発性メモリを誤って初期化等することなく、RAMの保持情報を修復し、情報記憶の要求が発生したときに、簡単なメモリ制御により、突発的な電源遮断が発生したときにも情報が消失しないように、不揮発性メモリの記憶情報を書き換えて更新することを目的とし、その際、不揮発性メモリの情報の書き込み回数を極力少なくしてその長寿命化を図ることも目的とする。   The present invention has been made in consideration of the above-mentioned points, and in this type of electronic control device, when an abnormality in the RAM occurs, the RAM can be retained without erroneously initializing the nonvolatile memory. When information is restored and information storage is requested, the memory information in the non-volatile memory is rewritten and updated by simple memory control so that the information is not lost even when sudden power interruption occurs. In this case, it is also an object to extend the life of the nonvolatile memory by reducing the number of times of writing information in the nonvolatile memory as much as possible.

上記した目的を達成するために、本発明の電子制御装置は、主記憶装置としてのRAMに、不揮発性メモリから読み出された記憶情報がそれぞれ書き込まれて設定される前記不揮発性メモリの容量の主、副バンクの領域を設け、前記両バンクの保持情報の比較をくり返し、前記両バンクの保持情報の一致、不一致を監視して検出するバンク監視手段と、前記不揮発性メモリの情報記憶の要求が発生し、前記正バンクの保持情報が前記不揮発性メモリに記憶させる情報に書き換えられて前記副バンクの保持情報が前記正バンクの保持情報のビット反転情報に書き換えられたときに、前記バンク監視手段のビット反転状態の不一致検出によって前記情報記憶の要求を認識し、該認識に基づき、前記正バンクの保持情報を前記不揮発性メモリに書き込んで前記不揮発性メモリの記憶情報を更新し、該更新後に、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれの保持情報を前記不揮発性メモリの最新の記憶情報に書き換える情報記憶処理手段と、前記バンク監視手段がビット反転状態以外の不一致を検出し、該検出に基いてバンク異常を認識したときに、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれに書き込み、前記両バンクの保持情報を前記不揮発性メモリの記憶情報に再設定して更正するバンク情報更正手段とを備えたことを特徴としている(請求項1)。   In order to achieve the above-described object, the electronic control device of the present invention has a capacity of the non-volatile memory in which storage information read from the non-volatile memory is written and set in a RAM as a main storage device. Bank monitoring means for providing main and sub-bank areas, repeatedly comparing the holding information of both banks, and monitoring and detecting the matching and mismatching of the holding information of both banks, and a request for storing information in the nonvolatile memory The bank monitoring is performed when the holding information of the primary bank is rewritten to the information to be stored in the nonvolatile memory and the holding information of the sub bank is rewritten to the bit inversion information of the holding information of the primary bank. The information storage request is recognized by detecting a bit inversion state mismatch of the means, and based on the recognition, the retained information of the primary bank is written to the nonvolatile memory. Information storage processing means for updating the storage information of the nonvolatile memory, and after the update, reading the storage information of the nonvolatile memory and rewriting the retained information of each of the banks to the latest storage information of the nonvolatile memory; When the bank monitoring means detects a mismatch other than the bit inversion state and recognizes a bank abnormality based on the detection, the storage information of the nonvolatile memory is read and written to each of the two banks. Bank information correcting means for resetting the stored information to the storage information of the non-volatile memory and correcting the stored information is provided (claim 1).

また、本発明の電子制御装置は、情報記憶処理手段に、バンク監視手段のビット反転状態の不一致検出により、正バンクの保持情報と不揮発性メモリの記憶情報との不一致を条件に、前記正バンクの保持情報の前記不揮発性メモリへの書き込みを許可する記憶更新制限手段を設けたことを特徴とし(請求項2)、書き換え可能な不揮発性メモリが、EEPROMであることも特徴としている(請求項3)。   Further, the electronic control unit of the present invention causes the information storage processing unit to detect the mismatch of the bit inversion state of the bank monitoring unit and to detect the mismatch between the stored information in the positive bank and the stored information in the nonvolatile memory. Storage update restriction means for permitting writing of the stored information to the nonvolatile memory is provided (claim 2), and the rewritable nonvolatile memory is also an EEPROM (claim). 3).

つぎに、本発明の電子制御装置のメモリ制御方法は、主記憶装置としてのRAMに、不揮発性メモリから読み出された記憶情報がそれぞれ書き込まれて設定される前記不揮発性メモリの容量の主、副バンクの領域を設け、前記両バンクの保持情報の比較のくり返しにより、前記両バンクの保持情報の一致、不一致を監視して検出し、前記不揮発性メモリの情報記憶の要求が発生し、前記正バンクの保持情報が前記不揮発性メモリに記憶させる情報に書き換えられて前記副バンクの保持情報が前記正バンクの保持情報のビット反転情報に書き換えられたときに、前記両バンクの保持情報のビット反転状態の不一致検出により前記情報記憶の要求を認識し、該認識に基づき、前記正バンクの保持情報を前記不揮発性メモリに書き込んで前記不揮発性メモリの記憶情報を更新し、該更新後に、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれの保持情報を前記不揮発性メモリの最新の記憶情報に書き換え、前記両バンクの保持情報のビット反転状態以外の不一致を検出し、該検出に基づいてバンク異常を認識したときに、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれに書き込み、前記両バンクの保持情報を前記不揮発性メモリの記憶情報に再設定して更正することを特徴としている(請求項4)。   Next, according to the memory control method of the electronic control device of the present invention, the main of the capacity of the nonvolatile memory in which the storage information read from the nonvolatile memory is written and set in the RAM as the main storage device, A sub-bank area is provided, and the holding information of both banks is monitored and detected by repeatedly comparing the holding information of both banks, and a request for storing information in the nonvolatile memory is generated, When the holding information of the primary bank is rewritten to the information to be stored in the nonvolatile memory and the holding information of the sub bank is rewritten to the bit inversion information of the holding information of the primary bank, the bits of the holding information of both banks Recognizing the information storage request by detecting the inconsistency of the inversion state, and based on the recognition, writing the retained information of the primary bank into the nonvolatile memory Update the storage information of the memory, and after the update, read the storage information of the nonvolatile memory, rewrite the holding information of each of the banks to the latest storage information of the nonvolatile memory, and the bits of the holding information of the both banks When a mismatch other than the inversion state is detected and a bank abnormality is recognized based on the detection, the storage information of the nonvolatile memory is read and written to each of the banks, and the retention information of the banks is stored in the nonvolatile memory The stored information is reset and corrected. (Claim 4)

また、本発明の電子制御装置のメモリ制御方法は、正、副バンクの保持情報のビット反転状態の不一致検出により、正バンクの保持情報と不揮発性メモリの保持情報との不一致を条件に、前記正バンクの保持情報の前記不揮発性メモリへの書き込みを許可することを特徴とし(請求項5)、書き換え可能な不揮発性メモリが、EEPROMであることも特徴としている(請求項6)。   Also, the memory control method of the electronic control device of the present invention is based on the condition that the holding information of the primary bank and the holding information of the nonvolatile memory are mismatched by detecting the mismatch of the bit inversion state of the holding information of the primary and secondary banks. The storage information of the primary bank is permitted to be written into the nonvolatile memory (Claim 5), and the rewritable nonvolatile memory is an EEPROM (Claim 6).

まず、請求項1、4の構成によれば、主記憶装置としてのRAMに設けられた主、副バンクは、不揮発性メモリの同一容量であって、それぞれ不揮発性メモリから読み出された記憶情報が書き込まれて設定され、不揮発性メモリの情報記憶の要求が発生すると、正バンクの保持情報が不揮発性メモリに記憶させる情報に書き換えられて副バンクの保持情報が正バンクの保持情報のビット反転情報に書き換えられる。   According to the first and fourth aspects of the present invention, the main and sub banks provided in the RAM as the main storage device have the same capacity of the nonvolatile memory, and the storage information read from the nonvolatile memory respectively. Is written and set, and when a request to store information in the non-volatile memory occurs, the retained information in the primary bank is rewritten to the information to be stored in the non-volatile memory, and the retained information in the secondary bank is bit-inverted from the retained information in the primary bank Rewritten with information.

そして、両バンクの保持情報の比較のくり返しに基づき、不揮発性メモリの情報記憶の要求が発生したときには、副バンクの保持情報が正バンクの保持情報のビット反転情報になることから、両バンクの情報のビット反転状態の不一致が検出され、この検出に基いて情報記憶の要求が認識される。   Based on the repeated comparison of the holding information of both banks, when a request for storing information in the non-volatile memory occurs, the holding information of the secondary bank becomes the bit inversion information of the holding information of the primary bank. A mismatch in the bit inversion state of the information is detected, and the information storage request is recognized based on this detection.

このとき、RAMの情報破壊等の異常に基く両バンクの情報の不一致であれば、両バンクの情報がビット反転状態にならないため、前記のビット反転状態の不一致の検出から、不揮発性メモリの情報記憶の要求が精度よく確実に認識され、この認識に基づき、正バンクの保持情報が不揮発性メモリに書き込まれて不揮発性メモリの記憶情報が更新される。   At this time, if the information in both banks does not match due to an abnormality such as information destruction in the RAM, the information in both banks does not enter the bit inversion state. The storage request is accurately and reliably recognized, and based on this recognition, the information held in the primary bank is written into the nonvolatile memory, and the storage information in the nonvolatile memory is updated.

そして、両バンクが不揮発性メモリの容量であって正バンクに不揮発性メモリのデータ構造で情報が保持され、正バンクの保持情報がそのまま不揮発メモリに書き込まれるため、アドレス管理等の複雑なメモリ制御が不要であり、簡単な制御で確実かつ短時間に不揮発性メモリの記憶情報が更新される。   And since both banks have the capacity of non-volatile memory, the main bank holds information with the data structure of the non-volatile memory, and the information held in the main bank is directly written into the non-volatile memory, so that complicated memory control such as address management The information stored in the non-volatile memory is updated reliably and in a short time with simple control.

しかも、情報記憶の要求が発生したときに、不揮発性メモリの記憶情報が更新されるため、突発的な電源遮断が発生しても、不揮発性メモリに必ず最新の情報が保持され、情報の消失が発生することもない。   Moreover, since the information stored in the non-volatile memory is updated when a request for information storage occurs, the latest information is always retained in the non-volatile memory even if a sudden power interruption occurs, and the information is lost. Does not occur.

つぎに、RAM側異常によっていずれか一方又は両方のバンクの保持情報が異常になると、両バンクの保持情報が一致しなくなり、このとき、その不一致がビット反転状態の不一致にならないことからバンク異常が検出され、不揮発性メモリの記憶情報が再度読み出されて両バンクに書き込まれ、不揮発性メモリの記憶情報を誤って初期化等することなく、RAMの情報が修復される。   Next, if the information held in one or both banks becomes abnormal due to an abnormality on the RAM side, the information held in both banks does not match, and at this time, the mismatch does not become a mismatch in the bit inversion state. The information stored in the nonvolatile memory is detected again and written in both banks, and the information in the RAM is restored without erroneously initializing the information stored in the nonvolatile memory.

そして、不揮発性メモリの記憶情報自体に破壊等の異常が発生したときは、正、副バンクに同じ情報が書き込まれることから、両バンクの情報が一致し、この場合は、不揮発性メモリの記憶情報が読み出されて両バンクに書き込まれることはなく、不揮発性メモリの記憶情報自体の破壊等の異常と、RAM側の異常とは確実に区別される。   Then, when an abnormality such as destruction occurs in the storage information itself of the nonvolatile memory, the same information is written in the primary and secondary banks, so the information in both banks coincides. In this case, the storage in the nonvolatile memory Information is not read out and written to both banks, and an abnormality such as destruction of information stored in the nonvolatile memory itself is reliably distinguished from an abnormality on the RAM side.

したがって、RAM側異常が発生したときには、不揮発性メモリを誤って初期化等することなく、RAMの保持情報を修復することができ、情報記憶の要求が発生したときには、簡単なメモリ制御により、突発的な電源遮断が発生したときにも情報が消失しないようにして、不揮発性メモリの記憶情報を書き換えて更新することができ、この種の電子制御装置において、簡単な制御で信頼性の高いメモリ制御を実現することができる。   Therefore, when an abnormality on the RAM side occurs, the information retained in the RAM can be restored without accidentally initializing the nonvolatile memory. When a request for storing information occurs, the memory is suddenly controlled by simple memory control. The information stored in the non-volatile memory can be rewritten and updated in such a manner that the information is not lost even when a general power interruption occurs, and in this type of electronic control device, a highly reliable memory with simple control Control can be realized.

つぎに、請求項2、5の構成によれば、正、副バンクの保持情報のビット反転状態の不一致が検出され、不揮発性メモリへの情報記憶の要求が発生したときに、不揮発性メモリに書き込むべき正バンクの保持情報と、不揮発性メモリの記憶情報とが同じで、書き換えが不要であれば、正バンクの保持情報が不揮発性メモリに書き込まれず、不揮発性メモリの不必要な記憶情報の書き換えが防止されて不揮発性メモリの長寿命化が図られる利点もある。   Next, according to the second and fifth aspects of the present invention, when a mismatch in the bit inversion state of the retained information in the primary and secondary banks is detected and a request for storing information in the nonvolatile memory occurs, the nonvolatile memory If the retention information of the primary bank to be written is the same as the storage information of the nonvolatile memory and rewriting is not required, the retention information of the primary bank is not written to the nonvolatile memory, and unnecessary storage information of the nonvolatile memory is stored. There is also an advantage that rewriting is prevented and the life of the nonvolatile memory is extended.

つぎに、請求項3、6の構成によれば、書き換え可能な不揮発性メモリがEEPROMからなる実用的な構成の電子制御装置において、上記の種々の効果を奏することができる。   Next, according to the configurations of claims 3 and 6, the electronic control device having a practical configuration in which the rewritable nonvolatile memory is an EEPROM can exhibit the various effects described above.

つぎに、本発明をより詳細に説明するため、その一実施形態について、図1のブロック図及び図2の動作説明用のフローチャートにしたがって詳述する。   Next, in order to describe the present invention in more detail, an embodiment thereof will be described in detail according to the block diagram of FIG. 1 and the flowchart for explaining the operation of FIG.

(構成)
図1は例えば車両のAT制御の電子制御装置のブロック図であり、この電子制御装置はECU4及びEEPROM5をバス6により接続して形成されている。
(Constitution)
FIG. 1 is a block diagram of an electronic control device for vehicle AT control, for example. This electronic control device is formed by connecting an ECU 4 and an EEPROM 5 by a bus 6.

そして、ECU4はCPU4a及び主記憶装置としてのRAM4bを有し、このRAM4bは、EEPROM5と情報をやり取りするため、EEPROM5の容量の正、副バンク7m、7sの領域が設定され、両バンク7m、7sはそれぞれEEPROM5のデータ構造の連続アドレスの固定容量の領域である。また、CPU4aは、例えば、図示省略したROMに保持された図2のステップS1〜S6のフローチャートのメモリ制御プログラムを実行し、そのソフトウエア処理により形成されたつぎの各手段を備える。   The ECU 4 includes a CPU 4a and a RAM 4b as a main storage device. The RAM 4b exchanges information with the EEPROM 5, and therefore, the capacity of the EEPROM 5 is set in the areas of the positive and sub banks 7m and 7s, and both banks 7m and 7s. Are fixed-capacity areas of continuous addresses in the data structure of the EEPROM 5, respectively. Further, the CPU 4a includes, for example, the following units that are formed by executing the memory control program of the flowchart of steps S1 to S6 in FIG.

(i)バンク監視手段
この手段は、バンク7m、7sの保持情報の比較を周期的にくり返して両バンク7m、7sの保持情報の一致、不一致を監視、検出する。
(I) Bank monitoring means This means periodically repeats the comparison of the holding information of the banks 7m and 7s to monitor and detect the matching and mismatching of the holding information of both banks 7m and 7s.

(ii)情報記憶処理手段
この手段は、EEPROM5の情報記憶の要求が発生し、正バンク7mの保持情報がEEPROM5に記憶させる情報に書き換えられて副バンク7sの保持情報が正バンク7mの保持情報のビット反転情報に書き換えられたときに、バンク監視手段のビット反転状態の不一致検出によって情報記憶の要求を認識し、この認識に基づき、正バンク7mの保持情報をEEPROM5に書き込んでEEPROM5の記憶情報を更新し、この更新後に、EEPROM5の記憶情報を読み出してバンク7m、7sそれぞれの保持情報をEEPROM5の最新の記憶情報に書き換える。
(Ii) Information storage processing means In this means, a request to store information in the EEPROM 5 is generated, and the information held in the primary bank 7m is rewritten with the information stored in the EEPROM 5, so that the information held in the sub bank 7s is the information held in the primary bank 7m. When the bit inversion information is rewritten, the bank monitoring means recognizes the information storage request by detecting the mismatch of the bit inversion state, and based on this recognition, the information held in the primary bank 7m is written into the EEPROM 5 to store the information stored in the EEPROM 5. After the update, the storage information in the EEPROM 5 is read out, and the retained information in the banks 7m and 7s is rewritten with the latest storage information in the EEPROM 5.

(iii)バンク情報更正手段
この手段は、バンク監視手段がビット反転状態以外の不一致を検出し、この検出に基いてバンク異常を認識したときに、EEPROM5の記憶情報を読み出してバンク7m、7sそれぞれに書き込み、両バンク7m、7sの保持情報をEEPROM5の記憶情報に再設定して更正する。
(Iii) Bank information correcting means This means reads bank information stored in the EEPROM 5 when the bank monitoring means detects a mismatch other than the bit inversion state and recognizes a bank abnormality on the basis of this detection. And the information held in both banks 7m and 7s is reset to the storage information in the EEPROM 5 for correction.

(iv)記憶更新制限手段
この手段は、情報記憶処理手段に設けられ、正、副バンク7m、7sの保持情報のビット反転の不一致が検出されたときに、正バンク7mの保持情報とEEPROM5の記憶情報との不一致を条件に、正バンク7mの保持情報のEEPROM5への書き込みを許可する。
(Iv) Storage Update Limiting Unit This unit is provided in the information storage processing unit, and when a mismatch in bit inversion of the stored information in the primary and secondary banks 7m and 7s is detected, the stored information in the primary bank 7m and the EEPROM 5 On condition that there is a discrepancy with the stored information, writing of the information held in the primary bank 7m to the EEPROM 5 is permitted.

(動作)
上記のように構成された電子制御装置は、つぎに説明するように動作する。
(Operation)
The electronic control device configured as described above operates as described below.

まず、車両のイグニッションキーがオンすると、車載バッテリの電源がECU4に給電され、ECU4が動作し、前記のメモリ制御プログラム及び設定されたAT制御のアプリケーションプログラム等を読み出して実行する。   First, when the ignition key of the vehicle is turned on, the power source of the in-vehicle battery is supplied to the ECU 4, and the ECU 4 operates to read and execute the memory control program and the set AT control application program.

そして、図2のステップS0の初期設定により、EEPROM5のアドレス単位のデータ1、2、…、nの記憶情報d51、d52、…、d5nを、正バンク7mにアドレス単位のデータ1、2、…、nの保持情報d71m、d72m、…、d7nmとして書き込まれ、副バンク7sにデータ1、2、…、nの保持情報d71s、d72s、…、d7nsとして書き込み、バンク7m、7sを同じ情報内容に初期設定する。   Then, by the initial setting in step S0 of FIG. 2, the address unit data 1, 2,..., N stored in the EEPROM 5 is stored in the primary bank 7m as the address unit data 1, 2,. , N holding information d71m, d72m,..., D7nm, and data 1, 2,..., N holding information d71s, d72s, ..., d7ns are written to the same information content in the banks 7m, 7s. Initial setting.

なお、EEPROM5の記憶情報d51〜d5nは、例えばドライバの日常の運転特性に応じたAT制御の測定データ等の書き換え自在の最新情報である。   The stored information d51 to d5n of the EEPROM 5 is rewritable latest information such as AT control measurement data according to the daily driving characteristics of the driver, for example.

また、初期設定された正バンク7mの保持情報d71m〜d7nmは、RAM4bのいわゆるワークメモリ領域等に複写され、AT制御の実行により参照等され、また、運転中のAT制御特性の測定結果等に基いて書き換え等される。   Also, the initially stored information d71m to d7nm of the primary bank 7m is copied to a so-called work memory area or the like of the RAM 4b, is referred to by execution of AT control, and is also used for the measurement result of the AT control characteristics during operation. Rewritten based on this.

そして、初期設定後にステップS1に移行し、バンク監視手段が正バンク7mの保持情報d71m〜d7nmと、副バンク7sの保持情報d71s〜d7nsとの比較を、例えば1〜数秒の間隔で周期的にくり返す。   Then, after the initial setting, the process proceeds to step S1, where the bank monitoring means periodically compares the holding information d71m to d7nm of the primary bank 7m with the holding information d71s to d7ns of the sub bank 7s at intervals of 1 to several seconds, for example. Repeat.

つぎに、AT制御のアプリケーションプログラム等により、周期的にあるいは不規則にEEPROM5への情報記憶の要求が発生すると、正バンク7mの保持情報d71m〜d7nmは、全部又は一部が必要に応じて変更され、保持情報d71m〜d7nmがEEPROM5に書き込ませる情報になる。   Next, when an information storage request to the EEPROM 5 is generated periodically or irregularly by an AT control application program or the like, all or part of the retained information d71m to d7nm of the primary bank 7m is changed as necessary. The retained information d71m to d7nm is information to be written in the EEPROM 5.

また、副バンク7sの保持情報d71s〜d7nsは、保持情報d71m〜d7nmのEEPROM5に書き込ませる情報の例えば16進数のビット反転の情報に書き換えられる。   Further, the holding information d71s to d7ns of the sub bank 7s is rewritten to, for example, hexadecimal bit inversion information of information to be written in the EEPROM 5 of the holding information d71m to d7nm.

このビット反転の情報の書き換えにより、前記の情報記憶の要求が発生すると、保持情報d71m〜d7nmの書き換えの有無によらず、ステップS1の比較結果が不一致になり、メモリ制御のプログラム側が前記の情報記憶の要求の発生を認識し、このとき、ステプS1からステップS2に移行し、保持されていたEEPROM5の記憶情報d51〜d5nを、RAM4bの図示省略した一時保持領域に読み出した後、ステップS3に移行する。   When the information storage request is generated due to the rewriting of the bit inversion information, the comparison result in step S1 becomes inconsistent regardless of whether the retained information d71m to d7nm is rewritten, and the memory control program side Recognizing the occurrence of a storage request, the process proceeds from step S1 to step S2, and the stored information d51 to d5n of the EEPROM 5 is read to a temporary holding area (not shown) of the RAM 4b, and then the process proceeds to step S3. Transition.

このステップS3に移行すると、情報記憶処理手段により、正バンク7mの保持情報d71m〜d7nmに対して、副バンク7sの保持情報d71s〜d7nsがビット反転の情報になっているか否かを判別し、このとき、EEPROM5への情報記憶の要求に基く前記のビット反転により、保持情報d71m〜d7nmの書き換えの有無によらず、図2のステップS1の比較結果が不一致になるため、メモリ制御のプログラム側が前記の情報記憶の要求の発生を認識して情報記憶情手段が動作し、ステップS3からステップS5に移行する。   In step S3, the information storage processing unit determines whether the holding information d71s to d7ns of the secondary bank 7s is the bit inversion information with respect to the holding information d71m to d7nm of the primary bank 7m. At this time, because of the bit inversion based on the information storage request to the EEPROM 5, the comparison result in step S1 in FIG. 2 becomes inconsistent regardless of whether or not the retained information d71m to d7nm is rewritten. Recognizing the occurrence of the information storage request, the information storage information means operates, and the process proceeds from step S3 to step S5.

そして、EEPROM5の書き換え回数を極力少なくしてEEPROM5の長寿命化を図るため、この実施形態にあっては、情報記憶処理手段の記憶更新制限手段により、正バンク7mの保持情報d71m〜d7nmと、EEPROM5の記憶情報d51〜d5nとを比較し、両情報が異なって不一致であれば、それを条件として、正バンク7mの保持情報d71m〜d7nmのEEPROM5への書き込みを許可する。   In order to extend the life of the EEPROM 5 by minimizing the number of times the EEPROM 5 is rewritten, in this embodiment, the storage update restriction means of the information storage processing means uses the retained information d71m to d7nm of the primary bank 7m, The stored information d51 to d5n in the EEPROM 5 is compared. If the two information are different and do not match, writing of the retained information d71m to d7nm in the primary bank 7m to the EEPROM 5 is permitted.

なお、正バンク7mの保持情報d71m〜d7nmと、EEPROM5の記憶情報d51〜d5nとが同じで、一致していれば、EEPROM5を書き換える必要がないため、EEPROM5への書き込みを禁止する。   If the stored information d71m to d7nm of the primary bank 7m and the stored information d51 to d5n of the EEPROM 5 are the same and match, writing to the EEPROM 5 is prohibited because it is not necessary to rewrite the EEPROM 5.

そして、正バンク7mの保持情報d71m〜d7nmのEEPROM5への書き込みが許可された場合は、ステップS5からステップS6に移行し、正バンク7mの保持情報d71m〜d7nmをEEPROM5に書き込み、EEPROM5の記憶情報d51〜d5nを保持情報d71m〜d7nmの内容に更新する。   If writing of the holding information d71m to d7nm of the primary bank 7m to the EEPROM 5 is permitted, the process proceeds from step S5 to step S6, and the holding information d71m to d7nm of the primary bank 7m is written to the EEPROM 5, and the storage information of the EEPROM 5 is stored. d51 to d5n are updated to the contents of the holding information d71m to d7nm.

このとき、正バンク7mがEEPROM5と同一のデータ構造のアドレスが連続する領域であるため、正バンク7mの保持情報d71m〜d7nmを順に読み出してEEPROM5に書き込むことにより、それらの情報d71m〜d7nmをEEPROM5のどこに(どのアドレスに)書き込むのか等をプログラム側で管理して認識することなく、EEPROM5の記憶情報d51〜d5nを更新することができ、情報の書き込みアドレス管理等が不要でメモリ制御が複雑化することもない。   At this time, since the primary bank 7m is an area in which the addresses of the same data structure as the EEPROM 5 are continuous, the information d71m to d7nm held in the primary bank 7m is sequentially read out and written to the EEPROM 5, whereby the information d71m to d7nm is read from the EEPROM5. The storage information d51 to d5n of the EEPROM 5 can be updated without managing and recognizing where (in which address) the data is to be written, and the memory control is complicated because the information write address management is unnecessary. I don't have to.

また、前記の情報記憶の要求が発生すると、イグニッションキーがオフしてECU4の電源が遮断される直前まで待ったりすることなく、EEPROM5の記憶情報d51〜d5nを書き換えて更新するため、突発的な電源遮断が発生したても、その直前の最新の情報がEEPROM5に書き込まれて記憶され、情報が消失することがない。   Further, when the information storage request is generated, the stored information d51 to d5n in the EEPROM 5 is rewritten and updated without waiting until the ignition key is turned off and the power of the ECU 4 is cut off. Even if the power is cut off, the latest information immediately before that is written and stored in the EEPROM 5, and the information is not lost.

そして、EEPROM5の記憶情報d51〜d5nを保持情報d71m〜d7nmの内容に更新すると、ステップS6からステップS4に移行し、更新されたEEPROM5の記憶情報d51〜d5nを読み出し、正バンク7mの保持情報d71m〜d7nm、副バンク7sの保持情報d71s〜d7nsを、共に、更新されたEEPROM5の最新の記憶情報d51〜d5nに書き換える。   When the storage information d51 to d5n in the EEPROM 5 is updated to the contents of the holding information d71m to d7nm, the process proceeds from step S6 to step S4, the updated storage information d51 to d5n in the EEPROM 5 is read, and the holding information d71m in the primary bank 7m is read. Retention information d71s to d7ns of .about.d7nm and sub bank 7s are rewritten to the latest storage information d51 to d5n of the updated EEPROM 5.

この書き換えにより、正バンク7mの保持情報d71m〜d7nmと副バンク7sの保持情報d71s〜d7nsとが一致するため、EEPROM5への情報記憶が終了してステップS4からステップS1に戻ったときに、元の保持情報d71m〜d7nm、d71s〜d7nsに基いてEEPROM5への情報記憶が誤ってくり返されることがない。   As a result of this rewriting, the holding information d71m to d7nm of the primary bank 7m and the holding information d71s to d7ns of the sub bank 7s coincide with each other. Therefore, when the information storage in the EEPROM 5 is completed and the process returns from step S4 to step S1, the original information is stored. The information stored in the EEPROM 5 is not erroneously repeated based on the stored information d71m to d7nm and d71s to d7ns.

つぎに、何らかの原因でRAM4bにいわゆるデータ破壊やデータリフレッシュミス等の前記のRAM側異常が発生し、EEPROM5の記憶情報d51〜d5nは正常であるが、正バンク7mの保持情報d71m〜d7nm、副バンク7sの保持情報d71s〜d7nsのいずれか一方又は両方が異常になると、正バンク7mの保持情報d71m〜d7nmと、副バンク7sの保持情報d71s〜d7nsとが不一致になり、ステップS1からステップs2を介してステップs3に移行する。   Next, for some reason, the RAM 4b malfunctions, such as so-called data destruction or data refresh error, and the stored information d51 to d5n in the EEPROM 5 is normal, but the retained information d71m to d7nm in the primary bank 7m is If any one or both of the holding information d71s to d7ns of the bank 7s become abnormal, the holding information d71m to d7nm of the primary bank 7m and the holding information d71s to d7ns of the sub bank 7s become inconsistent, and the steps S1 to s2 Through step s3.

このとき、正バンク7mの保持情報d71m〜d7nmに対して、副バンク7sの保持情報d71s〜d7nsがビット反転状態になることは皆無に等しく、保持情報d71m〜d7nmと保持情報d71s〜d7nsとがビット反転状態以外の不一致になり、バンク監視手段が、この不一致を検出してバンク異常を認識する。   At this time, the holding information d71s to d7ns of the secondary bank 7s is not in a bit-inverted state with respect to the holding information d71m to d7nm of the primary bank 7m, and the holding information d71m to d7nm and the holding information d71s to d7ns The bank monitoring means detects this mismatch and recognizes a bank abnormality.

さらに、このバンク異常の認識により、バンク情報更正手段が動作してステップS3からステップS4に移行し、EEPROM5の記憶情報d51〜d5nを読み出して両バンク7m、7sそれぞれに書き込み、正バンク7mの保持情報d71m〜d7nm、副バンク7sの保持情報d71s〜d7nsを最新の記憶情報d51〜d5nに再設定して更正し、修復する。   Further, the bank information correcting means operates by recognizing this bank abnormality, and the process proceeds from step S3 to step S4. The storage information d51 to d5n of the EEPROM 5 is read and written to both banks 7m and 7s, and the main bank 7m is held. The information d71m to d7nm and the holding information d71s to d7ns of the sub bank 7s are reset to the latest stored information d51 to d5n, corrected, and restored.

ところで、正、副バンク7m、7sにEEPROM5の記憶情報d51〜d5nを読み出して書き込んだ後にEEPROM5の記憶情報自体に破壊等の異常が発生しても、正、副バンク7m、7sにEEPROM5に異常が発生する前の同じ情報が書き込まれていることから、両バンク7m、7sの情報が一致し、EEPROM5の記憶情報が読み出されて両バンク7m、7sに書き込まれることはない。   By the way, even if abnormality such as destruction occurs in the storage information itself of the EEPROM 5 after reading and writing the storage information d51 to d5n of the EEPROM 5 in the primary and secondary banks 7m and 7s, the EEPROM 5 is abnormal in the primary and secondary banks 7m and 7s. Since the same information before the occurrence of the error is written, the information in both banks 7m and 7s coincides and the storage information in the EEPROM 5 is not read and written in both banks 7m and 7s.

そして、EEPROM5の記憶情報自体の破壊等の異常と、RAM側の異常とが確実に区別され、RAM側異常が発生したときに、誤ってEEPROM5の記憶情報d51〜d5nを初期化することがない。   Then, abnormalities such as destruction of the stored information itself of the EEPROM 5 are reliably distinguished from abnormalities on the RAM side, and when the abnormalities on the RAM side occur, the stored information d51 to d5n of the EEPROM 5 is not erroneously initialized. .

なお、イグニッションキーがオフしてECU4の電源が遮断され、その給電が停止するまで、図2の情報管理プログラムが動作し、RAM4bとEEPROM5との情報のやり取りが制御される。   Note that the information management program of FIG. 2 operates and the exchange of information between the RAM 4b and the EEPROM 5 is controlled until the ignition key is turned off, the power supply of the ECU 4 is shut off, and the power supply is stopped.

したがって、RAM側異常が発生したときには、EEPROM5を誤って初期化等することなく、RAM4bの保持情報を修復することができ、EEPROM5の情報記憶の要求が発生したときには、簡単なメモリ制御により、突発的な電源遮断が発生したときにも情報が消失しないようにして、EEPROM5の記憶情報を書き換えて更新することができ、この種の電子制御装置において、簡単な制御で信頼性の高いメモリ制御を実現することができる。   Therefore, when an abnormality in the RAM occurs, the information held in the RAM 4b can be restored without erroneously initializing the EEPROM 5, and when a request for storing information in the EEPROM 5 occurs, the memory is suddenly controlled by simple memory control. The information stored in the EEPROM 5 can be rewritten and updated in such a manner that the information is not lost even when a general power interruption occurs. In this type of electronic control device, highly reliable memory control can be performed with simple control. Can be realized.

なお、この場合、メモリ制御のプログラムが他の処理のプログラムと別個独立に実行されて動作するため、プログラムの独立性が高く、その動作確認等が容易で保守性の向上等が図られる利点もある。   In this case, since the memory control program is executed independently of other processing programs and operates, there is an advantage that the program is highly independent, its operation can be easily confirmed, and maintainability is improved. is there.

ところで、図2のステップS0を省いてもよく、ステップS0を省いた場合は、車両のイグニッションキーがオンし、車載バッテリの電源がECU4に給電されてECU4が動作したときに、図2のステップS1のバンク監視手段により、正バンク7mの保持情報d71m〜d7nmと、副バンク7sの保持情報d71s〜d7nsと比較し、給電開始直後は、両バンク7m、7sに情報が読み込まれておらず、両バンク7m、7sの保持情報が不一致になることから、ステップS1からステップS2に移行して電源遮断中に保持されていたEEPROM5の記憶情報d51〜d5nをRAM4bの図示省略した一時保持領域に読み出した後、ステップS2からステップS3に移行し、情報記憶処理手段により、正バンク7mの保持情報d71m〜d7nmに対して副バンク7sの保持情報d71s〜d7nsがビット反転の情報になっているか否かを判別する。   By the way, step S0 of FIG. 2 may be omitted, and when step S0 is omitted, when the ignition key of the vehicle is turned on and the power source of the in-vehicle battery is supplied to ECU 4 to operate ECU 4, the step of FIG. The bank monitoring means of S1 compares the holding information d71m to d7nm of the primary bank 7m with the holding information d71s to d7ns of the secondary bank 7s, and information is not read into both banks 7m and 7s immediately after the start of power feeding. Since the holding information of both banks 7m and 7s becomes inconsistent, the storage information d51 to d5n of the EEPROM 5 held during power-off is transferred from the step S1 to the step S2, and the temporary holding area (not shown) of the RAM 4b is read. After that, the process proceeds from step S2 to step S3, and the information storage processing means performs the holding information d7 of the primary bank 7m. Holding information d71s~d7ns sub bank 7s it is determined whether or not it is information of the bit inverted with respect to M~d7nm.

そして、給電開始時、ビット反転の情報になることはほとんどなく、ビット反転状態以外の不一致の検出によりバンク情報更正手段が動作してRAM側異常、すなわち、バンク異常を認識し、ステップS3からステップS4に移行し、ステップS2で読み出したEEPROM5の記憶情報d51〜d5nが、バンク7m、7sに保持情報d71m〜d7nm、d71s〜d7nsとして書き込まれることにより、バンク7m、7sが同じ情報内容に初期設定される。   When the power supply is started, there is almost no bit inversion information, and the bank information correcting means operates by detecting a mismatch other than the bit inversion state to recognize a RAM side abnormality, that is, a bank abnormality. The process proceeds to S4, and the storage information d51 to d5n of the EEPROM 5 read in step S2 is written as the holding information d71m to d7nm and d71s to d7ns in the banks 7m and 7s, so that the banks 7m and 7s are initialized to the same information contents. Is done.

そして、本発明は上記した実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて上述したもの以外に種々の変更を行うことが可能であり、不揮発性メモリがEEPROM以外の書き換え可能なメモリであってもよいのは勿論である。   The present invention is not limited to the above-described embodiment, and various modifications other than those described above can be made without departing from the spirit of the present invention, and the nonvolatile memory can be rewritten other than the EEPROM. Of course, it may be a memory.

また、装置の用途等によっては、記憶更新制限手段を省き、図2のステップS5の判断を行なわずにEEPROMの記憶情報を更新してもよい。   Further, depending on the usage of the apparatus, the storage update limiting means may be omitted, and the stored information in the EEPROM may be updated without performing the determination in step S5 of FIG.

そして、本発明は、情報記憶の要求に基いてRAMの保持情報が書き込まれる不揮発性メモリにより、コンピュータの電源遮断時等に情報が失われないようにするコンピュータ構成の種々の電子制御装置及びそのメモリ制御方法に適用することができる。   In addition, the present invention provides various electronic control devices having a computer configuration in which information is not lost when the power of the computer is cut off by a nonvolatile memory in which information held in the RAM is written based on a request for information storage, and the like It can be applied to a memory control method.

一実施形態のブロック図である。It is a block diagram of one embodiment. 図1の動作説明用のフローチャートである。It is a flowchart for operation | movement description of FIG. 従来例のブロック図である。It is a block diagram of a prior art example.

符号の説明Explanation of symbols

4 ECU
4a CPU
4b RAM
5 EEPROM
7m 正バンク
7s 副バンク
4 ECU
4a CPU
4b RAM
5 EEPROM
7m primary bank 7s secondary bank

Claims (6)

書き換え可能な不揮発性メモリの記憶情報を主記憶装置としてのランダムアクセスメモリに読み出して処理し、情報記憶の要求により、前記ランダムアクセスメモリの保持情報を前記不揮発性メモリに書き込むコンピュータ構成の電子制御装置において、
前記ランダムアクセスメモリに、前記不揮発性メモリから読み出された記憶情報がそれぞれ書き込まれて設定される前記不揮発性メモリの容量の主、副バンクの領域を設け、
前記両バンクの保持情報の比較をくり返し、前記両バンクの保持情報の一致、不一致を監視して検出するバンク監視手段と、
前記不揮発性メモリの情報記憶の要求が発生し、前記正バンクの保持情報が前記不揮発性メモリに記憶させる情報に書き換えられて前記副バンクの保持情報が前記正バンクの保持情報のビット反転情報に書き換えられたときに、前記バンク監視手段のビット反転状態の不一致検出によって前記情報記憶の要求を認識し、該認識に基づき、前記正バンクの保持情報を前記不揮発性メモリに書き込んで前記不揮発性メモリの記憶情報を更新し、該更新後に、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれの保持情報を前記不揮発性メモリの最新の記憶情報に書き換える情報記憶処理手段と、
前記バンク監視手段がビット反転状態以外の不一致を検出し、該検出に基いてバンク異常を認識したときに、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれに書き込み、前記両バンクの保持情報を前記不揮発性メモリの記憶情報に再設定して更正するバンク情報更正手段とを備えたことを特徴とする電子制御装置。
Computer-controlled electronic control device that reads and processes storage information in a rewritable nonvolatile memory into a random access memory as a main storage device, and writes information held in the random access memory into the nonvolatile memory in response to a request for information storage In
The random access memory is provided with areas of main and sub banks of the capacity of the nonvolatile memory in which storage information read from the nonvolatile memory is written and set.
Bank monitoring means for repeatedly comparing the holding information of both banks and monitoring and detecting the matching and mismatching of the holding information of both banks;
When a request to store information in the nonvolatile memory occurs, the retained information in the primary bank is rewritten to information to be stored in the nonvolatile memory, and the retained information in the sub bank becomes the bit inversion information of the retained information in the primary bank. When rewritten, the bank monitoring means recognizes the information storage request by detecting a bit inversion state mismatch, and based on the recognition, writes the information held in the primary bank into the nonvolatile memory Information storage processing means for reading the storage information of the nonvolatile memory after the update, and rewriting the retained information of each of the banks to the latest storage information of the nonvolatile memory after the update,
When the bank monitoring means detects a mismatch other than the bit inversion state and recognizes a bank abnormality based on the detection, the storage information of the nonvolatile memory is read and written to each of the banks, and the both banks are held. An electronic control device comprising: bank information correcting means for resetting and correcting information stored in the nonvolatile memory.
情報記憶処理手段に、前記バンク監視手段のビット反転状態の不一致検出により、正バンクの保持情報と不揮発性メモリの記憶情報との不一致を条件に、前記正バンクの保持情報の前記不揮発性メモリへの書き込みを許可する記憶更新制限手段を設けたことを特徴とする請求項1記載の電子制御装置。   When the information storage processing means detects a mismatch of the bit inversion state of the bank monitoring means, the information stored in the primary bank is stored in the nonvolatile memory on the condition that the information held in the primary bank does not match the information stored in the nonvolatile memory. 2. An electronic control unit according to claim 1, further comprising storage update limiting means for permitting the writing of. 書き換え可能な不揮発性メモリが、イー・イー・ピー・ロム(EEPROM(Electrically・Erasable・Programmable・Read−Only・Memory))であることを特徴とする請求項1または2に記載の電子制御装置。   The electronic control device according to claim 1, wherein the rewritable nonvolatile memory is an EEPROM (Electrically, Erasable, Programmable, Read-Only Memory). 書き換え可能な不揮発性メモリの記憶情報を主記憶装置としてのランダムアクセスメモリに読み出して処理し、情報記憶の要求により、前記ランダムアクセスメモリの保持情報を前記不揮発性メモリに書き込むコンピュータ構成の電子制御装置のメモリ制御方法において、
前記ランダムアクセスメモリに、前記不揮発性メモリから読み出された記憶情報がそれぞれ書き込まれて設定される前記不揮発性メモリの容量の主、副バンクの領域を設け、
前記両バンクの保持情報の比較のくり返しにより、前記両バンクの保持情報の一致、不一致を監視して検出し、
前記不揮発性メモリの情報記憶の要求が発生し、前記正バンクの保持情報が前記不揮発性メモリに記憶させる情報に書き換えられて前記副バンクの保持情報が前記正バンクの保持情報のビット反転情報に書き換えられたときに、前記両バンクの保持情報のビット反転状態の不一致検出により前記情報記憶の要求を認識し、該認識に基づき、前記正バンクの保持情報を前記不揮発性メモリに書き込んで前記不揮発性メモリの記憶情報を更新し、該更新後に、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれの保持情報を前記不揮発性メモリの最新の記憶情報に書き換え、
前記両バンクの保持情報のビット反転状態以外の不一致を検出し、該検出に基づいてバンク異常を認識したときに、前記不揮発性メモリの記憶情報を読み出して前記両バンクそれぞれに書き込み、前記両バンクの保持情報を前記不揮発性メモリの記憶情報に再設定して更正することを特徴とする電子制御装置のメモリ制御方法。
An electronic control device having a computer configuration in which information stored in a rewritable nonvolatile memory is read and processed in a random access memory as a main storage device, and information held in the random access memory is written in the nonvolatile memory in response to a request for information storage In the memory control method of
The random access memory is provided with areas of main and sub banks of the capacity of the nonvolatile memory in which storage information read from the nonvolatile memory is written and set.
By repeatedly comparing the holding information of both banks, it is possible to monitor and detect the matching and mismatching of the holding information of both banks,
When a request to store information in the nonvolatile memory occurs, the retained information in the primary bank is rewritten to information to be stored in the nonvolatile memory, and the retained information in the sub bank becomes the bit inversion information of the retained information in the primary bank. When the information is rewritten, the information storage request is recognized by detecting the mismatch of the bit inversion states of the information held in both banks, and based on the recognition, the information held in the primary bank is written into the nonvolatile memory and the nonvolatile memory is written. Update the storage information of the non-volatile memory, and after the update, read the storage information of the non-volatile memory and rewrite the holding information of each of the banks to the latest storage information of the non-volatile memory,
When a mismatch other than the bit inversion state of the holding information of both banks is detected and a bank abnormality is recognized based on the detection, the storage information of the nonvolatile memory is read and written to each of the banks. A memory control method for an electronic control device, wherein the stored information is reset to the storage information of the non-volatile memory for correction.
正、副バンクの保持情報のビット反転状態の不一致検出により、正バンクの保持情報と不揮発性メモリの保持情報との不一致を条件に、前記正バンクの保持情報の前記不揮発性メモリへの書き込みを許可することを特徴とする請求項4記載の電子制御装置のメモリ制御方法。   By detecting the mismatch of the bit inversion state of the holding information of the primary and secondary banks, writing the holding information of the primary bank to the nonvolatile memory on condition that the holding information of the primary bank and the holding information of the nonvolatile memory are inconsistent. 5. The memory control method for an electronic control device according to claim 4, wherein the memory control method is permitted. 書き換え可能な不揮発性メモリが、イー・イー・ピー・ロム(EEPROM(Electrically・Erasable・Programmable・Read−Only・Memory))であることを特徴とする請求項4または5に記載の電子制御装置のメモリ制御方法。   6. The electronic control device according to claim 4, wherein the rewritable nonvolatile memory is EEPROM (Electrically, Erasable, Programmable, Read-Only, Memory). Memory control method.
JP2004089203A 2004-03-25 2004-03-25 Electronic controller and memory control method therefor Withdrawn JP2005275889A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004089203A JP2005275889A (en) 2004-03-25 2004-03-25 Electronic controller and memory control method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004089203A JP2005275889A (en) 2004-03-25 2004-03-25 Electronic controller and memory control method therefor

Publications (1)

Publication Number Publication Date
JP2005275889A true JP2005275889A (en) 2005-10-06

Family

ID=35175493

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004089203A Withdrawn JP2005275889A (en) 2004-03-25 2004-03-25 Electronic controller and memory control method therefor

Country Status (1)

Country Link
JP (1) JP2005275889A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007213513A (en) * 2006-02-13 2007-08-23 Isuzu Motors Ltd Memory access method and device
WO2018235327A1 (en) * 2017-06-20 2018-12-27 京セラドキュメントソリューションズ株式会社 Memory system and electronic device
CN110888605A (en) * 2019-12-11 2020-03-17 重庆超力高科技股份有限公司 EEPROM data writing method and device and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007213513A (en) * 2006-02-13 2007-08-23 Isuzu Motors Ltd Memory access method and device
WO2018235327A1 (en) * 2017-06-20 2018-12-27 京セラドキュメントソリューションズ株式会社 Memory system and electronic device
CN110325971A (en) * 2017-06-20 2019-10-11 京瓷办公信息系统株式会社 Storage system and electronic equipment
US10956090B2 (en) 2017-06-20 2021-03-23 Kyocera Document Solutions Inc. Memory system and electronic apparatus
CN110888605A (en) * 2019-12-11 2020-03-17 重庆超力高科技股份有限公司 EEPROM data writing method and device and electronic equipment
CN110888605B (en) * 2019-12-11 2023-10-20 重庆超力高科技股份有限公司 EEPROM data writing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
JP4345860B2 (en) Vehicle memory management device
JP4227149B2 (en) Information storage method for electronic control unit
JP2990181B1 (en) Flash memory, microcomputer having flash memory, and method of storing program in flash memory
US7584333B2 (en) Data processing device in vehicle control system
JP2009120054A (en) Vehicular memory management device
JP5045584B2 (en) Program rewriting device
JP2004046453A (en) Single chip microcomputer and boot sector switching method
JP2003002132A (en) Vehicle control device
JP2005275889A (en) Electronic controller and memory control method therefor
JP4483876B2 (en) Storage device control method in duplex system
JP2009289049A (en) Memory control device
JP2007320456A (en) On-vehicle electronic equipment control device
JP2007316800A (en) Onboard program rewriting controller
JP2007062632A (en) Electronic control unit and storing method of data for abnormality generated time storage
JP4844214B2 (en) Electronic control system
US20100083073A1 (en) Data processing apparatus, memory controlling circuit, and memory controlling method
JP5872982B2 (en) Vehicle control device
JP2004151944A (en) Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller
JP7007223B2 (en) Control device and abnormality detection method
JP2004021520A (en) Electronic controller for vehicle
JP3960212B2 (en) Electronic control unit
JP2011118682A (en) Onboard control device
JP4031693B2 (en) Nonvolatile memory and data storage device having the same
JPH08153397A (en) Eeprom data rewrite controller
JP2005297652A (en) Communication device of on-vehicle electronic control device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070605