JP2013003731A - Information processor, electronic circuit device, and data erasing method - Google Patents

Information processor, electronic circuit device, and data erasing method Download PDF

Info

Publication number
JP2013003731A
JP2013003731A JP2011132525A JP2011132525A JP2013003731A JP 2013003731 A JP2013003731 A JP 2013003731A JP 2011132525 A JP2011132525 A JP 2011132525A JP 2011132525 A JP2011132525 A JP 2011132525A JP 2013003731 A JP2013003731 A JP 2013003731A
Authority
JP
Japan
Prior art keywords
counting
value
change
clock
signal
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
JP2011132525A
Other languages
Japanese (ja)
Inventor
Masahiro Sano
正洋 佐野
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2011132525A priority Critical patent/JP2013003731A/en
Publication of JP2013003731A publication Critical patent/JP2013003731A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an electronic circuit device for enabling a user to perform analysis sufficiently as necessity arises while securing high security with respect to reverse engineering by IC opening by a third party.SOLUTION: The electronic circuit device includes: main storage means for storing data; first detecting means for detecting a change of clock frequencies; first count means for counting detected changes; first storage means for storing prescribed value set from outside; and output means for outputting an erasure signal for instructing erasure of data of the main storage means on the basis of the value counted by the first count means and value stored in the first storage means. Since changes occurring when the IC package is opened are detected from a change of clock frequencies, and reference value with respect to data erasure is set by a user, the user can select data erasure timing on the basis of a purpose of use.

Description

本発明は、情報処理装置、当該装置に含まれる電子回路装置及び当該電子回路装置を利用したデータ消去方法に関し、特に高いセキュリティ性を実現するデータ消去方法及び当該方法を実施するために用いられる電子回路装置並びに情報処理装置に関する。   The present invention relates to an information processing device, an electronic circuit device included in the device, and a data erasing method using the electronic circuit device, and in particular, a data erasing method that realizes high security and an electronic device used to implement the method. The present invention relates to a circuit device and an information processing device.

高いセキュリティ性が求められるアプリケーションに関して、その高セキュリティを保つためには、そのアプリケーションを実行する情報処理装置自身(例えば、マイクロコンピュータ)についても、より高いセキュリティ性が求められる。   For an application that requires high security, in order to maintain the high security, the information processing apparatus itself (for example, a microcomputer) that executes the application is also required to have higher security.

情報処理装置自身が有するセキュリティ機能には、例えば、オンチップデバッグにおいて、セキュリティIDの認証を失敗した時にフラッシュメモリのデータを消去する機能やセキュリティコマンドを設定する機能が挙げられる。   The security function of the information processing apparatus itself includes, for example, a function for erasing data in the flash memory when security ID authentication fails and a function for setting a security command in on-chip debugging.

しかしながら、第三者がIC開封によるリバースエンジニアリングを行う事により、内蔵フラッシュROMのデータが読み出されてしまうというケースが想定される。このような手法を考慮すると、前述のセキュリティ機能は、十分なセキュリティを確保しているとは言えない。従って、IC開封によるリバースエンジニアリングに対しても、第三者によりフラッシュROMのデータを不正に読み出されて秘密データを悪用されるといった事態を未然に防ぐことができるセキュリティ機能が求められる。   However, it is assumed that the data in the built-in flash ROM is read by a third party performing reverse engineering by opening the IC. Considering such a method, it cannot be said that the above-described security function ensures sufficient security. Therefore, even for reverse engineering by opening the IC, a security function is required that can prevent a situation in which the data in the flash ROM is illegally read by a third party and the secret data is misused.

そこで、電子データ処理システム用の集積回路チップの保護メモリ内に記憶された秘密データをリバースエンジニアリングにより解析することを防止する手法として、特許文献1に記載の技術が公開されている。   Therefore, as a technique for preventing the secret data stored in the protection memory of the integrated circuit chip for the electronic data processing system from being analyzed by reverse engineering, the technique described in Patent Document 1 is disclosed.

特許文献1に記載された集積回路チップは、秘密データを記憶する揮発性メモリと、チップをカプセル封じする材料の不透明層と、カプセル封じ材料によってカプセル封じされ且つ揮発性メモリに結合された保護回路を具備し、当該保護回路は、光にさらされる際に検知可能な変化をする電流特性を持つ光感知素子と、その光感知素子が光にさらされるときに生じる電流の変化を検知するための検知手段と、当該検知手段で電流の変化が検知された場合に揮発性メモリへの電力供給を切断するスイッチ手段と、から構成される。   An integrated circuit chip described in Patent Document 1 includes a volatile memory that stores secret data, an opaque layer of material that encapsulates the chip, and a protection circuit that is encapsulated by the encapsulation material and coupled to the volatile memory And a protection circuit for detecting a change in current that occurs when the light-sensitive element is exposed to light, and a light-sensitive element having a current characteristic that changes when the light-sensitive element is exposed to light. The detecting means and switching means for cutting off the power supply to the volatile memory when a change in current is detected by the detecting means.

当該構成によれば、カプセル封じ材料がチップから除去された場合、揮発性メモリと電源との結合が解除されて揮発性メモリ内の秘密データが消去される。従って、第三者のIC開封によるリバースエンジニアリングに対しても高いセキュリティ機能を実現することができる。   According to this configuration, when the encapsulating material is removed from the chip, the coupling between the volatile memory and the power source is released, and the secret data in the volatile memory is erased. Accordingly, it is possible to realize a high security function against reverse engineering by opening a third party's IC.

特開平4−258892号公報Japanese Patent Laid-Open No. 4-258882

製品に不具合が発生した場合には、ユーザは、その不具合の原因を特定するためにICを開封してIC内部の回路の動作を詳しく調査・検証する必要がある。その際には、メモリに格納された情報に関連する調査・検証も行われる。   When a defect occurs in the product, the user needs to unseal the IC and to investigate and verify the operation of the circuit inside the IC in detail in order to identify the cause of the defect. At that time, investigation / verification related to information stored in the memory is also performed.

しかしながら、上記の特許文献1に記載の技術を導入していると、ユーザは、メモリの情報が消去されないように、光の照射が全くない環境で、ICの開封作業、及び、不具合の原因を特定するための様々な調査・検証を行わなければならない。   However, when the technique described in Patent Document 1 is introduced, the user can open the IC and perform the cause of the malfunction in an environment where there is no light irradiation so that the information in the memory is not erased. Various investigations and verifications for identification must be conducted.

すなわち、ユーザが、ユーザ自身の製品を解析する場合にも、解析環境に厳しい条件を課すことになってしまい、解析作業の効率の著しい低下を招くだけでなく、十分な解析すらできないという状況が生じていた。   That is, even when the user analyzes his / her own product, severe conditions are imposed on the analysis environment, which not only significantly reduces the efficiency of the analysis work but also does not allow sufficient analysis. It was happening.

本発明の電子回路装置は、データを記憶する主記憶部と、クロック周波数の変化を検出する第1検出部と、前記検出された変化を計数する第1計数部と、外部より設定される所定の値を記憶する第1記憶部と、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とに基づいて前記主記憶部のデータを消去することを指示する消去信号を出力する出力部と、を具備する。   An electronic circuit device according to the present invention includes a main storage unit that stores data, a first detection unit that detects a change in clock frequency, a first counting unit that counts the detected change, and a predetermined externally set value. Instructing to erase the data in the main storage unit based on the first storage unit that stores the value of the first storage unit, the value counted by the first counting unit and the value stored in the first storage unit An output unit for outputting an erasing signal.

上記構成とすることにより、第三者からのIC開封に対しては高いセキュリティを保ちつつ、ユーザ自身からのIC開封に対しては適切に解析作業を行える環境を提供することができる。   With the above-described configuration, it is possible to provide an environment in which an analysis operation can be appropriately performed with respect to IC opening from the user while maintaining high security against IC opening from a third party.

また、本発明の情報処理装置は、データを記憶する主記憶部と、演算処理を行う処理部と、第1の周波数を有する第1クロック信号を出力する第1発振部と、第2の周波数を有する第2クロック信号を出力する第2発振部と、前記第1クロック信号及び前記第2クロック信号に基づいて前記第1クロック信号の周波数の変化を検出する検出部と、前記検出された変化を計数する計数部と、外部より設定される所定の値を記憶する記憶部と、前記計数部で計数された値と前記記憶部に記憶されている値とに基づいて消去信号を出力する出力部と、前記消去信号に基づいて前記主記憶部に記憶されているデータを消去する消去部と、を具備する。   The information processing apparatus according to the present invention includes a main storage unit that stores data, a processing unit that performs arithmetic processing, a first oscillation unit that outputs a first clock signal having a first frequency, and a second frequency. A second oscillation unit that outputs a second clock signal, a detection unit that detects a change in frequency of the first clock signal based on the first clock signal and the second clock signal, and the detected change An output for outputting an erasure signal based on a value counted by the counting unit and a value stored in the storage unit And an erasure unit for erasing data stored in the main storage unit based on the erasure signal.

上記構成とすることにより、第三者からのIC開封に対しては高いセキュリティを保ちつつ、ユーザ自身からのIC開封に対しては適切に解析作業を行える環境を提供することができる。   With the above-described configuration, it is possible to provide an environment in which an analysis operation can be appropriately performed with respect to IC opening from the user while maintaining high security against IC opening from a third party.

また、本発明のデータ消去方法は、外部より設定される所定の値を記憶部に記憶する記憶ステップと、クロック周波数の変化を検出する検出ステップと、前記検出された変化を計数する計数ステップと、前記計数ステップで計数された値と前記記憶ステップで記憶された値とに基づいて消去信号を出力する出力ステップと、前記消去信号に基づいてデータを消去する消去ステップと、を有する。   The data erasing method of the present invention includes a storage step of storing a predetermined value set from the outside in a storage unit, a detection step of detecting a change in clock frequency, and a counting step of counting the detected change. And an output step for outputting an erase signal based on the value counted in the counting step and the value stored in the storage step, and an erase step for erasing data based on the erase signal.

上記方法によりデータが消去されることで、ユーザ自身からのIC開封に対しては適切に解析作業を行える環境を担保しつつ、第三者からのIC開封に対しては高いセキュリティを保つことが可能となる。   By erasing data by the above method, it is possible to maintain a high security against opening an IC from a third party while ensuring an environment in which an analysis operation can be appropriately performed for an IC opening from the user himself / herself. It becomes possible.

本発明によれば、第三者のリバースエンジニアリングに対して高いセキュリティ機能を実現しつつ、必要に応じてユーザ自身が適切に解析作業を実施できる装置及び方法を提供することができる。   According to the present invention, it is possible to provide an apparatus and a method by which a user himself can appropriately perform an analysis work as necessary while realizing a high security function against third party reverse engineering.

本発明の実施の形態1に係る情報処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the information processing apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る情報処理装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the information processing apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る情報処理装置の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the information processing apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係る電子回路装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the electronic circuit apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係る電子回路装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the electronic circuit apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る情報処理装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the information processing apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る電子回路装置の別の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of another form of the electronic circuit apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態4に係る電子回路装置に含まれる時間計測用タイマの構成例を示すブロック図である。It is a block diagram which shows the structural example of the timer for time measurement contained in the electronic circuit apparatus which concerns on Embodiment 4 of this invention.

(実施の形態1)
以下、図面を参照して本発明の実施の形態について説明する。
(Embodiment 1)
Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施の形態1に係る情報処理装置(マイクロコンピュータ100)のブロック図である。   FIG. 1 is a block diagram of an information processing apparatus (microcomputer 100) according to Embodiment 1 of the present invention.

