JPH0880810A - Power cut-off detecting device in equipment with security mechanism - Google Patents

Power cut-off detecting device in equipment with security mechanism

Info

Publication number
JPH0880810A
JPH0880810A JP21735094A JP21735094A JPH0880810A JP H0880810 A JPH0880810 A JP H0880810A JP 21735094 A JP21735094 A JP 21735094A JP 21735094 A JP21735094 A JP 21735094A JP H0880810 A JPH0880810 A JP H0880810A
Authority
JP
Japan
Prior art keywords
power
microcomputer
security
reset
flip
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
JP21735094A
Other languages
Japanese (ja)
Other versions
JP3722500B2 (en
Inventor
Nobuyoshi Tateishi
信好 立石
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP21735094A priority Critical patent/JP3722500B2/en
Publication of JPH0880810A publication Critical patent/JPH0880810A/en
Application granted granted Critical
Publication of JP3722500B2 publication Critical patent/JP3722500B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE: To provide a power cut-off detecting device surely capable of detecting the generation of a power cut-off state in equipment with a security mechanism. CONSTITUTION: When power supply to-equipment is cut-off, a flip-flop circuit 8 is reset. Where the flip-flop circuit 8 is reset at the time of reset starting, judging that power supply was cut-off, a micro computer 2 executes a security process. After that, the computer 2 stores the result of the execution of the security process in an EEPROM 3 and then sets the flip-flop circuit 8. The security performance of the equipment is further improved by replacing the flip-flop circuit 8 with a shift resister or RAM comprising a plurality of bits.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、盗難防止を目的とする
セキュリティ機構を備えた機器において、電源切断状態
が発生したことを検出するための装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for detecting the occurrence of a power-off state in a device having a security mechanism for the purpose of preventing theft.

【0002】[0002]

【従来の技術】近年、盗難防止の観点から、カーステレ
オ等の車載用機器にセキュリティ機構を設ける傾向にあ
る。そのようなセキュリティ機構を実現するための方式
として代表的なものにコードセキュリティ方式がある。
車載用機器は、一般的に、マイクロコンピュータシステ
ムとして実現されており、そのメモリ保持等を目的とし
て、スイッチを介することなく直接バッテリー電源へ接
続されている。コードセキュリティ方式は、その電源接
続が一旦切断され再度接続されたことを検出した場合
に、盗難にあった可能性があるため、セキュリティモー
ドに移行してコード入力を要求し、その入力値が正しく
なければ動作を開始しないようにマイコンが処理するよ
う構成されているものである。このように、電源が投入
されたときにセキュリティモードに移行するのは、電源
ラインが切断された時点では、セキュリティ機構自身を
動かす電源供給も無くなり、電源切断の判断処理が実行
できないからである。
2. Description of the Related Art In recent years, from the viewpoint of theft prevention, there is a tendency to install a security mechanism in in-vehicle devices such as car stereos. A code security method is a typical method for realizing such a security mechanism.
The vehicle-mounted device is generally realized as a microcomputer system, and is directly connected to a battery power source without a switch for the purpose of holding its memory. When the code security method detects that the power supply connection was once disconnected and then reconnected, it may have been stolen.Therefore, the security mode is entered and the code input is requested. If it is not, the microcomputer is configured so as not to start the operation. As described above, the reason why the security mode is entered when the power is turned on is that when the power line is cut off, the power supply for moving the security mechanism itself is also lost and the power cutoff determination process cannot be executed.

【0003】また、マイコンシステムによる機器には、
一般的に、マイコンの暴走等のトラブル状態を解除する
ために、マイコンを電源投入時と同一の状態へ復帰させ
るためのリセットスイッチが設けられていることが多
い。すなわち、そのようなリセットスイッチの操作に応
じてマイコンは、電源投入時の場合と同一の命令アドレ
スからスタートすることとなる。
In addition, a device using a microcomputer system includes
Generally, in order to cancel a trouble state such as a runaway of a microcomputer, a reset switch for returning the microcomputer to the same state as when the power is turned on is often provided. That is, in response to the operation of such a reset switch, the microcomputer starts from the same instruction address as when the power was turned on.

【0004】かかるリセットスイッチ操作によってもセ
キュリティモードに移行するようにすると、そのモード
の解除に手間がかかってしまうという欠点が生ずる。そ
れを回避するためには、マイコンは、リセットスタート
(立ち上がり)時に、電源の再投入によるものか、リセ
ットスイッチ操作によるものか、を判定して電源再投入
による場合のみセキュリティモードに移行する必要があ
る。そのため、セキュリティ機構付きのマイコン制御式
機器には、直前に電源切断が発生していたことを立ち上
がり時に検出するための構成が設けられている。
If the reset mode is operated to shift to the security mode, it is troublesome to release the mode. In order to avoid this, it is necessary for the microcomputer to enter the security mode only when the power is turned on again by determining whether the power is turned on again or the reset switch is operated at reset start (rising). is there. Therefore, a microcomputer-controlled device with a security mechanism is provided with a configuration for detecting the occurrence of power cutoff immediately before starting.

【0005】図7は、そのような従来の電源切断検出装
置の一例を示すブロック図である。この図において、符
号VBは例えば12Vのバッテリー電源、符号1は電源
VBとセキュリティ機構付きのマイコン制御式機器との
接続部、符号2は当該機器の制御中枢になるとともに電
源切断検出のための判定処理を行うマイクロコンピュー
タ(マイコン)、符号3は電源切断状態においても保持
する必要のあるデータを格納するためのEEPROM、
符号4は電源VBの波形を整形するための波形整形回
路、符号5は波形整形回路4の出力を所定の時間遅延さ
せるための遅延回路、符号6は電源VBよりマイコン2
に供給するための5Vを生成するための5V生成回路、
符号7は電源投入時と同一の状態にマイコン2をリセッ
トするためのリセットスイッチ、をそれぞれ示す。
FIG. 7 is a block diagram showing an example of such a conventional power disconnection detecting device. In this figure, reference numeral VB is a battery power source of, for example, 12V, reference numeral 1 is a connecting portion between the power supply VB and a microcomputer-controlled device having a security mechanism, and reference numeral 2 is a control center of the device and a determination for detecting power-off. A microcomputer for processing, reference numeral 3 is an EEPROM for storing data that needs to be retained even in a power-off state,
Reference numeral 4 is a waveform shaping circuit for shaping the waveform of the power source VB, reference numeral 5 is a delay circuit for delaying the output of the waveform shaping circuit 4 for a predetermined time, and reference numeral 6 is a microcomputer 2 from the power source VB.
A 5V generation circuit for generating 5V to be supplied to
Reference numeral 7 indicates a reset switch for resetting the microcomputer 2 in the same state as when the power was turned on.

【0006】図7におけるマイコン2のスタート時の処
理手順を図8の概略フローチャートにより説明する。ま
ず、接続部1の切断により電源供給が中断され、EEP
ROM3に格納されたものを除き、データが破壊されて
いる可能性があるため、所定のイニシャライズ処理を実
行する(ステップ802)。次いで、遅延回路5の出力
51がロウレベルであるか否かを判定する(ステップ8
04)。ロウレベルであれば、スタート直前では電源切
断状態であったことが判明し、電源再投入によるスター
トであると判定することができる。その場合には、盗難
が発生した可能性があるため、前記したようにセキュリ
ティコードの入力処理へと移行する(ステップ80
6)。また、ロウレベルでなければ、リセットスイッチ
をONしたことによるスタートであると判断し、コード
入力処理は省略される(ステップ808)。
The processing procedure at the time of starting the microcomputer 2 in FIG. 7 will be described with reference to the schematic flowchart of FIG. First, the power supply is interrupted by disconnection of the connecting portion 1, and the EEP
Since there is a possibility that the data other than those stored in the ROM 3 are destroyed, a predetermined initialization process is executed (step 802). Next, it is determined whether the output 51 of the delay circuit 5 is at low level (step 8).
04). If it is at a low level, it is found that the power supply was in a power-off state immediately before the start, and it can be determined that the power supply has been restarted. In that case, since theft may have occurred, the process proceeds to the security code input process as described above (step 80).
6). If it is not low level, it is determined that the start is caused by turning on the reset switch, and the code input process is omitted (step 808).

