[go: up one dir, main page]

JP2003242044A - Microcomputer circuit - Google Patents

Microcomputer circuit

Info

Publication number
JP2003242044A
JP2003242044A JP2002039389A JP2002039389A JP2003242044A JP 2003242044 A JP2003242044 A JP 2003242044A JP 2002039389 A JP2002039389 A JP 2002039389A JP 2002039389 A JP2002039389 A JP 2002039389A JP 2003242044 A JP2003242044 A JP 2003242044A
Authority
JP
Japan
Prior art keywords
program
flash memory
initial processing
memory
microcomputer circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002039389A
Other languages
Japanese (ja)
Inventor
Junko Shirakawa
順子 白川
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 Kokusai Electric Inc
Original Assignee
Hitachi Kokusai Electric Inc
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 Kokusai Electric Inc filed Critical Hitachi Kokusai Electric Inc
Priority to JP2002039389A priority Critical patent/JP2003242044A/en
Publication of JP2003242044A publication Critical patent/JP2003242044A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer circuit which can prevent a program from being in an infeasible state even with troubles in the initial processing by solving problem that, if any troubles occur in the initial processing to transfer an application program to a RAM from a flash memory in the initial processing of the program, all subsequent programs are not executed and the operation is stopped. <P>SOLUTION: The microcomputer circuit is provided with a means which performs the two-side mounting of the flash memory for program storage on the microcomputer circuit in a control device to store the program in both memories, starts the microcomputer by the program stored in one flash memory, and monitors whether or not the initial processing procedure is normally advanced. If any trouble occurs in the initial processing, a CPU is reset by the means, and the microcomputer is forcibly re-started by the program stored in the other flash memory. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】 【0001】 【発明の属する技術分野】本発明は、マイクロコンピュ
ータ回路のプログラム動作バックアップに関するもので
ある。 【0002】 【従来の技術】従来の技術では、制御装置内マイクロコ
ンピュータ回路に、プログラム格納用フラッシュメモリ
を2面又はプログラム容量の2倍以上実装し、各々のフ
ラッシュメモリエリアにプログラムを書き込んでプログ
ラムのバックアップを行っていた。ここで、フラッシュ
メモリとはデータを電気的に書き込み、また、消去する
ことができるメモリで電源を切ってもデータ内容を保持
できるメモリである。なお、ランダムアクセスメモリ
(以下、RAMと略す)と比べると書き込み速度は遅い
ため主にプログラム格納用やデータ保存用に使用するも
のである。回路リセット後のイニシャル処理プログラム
実行時にアクセスするフラッシュメモリは決まってい
て、イニシャル処理にて、フラッシュメモリに格納され
たプログラムをプログラム実行用RAMに転送してRA
M上でプログラムを実行し、中央処理装置(以下、CP
Uと略す)からアクセスするフラッシュメモリ又はフラ
ッシュメモリエリアをセレクトできるようにし、リモー
トメンテナンス等の遠隔でのプログラム書き替えにも対
応していた。従来の回路構成では、イニシャル処理で、
プログラム格納用フラッシュメモリに格納されているプ
ログラムをRAMに転送し、アプリケーションプログラ
ムの実行はプログラム実行用RAM上で行われる。アプ
リケーションプログラムの実行中に関しては、動作監視
が行われているが、イニシャル処理プログラムに関して
は動作監視はなされておらず、イニシャル処理プログラ
ム動作中にフラッシュメモリ自身の動作不良等の障害が
あった場合は、その後のイニシャル処理プログラム及び
アプリケーションプログラムが実行されず、動作がスト
ップしてしまうという問題点が有った。 【0003】 【発明が解決しようとする課題】前述の従来技術では、
プログラムのバックアップは行っていたものの、リセッ
ト後にアクセスされるフラッシュメモリは決まってお
り、そのフラッシュメモリに格納されたプログラムにお
いて、フラッシュメモリからランダムアクセスメモリへ
プログラムを転送するイニシャル処理に障害が発生する
と、以降の全てのプログラムは実行されず、動作がスト
ップしてしまう。本発明は、前記イニシャル処理時の障
害でもプログラムが実行停止状態に陥らないようにする
ことを目的とする。 【0004】 【課題を解決するための手段】本発明は、上記目的を達
成するため、制御装置内マイクロコンピュータ回路にプ
ログラム格納用フラッシュメモリを2面実装してプログ
ラムを両方のフラッシュメモリに格納し、2面の内どち
らのフラッシュメモリをセレクトしているかの状態をC
PUに読み込み可能とし、フラッシュメモリセレクト情
報をCPUに取り込む。前記イニシャル処理プログラム
の処理手順が正常に進行しているかどうかを監視する手
段を設け、イニシャル処理に障害が発生した場合は、前
記手段からCPUにリセットをかけ、強制的にもう一方
のフラッシュメモリに格納されたプログラムにて再起動
させるようにする。CPUはリセット後、アクセスして
いるフラッシュメモリがどちらかを識別し、リセット前
後の状態と比較して、異なるフラッシュメモリをセレク
トしていた場合、イニシャル処理にて障害が発生したと
認識し、該障害情報をロギング情報として保存し、後で
読み出せるようにする。 【0005】 【発明の実施の形態】以下、本発明の実施例を図1およ
び図2により説明する。図1は本発明の全体構成を示す
ブロック図である。1はCPU、2はフラッシュメモリ
A、3はフラッシュメモリB、4はランダムアクセスメ
モリであるSDRAM、5はパルス監視部、6はエラー
カウンタ、7はフラッシュメモリセレクタ、8はフラッ
シュメモリセレクトステータス信号、9はプログラム障
害検出時フラッシュメモリを切替えるためのフラッシュ
メモリチェンジ信号A、10はフラッシュメモリセレク
ト信号、11はフラッシュメモリAセレクト信号、12
はフラッシュメモリBセレクト信号、13はSDRAM
セレクト信号、14はパワーオンリセット信号、15は
CPU1およびエラーカウンタ6リセット信号、16は
データおよびアドレスバスであるシステムバス信号、1
7はリモートメンテナンス時、CPUからフラッシュメ
モリAまたはBを指定するためのフラッシュメモリチェ
ンジ信号Bである。図2は本発明のメモリ配置の実施例
で、CPU1のメモリ空間上に配置した例である。フラ
ッシュメモリA2とフラッシュメモリB3は同一空間エ
リア上に配置する。フラッシュメモリA2とフラッシュ
メモリB3の内部は共に同一アドレスとして、イニシャ
ル処理プログラムとアプリケーションプログラムおよび
未使用領域から構成される。イニシャル処理プログラム
はオペレーティングシステムと、フラッシュメモリから
SDRAMへプログラムを転送し、ロードするためのロ
ーダ等が含まれている。また、アプリケーションプログ
ラムは制御装置を動作させるための実行プログラムであ
る。動作は、まず電源を投入すると、パワーオンリセッ
ト信号14によりフラッシュメモリセレクタ7およびエ
ラーカウンタ6がリセットされる。該リセットにより、
フラッシュメモリセレクタ7の出力であるフラッシュメ
モリAセレクト信号11がイネーブル、フラッシュメモ
リBセレクト信号12がディスエーブルとなり、フラッ
シュメモリA2がセレクトされる。また、フラッシュメ
モリセレクトステータス信号8によりCPU1へフラッ
シュメモリA2がセレクトされている旨を通知する。C
PU1はフラッシュメモリセレクトステータス信号8を
読み込み、フラッシュメモリA2がセレクトされている
ことを認識し、セレクト情報を格納する。そして、フラ
ッシュメモリA2のイニシャル処理プログラムが動作
し、フラッシュメモリA2内のアプリケーションプログ
ラムをSDRAM4に転送しロードする。ロードが終了
すると、フラッシュメモリA2上のイニシャル処理プロ
グラムとSDRAM4上にロードされたアプリケーショ
ンプログラムが結合して動作を開始するようになってい
る。このイニシャル処理プログラム動作において、アプ
リケーションプログラム動作でも使用するパルス監視部
5内のウォッチドッグタイマを使用し、ウォッチドッグ
タイマ解除用パルスをCPU1からパルス監視部5へ定
期的に送出することにより、イニシャル処理プログラム
において処理動作が正常に進行しているかを監視する。
もし、定期的にウォッチドッグタイマ解除用パルスがC
PU1からパルス監視部5へ出力されない場合は、パル
ス監視部5でエラー出力としてリセット信号15を出力
する。該リセット信号15はCPU1およびエラーカウ
ンタ6へ出力し、CPU1では前記リセット信号15で
リセットされ、エラーカウンタ6では前記リセット信号
15をカウントする。エラーカウンタ6では、予め定め
た回数のエラー発生としてのリセット信号15が入力さ
れると、フラッシュメモリセレクタ7に対し、フラッシ
ュメモリセレクトチェンジ信号A9を送出すると共に、
エラーカウンタ6の内容をクリアする。フラッシュメモ
リセレクトチェンジ信号A9を受信したフラッシュメモ
リセレクタ7は、フラッシュメモリA2へ送出していた
フラッシュメモリAセレクト信号11をディスエーブル
し、フラッシュメモリBセレクト信号12をイネーブル
にすると共に、フラッシュメモリセレクトステータス信
号8にて、フラッシュメモリB3をセレクトしている
旨、CPU1へ通知する。CPU1はリセット後、フラ
ッシュメモリB3に格納してあるプログラムで再起動す
る。イニシャル処理終了後、フラッシュメモリセレクト
ステータス信号8を読み込み、リセット前に格納したフ
ラッシュメモリのセレクト情報と比較し、リセット前と
異なるフラッシュメモリがセレクトされていることを識
別し、イニシャル処理プログラム動作において障害が発
生したことを認識し、例えばSDRAMのロギング情報
エリアに前記障害状況を記録、保存し、後で読み出せる
ようにする。 【0006】 【発明の効果】本発明により、イニシャル処理プログラ
ム動作時に障害が発生しても、バックアップしたプログ
ラムで再起動して正常動作が可能となり、かつ、CPU
にてイニシャル処理プログラム動作時に障害が発生した
状況を認識できるとともに前記状況情報を保存し、後で
障害状況を読み出し、障害履歴管理等に役立てることも
できる。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program operation backup of a microcomputer circuit. In the prior art, a flash memory for storing a program is mounted on a microcomputer circuit in a control device on two sides or twice or more of a program capacity, and a program is written in each flash memory area. Backed up. Here, a flash memory is a memory that can electrically write and erase data and that can retain data contents even when the power is turned off. Since the writing speed is slower than that of a random access memory (hereinafter abbreviated as RAM), it is mainly used for storing programs and data. The flash memory to be accessed when the initial processing program is executed after the circuit reset is determined. In the initial processing, the program stored in the flash memory is transferred to the RAM for program execution and RA
A program is executed on a central processing unit (hereinafter referred to as a CP).
(Abbreviated as U) to select a flash memory or a flash memory area to be accessed, and to cope with remote program rewriting such as remote maintenance. In the conventional circuit configuration, the initial processing
The program stored in the program storage flash memory is transferred to the RAM, and the application program is executed on the program execution RAM. When the application program is running, the operation is monitored.However, the operation is not monitored for the initial processing program.If there is a failure such as a malfunction of the flash memory itself during the operation of the initial processing program, However, there is a problem that the subsequent initial processing program and application program are not executed and the operation is stopped. [0003] In the above-mentioned prior art,
Although the program was backed up, the flash memory to be accessed after reset was determined.If a failure occurred in the initial process of transferring the program from the flash memory to the random access memory in the program stored in the flash memory, All subsequent programs are not executed and the operation stops. An object of the present invention is to prevent a program from falling into an execution suspended state even when a failure occurs during the initial processing. According to the present invention, in order to achieve the above object, two flash memories for storing a program are mounted on a microcomputer circuit in a control device, and a program is stored in both flash memories. The state of which of the two flash memories is selected is C
The data can be read by the PU, and the flash memory select information is loaded into the CPU. A means is provided for monitoring whether or not the processing procedure of the initial processing program is proceeding normally. If a failure occurs in the initial processing, the means resets the CPU and forcibly loads the other flash memory. Restart with the stored program. After resetting, the CPU identifies which flash memory is being accessed, compares it with the state before and after the reset, and if a different flash memory is selected, recognizes that a failure has occurred in the initial processing, and Failure information is stored as logging information so that it can be read later. An embodiment of the present invention will be described below with reference to FIGS. 1 and 2. FIG. 1 is a block diagram showing the overall configuration of the present invention. 1 is a CPU, 2 is a flash memory A, 3 is a flash memory B, 4 is a random access memory SDRAM, 5 is a pulse monitor, 6 is an error counter, 7 is a flash memory selector, 8 is a flash memory select status signal, 9 is a flash memory change signal A for switching the flash memory when a program failure is detected, 10 is a flash memory select signal, 11 is a flash memory A select signal, 12
Is a flash memory B select signal, 13 is an SDRAM
A select signal, 14 is a power-on reset signal, 15 is a reset signal for the CPU 1 and the error counter 6, 16 is a system bus signal which is a data and address bus, 1
Reference numeral 7 denotes a flash memory change signal B for designating the flash memory A or B from the CPU during remote maintenance. FIG. 2 shows an embodiment of the memory arrangement according to the present invention, which is an example in which the memory is arranged in the memory space of the CPU 1. The flash memory A2 and the flash memory B3 are arranged on the same space area. The insides of the flash memory A2 and the flash memory B3 have the same address, and are composed of an initial processing program, an application program, and an unused area. The initial processing program includes an operating system and a loader for transferring and loading the program from the flash memory to the SDRAM. The application program is an execution program for operating the control device. In operation, when power is first turned on, the flash memory selector 7 and the error counter 6 are reset by the power-on reset signal 14. By the reset,
The flash memory A select signal 11 output from the flash memory selector 7 is enabled, the flash memory B select signal 12 is disabled, and the flash memory A2 is selected. Further, the flash memory select status signal 8 notifies the CPU 1 that the flash memory A2 has been selected. C
PU1 reads the flash memory select status signal 8, recognizes that the flash memory A2 has been selected, and stores select information. Then, the initial processing program of the flash memory A2 operates to transfer and load the application program in the flash memory A2 to the SDRAM 4. When the loading is completed, the initial processing program on the flash memory A2 and the application program loaded on the SDRAM 4 are combined to start operation. In the initial processing program operation, the watchdog timer in the pulse monitoring unit 5 used in the application program operation is used, and a pulse for releasing the watchdog timer is periodically transmitted from the CPU 1 to the pulse monitoring unit 5, so that the initial processing is performed. It monitors whether the processing operation is proceeding normally in the program.
If the watchdog timer release pulse is periodically C
When the signal is not output from the PU 1 to the pulse monitoring unit 5, the pulse monitoring unit 5 outputs a reset signal 15 as an error output. The reset signal 15 is output to the CPU 1 and the error counter 6. The CPU 1 is reset by the reset signal 15, and the error counter 6 counts the reset signal 15. When the error counter 6 receives a reset signal 15 indicating that a predetermined number of errors have occurred, the error counter 6 sends a flash memory select change signal A9 to the flash memory selector 7 and
The contents of the error counter 6 are cleared. Upon receiving the flash memory select change signal A9, the flash memory selector 7 disables the flash memory A select signal 11 sent to the flash memory A2, enables the flash memory B select signal 12, and sets the flash memory select status. The signal 8 notifies the CPU 1 that the flash memory B3 has been selected. After the reset, the CPU 1 is restarted by the program stored in the flash memory B3. After the completion of the initial processing, the flash memory select status signal 8 is read and compared with the flash memory select information stored before the reset to identify that a flash memory different from that before the reset has been selected. Is recognized, and the failure status is recorded and stored in, for example, a logging information area of the SDRAM so that it can be read out later. According to the present invention, even if a failure occurs during the operation of the initial processing program, the program can be restarted by the backed-up program so that normal operation can be performed.
It is possible to recognize the situation in which a failure has occurred during the operation of the initial processing program, save the situation information, read out the failure situation later, and use it for failure history management and the like.