マイクロコンピュータ100は、主に、内蔵発振クロック変化検出器101、内蔵発振器140、サブ内蔵発振器150、CPUコア160、フラッシュメモリ170、内部バス180、及び周辺ハードウェア190から構成される。   The microcomputer 100 mainly includes a built-in oscillation clock change detector 101, a built-in oscillator 140, a sub built-in oscillator 150, a CPU core 160, a flash memory 170, an internal bus 180, and peripheral hardware 190.

内蔵発振器140は、基準クロックを生成し、CPUコア160にCPUクロックを、メモリーコントローラ等の周辺ハードウェア190に周辺ハードウェアクロックを、内蔵発振クロック変化検出器101に内蔵発振クロックをそれぞれ供給する第1の発振器である。   The built-in oscillator 140 generates a reference clock and supplies the CPU clock to the CPU core 160, the peripheral hardware clock to the peripheral hardware 190 such as a memory controller, and the built-in oscillation clock to the built-in oscillation clock change detector 101. 1 oscillator.

サブ内蔵発振器150は、内蔵発振クロックとは異なる周波数のクロック信号であるベースクロックを内蔵発振クロック変化検出器101に供給する。   The sub built-in oscillator 150 supplies a base clock, which is a clock signal having a frequency different from that of the built-in oscillation clock, to the built-in oscillation clock change detector 101.

CPUコア160は、プログラムに従って演算処理を行う処理部である。   The CPU core 160 is a processing unit that performs arithmetic processing according to a program.

フラッシュメモリ170は、マイクロコンピュータ100のメインメモリであり、プログラムやデータを一時記憶する主記憶部である。   The flash memory 170 is a main memory of the microcomputer 100, and is a main storage unit that temporarily stores programs and data.

内部バス180は、マイクロコンピュータ内部の各ブロックを接続する経路である。ユーザは、内部バス180を通じて後述する変化回数期待値レジスタにアクセスし、所定の値を記憶させておくことができる。   The internal bus 180 is a path connecting each block inside the microcomputer. The user can access a change number expected value register, which will be described later, through the internal bus 180 and store a predetermined value.

周辺ハードウェア190は、例えばメモリーコントローラや割り込みコントローラなどであり、内蔵発振器140から出力された周辺ハードウェアクロックに従って動作する。   The peripheral hardware 190 is, for example, a memory controller or an interrupt controller, and operates according to the peripheral hardware clock output from the built-in oscillator 140.

内蔵発振クロック変化検出器101は、さらに、クロック不一致検出部110と、期待変化回数比較部120とから構成される電子回路装置である。   The built-in oscillation clock change detector 101 is an electronic circuit device that further includes a clock mismatch detection unit 110 and an expected change number comparison unit 120.

クロック不一致検出部110は、IC開封時に生じる内蔵発振クロックの変化を検出する検出部である。期待変化回数比較部120は、クロック不一致検出部110で検出された上記の変化をカウントする変化回数カウンタ121でカウントされた値と変化回数期待値レジスタ122に記憶されている値とに基づいて消去信号を出力する出力部である。以下、各部について詳細に説明する。   The clock mismatch detection unit 110 is a detection unit that detects a change in the internal oscillation clock that occurs when the IC is opened. The expected change count comparison unit 120 erases based on the value counted by the change count counter 121 that counts the change detected by the clock mismatch detection unit 110 and the value stored in the expected change count value register 122. It is an output part which outputs a signal. Hereinafter, each part will be described in detail.

クロック不一致検出部110は、内蔵発振クロックハイ/ロウ幅カウンタ111と、ハイ/ロウ幅期待値レジスタ112と、第2比較器113と、から構成される。   The clock mismatch detection unit 110 includes a built-in oscillation clock high / low width counter 111, a high / low width expected value register 112, and a second comparator 113.

内蔵発振クロックハイ/ロウ幅カウンタ111は、内蔵発振器140から出力される内蔵発振クロックのハイ/ロウレベル期間をカウントする。具体的には、第1の発信器である内蔵発振器140から出力される内蔵発振クロックのハイ/ロウレベル期間を、第2の発振器であるサブ内蔵発振器150から出力されるベースクロックを用いてカウントする。   The internal oscillation clock high / low width counter 111 counts the high / low level period of the internal oscillation clock output from the internal oscillator 140. Specifically, the high / low level period of the internal oscillation clock output from the internal oscillator 140 as the first oscillator is counted using the base clock output from the sub internal oscillator 150 as the second oscillator. .

ハイ/ロウ幅期待値レジスタ112は、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされるハイ/ロウレベル期間の期待値を記憶する。   The high / low width expected value register 112 stores the expected value of the high / low level period counted by the internal oscillation clock high / low width counter 111.

第2比較器113は、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされる値と、ハイ/ロウ幅期待値レジスタ112に記憶されている値とを常時比較する。比較の結果、これらの2つの値が不一致となった場合に、第2比較器113は不一致信号を後述する変化回数カウンタ121に出力する。不一致信号は、クロック周波数に変化が生じたことを示す信号である。例えば、ハイ/ロウ幅期待値レジスタ112に期待値として"7"の値を設定している場合であって、内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値が"5"であった場合、両者の値は不一致となるので、クロック周波数が変化したとして不一致信号が出力される。当該不一致信号に基づいて、変化回数カウンタ121がインクリメントされる。なお、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされた値は、第2比較器113における比較処理が行われる毎にクリアされる。   The second comparator 113 constantly compares the value counted by the built-in oscillation clock high / low width counter 111 with the value stored in the high / low width expected value register 112. When these two values do not match as a result of the comparison, the second comparator 113 outputs a mismatch signal to the change counter 121 described later. The mismatch signal is a signal indicating that a change has occurred in the clock frequency. For example, when a value “7” is set as an expected value in the high / low width expected value register 112 and the count value of the internal oscillation clock high / low width counter 111 is “5”, Since the two values do not match, a mismatch signal is output assuming that the clock frequency has changed. Based on the mismatch signal, the change counter 121 is incremented. The value counted by the built-in oscillation clock high / low width counter 111 is cleared every time the comparison process is performed in the second comparator 113.

ここで、ハイ/ロウ幅期待値レジスタ112は、内部バス180を介してアクセス可能な構成となっており、ユーザは、任意に期待値を設定することができる。なお、マイクロコンピュータ100の動作保証温度範囲内での温度依存による内蔵発振クロック変動を考慮し、設定する期待値に一定のマージンを与えておくことが好ましい。このように設定することで、IC開封によって生じる応力の変化に依存するクロック変動と温度依存によるクロック変動とを区別することができる。例えば、動作保証温度範囲内での温度依存により生じる内蔵発振クロック変動により、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされる値に±1程度の誤差が生じる場合には、ハイ/ロウ幅期待値カウンタに当該誤差を考慮した一定の範囲の値を設定しておくとよい。ハイ/ロウ幅期待値レジスタ112に"6"、"7"、"8"の3つの値を設定しておけば、温度依存による内蔵発振クロック変動が生じても不一致信号は出力されない。   Here, the high / low width expected value register 112 is configured to be accessible via the internal bus 180, and the user can arbitrarily set the expected value. It is preferable to give a certain margin to the expected value to be set in consideration of fluctuations in the internal oscillation clock due to temperature dependence within the guaranteed operating temperature range of the microcomputer 100. By setting in this way, it is possible to distinguish between clock fluctuations depending on stress changes caused by opening the IC and clock fluctuations due to temperature dependence. For example, if an error of about ± 1 occurs in the value counted by the internal oscillation clock high / low width counter 111 due to fluctuations in the internal oscillation clock caused by temperature dependence within the guaranteed operating temperature range, high / low width expectation is expected. It is advisable to set a value within a certain range in consideration of the error in the value counter. If three values “6”, “7”, and “8” are set in the high / low width expected value register 112, a mismatch signal is not output even if the internal oscillation clock fluctuation due to temperature dependence occurs.

期待変化回数比較部120は、変化回数カウンタ121と、変化回数期待値レジスタ122と、第1比較器123と、から構成される。   The expected change count comparison unit 120 includes a change count counter 121, a change count expected value register 122, and a first comparator 123.

変化回数カウンタ121は、上述した不一致信号を入力し、当該不一致信号に基づいてカウンタの値をインクリメントして記憶する。   The number-of-changes counter 121 receives the above-described mismatch signal and increments and stores the counter value based on the mismatch signal.

変化回数期待値レジスタ122は、所定の値を記憶している。また、変化回数期待値レジスタ122は、内部バス18を介してアクセス可能となっており、ユーザは記憶させておく値を任意に設定することができる。変化回数期待値レジスタ122に記憶される所定の値は、第1比較器123で行われる比較処理において比較の基準となる基準値であり、使用目的に応じて外部から設定可能な構成となっている。   The change count expected value register 122 stores a predetermined value. The change count expected value register 122 is accessible via the internal bus 18, and the user can arbitrarily set a value to be stored. The predetermined value stored in the expected number-of-changes register 122 is a reference value used as a reference for comparison in the comparison process performed by the first comparator 123, and can be set from the outside according to the purpose of use. Yes.

第1比較器123は、変化回数カウンタ121でカウントされた値と変化回数期待値レジスタ122に記憶されている値とを比較する。第1比較器123は、比較の結果、変化回数カウンタ121にカウントされた値が、変化回数期待値レジスタ122に記憶されている値と一致した場合には、一致信号を生成して出力する。当該一致信号は、フラッシュメモリ170のデータを消去するトリガとなる消去信号である。当該一致信号が出力されることにより、図示せぬ消去部がフラッシュメモリ内のデータを消去する。消去部における消去方法としては、上記一致信号に基づいてフラッシュメモリへの給電を断つスイッチ部を設けることにより消去しても良いし、上記一致信号に基づいてセルフプログラミングフラッシュ消去コマンドを実行する消去コマンド実行部を設けることにより消去してもよい。   The first comparator 123 compares the value counted by the change count counter 121 with the value stored in the change count expected value register 122. The first comparator 123 generates and outputs a coincidence signal when the value counted by the change count counter 121 matches the value stored in the expected change count register 122 as a result of the comparison. The coincidence signal is an erase signal that serves as a trigger for erasing data in the flash memory 170. By outputting the coincidence signal, an erasing unit (not shown) erases data in the flash memory. As an erasing method in the erasing unit, erasing may be performed by providing a switch unit that cuts off power to the flash memory based on the coincidence signal, or an erasing command that executes a self-programming flash erasing command based on the coincidence signal You may delete by providing an execution part.

次に、図1に記載されたマイクロコンピュータ100の動作について説明する。図2は、マイクロコンピュータ100の動作に関するフローチャートである。   Next, the operation of the microcomputer 100 described in FIG. 1 will be described. FIG. 2 is a flowchart regarding the operation of the microcomputer 100.

まず、第2比較器113が、ユーザが任意に設定したハイ/ロウ幅期待値レジスタ112のハイ/ロウ幅期待値と、現在の内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値、すなわち、内蔵発振クロックのハイ/ロウレベル期間をカウントした値と、を比較する(ステップS101)。   First, the second comparator 113 sets the expected high / low width value of the high / low width expected value register 112 arbitrarily set by the user and the count value of the current internal oscillation clock high / low width counter 111, that is, the internal The value obtained by counting the high / low level period of the oscillation clock is compared (step S101).

第2比較器113は、ステップS101における比較の結果2つの値が不一致だった場合は、不一致信号を出力する。変化回数カウンタ121は、当該不一致信号が入力されるとカウンタの値を一回インクリメントしてカウント値を記憶する(ステップS102)。   The second comparator 113 outputs a mismatch signal when the two values do not match as a result of the comparison in step S101. When the mismatch signal is input, the change number counter 121 increments the counter value once and stores the count value (step S102).