【0007】[0007]

【発明が解決しようとする課題】しかしながら、このよ
うな構成による電源切断の検出は、必ずしも確実にその
検出を実現することができるものではない。すなわち、
電源の接続状態を検出するための信号51は、電源VB
の出力を波形整形し、電源接続後スタートしたマイコン
2がスタート直前の電源接続状態としてそれを読み込む
ことができる程度まで遅延された信号である。そのた
め、例えば、ステップ804で電源切断があったと判定
して、ステップ806に進み、コード入力処理を実行し
ようとした時点で、リセットスイッチ7が押下された場
合、再びマイコン2はスタート状態となり、再度ステッ
プ802及び804を実行するが、そのときには電源切
断を検出可能な遅延時間を経過しており、単にリセット
スイッチONのみが発生したと判断し、コード入力処理
を実行しないまま、通常動作に移行する可能性がある。
このように、従来の装置は、確実なセキュリティ動作を
保証するものではなかった。
However, the detection of power supply disconnection by such a configuration cannot necessarily realize the detection with certainty. That is,
The signal 51 for detecting the connection state of the power source is the power source VB.
Is a signal delayed to the extent that the output of the waveform is shaped and the microcomputer 2 started after power connection can read it as the power connection state immediately before start. Therefore, for example, when it is determined in step 804 that the power has been cut off, the process proceeds to step 806, and when the reset switch 7 is pressed at the time when the code input process is to be executed, the microcomputer 2 becomes the start state again, and the microcomputer 2 starts again. Steps 802 and 804 are executed, but at that time, the delay time capable of detecting the power-off has passed, it is judged that only the reset switch ON has occurred, and the normal operation is performed without executing the code input process. there is a possibility.
As described above, the conventional device does not guarantee a reliable security operation.