【図面の簡単な説明】 【図1】本発明の全体構成を示すブロック図 【図2】本発明のメモリ配置の実施例 【符号の説明】 1:CPU、2:フラッシュメモリA、3:フラッシュ
メモリB、4:SDRAM、5:パルス監視部、6:エ
ラーカウンタ、7:フラッシュメモリセレクタ、8:フ
ラッシュメモリセレクトステータス信号、9:フラッシ
ュメモリチェンジ信号A、10:フラッシュメモリセレ
クト信号、11:フラッシュメモリAセレクト信号、1
2:フラッシュメモリBセレクト信号、13:SDRA
Mセレクト信号、14:パワーオンリセット信号、1
5:リセット信号、16:システムバス信号、17:フ
ラッシュメモリチェンジ信号B
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing the overall configuration of the present invention. FIG. 2 is an embodiment of a memory arrangement of the present invention. [Description of References] 1: CPU, 2: Flash memory A, 3: Flash Memory B, 4: SDRAM, 5: Pulse monitoring unit, 6: Error counter, 7: Flash memory selector, 8: Flash memory select status signal, 9: Flash memory change signal A, 10: Flash memory select signal, 11: Flash Memory A select signal, 1
2: Flash memory B select signal, 13: SDRA
M select signal, 14: power-on reset signal, 1
5: reset signal, 16: system bus signal, 17: flash memory change signal B