第1比較器123は、ステップS102によってインクリメントされた変化回数カウンタ121のカウント値と、ユーザにより任意に設定された変化回数期待値レジスタ122に格納された値とを比較する(ステップS103)。第1比較器123は、比較の結果、これら2つの値が一致した場合は一致信号を出力する。一方、これら2つの値が一致しなかった場合は、再び上記S101〜S103の処理が繰り返される。   The first comparator 123 compares the count value of the change count counter 121 incremented in step S102 with the value stored in the expected change count register 122 arbitrarily set by the user (step S103). The first comparator 123 outputs a coincidence signal when these two values coincide as a result of the comparison. On the other hand, if these two values do not match, the processes of S101 to S103 are repeated again.

上記一致信号に基づいてセルフ消去コマンドが実行され、フラッシュメモリ内のデータが消去される(ステップS104)。   A self-erase command is executed based on the coincidence signal, and data in the flash memory is erased (step S104).

次に、クロック不一致検出部110で行われる内蔵発振クロックの変動検出における、内蔵発振クロックのハイ/ロウ幅のカウント方法を図3のタイミングチャートを用いて説明する。   Next, a method of counting the high / low width of the internal oscillation clock in the fluctuation detection of the internal oscillation clock performed by the clock mismatch detection unit 110 will be described with reference to the timing chart of FIG.

CLKは、内蔵発振器140から出力される内蔵発振クロックを示しており、HCLKはそのハイ幅を、LCLKはそのロウ幅をそれぞれ分けて表記している。また、BCLKは、サブ内蔵発振器150から出力されるベースクロックを示している。また、ここでは、図1の内蔵発振クロックハイ/ロウ幅カウンタと不一致信号について、ハイ幅カウンタとロウ幅カウンタ及びハイ幅不一致信号とロウ幅不一致信号というようにハイ・ロウに関して個別に表記している。   CLK indicates a built-in oscillation clock output from the built-in oscillator 140, HCLK indicates a high width, and LCLK indicates a low width. BCLK indicates a base clock output from the sub built-in oscillator 150. In addition, here, the internal oscillation clock high / low width counter and the mismatch signal of FIG. 1 are individually described with respect to high and low, such as a high width counter, a low width counter, a high width mismatch signal, and a low width mismatch signal. Yes.

この例では、CLKのハイ幅及びロウ幅の両方ともBCLKを基準として5カウントされているため、ハイ幅カウンタ及びロウ幅カウンタのカウント値は共に"5"となる。一方、ハイ/ロウ幅期待値レジスタには"7"の値が記憶されているため、第2比較器113に含まれるハイ幅比較器及びロウ幅比較器は、ハイ幅不一致信号とロウ幅不一致信号をそれぞれ生成して変化回数カウンタへ出力する。変化回数期待値レジスタには予め値"M"が記憶されているため、変化回数カウンタの値がMに到達した場合にセルフプログラミング消去コマンド起動トリガとなる一致信号が出力される。   In this example, both the high width and the low width of CLK are counted with respect to BCLK, so the count values of the high width counter and the low width counter are both “5”. On the other hand, since the value “7” is stored in the high / low width expected value register, the high width comparator and the low width comparator included in the second comparator 113 are not matched with the high width mismatch signal. Each signal is generated and output to the change counter. Since the value “M” is stored in the change count expected value register in advance, when the value of the change count counter reaches M, a coincidence signal serving as a trigger for starting the self programming erase command is output.

なお、クロック不一致検出部110は、内蔵発振クロックのハイ幅とロウ幅の両方を個別にカウントする構成に限るものではない。クロック不一致検出部110は、どちらか片方をカウントして1つの不一致信号を生成しても良いし、ハイ/ロウの組の1周期を単位としてBCLKを用いてカウントして1つの不一致信号を生成する構成であっても良い。   Note that the clock mismatch detection unit 110 is not limited to a configuration that individually counts both the high width and the low width of the internal oscillation clock. The clock mismatch detection unit 110 may generate one mismatch signal by counting either one, or generate one mismatch signal by counting using BCLK in units of one cycle of a high / low pair. It may be configured to do so.

なお、内蔵発振クロックとベースクロックとが、加えられる応力や光の照射に対して同様のクロック変動をしてしまうと、内蔵発振クロックのカウントにおいて、常に同じ値をカウントしてしまい、内蔵発振クロックの変動を検出する事ができない。そこで、ベースクロック(BCLK)を出力するサブ内蔵発振器150は、コンデンサ、抵抗等の配置をメインの内蔵発振クロック(CLK)を出力する内蔵発振器140と異なる構成とし、クロックの変化の仕方に相違を持たせる。このように構成することで、ベースクロックもIC開封による応力の変化や光の照射によって変動するが、内蔵発振クロックとは周波数変動特性が異なる為、内蔵発振クロックの変動を検出する事が可能となる。   Note that if the internal oscillation clock and the base clock undergo similar clock fluctuations due to applied stress or light irradiation, the internal oscillation clock always counts the same value, and the internal oscillation clock It is impossible to detect the fluctuation of Therefore, the sub built-in oscillator 150 that outputs the base clock (BCLK) has a different configuration from the built-in oscillator 140 that outputs the main built-in oscillation clock (CLK) in terms of the arrangement of capacitors, resistors, and the like. Give it. With this configuration, the base clock also fluctuates due to stress changes due to IC opening and light irradiation. However, since the frequency fluctuation characteristics are different from the internal oscillation clock, it is possible to detect fluctuations in the internal oscillation clock. Become.

以上説明したように、本実施の形態1に係る情報処理装置は、データを記憶する主記憶部であるフラッシュメモリ、演算処理を行う処理部であるCPUコア、第1の周波数を有する第1クロック信号を出力する第1発振部である内蔵発振器、といった情報処理装置の基本構成に加え、次の構成要素を有している。すなわち、第2の周波数を有する第2クロック信号を出力する第2発振部と、前記第1クロック信号及び前記第2クロック信号に基づいて前記第1クロック信号の周波数の変化を検出する検出部と、前記検出された変化を計数する計数部と、外部より設定される所定の値を記憶する記憶部と、前記計数部で計数された値と前記記憶部に記憶されている値とに基づいて消去信号を出力する出力部と、前記消去信号に基づいて前記主記憶部に記憶されているデータを消去する消去部と、を備えることを特徴としている。   As described above, the information processing apparatus according to the first embodiment includes a flash memory that is a main storage unit that stores data, a CPU core that is a processing unit that performs arithmetic processing, and a first clock having a first frequency. In addition to the basic configuration of the information processing apparatus such as a built-in oscillator that is a first oscillation unit that outputs a signal, it has the following components. A second oscillation unit that outputs a second clock signal having a second frequency; and a detection unit that detects a change in the frequency of the first clock signal based on the first clock signal and the second clock signal. Based on a counting unit that counts the detected change, a storage unit that stores a predetermined value set from the outside, a value counted by the counting unit, and a value stored in the storage unit An output unit that outputs an erase signal, and an erase unit that erases data stored in the main storage unit based on the erase signal are provided.

また、本実施の形態1に係る情報処理装置に含まれる電子回路装置は、データを記憶する主記憶部と、クロック周波数の変化を検出する第1検出部と、前記検出された変化を計数する第1計数部と、外部より設定される所定の値を記憶する第1記憶部と、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とに基づいて前記主記憶部のデータを消去することを指示する消去信号を出力する出力部と、を備える。   Further, the electronic circuit device included in the information processing apparatus according to the first embodiment counts the detected change, a main storage unit that stores data, a first detection unit that detects a change in clock frequency, and the detected change. Based on a first counting unit, a first storage unit that stores a predetermined value set from the outside, a value counted by the first counting unit, and a value stored in the first storage unit And an output unit that outputs an erasure signal instructing erasure of data in the main storage unit.

このように構成することで、ICパッケージが開封される場合に必然的に生じる応力や外光照射などをクロック周波数の変化で捉え、当該変化量とユーザが予め記憶させた値とが所定の条件を満たした場合に消去信号が出力される。従って、リバースエンジニアリングに対して高いセキュリティを保ちつつ、ユーザ自ら解析を行う場合は、消去信号が出力されないように記憶させる値を設定しておくことができる。   With such a configuration, a stress or an external light irradiation that is inevitably generated when the IC package is opened is captured by a change in the clock frequency, and the change amount and a value stored in advance by the user are set to a predetermined condition. When this is satisfied, an erasure signal is output. Therefore, when performing analysis by the user himself / herself while maintaining high security against reverse engineering, a value to be stored can be set so as not to output an erasure signal.

例えば、第三者からICを開封された時点で瞬間的に主記憶部に記憶されているデータを消去したい場合は、第1記憶部に記憶させる値を"1"に設定する。このように設定することで、IC開封による応力の変化に起因するクロックの変動が検出された場合、即座に主記憶部に記憶されているデータが消去される。一方、ユーザによる正当な解析作業によりICパッケージを開封する必要がある場合には、開封された瞬間にデータが消去されてしまう事を避けるために、第1記憶部に記憶させる値を非常に大きな値に設定する。このように、ユーザが必要に応じて第1記憶部の値を変更できる構成とすることでユーザの使用用途に応じて、データ消去のタイミングを変更することができる。   For example, when it is desired to erase the data stored in the main storage unit instantaneously when the IC is opened by a third party, the value stored in the first storage unit is set to “1”. By setting in this way, when a clock fluctuation due to a stress change due to IC opening is detected, the data stored in the main memory is immediately erased. On the other hand, when the IC package needs to be opened by a valid analysis operation by the user, the value stored in the first storage unit is very large in order to avoid erasing data at the moment of opening. Set to value. In this way, by adopting a configuration in which the user can change the value of the first storage unit as necessary, the data erasing timing can be changed according to the user's usage.

なお、前記出力部は、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とを比較する第1比較部を備え、前記第1比較部は、比較の結果、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とが一致した場合に消去信号を出力する構成とすることができる。このように構成することで比較的単純な電子回路で発明を実現することができる。   The output unit includes a first comparison unit that compares a value counted by the first counting unit with a value stored in the first storage unit, and the first comparison unit is a result of the comparison. The erasing signal may be output when the value counted by the first counting unit matches the value stored in the first storage unit. With this configuration, the invention can be realized with a relatively simple electronic circuit.

また、前記第1計数部は、前記検出部で検出された変化の回数を計数する構成とすることができる。検出されるクロック周波数の変化のうち、その変化の回数を計数する構成とすることで、比較的単純な電子回路で発明を実現することができる。   The first counting unit may be configured to count the number of changes detected by the detecting unit. By adopting a configuration that counts the number of changes in the detected clock frequency, the invention can be realized with a relatively simple electronic circuit.

また、前記検出部は、第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数部と、所定の期待値を記憶する第2記憶部と、前記第2計数部で計数された値と前記第2記憶部に記憶されている値とを比較する第2比較部と、を備え、前記第2比較部は、比較の結果、前記第2計数部で計数された値と前記第2記憶部に記憶されている値とが一致しない場合に前記クロック周波数が変化したことを示す信号を前記第1計数部に出力する構成とすることができる。このように周波数の異なる2つのクロック信号を用いることでクロック周波数の変動検出が容易となる。   In addition, the detection unit counts a high width or a low width of a clock signal having a first frequency using a clock signal having a second frequency, and stores a second expected value. A storage unit, and a second comparison unit that compares the value counted by the second counting unit with the value stored in the second storage unit, wherein the second comparison unit is a result of the comparison, When the value counted by the second counting unit and the value stored in the second storage unit do not match, a signal indicating that the clock frequency has changed is output to the first counting unit. be able to. By using two clock signals having different frequencies as described above, it is easy to detect fluctuations in the clock frequency.