【0008】かかる実情に鑑み、本発明の目的は、セキ
ュリティ機構付きの機器における電源切断状態の発生を
確実に検出することが可能な電源切断検出装置を提供す
ることにある。
In view of the above situation, an object of the present invention is to provide a power cutoff detecting device capable of surely detecting the occurrence of a power cutoff state in a device with a security mechanism.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、以下に記載されるような技術構成を採用
するものである。すなわち、本発明に係る、セキュリテ
ィ機構付き機器における電源切断検出装置は、セキュリ
ティ機構を備えた機器において電源切断状態が発生した
ことを検出する装置であって、当該機器への電源供給が
遮断されると記憶内容が破壊される電源切断記憶部と、
リセットスタート時に、前記電源切断記憶部の記憶内容
が破壊されている場合に、電源切断があったと判定し
て、所定のセキュリティ処理を実行するマイクロコンピ
ュータと、を具備することを特徴とする。
In order to achieve the above object, the present invention adopts the technical constitution as described below. That is, the power-off detection device in a device with a security mechanism according to the present invention is a device for detecting that a power-off state has occurred in a device with a security mechanism, and the power supply to the device is cut off. And a power-off storage unit that destroys memory contents,
And a microcomputer that executes a predetermined security process by determining that the power is cut off when the stored contents of the power-off storage unit is destroyed at the time of reset start.

【0010】また、本発明によれば、前記電源切断検出
装置は、不揮発性メモリをさらに具備し、前記マイクロ
コンピュータは、前記所定のセキュリティ処理実行結果
を前記不揮発性メモリに格納した後、前記電源切断記憶
部に所定のデータをセットするように構成される。
Further, according to the present invention, the power-off detection device further comprises a non-volatile memory, and the microcomputer stores the predetermined security processing execution result in the non-volatile memory, and then the power source. It is configured to set predetermined data in the disconnection storage unit.

【0011】また、本発明によれば、前記電源切断記憶
部は、複数のビットからなるように構成される。
Further, according to the present invention, the power-off storage unit is constituted by a plurality of bits.

【0012】また、本発明によれば、前記マイクロコン
ピュータは、前記電源切断記憶部の記憶内容が破壊され
ているかを所定の周期で監視し、破壊されている場合に
ソフトウェアリセットを発行するように構成される。
Further, according to the present invention, the microcomputer monitors whether the stored contents of the power-off storage unit is destroyed in a predetermined cycle and issues a software reset when the contents are destroyed. Composed.

【0013】[0013]

【作用】上記の如く構成された電源切断検出装置におい
ては、電源切断状態の発生が電源切断記憶部に確実に記
憶されることとなる。また、不揮発性メモリにセキュリ
ティ処理実行結果を格納した後、電源切断記憶部に所定
のデータをセットするように構成することにより、スタ
ート時における判定後にリセットスイッチ操作が行われ
ても誤判定をすることがなくなる。また、電源切断記憶
部を複数のビットからなるように構成して複雑化するこ
とにより、悪意の操作に対するセキュリティ性が向上す
る。また、マイクロコンピュータが、電源切断記憶部の
記憶内容が破壊されているかを所定の周期で監視し、破
壊されている場合にソフトウェアリセットを発行するよ
うにすることにより、電源切断検知は行うがマイクロコ
ンピュータの保持時間が長くマイクロコンピュータのリ
セットがかからない場合でも、確実に電源切断の発生を
検出することができるようになる。
In the power-off detecting device constructed as described above, the occurrence of the power-off state is surely stored in the power-off storage unit. In addition, by storing the security process execution result in the non-volatile memory and then setting predetermined data in the power-off storage unit, an erroneous determination is made even if the reset switch operation is performed after the determination at the start. Will disappear. Further, the power-off storage unit is configured to have a plurality of bits and is complicated, so that the security against malicious operations is improved. Further, the microcomputer monitors the stored contents of the power-off storage unit for a predetermined period and issues a software reset when the contents are destroyed, so that the power-off detection is performed but the microcomputer does Even when the computer is held for a long time and the microcomputer is not reset, it is possible to reliably detect the occurrence of power-off.