Claims (1)

【特許請求の範囲】 【請求項1】中央処理装置とプログラムの格納用メモリ
とプログラム実行用メモリを含むマイクロコンピュータ
回路であって、プログラムを格納したフラッシュメモリ
を2面以上又はプログラム容量の2倍以上の容量を持つフ
ラッシュメモリを備え、プログラム実行用メモリとして
プログラム容量以上の容量を有するランダムアクセスメ
モリを備え、一方のフラッシュメモリに格納されている
プログラムをランダムアクセスメモリへ転送し、ランダ
ムアクセスメモリ上でプログラムを実行し、プログラム
動作障害時に他方のフラッシュメモリから前記ランダム
アクセスメモリへプロクラムを転送し直し、プログラム
を動作させるマイクロコンピュータ回路において、前記
一方のフラッシュメモリから前記ランダムアクセスメモ
リへプログラムを転送するイニシャル処理時に、該イニ
シャル処理手順が所定の流れで進行しなくなったことを
監視する手段を備え、該手段により中央処理装置をリセ
ットし、前記他方のフラッシュメモリからランダムアク
セスメモリへプログラムを転送し直し、プログラム動作
をバックアップする手段を備えたことを特徴とするマイ
クロコンピュータ回路。
Claims 1. A microcomputer circuit including a central processing unit, a program storage memory, and a program execution memory, wherein a flash memory storing a program is stored on two or more surfaces or twice the program capacity. A flash memory having a capacity equal to or greater than the program capacity, a random access memory having a capacity equal to or greater than the program capacity as a program execution memory, and transferring a program stored in one flash memory to the random access memory; In the microcomputer circuit for executing the program and transferring the program from the other flash memory to the random access memory when the program operation fails, and operating the program, the random access memory is read from the one flash memory. Means for monitoring that the initial processing procedure does not proceed according to a predetermined flow at the time of initial processing for transferring the program to the memory, resetting the central processing unit by the means, and A microcomputer circuit comprising means for transferring a program back to a computer and backing up a program operation.
JP2002039389A 2002-02-18 2002-02-18 Microcomputer circuit Pending JP2003242044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002039389A JP2003242044A (en) 2002-02-18 2002-02-18 Microcomputer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002039389A JP2003242044A (en) 2002-02-18 2002-02-18 Microcomputer circuit