また、前記情報処理装置の前記第1発振部及び前記第2発振部は、光が外部から照射された場合にそれぞれ異なる周波数変動特性を示すことを特徴としても良いし、外部から加えられる応力に対してそれぞれ異なる周波数変動特性を示すことを特徴としても良い。このように第1発振部と第2発振部とが所定の条件下において異なる発振特性を持つことで周波数変動を容易に検出することができる。このような周波数変動特性の差異は、第1発振部と第2発振部における抵抗やキャパシタや光感知素子等の配列や組み合わせに差異を持たせることで実現することができる。   In addition, the first oscillation unit and the second oscillation unit of the information processing apparatus may each have different frequency variation characteristics when light is irradiated from the outside, and the stress applied from outside On the other hand, different frequency fluctuation characteristics may be shown. As described above, since the first oscillation unit and the second oscillation unit have different oscillation characteristics under a predetermined condition, the frequency fluctuation can be easily detected. Such a difference in frequency variation characteristics can be realized by providing a difference in the arrangement and combination of resistors, capacitors, light sensing elements, and the like in the first oscillation unit and the second oscillation unit.

また、本実施の形態1に係るデータ消去方法は、外部より設定される所定の値を記憶部に記憶する記憶ステップと、クロック周波数の変化を検出する検出ステップと、前記検出された変化を計数する計数ステップと、前記計数ステップで計数された値と前記記憶ステップで記憶された値とに基づいて消去信号を出力する出力ステップと、前記消去信号に基づいて主記憶部に記憶されているデータを消去する消去ステップと、を有する。このような手順に従ってデータが消去される構成とすることで、使用目的に応じてデータの消去タイミングを変更することができる。   In addition, the data erasing method according to the first embodiment includes a storage step of storing a predetermined value set from the outside in the storage unit, a detection step of detecting a change in the clock frequency, and counting the detected change. A counting step, an output step for outputting an erasing signal based on the value counted in the counting step and a value stored in the storing step, and data stored in the main storage unit based on the erasing signal And an erasing step for erasing. By adopting a configuration in which data is erased according to such a procedure, the data erasure timing can be changed according to the purpose of use.

なお、上記説明では、変化回数カウンタ121は、クロック周波数の変化回数をカウントする構成を示したがこれに限るものではなく、クロック周波数の変化の量も含めてカウントしても良い。例えば、ハイ/ロウ幅期待値レジスタ112に記録されている値が"9"で、内蔵発振クロックハイ/ロウ幅カウンタ110のカウント値が"5"であった場合、第2比較器113は、これらの値の差異である"4"に対応する情報を不一致信号に含めて変化回数カウンタ121に出力し、変化回数カウンタ121で4回インクリメントされる構成であっても良い。   In the above description, the change count counter 121 is configured to count the number of changes in the clock frequency. However, the present invention is not limited to this, and may be counted including the amount of change in the clock frequency. For example, when the value recorded in the high / low width expected value register 112 is “9” and the count value of the internal oscillation clock high / low width counter 110 is “5”, the second comparator 113 The information corresponding to “4”, which is the difference between these values, may be included in the mismatch signal, output to the change counter 121, and incremented four times by the change counter 121.

なお、上記説明では変化回数期待値レジスタ122に記憶されている期待値と変化回数カウンタ121のカウント値が同一であった場合に一致信号を送信する場合について説明したが、これに限るものではない。例えば変化回数カウンタ121の値が変化回数期待値レジスタ122に記憶されている期待値を上回った場合に一致信号を出力する構成であっても良い。   In the above description, the case where the coincidence signal is transmitted when the expected value stored in the expected change number register 122 and the count value of the change counter 121 is the same has been described. However, the present invention is not limited to this. . For example, a configuration may be adopted in which a match signal is output when the value of the change count counter 121 exceeds the expected value stored in the change count expected value register 122.

(実施の形態2)
本実施の形態2に係る発明は、クロック周波数を時系列で比較することでクロック周波数の変化を検出し、第三者のリバースエンジニアリングを防止することを特徴としている。
(Embodiment 2)
The invention according to the second embodiment is characterized in that a change in the clock frequency is detected by comparing the clock frequency in time series, thereby preventing reverse engineering by a third party.

図4は、本実施の形態2に係る電子回路装置である内蔵発振クロック変化検出器201のブロック図である。なお、実施の形態1で説明したブロックと同一のブロックについては一部説明を省略する。   FIG. 4 is a block diagram of a built-in oscillation clock change detector 201 which is an electronic circuit device according to the second embodiment. Note that some of the same blocks as those described in Embodiment 1 are not described here.

本実施の形態2に係るクロック不一致検出部210は、内蔵発振クロックハイ/ロウ幅カウンタ111、タイマ211、ハイ/ロウ幅キャプチャレジスタ212、内蔵発振クロックハイ/ロウ幅現在値レジスタ213、内蔵発振クロックハイ/ロウ幅保持値レジスタ214、第2比較器215、から構成される。   The clock mismatch detection unit 210 according to the second embodiment includes a built-in oscillation clock high / low width counter 111, a timer 211, a high / low width capture register 212, a built-in oscillation clock high / low width current value register 213, and a built-in oscillation clock. A high / low width hold value register 214 and a second comparator 215 are included.

タイマ211は、予め設定されている時間経過毎にキャプチャトリガ信号を生成してハイ/ロウ幅キャプチャレジスタ212及び内蔵発振クロックハイ/ロウ幅現在値レジスタ213に出力する。   The timer 211 generates a capture trigger signal for every elapse of a preset time and outputs it to the high / low width capture register 212 and the internal oscillation clock high / low width current value register 213.

ハイ/ロウ幅キャプチャレジスタ212は、タイマから入力したキャプチャトリガ信号をトリガとして内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値をキャプチャし、キャプチャしたカウント値を内蔵発振クロックハイ/ロウ幅現在値レジスタ213へ出力する。   The high / low width capture register 212 uses the capture trigger signal input from the timer as a trigger to capture the count value of the internal oscillation clock high / low width counter 111, and the captured count value is stored in the internal oscillation clock high / low width current value register. To 213.

内蔵発振クロックハイ/ロウ幅現在値レジスタ213は、ハイ/ロウ幅キャプチャレジスタから出力されたカウント値を記憶する。また、タイマ211から入力したキャプチャトリガ信号をトリガとして、現在記憶しているカウント値を内蔵発振クロックハイ/ロウ幅保持値レジスタ214に出力し、ハイ/ロウ幅キャプチャレジスタ212から新たに出力されるカウント値を記憶する。   The internal oscillation clock high / low width current value register 213 stores the count value output from the high / low width capture register. Also, using the capture trigger signal input from the timer 211 as a trigger, the currently stored count value is output to the internal oscillation clock high / low width hold value register 214 and newly output from the high / low width capture register 212. Store the count value.

内蔵発振クロックハイ/ロウ幅保持値レジスタ214は、内蔵発振クロックハイ/ロウ幅現在値レジスタ213から出力されたカウント値を記憶する。   The internal oscillation clock high / low width holding value register 214 stores the count value output from the internal oscillation clock high / low width current value register 213.

第2比較器215は、内蔵発振クロックハイ/ロウ幅保持値レジスタ214と内蔵発振クロックハイ/ロウ幅現在値レジスタ213にそれぞれ記憶されている値を比較する。比較タイミングは、例えば、タイマ211で計測される所定の時間毎に比較を行う。当該比較の結果、これらの2つの値が異なる場合は、不一致信号を生成し、変化回数カウンタ121へ出力する。その後の動作は実施の形態1と同様であるため説明を省略する。   The second comparator 215 compares the values stored in the internal oscillation clock high / low width holding value register 214 and the internal oscillation clock high / low width current value register 213, respectively. For the comparison timing, for example, the comparison is performed every predetermined time measured by the timer 211. If these two values are different as a result of the comparison, a mismatch signal is generated and output to the change counter 121. Since the subsequent operation is the same as that of the first embodiment, description thereof is omitted.

以上の構成によれば、タイマに設定された所定の時間分異なる時刻におけるカウント値を比較できるため、時系列で比較した結果異なるカウント値が生じた場合に不一致信号を生成し、変化回数カウンタ122の値をインクリメントしていく。そして変化回数カウンタ122の値と変化回数期待値レジスタ122に記憶されている値とに基づいて消去信号が出力され、フラッシュメモリのデータを消去することができる。   According to the above configuration, the count values at different times set for the predetermined time set in the timer can be compared. Therefore, when different count values are generated as a result of time series comparison, a mismatch signal is generated, and the change counter 122 The value of is incremented. Then, an erase signal is output based on the value of the change count counter 122 and the value stored in the expected change count register 122, and the data in the flash memory can be erased.

すなわち、本実施の形態2に係る電子回路装置は、クロック周波数の変化を検出する検出部と、前記検出された変化を計数する第1計数部と、外部より設定される所定の値を記憶する第1記憶部と、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とに基づいて消去信号を出力する出力手段と、を備え、前記検出手段は、第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数部と、所定の時間を計測する時間計測部と、前記第2計数部で計数された値を記憶する第2記憶部と、前記第2記憶部で記憶された値と前記時間計測部で計測された所定の時間経過後に前記第2計数部で計数された値とを比較する第2比較部と、から構成され、前記第2比較部は、比較の結果、前記第2記憶部で記憶された値と前記時間計測部で計測された所定の時間経過後に前記第2計数部で計数された値とが一致しない場合に前記クロック周波数が変化したことを示す信号を前記第1計数部に出力することを特徴とする。   That is, the electronic circuit device according to the second embodiment stores a detection unit that detects a change in the clock frequency, a first counting unit that counts the detected change, and a predetermined value set from the outside. A first storage unit; and an output unit that outputs an erasure signal based on the value counted by the first counting unit and the value stored in the first storage unit. A second counting unit that counts a high width or a low width of a clock signal having a frequency of 1 using a clock signal having a second frequency, a time measuring unit that measures a predetermined time, and the second counting unit. The second storage unit that stores the counted value, the value stored in the second storage unit, and the value counted by the second counting unit after a predetermined time measured by the time measuring unit are compared. And a second comparison unit, wherein the second comparison unit is As a result of the comparison, the clock frequency has changed when the value stored in the second storage unit and the value counted by the second counting unit do not match after the lapse of a predetermined time measured by the time measuring unit A signal indicating this is output to the first counter.

また、本実施の形態2に係るデータ消去方法は、外部より設定される所定の値を記憶部に記憶する記憶ステップと、クロック信号のハイ幅又はロウ幅を計数する第1計数ステップと、所定の時間の計測を開始する時間計測ステップと、前記時間計測ステップで計測された所定の時間後にクロック信号のハイ幅又はロウ幅を計数する第2計数ステップと、前記第1計数ステップ及び前記第2計数ステップで計数された値を比較する比較ステップと、前記前記第1計数ステップで計数された値と前記第2ステップで計数された値が同一でない回数を計数する第3計数ステップと、前記記憶ステップで記憶した値と前記第3計数ステップで計数された値とに基づいて消去信号を出力する出力ステップと、前記消去信号に基づいてデータを消去する消去ステップと、を有する。   The data erasing method according to the second embodiment includes a storage step of storing a predetermined value set from the outside in the storage unit, a first counting step of counting the high width or low width of the clock signal, A time measurement step for starting the time measurement, a second count step for counting the high width or the low width of the clock signal after the predetermined time measured in the time measurement step, the first count step, and the second count A comparison step for comparing the values counted in the counting step, a third counting step for counting the number of times that the value counted in the first counting step and the value counted in the second step are not the same, and the storage An output step for outputting an erasure signal based on the value stored in the step and the value counted in the third counting step, and an erasure for erasing data based on the erasure signal. Has a step, a.