【0014】[0014]

【実施例】以下、添付図面を参照して本発明の実施例を
説明する。
Embodiments of the present invention will be described below with reference to the accompanying drawings.

【0015】図1は、本発明の第1の実施例に係る電源
切断検出装置のハードウェア構成を示すブロック図であ
る。この図において、従来例に係る図7の構成要素と同
一の構成要素には、同一の符号が付されており、その説
明は省略する。従来の回路(図7)と相違する点は、従
来回路における遅延回路5に代えて、フリップフロップ
8を使用していることである。このフリップフロップ8
は、波形整形回路4の出力をリセット端子Rに入力する
ことにより、電源VBのロウレベルすなわち切断を検知
してリセット状態になる。また、このフリップフロップ
は、それ自身への電力供給が一旦断たれて再度電力供給
された時点でもリセット状態となる。すなわち、瞬間的
な電源切断状態も長時間の電源切断状態も検出してリセ
ット状態となる。なお、当然に、このフリップフロップ
8は、リセットスイッチ7のONではリセットされな
い。
FIG. 1 is a block diagram showing the hardware configuration of a power disconnection detecting apparatus according to the first embodiment of the present invention. In this figure, the same components as those of FIG. 7 according to the conventional example are designated by the same reference numerals, and the description thereof will be omitted. The difference from the conventional circuit (FIG. 7) is that a flip-flop 8 is used instead of the delay circuit 5 in the conventional circuit. This flip-flop 8
By inputting the output of the waveform shaping circuit 4 to the reset terminal R, the low level, that is, the disconnection of the power supply VB is detected to enter the reset state. Further, the flip-flop is in the reset state even when the power supply to itself is once cut off and then supplied again. That is, the reset state is entered by detecting both the momentary power-off state and the long-term power-off state. Naturally, the flip-flop 8 is not reset when the reset switch 7 is turned on.

【0016】このような図1のハードウェア構成を有す
る第1の実施例におけるマイコン2のスタート時処理手
順について、図2のフローチャートにより説明する。ま
ず、電源投入又はリセットスイッチONにより起動され
ると、所定のイニシャライズ処理を実行する(ステップ
102)。次いで、セキュリティが設定されているかを
確認するために、EEPROM3に格納されたセキュリ
ティフラグを読み出して、ONであるかを判定する(ス
テップ104)。セキュリティフラグがOFFであれ
ば、以下に説明する処理はスキップされる。セキュリテ
ィフラグがONすなわちセキュリティが設定されている
場合には、フリップフロップ8がリセット状態であるか
否かを判定する(ステップ106)。セット状態であれ
ば、電源切断はなかったと判断することができるため、
以下の処理がスキップされる。また、リセット状態であ
れば、ステップ108に進む。
The processing procedure at the time of start of the microcomputer 2 in the first embodiment having the hardware configuration of FIG. 1 will be described with reference to the flowchart of FIG. First, when the power is turned on or the reset switch is turned on, a predetermined initialization process is executed (step 102). Next, in order to confirm whether the security is set, the security flag stored in the EEPROM 3 is read and it is determined whether it is ON (step 104). If the security flag is OFF, the process described below is skipped. If the security flag is ON, that is, security is set, it is determined whether the flip-flop 8 is in the reset state (step 106). If it is in the set state, it can be determined that the power was not cut off,
The following processing is skipped. If it is in the reset state, the process proceeds to step 108.

【0017】ステップ108では、EEPROM3に格
納された電源フラグがONであるか否かを判定する。こ
の電源フラグは、スタート前にはセキュリティコード入
力判定処理が正常になされて電源ON状態であったこと
を示すフラグである。電源フラグがOFFであれば、異
常であるためステップ120のエラー処理に進む。ま
た、電源フラグがONの場合には、電源フラグをOFF
としてEEPROM3に書き込む(ステップ110)。
これにより、電源投入されてから未だセキュリティコー
ド入力判定処理がなされていないことが記憶されたこと
となる。そして、フリップフロップ8のセット入力端子
Sへの信号をアクティブにすることにより、フリップフ
ロップ8をセット状態にする(ステップ112)。
At step 108, it is determined whether or not the power flag stored in the EEPROM 3 is ON. The power supply flag is a flag indicating that the security code input determination process was normally performed and the power supply was in an ON state before the start. If the power supply flag is OFF, it means that there is an abnormality, and the process proceeds to step 120 for error processing. If the power flag is ON, turn the power flag OFF.
Is written in the EEPROM 3 (step 110).
As a result, it is stored that the security code input determination process has not been performed since the power was turned on. Then, by activating the signal to the set input terminal S of the flip-flop 8, the flip-flop 8 is set (step 112).