Publications (1)

Publication Number Publication Date
JP2003242044A true JP2003242044A (en) 2003-08-29

Family

ID=27780418

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002039389A Pending JP2003242044A (en) 2002-02-18 2002-02-18 Microcomputer circuit

Country Status (1)

Country Link
JP (1) JP2003242044A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006276967A (en) * 2005-03-28 2006-10-12 Renesas Technology Corp Semiconductor apparatus
JP2007304781A (en) * 2006-05-10 2007-11-22 Nec Electronics Corp Semiconductor device and start-up method
JP4933268B2 (en) * 2003-12-31 2012-05-16 サンディスク コーポレイション Flash memory system startup behavior
JP2017045311A (en) * 2015-08-27 2017-03-02 株式会社東芝 Memory system
CN115098304A (en) * 2022-06-20 2022-09-23 中国科学院空间应用工程与技术中心 Embedded system, electronic equipment and software running method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4933268B2 (en) * 2003-12-31 2012-05-16 サンディスク コーポレイション Flash memory system startup behavior
JP2006276967A (en) * 2005-03-28 2006-10-12 Renesas Technology Corp Semiconductor apparatus
JP2007304781A (en) * 2006-05-10 2007-11-22 Nec Electronics Corp Semiconductor device and start-up method
JP2017045311A (en) * 2015-08-27 2017-03-02 株式会社東芝 Memory system
CN115098304A (en) * 2022-06-20 2022-09-23 中国科学院空间应用工程与技术中心 Embedded system, electronic equipment and software running method
CN115098304B (en) * 2022-06-20 2022-11-29 中国科学院空间应用工程与技术中心 Embedded system, electronic equipment and software running method