IC開封によるリバースエンジニアリングを行うと外光が電子回路装置に照射されるため内蔵発振クロックに変化を生じる。従って、開封前と開封後で内蔵発振クロックハイ/ロウ幅カウンタでカウントされる値が変化する。本実施の形態2の電子回路装置は、異なる時刻で得られたカウント値を比較することによりクロック変化を検出することができるため、応力を装置に与えずにICを開封することができたとしても開封前後で装置に照射される光の変化量に基づいてICが開封されたことを検出し、適切にデータを消去することができる。なお、ユーザ自らが解析のために開封する場合には、変化回数期待値レジスタに大きな値を設定しておけば、ICを開封しても第1比較器123から直ちに消去信号が出力されることがないため、適切に解析作業を行うことができる。   When reverse engineering is performed by opening the IC, external light is applied to the electronic circuit device, which causes a change in the internal oscillation clock. Accordingly, the value counted by the built-in oscillation clock high / low width counter changes before and after opening. Since the electronic circuit device according to the second embodiment can detect a clock change by comparing count values obtained at different times, the IC can be opened without applying stress to the device. In addition, it is possible to detect that the IC has been opened based on the amount of change in the light applied to the device before and after opening, and to erase the data appropriately. When the user himself opens for analysis, if a large value is set in the change count expected value register, an erase signal is immediately output from the first comparator 123 even if the IC is opened. Therefore, the analysis work can be performed appropriately.

なお、第2比較器215は、実施の形態1の場合と同様、動作保証温度範囲内での温度依存を考慮し、内蔵発振クロックハイ/ロウ幅保持値レジスタ214と内蔵発振クロックハイ/ロウ幅現在値レジスタ215にそれぞれ記憶されている値が、所定の誤差以上の差異がある場合に不一致信号を生成するよう構成しても良い。   As in the case of the first embodiment, the second comparator 215 considers the temperature dependence within the guaranteed operating temperature range, and the internal oscillation clock high / low width holding value register 214 and the internal oscillation clock high / low width. A configuration may be adopted in which a mismatch signal is generated when the values stored in the current value register 215 are different from each other by a predetermined error or more.

(実施の形態3)
本実施の形態3に係る電子回路装置は、実施の形態1で説明した応力による内蔵発振クロックの変化を検出する第1のクロック不一致検出部と、実施の形態2で説明した内蔵発振クロックの時系列変化を検出する第2のクロック不一致検出部を組み合わせた構成とすることを特徴とする。以下図面を用いて説明する。
(Embodiment 3)
The electronic circuit device according to the third embodiment includes the first clock mismatch detection unit that detects a change in the built-in oscillation clock due to the stress described in the first embodiment, and the built-in oscillation clock described in the second embodiment. The second clock mismatch detection unit for detecting a series change is combined. This will be described below with reference to the drawings.

図5は、本実施の形態3に係る内蔵発振クロック変化検出器301のブロック図である。なお、実施の形態1及び2で説明したブロックと同一のブロックについては一部説明を省略する。   FIG. 5 is a block diagram of the built-in oscillation clock change detector 301 according to the third embodiment. Note that some of the same blocks as those described in the first and second embodiments are not described.

本実施の形態3の内蔵発振クロック変化検出器301は、大きく分けて、第1クロック不一致検出部310と、期待変化回数比較部320と、第2クロック不一致検出部330と、から構成される。   The built-in oscillation clock change detector 301 of the third embodiment is roughly composed of a first clock mismatch detection unit 310, an expected change count comparison unit 320, and a second clock mismatch detection unit 330.

第1クロック不一致検出部310は、ICが開封された時の応力の変化により生じる内蔵発振クロックの最初の変動を検出する第1の検出部である。第2クロック不一致検出部330は、上記最初の変動が検出された場合、その最初の変動以降にIC開封後の光の照射により発生する内蔵発振クロックの変化を時系列的に検出する第2の検出部である。期待変化回数比較部320は、第1クロック不一致検出部310及び第2クロック不一致検出部330により検出された変動をカウントする。そして、当該カウントした値が予め設定された値と一致した場合に消去信号を出力する出力部である。以下、各ブロックについて詳細に説明する。   The first clock mismatch detection unit 310 is a first detection unit that detects a first fluctuation of the built-in oscillation clock caused by a change in stress when the IC is opened. When the first fluctuation is detected, the second clock mismatch detection unit 330 detects a change in the internal oscillation clock generated by irradiation of light after opening the IC after the first fluctuation in a time series. It is a detection unit. The expected change number comparison unit 320 counts fluctuations detected by the first clock mismatch detection unit 310 and the second clock mismatch detection unit 330. The output unit outputs an erasure signal when the counted value matches a preset value. Hereinafter, each block will be described in detail.

クロック不一致検出部310は、内蔵発振クロックハイ/ロウ幅カウンタ111と、ハイ/ロウ幅期待値レジスタ112と、第2比較器113と、ハイ/ロウ幅キャプチャレジスタ312と、から構成される。   The clock mismatch detection unit 310 includes a built-in oscillation clock high / low width counter 111, a high / low width expected value register 112, a second comparator 113, and a high / low width capture register 312.

内蔵発振クロックハイ/ロウ幅カウンタ111は、内蔵発振器から出力される内蔵発振クロックのハイ/ロウレベル期間を、サブ内蔵発振器から出力されるベースクロックを用いてカウントする。   The internal oscillation clock high / low width counter 111 counts the high / low level period of the internal oscillation clock output from the internal oscillator using the base clock output from the sub internal oscillator.

ハイ/ロウ幅期待値レジスタ112は、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされるハイ/ロウレベル期間の期待値を記憶する。内蔵発振クロックハイ/ロウ幅期待値レジスタ112は、外部より内部バス180を介してアクセス可能な構成となっており、ユーザは、任意に期待値を設定することができる。   The high / low width expected value register 112 stores the expected value of the high / low level period counted by the internal oscillation clock high / low width counter 111. The built-in oscillation clock high / low width expected value register 112 is configured to be accessible from the outside via the internal bus 180, and the user can arbitrarily set the expected value.

第2比較器113は、内蔵発振クロックハイ/ロウ幅カウンタ111でカウントされる値と、ハイ/ロウ幅期待値レジスタ112に記憶されている値とを常時比較する。比較の結果、これらの2つの値が不一致となった場合に、第2比較器113は第1の不一致信号を後述するハイ/ロウ幅キャプチャレジスタ312、タイマ331及び変化回数カウンタ321に出力する。   The second comparator 113 constantly compares the value counted by the built-in oscillation clock high / low width counter 111 with the value stored in the high / low width expected value register 112. If these two values do not match as a result of the comparison, the second comparator 113 outputs a first mismatch signal to a high / low width capture register 312, a timer 331, and a change counter 321 described later.

ハイ/ロウ幅キャプチャレジスタ312は、第2比較器113から出力される第1不一致信号又は後述のタイマ331から出力されるキャプチャトリガ信号をトリガとして内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値をキャプチャする。第1不一致信号に基づいてキャプチャされたカウント値は、後述の内蔵発振クロックハイ/ロウ幅保持値レジスタ334へ、キャプチャトリガ信号に基づいてキャプチャされた値は、後述の内蔵発振クロックハイ/ロウ幅現在値レジスタ333へそれぞれ出力される。   The high / low width capture register 312 uses the count value of the built-in oscillation clock high / low width counter 111 as a trigger triggered by the first mismatch signal output from the second comparator 113 or the capture trigger signal output from the timer 331 described later. To capture. The count value captured based on the first mismatch signal is stored in a later-described built-in oscillation clock high / low width holding value register 334, and the value captured based on the capture trigger signal is stored in a later-described built-in oscillation clock high / low width. Each is output to the current value register 333.

第2クロック不一致検出部330は、タイマ331と、内蔵発振クロックハイ/ロウ幅現在値レジスタ333と、内蔵発振クロックハイ/ロウ幅保持値レジスタ334と、第3比較器335と、から構成される。   The second clock mismatch detection unit 330 includes a timer 331, a built-in oscillation clock high / low width current value register 333, a built-in oscillation clock high / low width hold value register 334, and a third comparator 335. .

タイマ331は、第2比較器113から出力された第1不一致信号をトリガとして時間計測を開始し、予め設定されている時間経過後にキャプチャトリガ信号を生成してハイ/ロウ幅キャプチャレジスタ312に出力する。   The timer 331 starts time measurement using the first mismatch signal output from the second comparator 113 as a trigger, generates a capture trigger signal after a preset time, and outputs it to the high / low width capture register 312. To do.

内蔵発振クロックハイ/ロウ幅保持値レジスタ334は、ハイ/ロウ幅キャプチャレジスタ312が第1不一致信号をトリガとしてキャプチャした値を入力して記憶する。すなわち、ハイ/ロウ幅キャプチャレジスタ312は、第1不一致信号をトリガとして内蔵発振クロックハイ/ロウ幅カウンタ111からカウント値を取り込み、内蔵発振クロックハイ/ロウ幅保持値レジスタ334へ取り込んだカウント値を出力する。   The internal oscillation clock high / low width hold value register 334 receives and stores the value captured by the high / low width capture register 312 using the first mismatch signal as a trigger. That is, the high / low width capture register 312 takes the count value from the internal oscillation clock high / low width counter 111 using the first mismatch signal as a trigger, and the count value fetched into the internal oscillation clock high / low width hold value register 334. Output.

内蔵発振クロックハイ/ロウ幅現在値レジスタ333は、ハイ/ロウ幅キャプチャレジスタ312がキャプチャトリガ信号をトリガとしてキャプチャした値を入力して記憶する。すなわち、ハイ/ロウ幅キャプチャレジスタ312は、キャプチャトリガ信号をトリガとして内蔵発振クロックハイ/ロウ幅カウンタ111からカウント値を取り込み、内蔵発振クロックハイ/ロウ幅現在値レジスタ333へ取り込んだカウント値を出力する。   The internal oscillation clock high / low width current value register 333 receives and stores the value captured by the high / low width capture register 312 using the capture trigger signal as a trigger. That is, the high / low width capture register 312 receives the count value from the internal oscillation clock high / low width counter 111 using the capture trigger signal as a trigger, and outputs the count value acquired to the internal oscillation clock high / low width current value register 333. To do.

第3比較器335は、内蔵発振クロックハイ/ロウ幅保持値レジスタ334に記憶された値と、内蔵発振クロックハイ/ロウ幅現在値レジスタ333に記憶された値とを比較する。比較の結果、これらの2つの値が不一致となった場合に、第3比較器335は第2の不一致信号を出力する。第3比較器335より出力された第2不一致信号は、変化回数カウンタ321に入力される。   The third comparator 335 compares the value stored in the internal oscillation clock high / low width holding value register 334 with the value stored in the internal oscillation clock high / low width current value register 333. If these two values do not match as a result of the comparison, the third comparator 335 outputs a second mismatch signal. The second mismatch signal output from the third comparator 335 is input to the change counter 321.

期待変化回数比較部320は、変化回数カウンタ321と、変化回数期待値レジスタ122と、第1比較器123と、から構成される。   The expected change count comparison unit 320 includes a change count counter 321, an expected change count register 122, and a first comparator 123.

変化回数カウンタ321は、上述した第1不一致信号及び第2不一致信号を入力し、これらの信号が入力される度にカウンタの値をインクリメントして記憶する。   The change count counter 321 receives the first mismatch signal and the second mismatch signal described above, and increments and stores the value of the counter each time these signals are input.