【0018】フリップフロップ8のセット後、セキュリ
ティコードの入力を促す所定の処理を実行する(ステッ
プ114)。そして、入力されたコードがEEPROM
3に格納された期待値と一致するか否かの判定処理を実
行する(ステップ116)。一致しなければ、ステップ
120のエラー処理へ進む。一致すれば、盗難による電
源切断及び再接続ではないと判断し、この時点で電源フ
ラグをON、コード入力処理のリトライ回数Nを0、と
してこれらをEEPROM3に格納し(ステップ11
8)、通常の機器制御処理へと移行する。
After the flip-flop 8 is set, a predetermined process for prompting the input of the security code is executed (step 114). And the entered code is EEPROM
A determination process of whether or not it matches the expected value stored in No. 3 is executed (step 116). If they do not match, the process proceeds to step 120 for error processing. If they match, it is determined that the power is not cut off or reconnected due to theft, and at this point, the power flag is turned on, the number of retries N of the code input process is set to 0, and these are stored in the EEPROM 3 (step 11).
8) Then, shift to normal device control processing.

【0019】ステップ108で電源フラグがOFFと判
定された場合、及びステップ116にてセキュリティコ
ードが不一致の場合には、ステップ120において所定
のエラー処理を実行する。次いで、現在のリトライ回数
Nが所定の許容回数Pを越えているか否かを判定する
(ステップ122)。N>Pであれば、ステップ122
において無限ループに陥り、動作不能となるようにされ
る。N≦Pであれば、リトライ回数Nをインクリメント
してEEPROM3に書き込むことにより、Nを記憶し
(ステップ124)、ステップ114のコード入力処理
へ移行する。
If it is determined in step 108 that the power flag is OFF, and if the security codes do not match in step 116, a predetermined error process is executed in step 120. Next, it is judged whether or not the current retry count N exceeds a predetermined allowable count P (step 122). If N> P, step 122
In, it falls into an infinite loop and becomes inoperable. If N ≦ P, the number of retries N is incremented and written in the EEPROM 3 to store N (step 124), and the process proceeds to the code input process of step 114.

【0020】以上のような第1の実施例においては、電
源切断を検出したことをフリップフロップ8のリセット
状態として保持し、マイコン2は、フリップフロップ8
のリセット状態を読み取った後に、セット状態とするた
め、電源切断の判断処理が確実に行われる。
In the first embodiment as described above, the fact that the power-off is detected is held as the reset state of the flip-flop 8, and the microcomputer 2 causes the flip-flop 8 to operate.
Since the reset state is read and then the set state is set, the power-off determination processing is reliably performed.

【0021】次に、本発明の第2の実施例について説明
する。第2の実施例は、第1の実施例と同じく図1に示
すハードウェア構成を有するが、その処理手順が図3の
ように改良される。図3のフローチャートにおいて第1
の実施例に係る図2のステップと同一のステップについ
ては、同一のステップ番号が付されており、その説明は
省略する。相違する点は、フリップフロップ8をセット
するステップ(図2の112)が、第2の実施例ではス
テップ118の後に実行されることである(ステップ2
12)。このように、電源フラグ等の判断結果のEEP
ROM3への書き込みを完了させてからフリップフロッ
プ8をセットすることにより、判断後にリセットスイッ
チ操作が行われても誤判定をすることがなくなる。
Next, a second embodiment of the present invention will be described. The second embodiment has the hardware configuration shown in FIG. 1 like the first embodiment, but the processing procedure is improved as shown in FIG. First in the flowchart of FIG.
The same steps as those in FIG. 2 according to the embodiment are given the same step numbers, and description thereof will be omitted. The difference is that the step of setting flip-flop 8 (112 in FIG. 2) is performed after step 118 in the second embodiment (step 2).
12). In this way, the EEP of the determination result of the power flag, etc.
By setting the flip-flop 8 after the writing to the ROM 3 is completed, an erroneous determination is not made even if the reset switch operation is performed after the determination.

【0022】すなわち、EEPROMへの書き込み前
にリセットスイッチが操作されても、フリップフロップ
がセットされていないため、確実に検出判定することが
できる。EEPROMへの書き込み後にリセットスイ
ッチが操作された場合でも、フリップフロップがセット
されていないため、同じデータを書き込むことになるだ
けで、誤判定は起きない。フリップフロップをセット
した後にリセットスイッチが操作された場合には、リセ
ットスイッチ操作であると検出判定することができる。
That is, even if the reset switch is operated before writing to the EEPROM, since the flip-flop is not set, it is possible to surely detect and judge. Even if the reset switch is operated after writing to the EEPROM, since the flip-flop is not set, the same data is written, and no erroneous determination occurs. When the reset switch is operated after setting the flip-flop, it can be detected and determined as the reset switch operation.