Similar Documents

Publication Publication Date Title
US6336174B1 (en) Hardware assisted memory backup system and method
JP5402693B2 (en) Disk array device control method and disk array device
US4603406A (en) Power backed-up dual memory system
JPH05204779A (en) Advanced data protection system and data protection method
JPH06259340A (en) Data-processing system provided with data protective mechanism in power-supply failure
JP2012069032A (en) Information processor
WO2010006301A1 (en) Battery-less cache memory module with integrated backup
JP2004038529A (en) Information processor
CN110837444B (en) Memory fault processing method and device
JPH08320835A (en) Fault detecting method for external bus
JPH09330277A (en) Service interruption processing system for disk cache system and method therefor
CN115273922A (en) Abnormal power-down protection device for domestic double-control disk array
JP2003242044A (en) Microcomputer circuit
JP2009237758A (en) Server system, server management method, and program therefor
US20130073792A1 (en) Electronic apparatus using nand flash and memory management method thereof
JP3550256B2 (en) Information processing equipment
JP2011154593A (en) Memory device and self-check control method thereof
JP6911591B2 (en) Information processing device, control device and control method of information processing device
JP4098400B2 (en) Semiconductor disk device
JP2785992B2 (en) Server program management processing method
JPH0934805A (en) Semiconductor disk device
CN118132386B (en) System crash information storage method, device and computer system
JPH02297237A (en) Automatic restarting device for electronic computer system
US20240219986A1 (en) Multi-node system and power supply control method
JP2646975B2 (en) Information processing system