変化回数期待値レジスタ122は、外部より設定される所定の値を記憶する。変化回数期待値レジスタ122は、内部バス180を介してアクセス可能となっており、ユーザは記憶させておく値を任意に設定することができる。   The expected change value register 122 stores a predetermined value set from the outside. The expected change number register 122 is accessible via the internal bus 180, and the user can arbitrarily set a value to be stored.

第1比較器123は、変化回数期待値レジスタ122に記憶されている値と変化回数カウンタ321に記憶されている値を比較する。第1比較器123は、比較の結果、変化回数カウンタ123に記憶されている値が変化回数期待値レジスタ122に記憶されている値と一致した場合は一致信号を生成して出力する。   The first comparator 123 compares the value stored in the change count expected value register 122 with the value stored in the change count counter 321. If the value stored in the change counter 123 matches the value stored in the expected change count register 122 as a result of the comparison, the first comparator 123 generates and outputs a match signal.

次に、本実施の形態に関する内蔵発振クロック変化検出器301の動作を図6のフローチャートを用いて説明する。なお、ステップS101〜S103は、図3に示すフローチャートのステップステップS101〜S103と同一であるため説明を省略する。   Next, the operation of the built-in oscillation clock change detector 301 according to this embodiment will be described with reference to the flowchart of FIG. Steps S101 to S103 are the same as steps S101 to S103 in the flowchart shown in FIG.

S103において、変化回数カウンタ321に記憶されている値と変化回数期待値レジスタ122に記憶されている値とが異なる場合、ハイ/ロウ幅保持値レジスタ334は、ハイ/ロウ幅キャプチャレジスタ312がキャプチャした内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値を格納する(ステップS104)。   If the value stored in the change count counter 321 and the value stored in the expected change count register 122 are different in S103, the high / low width hold value register 334 captures the high / low width capture register 312. The count value of the built-in oscillation clock high / low width counter 111 is stored (step S104).

次に、ハイ/ロウ幅現在値レジスタ333は、タイマ331によって作り出される所定の時間経過後にハイ/ロウ幅キャプチャレジスタ312がキャプチャした内蔵発振クロックハイ/ロウ幅カウンタ111のカウント値を格納する(ステップS105)。   Next, the high / low width current value register 333 stores the count value of the built-in oscillation clock high / low width counter 111 captured by the high / low width capture register 312 after a predetermined time created by the timer 331 has elapsed (step S31). S105).

次に、第3比較器335は、ハイ/ロウ幅保持値レジスタ334に格納されている過去のカウント値とハイ/ロウ幅現在値レジスタ333に格納されている現在のカウント値とを比較する(ステップS106)。   Next, the third comparator 335 compares the past count value stored in the high / low width holding value register 334 with the current count value stored in the high / low width current value register 333 ( Step S106).

上記比較の結果、上記2つのカウント値が一致する場合は、ステップS101の前段に戻って待機する。一方、比較の結果、上記2つのカウント値が一致しない場合は、第3比較器は、不一致信号を生成して変化回数カウンタ321に出力し、変化回数カウンタ321の値が一つインクリメントされる(ステップS107)。   As a result of the comparison, if the two count values match, the process returns to the previous stage of step S101 and waits. On the other hand, if the two count values do not match as a result of the comparison, the third comparator generates a mismatch signal and outputs the mismatch signal to the change counter 321 so that the value of the change counter 321 is incremented by one ( Step S107).

次に、第1比較器123は、変化回数カウンタ321の値と変化回数期待値レジスタ122の値を比較する。これらの値が同一であった場合は一致信号を生成して出力し、同一でない場合はステップS104の前段に戻る(ステップS108)。   Next, the first comparator 123 compares the value of the change count counter 321 with the value of the expected change count register 122. If these values are the same, a coincidence signal is generated and output. If not, the process returns to the previous stage of step S104 (step S108).

上記一致信号がトリガとなってセルフプログラミング消去コマンドを起動され、内蔵フラッシュROMのデータが一斉に消去される(ステップS109)。   The self-programming erase command is activated by the coincidence signal as a trigger, and the data in the built-in flash ROM are erased all at once (step S109).

以上の構成によれば、応力が加えられた場合に生じるクロック変動と時系列で現れるクロック変動の両方を用いてフラッシュメモリ内のデータを消去するかどうかを判断することができる。   According to the above configuration, it is possible to determine whether or not to erase the data in the flash memory using both the clock fluctuation that occurs when stress is applied and the clock fluctuation that appears in time series.

なお、上記説明では、第1クロック不一致検出部と第2クロック不一致検出部が直列的に配置される構成を示したがこれに限るものではなく、第1・第2クロック不一致検出部をパラレルに配置する構成であっても良い。図7は、別の変化形態の内蔵発振クロック変化検出器401のブロック構成を示している。   In the above description, the first clock mismatch detection unit and the second clock mismatch detection unit are arranged in series. However, the present invention is not limited to this, and the first and second clock mismatch detection units are arranged in parallel. The structure to arrange | position may be sufficient. FIG. 7 shows a block configuration of a built-in oscillation clock change detector 401 of another variation form.

内蔵発振クロック変化検出器401は、第1クロック不一致検出部410と第2クロック検出部430の2つの検出手段及び第1期待変化回数比較部420と第2期待変化回数比較部440の2つの比較手段を備える。内部の各ブロックの機能は上述しているため一部説明を省略する。   The built-in oscillation clock change detector 401 includes two detection means of a first clock mismatch detection unit 410 and a second clock detection unit 430 and two comparisons of a first expected change number comparison unit 420 and a second expected change number comparison unit 440. Means. Since the function of each internal block has been described above, a part of the description is omitted.

第1期待変化回数比較部420は、第1クロック不一致検出部410より出力される第1不一致信号を入力し、変化回数期待値レジスタ422の値と変化回数カウンタ421の値が一致した場合に第1一致信号を出力する。また、第2期待変化回数比較部440も、第2クロック不一致検出部430より出力される第2不一致信号を入力し、変化回数期待値レジスタ442の値と変化回数カウンタ441の値が一致した場合に第2一致信号を出力する。   The first expected change number comparison unit 420 receives the first mismatch signal output from the first clock mismatch detection unit 410, and the first expected change number comparison unit 420 receives the first mismatch signal when the value of the change number expected value register 422 matches the value of the change number counter 421. 1 coincidence signal is output. The second expected change count comparison unit 440 also receives the second mismatch signal output from the second clock mismatch detection unit 430, and the value of the change count expected value register 442 matches the value of the change count counter 441. To output a second coincidence signal.

消去コマンド実行部450は、第1一致信号と第2一致信号を入力し、この2つの一致信号が入力された場合に消去コマンドを実行してフラッシュメモリのデータを消去する。なお、2つの一致信号の入力タイミングは同一である必要はない。   The erase command execution unit 450 inputs the first coincidence signal and the second coincidence signal, and when the two coincidence signals are inputted, executes the erase command to erase the data in the flash memory. Note that the input timing of the two coincidence signals does not have to be the same.

以上説明したように、本実施の形態3に係る電子回路装置は、クロック周波数の変化を検出する第1検出部と、所定の時間を計測する時間計測部と、前記時間計測部で計測された所定の時間分異なる時刻における前記クロック周波数の変化を検出する第2検出部と、前記第1検出部及び前記第2検出部で検出された前記クロック周波数の変化を計数する第1計数部と、外部より設定される所定の値を記憶する第1記憶部と、前記第1計数部で計数された値と前記第1記憶部に記憶されている値とに基づいて消去信号を出力する出力部と、を具備する。   As described above, the electronic circuit device according to the third embodiment is measured by the first detection unit that detects a change in the clock frequency, the time measurement unit that measures a predetermined time, and the time measurement unit. A second detector for detecting a change in the clock frequency at a time different by a predetermined time; a first counter for counting a change in the clock frequency detected by the first detector and the second detector; A first storage unit that stores a predetermined value set from the outside, and an output unit that outputs an erasure signal based on the value counted by the first counting unit and the value stored in the first storage unit And.

また、前記第1検出部は、第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数部と、所定の期待値を記憶する第2記憶部と、前記第2計数部で計数された値と前記第2記憶部に記憶されている値とを比較する第2比較部と、を備え、前記第2比較部は、比較の結果、前記第2計数部で計数された値と前記第2記憶部に記憶されている値とが一致しない場合に前記クロック周波数が変化したことを示す第1不一致信号を前記第1計数部に出力する構成とすることができる。   The first detector stores a second expected unit that counts a high width or a low width of a clock signal having a first frequency using a clock signal having a second frequency, and stores a predetermined expected value. A second storage unit, and a second comparison unit that compares the value counted by the second counting unit with the value stored in the second storage unit, wherein the second comparison unit As a result, when the value counted by the second counting unit does not match the value stored in the second storage unit, a first mismatch signal indicating that the clock frequency has changed is sent to the first counting unit. It can be set as the structure which outputs.

また、前記第2検出部は、前記第2計数部で計数された値を記憶する第3記憶部と、前記第3記憶部で記憶された値と前記時間計測部で計測された所定の時間経過後に前記第2計数部で計数された値とを比較する第3比較部と、を備え、前記第3比較部は、比較の結果、前記第3記憶部で記憶された値と前記時間計測部で計測された所定の時間経過後に前記第2計数部で計数された値とが一致しない場合に前記クロック周波数が変化したことを示す第2不一致信号を前記第1計数部に出力する構成とすることができる。   The second detection unit includes a third storage unit that stores a value counted by the second counting unit, a value stored in the third storage unit, and a predetermined time measured by the time measurement unit. A third comparison unit that compares the value counted by the second counting unit after elapses, and the third comparison unit compares the value stored in the third storage unit and the time measurement as a result of the comparison A second mismatch signal indicating that the clock frequency has changed when the value counted by the second counting unit does not match after a predetermined time measured by the unit is output to the first counting unit; can do.

また、前記時間計測部は、前記第1不一致信号を入力することにより前記所定の時間の計測を開始する構成とすることができる。   Further, the time measuring unit may be configured to start measuring the predetermined time by inputting the first mismatch signal.

また、所定の値を記憶する第4記憶部を更に備え、前記第1計数部は、前記第1検出部で検出された変化を計数する第1変化計数部と、前記第2検出部で検出された変化を計数する第2変化計数部と、から構成され、前記出力部は、前記第1変化計数部で計数された値と前記第1記憶部に記憶されている値とに基づいて第1の消去信号を出力する第1出力部と、前記第2変化計数部で計数された値と前記第4記憶部に記憶されている値とに基づいて第2の消去信号を出力する第2出力部と、を備える構成とすることができる。   In addition, a fourth storage unit that stores a predetermined value is further provided, and the first counting unit is detected by the first change counting unit that counts the change detected by the first detection unit and the second detection unit. A second change counting unit that counts the change that has been made, and the output unit is configured to output the first change based on a value counted by the first change counting unit and a value stored in the first storage unit. A first output unit that outputs one erase signal, a second output that outputs a second erase signal based on the value counted by the second change counting unit and the value stored in the fourth storage unit And an output unit.

上記第1消去信号及び第2消去信号が出力された場合、つまり、2つの検出部でともにクロック周波数の変化が検出された場合に、別途設けられた消去部が、主記憶部に格納されているデータを消去するよう構成しても良い。   When the first erasure signal and the second erasure signal are output, that is, when a change in the clock frequency is detected by the two detection units, a separate erasure unit is stored in the main storage unit. It may be configured to erase existing data.

(実施の形態4)
本実施の形態では、実施の形態3に係る電子回路装置が具備するタイマの計測時間を変更できる構成としたことを特徴とする。
(Embodiment 4)
The present embodiment is characterized in that the measurement time of the timer included in the electronic circuit device according to the third embodiment can be changed.