【0023】次に、本発明の第3の実施例について説明
する。図4はその第3の実施例に係る電源切断検出装置
のハードウェア構成を示すブロック図、図5はその場合
のマイコンのスタート時の処理手順を示す概略フローチ
ャートである。図1と図4とを比較して容易にわかるよ
うに、第3の実施例においては、フリップフロップ8に
代えてシフトレジスタ9を採用する。また、図5のフロ
ーチャートは、図3のステップ106及び212がそれ
ぞれステップ306及び312に変更されている点のみ
相違する。フリップフロップではハイ(H)かロウ
(L)かの判定であるため、ある程度の知識があれば、
悪意の操作により外部からフリップフロップをセット状
態に変えることができ、マイコン2を誤判定させること
が可能である。そのため、シフトレジスタ9に複数ビッ
トからなる特定のデータを書き込み、また読み出すよう
にすることで、そのような悪意の操作に対するセキュリ
ティ性が向上する。レジスタのデータとしては、例え
ば、機器のシリアルナンバー等、機器ごとに異なるコー
ドを使用すれば、さらに保護は確実となろう。なお、シ
フトレジスタでなくとも、ある程度のビット数を有する
RAMでもよい。
Next, a third embodiment of the present invention will be described. FIG. 4 is a block diagram showing the hardware configuration of the power-off detection device according to the third embodiment, and FIG. 5 is a schematic flowchart showing the processing procedure at the start of the microcomputer in that case. As can be easily understood by comparing FIGS. 1 and 4, a shift register 9 is adopted in place of the flip-flop 8 in the third embodiment. The flowchart of FIG. 5 is different only in that steps 106 and 212 of FIG. 3 are changed to steps 306 and 312, respectively. Flip-flops are high (H) or low (L) judgments, so if you have some knowledge,
The flip-flop can be externally changed to the set state by a malicious operation, and the microcomputer 2 can be erroneously determined. Therefore, by writing and reading specific data composed of a plurality of bits in the shift register 9, the security against such malicious operation is improved. As the data in the register, for example, if a different code such as the serial number of the device is used for each device, the protection will be further ensured. A RAM having a certain number of bits may be used instead of the shift register.

【0024】最後に、第4の実施例について説明する。
以上の第1、第2及び第3の実施例においては、電源の
OFF−ON又はリセットスイッチ操作によりマイコン
2がリセットされたことにより起動される構成となって
いる。そのため、電源切断検知は行ったもののマイコン
の保持時間が長くてリセットがかからない場合には、処
理が実行されない。そのため、図6に示すように、メイ
ンルーチンにおいて所定の周期で電源切断検出信号(第
1及び第2の実施例でいえばフリップフロップ8の出力
信号)を監視し(ステップ402)、電源切断が検出さ
れた場合にはマイコンがソフトウェアリセットを発行す
るようにする(ステップ404)。こうすることで、電
源切断の検出がさらに確実となる。
Finally, a fourth embodiment will be described.
The first, second, and third embodiments described above are configured to be activated when the microcomputer 2 is reset by turning the power OFF-ON or operating the reset switch. Therefore, if the power-off detection is performed but the microcomputer is held for a long time and is not reset, the process is not executed. Therefore, as shown in FIG. 6, the power-off detection signal (the output signal of the flip-flop 8 in the first and second embodiments) is monitored at a predetermined cycle in the main routine (step 402), and the power-off is detected. If detected, the microcomputer issues a software reset (step 404). By doing so, the detection of power supply disconnection becomes more reliable.

【0025】以上、本発明の実施例について述べてきた
が、もちろん本発明はこれに限定されるものではなく、
様々な実施例を案出することは当業者にとって容易なこ
とであろう。
Although the embodiment of the present invention has been described above, the present invention is not limited to this, of course.
It will be easy for one skilled in the art to devise various embodiments.

【0026】[0026]

【発明の効果】以上説明したように、本発明によれば、
上記したような電源切断記憶部を設けることにより、セ
キュリティ機構付きの機器における電源切断状態の発生
を確実に検出することが可能な電源切断検出装置が提供
される。さらに、不揮発性メモリにセキュリティ処理実
行結果を格納した後、電源切断記憶部に所定のデータを
セットするように構成することにより、スタート時にお
ける判定後にリセットスイッチ操作が行われても誤判定
をすることがなくなる。また、電源切断記憶部を複数の
ビットからなるように構成して複雑化することにより、
悪意の操作に対するセキュリティ性が向上する。すなわ
ち、盗難製品を改造してセキュリティを解除することが
できなくなる。また、マイクロコンピュータが、電源切
断記憶部の記憶内容が破壊されているかを所定の周期で
監視し、破壊されている場合にソフトウェアリセットを
発行するようにすることにより、瞬時的な電源切断でマ
イコンにリセットがかからない場合でも、確実に電源切
断の発生を検出することができるようになる。すなわ
ち、電源の瞬断により、メモリ内容は破壊されたが、マ
イコンにはリセットがかからなかったというような事態
を回避することが可能となる。
As described above, according to the present invention,
By providing the power-off storage unit as described above, it is possible to provide a power-off detection device capable of reliably detecting the occurrence of a power-off state in a device with a security mechanism. Further, by storing the security process execution result in the non-volatile memory and then setting the predetermined data in the power-off storage unit, an erroneous determination is made even if the reset switch operation is performed after the determination at the start. Will disappear. Also, by configuring the power-off storage unit to be composed of a plurality of bits and making it complicated,
Security against malicious operations is improved. That is, it becomes impossible to modify the stolen product and release the security. In addition, the microcomputer monitors whether the stored contents of the power-off storage unit is destroyed at a predetermined cycle and issues a software reset when the contents are destroyed, so that the microcomputer can be powered off instantaneously. Even if the power supply is not reset, it is possible to reliably detect the occurrence of the power cut. That is, it is possible to avoid a situation in which the contents of the memory are destroyed by a momentary power failure, but the microcomputer is not reset.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施例に係る電源切断検出装置
のハードウェア構成を示すブロック図である。
FIG. 1 is a block diagram showing a hardware configuration of a power disconnection detection device according to a first embodiment of the present invention.

【図2】本発明の第1の実施例におけるマイコンのスタ
ート時の処理手順を示す概略フローチャートである。
FIG. 2 is a schematic flow chart showing a processing procedure at the time of starting the microcomputer in the first embodiment of the present invention.

【図3】本発明の第2の実施例におけるマイコンのスタ
ート時の処理手順を示す概略フローチャートである。
FIG. 3 is a schematic flowchart showing a processing procedure at the time of starting the microcomputer in the second embodiment of the present invention.

【図4】本発明の第3の実施例に係る電源切断検出装置
のハードウェア構成を示すブロック図である。
FIG. 4 is a block diagram showing a hardware configuration of a power disconnection detection device according to a third embodiment of the present invention.

【図5】本発明の第3の実施例におけるマイコンのスタ
ート時の処理手順を示す概略フローチャートである。
FIG. 5 is a schematic flowchart showing a processing procedure at the time of starting the microcomputer in the third embodiment of the present invention.

【図6】本発明の第4の実施例におけるマイコンのメイ
ンルーチンの処理手順を示す概略フローチャートであ
る。
FIG. 6 is a schematic flowchart showing a processing procedure of a main routine of a microcomputer according to a fourth embodiment of the present invention.

【図7】従来の電源切断検出装置の一例を示すブロック
図である。
FIG. 7 is a block diagram showing an example of a conventional power disconnection detection device.

【図8】図7におけるマイコンのスタート時の処理手順
を示す概略フローチャートである。
8 is a schematic flowchart showing a processing procedure when the microcomputer in FIG. 7 is started.

【符号の説明】[Explanation of symbols]