図8は、本実施の形態4に係る内蔵発振クロック変化検出器に含まれるタイマ530のブロック図である。   FIG. 8 is a block diagram of timer 530 included in the built-in oscillation clock change detector according to the fourth embodiment.

タイマ530は、所定の時間を計測する時間計測部であり、図4のタイマ211や図7のタイマ431に対応する。タイマ530は、コンペアレジスタ531と、セレクタ532と、AND回路533と、周波数変化回数タイマカウンタ534と、比較器535と、から構成される。   The timer 530 is a time measuring unit that measures a predetermined time, and corresponds to the timer 211 in FIG. 4 and the timer 431 in FIG. The timer 530 includes a compare register 531, a selector 532, an AND circuit 533, a frequency change count timer counter 534, and a comparator 535.

コンペアレジスタ531は、時間計測の基準となる値が記憶されている。   The compare register 531 stores a reference value for time measurement.

セレクタ532は、分周されて複数の周波数をもつベースクロック信号の中から1つの信号を選び出す。ユーザはセレクタ532にアクセス可能であり、どの周波数をもつベースクロック信号を選び出すかを設定できる構成となっている。   The selector 532 selects one signal from base clock signals having a plurality of frequencies that have been divided. The user can access the selector 532 and can set which frequency to select the base clock signal.

AND回路533は、タイマ530より出力された不一致信号と、前記セレクタ432から出力された信号とを入力して論理積をとって信号を出力する。   The AND circuit 533 inputs the mismatch signal output from the timer 530 and the signal output from the selector 432, performs a logical product, and outputs a signal.

周波数変化回数タイマカウンタ534は、AND回路533から出力された信号の周波数変化をカウントする。   The frequency change count timer counter 534 counts the frequency change of the signal output from the AND circuit 533.

比較器535は、周波数変化回数タイマカウンタ534でカウントされたカウント値とコンペアレジスタ531に記憶されている基準値とを比較する。比較の結果、上記カウント値と基準値とが一致した場合にキャプチャトリガ信号が出力される。   The comparator 535 compares the count value counted by the frequency change count timer counter 534 with the reference value stored in the compare register 531. As a result of the comparison, when the count value matches the reference value, a capture trigger signal is output.

上記構成によれば、ユーザからの設定によりセレクタ536で異なる周波数をもつクロック信号から1つのクロック信号を選び出すことができ、不一致信号との論理積をとって出力信号をカウントできるので、ユーザがタイマ530で計測する時間を設定することができる。   According to the above configuration, one clock signal can be selected from the clock signals having different frequencies by the selector 536 according to the setting from the user, and the output signal can be counted by taking the logical product with the mismatch signal. The time to be measured at 530 can be set.

なお、タイマで計測する時間の設定方法としては、上記方法に限定されるものではなく、例えばコンペアレジスタにユーザが内部バスを通じてアクセス可能な構成とすることもできる。すなわち、セレクタ536を取り除き、所定の周波数をもつクロック信号と不一致信号との論理積出力を周波数変化回数タイマカウンタがカウントし、コンペアレジスタにユーザが設定した基準値と周波数変化回数タイマカウンタでカウントされたカウント値とを比較するよう構成しても良い。   Note that the method for setting the time measured by the timer is not limited to the above method, and for example, the user can access the compare register through the internal bus. That is, the selector 536 is removed, the logical product output of the clock signal having a predetermined frequency and the mismatch signal is counted by the frequency change count timer counter, and is counted by the reference value set by the user in the compare register and the frequency change count timer counter. You may comprise so that it may compare with the counted value.

以上、各実施の形態で説明したように、本発明によれば、ユーザがフラッシュメモリの消去タイミングを任意に選択可能となる為、ユーザの使用用途に合わせてセキュリティレベルの設定が可能となる。従って、第三者のリバースエンジニアリングに対して高いセキュリティを保ちつつ、ユーザ自身による十分な解析も可能となる。   As described above, according to the embodiments, according to the present invention, the user can arbitrarily select the erasing timing of the flash memory. Therefore, the security level can be set according to the usage purpose of the user. Therefore, it is possible to perform sufficient analysis by the user while maintaining high security against reverse engineering by a third party.

なお、変化回数レジスタ及びハイ/ロウ幅期待値レジスタは、別途設けられた設定部により格納する値を設定できる。すなわち、設定部は、ユーザからの指示に基づいて変化回数レジスタ又はハイ/ロウ幅期待値レジスタに記憶させる所定の値を設定するよう構成しても良い。   The change count register and the high / low width expected value register can set values to be stored by a separately provided setting unit. That is, the setting unit may be configured to set a predetermined value stored in the change count register or the high / low width expected value register based on an instruction from the user.

また、変化回数レジスタやハイ/ロウ幅期待値レジスタにアクセスをするためには所定の認証や手順を踏んだ場合にアクセスできる構成とすることもできる。この場合、新たにアクセス管理部を別途備え、当該アクセス管理部が、所定の認証処理や設定手順に基づいた上記レジスタへのアクセスが行われたかを判断する判断処理を行う構成であっても良い。当該アクセス管理部で、適切なユーザからのレジスタアクセス要求であることを確認した後に、ユーザが変化回数レジスタ又はハイ/ロウ幅期待値レジスタにアクセスし、これらのレジスタに格納されている基準値を変更できる構成であっても良い。   Further, in order to access the change count register and the expected high / low width value register, it can be configured to be accessible when a predetermined authentication or procedure is performed. In this case, a configuration may be adopted in which a separate access management unit is provided, and the access management unit performs a determination process for determining whether the register is accessed based on a predetermined authentication process or setting procedure. . After confirming that the access management unit is a register access request from an appropriate user, the user accesses the change count register or the high / low width expectation value register, and sets the reference value stored in these registers. The structure which can be changed may be sufficient.

なお、上記説明では消去信号に基づいて主記憶部であるフラッシュメモリのデータを消去する構成について示したがこれに限定するものではなく、別の記憶手段に記憶されている秘密データを消去する構成であっても良い。   In the above description, the configuration for erasing the data in the flash memory, which is the main storage unit, based on the erasure signal is shown. However, the present invention is not limited to this, and the configuration for erasing secret data stored in another storage means It may be.

その他、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。   In addition, the present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit of the present invention.

100:マイクロコンピュータ 101:内蔵発振クロック変化検出器
110:クロック不一致検出部 111:内蔵発振クロックハイ/ロウ幅カウンタ
112:ハイ/ロウ幅期待値レジスタ 113:第2比較器
120:期待変化回数比較部 121:変化回数カウンタ
122:変化回数期待値レジスタ 123:第1比較器
140:内蔵発信器 150:サブ内蔵発信器
160:CPUコア 170:フラッシュメモリ
180:内部バス 190:周辺ハードウェア
201:内蔵発振クロック変化検出器 210:クロック不一致検出部
211:タイマ 212:ハイ/ロウ幅キャプチャレジスタ
213:内部発振クロックハイ/ロウ幅現在値レジスタ
214:内部発振クロックハイ/ロウ幅保持値レジスタ
215:第2比較器 301:内部発振クロック変化検出器
310:第1クロック不一致検出部 312:ハイ/ロウ幅キャプチャレジスタ
320:期待変化回数比較部 321:変化回数カウンタ
330:第2クロック不一致検出部 331:タイマ
333:内部発振クロックハイ/ロウ幅現在値レジスタ
334:内部発振クロックハイ/ロウ幅保持値レジスタ
335:第3比較器 401:内部発振クロック変化検出器
410:第1クロック不一致検出部 420:第1期待変化回数比較部
421:変化回数カウンタ 422:変化回数期待値レジスタ
423:第1比較器 430:第2クロック不一致検出部
431:タイマ 440:第2期待変化回数比較部
441:変化回数カウンタ 442:変化回数期待値レジスタ
443:第1比較器 450:消去コマンド生成部
501:内部発振クロック変化検出器 530:タイマ
531:コンペアレジスタ 532:セレクタ
533:AND回路 534:周波数変化回数タイマカウンタ
535:比較器
DESCRIPTION OF SYMBOLS 100: Microcomputer 101: Built-in oscillation clock change detector 110: Clock mismatch detection part 111: Built-in oscillation clock high / low width counter 112: High / low width expected value register 113: Second comparator 120: Expected change frequency comparison part 121: Change count counter 122: Change count expected value register 123: First comparator 140: Built-in transmitter 150: Sub built-in transmitter 160: CPU core 170: Flash memory 180: Internal bus 190: Peripheral hardware 201: Built-in oscillation Clock change detector 210: Clock mismatch detection unit 211: Timer 212: High / low width capture register 213: Internal oscillation clock high / low width current value register 214: Internal oscillation clock high / low width hold value register 215: Second comparison 301: Internal oscillation black Change detector 310: first clock mismatch detection unit 312: high / low width capture register 320: expected change count comparison unit 321: change count counter 330: second clock mismatch detection unit 331: timer 333: internal oscillation clock high / Low width current value register 334: Internal oscillation clock high / low width hold value register 335: Third comparator 401: Internal oscillation clock change detector 410: First clock mismatch detection unit 420: First expected change number comparison unit 421 Change count counter 422: Change count expected value register 423: First comparator 430: Second clock mismatch detection section 431: Timer 440: Second expected change count comparison section 441: Change count counter 442: Change count expected value register 443: First comparator 450: Erase command generator 501: Internal oscillation clock Click change detector 530: Timer 531: compare register 532: Selector 533: the AND circuit 534: frequency change frequency timer counter 535: a comparator

Claims (15)