1…電源と機器との接続部 2…マイクロコンピュータ(マイコン) 3…EEPROM 4…波形整形回路 5…遅延回路 6…5V生成回路 7…リセットスイッチ 8…フリップフロップ 9…シフトレジスタ VB…バッテリー電源 DESCRIPTION OF SYMBOLS 1 ... Connection part of power supply and equipment 2 ... Microcomputer (microcomputer) 3 ... EEPROM 4 ... Waveform shaping circuit 5 ... Delay circuit 6 ... 5V generation circuit 7 ... Reset switch 8 ... Flip-flop 9 ... Shift register VB ... Battery power supply

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 セキュリティ機構を備えた機器において
電源切断状態が発生したことを検出する装置であって、 当該機器への電源供給が遮断されると記憶内容が破壊さ
れる電源切断記憶部と、 リセットスタート時に、前記電源切断記憶部の記憶内容
が破壊されている場合に、電源切断があったと判定し
て、所定のセキュリティ処理を実行するマイクロコンピ
ュータと、 を具備することを特徴とする、セキュリティ機構付き機
器における電源切断検出装置。
1. A device for detecting that a power-off state has occurred in a device having a security mechanism, the power-off storage unit destroying stored contents when power supply to the device is cut off, When the contents of the power-off storage unit are destroyed at the time of reset start, it is determined that the power has been turned off, and a microcomputer that executes a predetermined security process is provided. Power disconnection detection device for equipment with mechanism.
【請求項2】 不揮発性メモリをさらに具備し、前記マ
イクロコンピュータは、前記所定のセキュリティ処理実
行結果を前記不揮発性メモリに格納した後、前記電源切
断記憶部に所定のデータをセットすることを特徴とす
る、請求項1に記載のセキュリティ機構付き機器におけ
る電源切断検出装置。
2. A non-volatile memory is further provided, and the microcomputer sets the predetermined data in the power-off storage unit after storing the predetermined security processing execution result in the non-volatile memory. The power cut detection device in the device with a security mechanism according to claim 1.
【請求項3】 前記電源切断記憶部は、複数のビットか
らなることを特徴とする、請求項1又は請求項2に記載
のセキュリティ機構付き機器における電源切断検出装
置。
3. The power cut detection device in a device with a security mechanism according to claim 1, wherein the power cut storage unit includes a plurality of bits.
【請求項4】 前記マイクロコンピュータは、前記電源
切断記憶部の記憶内容が破壊されているかを所定の周期
で監視し、破壊されている場合にソフトウェアリセット
を発行することを特徴とする、請求項1から請求項3ま
でのいずれか1項に記載のセキュリティ機構付き機器に
おける電源切断検出装置。
4. The microcomputer monitors the contents stored in the power-off storage unit for destruction at predetermined intervals, and issues a software reset when the contents are destroyed. The power-off detection device in a device with a security mechanism according to any one of claims 1 to 3.
JP21735094A 1994-09-12 1994-09-12 Power-off detection device for equipment with security mechanism Expired - Lifetime JP3722500B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21735094A JP3722500B2 (en) 1994-09-12 1994-09-12 Power-off detection device for equipment with security mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21735094A JP3722500B2 (en) 1994-09-12 1994-09-12 Power-off detection device for equipment with security mechanism

Publications (2)

Publication Number Publication Date
JPH0880810A true JPH0880810A (en) 1996-03-26
JP3722500B2 JP3722500B2 (en) 2005-11-30

Family

ID=16702801

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21735094A Expired - Lifetime JP3722500B2 (en) 1994-09-12 1994-09-12 Power-off detection device for equipment with security mechanism

Country Status (1)

Country Link
JP (1) JP3722500B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007508173A (en) * 2003-10-11 2007-04-05 プレー・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツング Switching device that detects voltage interruption
JP2010004374A (en) * 2008-06-20 2010-01-07 Fujitsu Microelectronics Ltd Power supply detecting circuit, and microcontroller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007508173A (en) * 2003-10-11 2007-04-05 プレー・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツング Switching device that detects voltage interruption
JP2010004374A (en) * 2008-06-20 2010-01-07 Fujitsu Microelectronics Ltd Power supply detecting circuit, and microcontroller
US8190928B2 (en) 2008-06-20 2012-05-29 Fujitsu Semiconductor Limited Power-on detection circuit and microcontroller

Also Published As

Publication number Publication date
JP3722500B2 (en) 2005-11-30

Similar Documents

Publication Publication Date Title
US5966081A (en) Paging activated electronic security system
US8601536B2 (en) Bus monitor for enhancing SOC system security and realization method thereof
JP5705258B2 (en) Microcomputer and operation method thereof
KR20170131584A (en) Method for protecting configuration data from a data bus transceiver, data bus transceiver and data bus system
US5961622A (en) System and method for recovering a microprocessor from a locked bus state
JPH0880810A (en) Power cut-off detecting device in equipment with security mechanism
JP4812699B2 (en) Power control device
JPH08178976A (en) Power breakage detector
CN110766890A (en) Anti-shell-dismantling method and system for T-BOX controller, controller and vehicle
CN113806828B (en) Cover opening protection device and method
JPH09198258A (en) Task stack overflow detecting circuit
JP2000163274A (en) Electronic equipment and recording medium with rom data monitoring program recorded thereon
JPH11328045A (en) Initialization control system for dram device with battery backup function
JPH04256038A (en) Watchdog timer inspecting device
KR100288860B1 (en) Selectively called radio receiver and controlling method thereof
JP2002073375A (en) Software operation monitoring method in system that contains microcomputer
KR20130003976A (en) Electronic control power steering electronic control unit and running reset processing method using the same
JPH0844629A (en) Memory access abnormality monitoring device
JP3243687B2 (en) Hot swapping system
JP3298989B2 (en) Failure detection / automatic embedded device
JP3178129B2 (en) Memory backup protection device
JPH08185239A (en) Device and method for deciding actuation
KR200298474Y1 (en) Program protection device during flash memory update
JP2544536B2 (en) Method for determining the presence or absence of data in memory
JP2000181510A (en) Backup data protecting method for programmable controller, and programmable controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040921

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041110

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: 20050816

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050913

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120922

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120922

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130922

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140922

Year of fee payment: 9

EXPY Cancellation because of completion of term