データを記憶する主記憶手段と、
クロック周波数の変化を検出する第1検出手段と、
前記検出された変化を計数する第1計数手段と、
外部より設定される所定の値を記憶する第1記憶手段と、
前記第1計数手段で計数された値と前記第1記憶手段に記憶されている値とに基づいて前記主記憶手段のデータを消去することを指示する消去信号を出力する出力手段と、
を具備する電子回路装置。
Main storage means for storing data;
First detecting means for detecting a change in clock frequency;
First counting means for counting the detected change;
First storage means for storing a predetermined value set from the outside;
Output means for outputting an erasure signal instructing erasure of data in the main storage means based on the value counted by the first counting means and the value stored in the first storage means;
An electronic circuit device comprising:
前記出力手段は、前記第1計数手段で計数された値と前記第1記憶手段に記憶されている値とを比較する第1比較手段を備え、
前記第1比較手段は、比較の結果、前記第1計数手段で計数された値と前記第1記憶手段に記憶されている値とが一致した場合に前記消去信号を出力する、
請求項1に記載の電子回路装置。
The output means includes first comparison means for comparing the value counted by the first counting means with the value stored in the first storage means,
The first comparing means outputs the erasure signal when the value counted by the first counting means matches the value stored in the first storage means as a result of comparison.
The electronic circuit device according to claim 1.
前記第1計数手段は、前記第1検出手段で検出された変化の回数を計数する、
請求項1に記載の電子回路装置。
The first counting means counts the number of changes detected by the first detecting means;
The electronic circuit device according to claim 1.
前記第1検出手段は、
第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数手段と、
所定の期待値を記憶する第2記憶手段と、
前記第2計数手段で計数された値と前記第2記憶手段に記憶されている値とを比較する第2比較手段と、
を備え、
前記第2比較手段は、比較の結果、前記第2計数手段で計数された値と前記第2記憶手段に記憶されている値とが一致しない場合に前記クロック周波数が変化したことを示す信号を前記第1計数手段に出力する、
請求項1から請求項3のいずれかに記載の電子回路装置。
The first detection means includes
Second counting means for counting a high width or a low width of a clock signal having a first frequency using a clock signal having a second frequency;
Second storage means for storing a predetermined expected value;
Second comparison means for comparing the value counted by the second counting means with the value stored in the second storage means;
With
The second comparing means outputs a signal indicating that the clock frequency has changed when the value counted by the second counting means and the value stored in the second storing means do not match as a result of comparison. Outputting to the first counting means;
The electronic circuit device according to claim 1.
前記第1検出手段は、
第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数手段と、
所定の時間を計測する時間計測手段と、
前記第2計数手段で計数された値を記憶する第2記憶手段と、
前記第2記憶手段に記憶された値と前記時間計測手段で計測された所定の時間経過後に前記第2計数手段で計数された値とを比較する第2比較手段と、
を備え、
前記第2比較手段は、比較の結果、前記第2記憶手段で記憶された値と前記時間計測手段で計測された所定の時間経過後に前記第2計数手段で計数された値とが一致しない場合に前記クロック周波数が変化したことを示す信号を前記第1計数手段に出力する、
請求項1から請求項3のいずれかに記載の電子回路装置。
The first detection means includes
Second counting means for counting a high width or a low width of a clock signal having a first frequency using a clock signal having a second frequency;
A time measuring means for measuring a predetermined time;
Second storage means for storing the value counted by the second counting means;
A second comparing means for comparing the value stored in the second storage means with the value counted by the second counting means after a predetermined time measured by the time measuring means;
With
The second comparison means, as a result of comparison, when the value stored in the second storage means and the value counted by the second counting means do not match after a predetermined time measured by the time measurement means A signal indicating that the clock frequency has changed to the first counting means,
The electronic circuit device according to claim 1.
所定の時間を計測する時間計測手段と、
前記時間計測手段で計測された所定の時間分異なる時刻におけるクロック周波数の変化を検出する第2検出手段と、
を更に具備し、
前記第1計数手段は、前記第1検出手段及び前記第2検出手段で検出された前記クロック周波数の変化を計数する、
請求項1から請求項3のいずれかに記載の電子回路装置。
A time measuring means for measuring a predetermined time;
Second detection means for detecting a change in clock frequency at a time different by a predetermined time measured by the time measurement means;
Further comprising
The first counting means counts the change in the clock frequency detected by the first detecting means and the second detecting means;
The electronic circuit device according to claim 1.
外部より設定される所定の値を記憶する第2記憶手段を更に具備し、
前記第1計数手段は、
前記第1検出手段で検出された変化を計数する第1変化計数手段と、
前記第2検出手段で検出された変化を計数する第2変化計数手段と、
を備え、
前記出力手段は、
前記第1変化計数手段で計数された値と前記第1記憶手段に記憶されている値とに基づいて第1の消去信号を出力する第1出力手段と、
前記第2変化計数手段で計数された値と前記第2記憶手段に記憶されている値とに基づいて第2の消去信号を出力する第2出力手段と、
を備える、
請求項6に記載の電子回路装置。
A second storage means for storing a predetermined value set from outside;
The first counting means includes
First change counting means for counting changes detected by the first detecting means;
Second change counting means for counting changes detected by the second detecting means;
With
The output means includes
First output means for outputting a first erase signal based on the value counted by the first change counting means and the value stored in the first storage means;
Second output means for outputting a second erase signal based on the value counted by the second change counting means and the value stored in the second storage means;
Comprising
The electronic circuit device according to claim 6.
前記第1検出手段は、
第1の周波数を有するクロック信号のハイ幅又はロウ幅を第2の周波数を有するクロック信号を用いて計数する第2計数手段と、
所定の期待値を記憶する第2記憶手段と、
前記第2計数手段で計数された値と前記第2記憶手段に記憶されている値とを比較する第2比較手段と、
を備え、
前記第2比較手段は、比較の結果、前記第2計数手段で計数された値と前記第2記憶手段に記憶されている値とが一致しない場合に前記クロック周波数が変化したことを示す第1不一致信号を前記第1計数手段に出力する、
請求項6に記載の電子回路装置。
The first detection means includes
Second counting means for counting a high width or a low width of a clock signal having a first frequency using a clock signal having a second frequency;
Second storage means for storing a predetermined expected value;
Second comparison means for comparing the value counted by the second counting means with the value stored in the second storage means;
With
The second comparison means indicates that the clock frequency has changed when the value counted by the second counting means and the value stored in the second storage means do not match as a result of comparison. Outputting a mismatch signal to the first counting means;
The electronic circuit device according to claim 6.
前記第2検出手段は、
前記第2計数手段で計数された値を記憶する第3記憶手段と、
前記第3記憶手段で記憶された値と前記時間計測手段で計測された所定の時間経過後に前記第2計数手段で計数された値とを比較する第3比較手段と、
を備え、
前記第3比較手段は、比較の結果、前記第3記憶手段で記憶された値と前記計測手段で計測された所定の時間経過後に前記第2計数手段で計数された値とが一致しない場合に前記クロック周波数が変化したことを示す第2不一致信号を前記第1計数手段に出力する、
請求項8に記載の電子回路装置。
The second detection means includes
Third storage means for storing the value counted by the second counting means;
Third comparison means for comparing the value stored in the third storage means with the value counted by the second counting means after a predetermined time measured by the time measuring means;
With
The third comparing means determines that, as a result of the comparison, the value stored in the third storing means and the value counted by the second counting means after a predetermined time measured by the measuring means do not match. Outputting a second mismatch signal indicating that the clock frequency has changed to the first counting means;
The electronic circuit device according to claim 8.
前記時間計測手段は、前記第1不一致信号を入力することにより前記所定の時間の計測を開始する、
請求項9に記載の電子回路装置。
The time measuring means starts measuring the predetermined time by inputting the first mismatch signal.
The electronic circuit device according to claim 9.
データを記憶する主記憶手段と
演算処理を行う処理手段と、
第1の周波数を有する第1クロック信号を出力する第1発振手段と、
第2の周波数を有する第2クロック信号を出力する第2発振手段と、
前記第1クロック信号及び前記第2クロック信号に基づいて前記第1クロック信号の周波数の変化を検出する検出手段と、
前記検出された変化を計数する計数手段と、
外部より設定される所定の値を記憶する記憶手段と、
前記計数手段で計数された値と前記記憶手段に記憶されている値とに基づいて消去信号を出力する出力手段と、
前記消去信号に基づいて前記主記憶手段に記憶されているデータを消去する消去手段と、
を具備する情報処理装置。
Main storage means for storing data, processing means for performing arithmetic processing,
First oscillating means for outputting a first clock signal having a first frequency;
Second oscillating means for outputting a second clock signal having a second frequency;
Detecting means for detecting a change in frequency of the first clock signal based on the first clock signal and the second clock signal;
Counting means for counting the detected changes;
Storage means for storing a predetermined value set from outside;
Output means for outputting an erasure signal based on the value counted by the counting means and the value stored in the storage means;
Erasing means for erasing data stored in the main storage means based on the erasing signal;
An information processing apparatus comprising:
前記第1発振手段及び前記第2発振手段は、外部から加えられる応力に対してそれぞれ異なる周波数変動特性を示すことを特徴とする、
請求項11に記載の情報処理装置。
The first oscillating means and the second oscillating means exhibit different frequency variation characteristics with respect to externally applied stress,
The information processing apparatus according to claim 11.
前記第1発振手段及び前記第2発振手段は、光が外部から照射された場合にそれぞれ異なる周波数変動特性を示すことを特徴とする、
請求項11に記載の情報処理装置。
The first oscillating means and the second oscillating means exhibit different frequency variation characteristics when light is irradiated from the outside,
The information processing apparatus according to claim 11.
外部より設定される所定の値を記録部に記憶する記憶ステップと、
クロック周波数の変化を検出する第1検出ステップと、
前記検出された変化を計数する計数ステップと、
前記計数ステップで計数された値と前記記憶ステップで記憶された値とに基づいて消去信号を出力する出力ステップと、
前記消去信号に基づいて主記憶部に記憶されているデータを消去する消去ステップと、
を有するデータ消去方法。
A storage step of storing a predetermined value set from outside in the recording unit;
A first detection step of detecting a change in clock frequency;
A counting step for counting the detected changes;
An output step of outputting an erasure signal based on the value counted in the counting step and the value stored in the storage step;
An erasing step of erasing data stored in the main memory based on the erasing signal;
A method for erasing data.
前記第1検出ステップにおける検出結果に基づいて所定の時間の計測を開始する時間計測ステップと、
前記時間計測ステップで計測された所定の時間分異なる時刻における前記クロック周波数の変化を検出する第2検出ステップと、
を更に有し、
前記計数ステップは、第1検出ステップ及び前記第2検出ステップで検出された変化を計数する、
請求項14に記載のデータ消去方法。
A time measurement step for starting measurement of a predetermined time based on the detection result in the first detection step;
A second detection step of detecting a change in the clock frequency at a time different from the predetermined time measured in the time measurement step;
Further comprising
The counting step counts changes detected in the first detection step and the second detection step;
The data erasing method according to claim 14.
JP2011132525A 2011-06-14 2011-06-14 Information processor, electronic circuit device, and data erasing method Withdrawn JP2013003731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011132525A JP2013003731A (en) 2011-06-14 2011-06-14 Information processor, electronic circuit device, and data erasing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011132525A JP2013003731A (en) 2011-06-14 2011-06-14 Information processor, electronic circuit device, and data erasing method

Publications (1)

Publication Number Publication Date
JP2013003731A true JP2013003731A (en) 2013-01-07

Family

ID=47672254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011132525A Withdrawn JP2013003731A (en) 2011-06-14 2011-06-14 Information processor, electronic circuit device, and data erasing method

Country Status (1)

Country Link
JP (1) JP2013003731A (en)

Similar Documents

Publication Publication Date Title
US7584386B2 (en) Microprocessor comprising error detection means protected against an attack by error injection
WO2020037612A1 (en) Embedded program secure boot method, apparatus and device, and storage medium
US8990578B2 (en) Password authentication circuit and method
Bittner et al. The forgotten threat of voltage glitching: a case study on Nvidia Tegra X2 SoCs
CN113742123A (en) Memory fault information recording method and equipment
US9536086B2 (en) Circuit arrangement, a method for forming a circuit arrangement, and method for integrity checking
JP2013003731A (en) Information processor, electronic circuit device, and data erasing method
US20050041803A1 (en) On-device random number generator
Mahmod et al. UnTrustZone: Systematic Accelerated Aging to Expose On-chip Secrets
US8050122B2 (en) Fuse apparatus for controlling built-in self stress and control method thereof
JP2010225009A (en) Real-time clock and method for setting security of electronic appliance
US11481522B2 (en) Circuit configured to monitor a sensitive payload for attack detection
JP4777595B2 (en) Use detection circuit
US20180329714A1 (en) Method for Operating a System on Chip Comprising a Bootable Processor
Knichel et al. The risk of outsourcing: Hidden SCA trojans in third-party IP-cores threaten cryptographic ICs
Poudel et al. Microcontroller Fingerprinting Using Partially Erased NOR Flash Memory Cells
US7590956B1 (en) Methods of detecting unwanted logic in an operational circuit design
TWI760673B (en) Electronic device
Hopkins et al. Ensuring data integrity via ICmetrics based security infrastructure
US11879938B2 (en) Method for detecting perturbations in a logic circuit and logic circuit for implementing this method
Elmohr Embedded systems security: On em fault injection on risc-v and br/tbr puf design on fpga
CN108170607A (en) The control device and control method of OTP switches
JP5641589B2 (en) Tamper resistant circuit, apparatus having tamper resistant circuit, and tamper resistant method
Desiraju High Speed Clock Glitching
JP2007242029A (en) Circuit for preventing program from being decoded in micro-computer chip to control game machine

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140902