JP6390840B2 - Semiconductor device and electronic equipment - Google Patents
Semiconductor device and electronic equipment Download PDFInfo
- Publication number
- JP6390840B2 JP6390840B2 JP2014206361A JP2014206361A JP6390840B2 JP 6390840 B2 JP6390840 B2 JP 6390840B2 JP 2014206361 A JP2014206361 A JP 2014206361A JP 2014206361 A JP2014206361 A JP 2014206361A JP 6390840 B2 JP6390840 B2 JP 6390840B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- external terminal
- debug
- semiconductor device
- predetermined period
- 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.)
- Active
Links
Images
Landscapes
- Microcomputers (AREA)
Description
本発明は、半導体装置及び電子機器に関する。 The present invention relates to a semiconductor device and an electronic apparatus.
MCU(Micro Controller Unit)等の半導体装置(例えば、IC(Integrated Circuit))では、プロセッサーがメモリーに記憶されているプログラムを実行することで、所望の機能を実現している。このような半導体装置では、プログラムを不正利用されることから保護することが課題となる。特許文献1では、パワー・オン・リセット時にデバッグ回路を使用不可にしてセキュリティ・リソース(レジスタ、ファームウェア、I/Oデバイス)へのアクセスを防止し、ブート・メモリからのシステム初期化中に選択されたセキュリティ手順を読み出すセキュリティ・コードを実行し、呼び出されたセキュリティ手順が有効であるときは、呼び出されたセキュリティ手順に応じてセキュアな環境でシステムを作動させ、呼び出されたセキュリティ手順が有効でないときは、デバッグ機能を使用可能にし、すべてのセキュリティ機能を隠す手法が提案されている。
In a semiconductor device such as an MCU (Micro Controller Unit) (for example, an IC (Integrated Circuit)), a processor executes a program stored in a memory to realize a desired function. In such a semiconductor device, it is a problem to protect the program from unauthorized use. In
特許文献1の手法を適用すれば、パワー・オン・リセット時に、プログラム(ファームウェア)へのアクセスが可能なデバッグ回路を使用不可にするため、プログラムを不正利用されることから保護することが可能かもしれない。しかしながら、特許文献1の手法では、デバッグ回路そのものを使用不可にしており、これを実現するための回路が複雑になり、半導体装置のサイズが増大しやすいという問題がある。また、特許文献1の手法では、呼び出されたセキュリティ手順が有効であるときは、セキュアな環境でシステムを作動させる(デバッグ機能を使用できない)ため、セキュリティ手順が無効の状態にしてプログラムのデバッグを行う必要があり、セキュリティ手順が有効の場合のデバッグを十分に行うことが難しいという問題もある。なお、プログラムの不正利用の保護に限らず、半導体装置に内蔵される検査回路の不正利用(意図しない使用も含む)に対する保護についても同様の問題がある。
If the method of
本発明は、以上のような問題点に鑑みてなされたものであり、本発明のいくつかの態様によれば、コストの増加を低減しながらプログラムの不正利用のおそれを低減させることが可能な半導体装置及び電子機器を提供することができる。また、本発明のいくつかの態様によれば、プログラムの不正利用のおそれを低減させながら、デバッグを容易に行うことが可能な半導体装置及び電子機器を提供することができる。また、本発明のいくつかの態様によれば、コストの増加を低減しながら検査回路の不正利用のおそれを低減させることが可能な半導体装置及び電子機器を提供することができる。また、本発明のいくつかの態様によれば、検査回路の不正利用のおそれを低減させながら、検査を容易に行うことが可能な半導体装置及び電子機器を提供することができる。 The present invention has been made in view of the above problems, and according to some aspects of the present invention, it is possible to reduce the risk of unauthorized use of a program while reducing an increase in cost. A semiconductor device and an electronic device can be provided. In addition, according to some aspects of the present invention, it is possible to provide a semiconductor device and an electronic device that can be easily debugged while reducing the possibility of unauthorized use of a program. In addition, according to some aspects of the present invention, it is possible to provide a semiconductor device and an electronic device that can reduce the risk of unauthorized use of the inspection circuit while reducing an increase in cost. In addition, according to some aspects of the present invention, it is possible to provide a semiconductor device and an electronic device that can be easily inspected while reducing the possibility of unauthorized use of the inspection circuit.
本発明は前述の課題の少なくとも一部を解決するためになされたものであり、以下の態様または適用例として実現することが可能である。 SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following aspects or application examples.
[適用例1]
本適用例に係る半導体装置は、不揮発性メモリーと、前記不揮発性メモリーに記憶されているプログラムを実行するプロセッサーと、前記プログラムのデバッグ機能を備えたデバッグ回路と、前記プログラムのデバッグに使用される第1の外部端子と、リセット解除から所定期間、前記第1の外部端子と前記デバッグ回路との電気的な接続を切断するマスク回路と、前記所定期間において、前記所定期間の経過後も前記第1の外部端子と前記デバッグ回路との電気的な接続を切断するか否かを制御する制御回路と、を含む。
[Application Example 1]
A semiconductor device according to this application example is used for non-volatile memory, a processor that executes a program stored in the non-volatile memory, a debug circuit having a debug function of the program, and debugging of the program A first external terminal, a mask circuit for disconnecting electrical connection between the first external terminal and the debug circuit for a predetermined period after reset release, and the predetermined period, and the first circuit after the predetermined period has elapsed. And a control circuit for controlling whether or not to disconnect the electrical connection between the external terminal and the debug circuit.
本適用例に係る半導体装置によれば、リセット解除からの所定期間は、マスク回路によって第1の外部端子とデバッグ回路との電気的な接続が切断され、第1の外部端子とデバッグ回路との電気的な接続が切断されている当該所定期間において、制御回路によって所定期間の経過後も切断するように制御可能であるので、第1の外部端子からデバッグ回路を介してプログラムが不正に利用されるおそれを低減させることができる。また、本適用例に係る半導体装置は、マスク回路と制御回路により第1の外部端子とデバッグ回路との電気的な接続を切断するという簡易な構成で実現することができる。従って、本適用例に係る半導体装置によれば、コストの増加を低減しながらプログラムの不正利用のおそれを低減させることができる。 According to the semiconductor device of this application example, the electrical connection between the first external terminal and the debug circuit is disconnected by the mask circuit for a predetermined period after the reset is released, and the first external terminal and the debug circuit are disconnected. In the predetermined period in which the electrical connection is disconnected, the control circuit can control the disconnection even after the elapse of the predetermined period, so that the program is illegally used from the first external terminal via the debug circuit. Can reduce the risk. Further, the semiconductor device according to this application example can be realized with a simple configuration in which the electrical connection between the first external terminal and the debug circuit is disconnected by the mask circuit and the control circuit. Therefore, according to the semiconductor device of this application example, it is possible to reduce the risk of unauthorized use of the program while reducing the increase in cost.
また、本適用例に係る半導体装置によれば、第1の外部端子とデバッグ回路との電気的な接続が切断されている所定期間において、制御回路によって、所定期間の経過後は、第1の外部端子とデバッグ回路とが電気的に接続されるように制御可能であるので、第1の外部端子からデバッグ回路を介してプログラムのデバッグを容易に行うことができる。 Further, according to the semiconductor device according to this application example, the first circuit after the predetermined period elapses by the control circuit in the predetermined period in which the electrical connection between the first external terminal and the debug circuit is disconnected. Since control is possible so that the external terminal and the debug circuit are electrically connected, the program can be easily debugged from the first external terminal via the debug circuit.
[適用例2]
上記適用例に係る半導体装置において、前記制御回路は、前記所定期間において、前記プロセッサーが前記プログラムに含まれる第1の命令を実行した場合に、前記所定期間の経過後も前記第1の外部端子と前記デバッグ回路との電気的な接続を切断してもよい。
[Application Example 2]
In the semiconductor device according to the application example, when the processor executes a first instruction included in the program in the predetermined period, the control circuit includes the first external terminal even after the predetermined period elapses. And the debug circuit may be disconnected from the electrical connection.
本適用例に係る半導体装置によれば、プログラムにおいて、リセット解除からの所定期間にプロセッサーによって実行される位置に第1の命令が組み込まれている場合には、当該所定期間の経過後も第1の外部端子とデバッグ回路との電気的な接続が切断される。従って、例えば、プログラムの所望の位置に第1の命令を組み込んでおくことで、当該プログラムの不正利用のおそれを低減させることができる。 According to the semiconductor device of this application example, in the program, when the first instruction is incorporated at a position to be executed by the processor in a predetermined period from the reset release, the first instruction is passed even after the predetermined period has elapsed. The electrical connection between the external terminal and the debug circuit is disconnected. Therefore, for example, by incorporating the first instruction at a desired position in the program, the possibility of unauthorized use of the program can be reduced.
[適用例3]
上記適用例に係る半導体装置は、前記第1の外部端子と前記プロセッサーとの間における信号の入出力インターフェース回路をさらに含み、前記制御回路は、前記所定期間において、前記プロセッサーが前記第1の命令を実行した場合に、前記第1の外部端子と前記入出力インターフェース回路とを電気的に接続してもよい。
[Application Example 3]
The semiconductor device according to the application example further includes an input / output interface circuit for a signal between the first external terminal and the processor, and the control circuit is configured so that the processor executes the first command in the predetermined period. When the above is executed, the first external terminal and the input / output interface circuit may be electrically connected.
本適用例に係る半導体装置によれば、プログラムにおいて、リセット解除からの所定期間にプロセッサーによって実行される位置に第1の命令が組み込まれている場合には、当該所定期間の経過後は、第1の外部端子とデバッグ回路との電気的な接続が切断されたまま、第1の外部端子と入出力インターフェース回路とが電気的に接続される。従って、第1の外部端子をデバッグ用の外部端子と入出力インターフェース用の外部端子として兼用することができる。 According to the semiconductor device of this application example, in the program, when the first instruction is incorporated at a position to be executed by the processor during a predetermined period after reset release, after the elapse of the predetermined period, The first external terminal and the input / output interface circuit are electrically connected while the electrical connection between the first external terminal and the debug circuit is disconnected. Therefore, the first external terminal can be used both as an external terminal for debugging and an external terminal for input / output interface.
[適用例4]
上記適用例に係る半導体装置は、第2の外部端子をさらに含み、前記不揮発性メモリーは、前記第2の外部端子に所定の信号が入力された場合に、記憶している情報を消去して
もよい。
[Application Example 4]
The semiconductor device according to the application example further includes a second external terminal, and the nonvolatile memory erases stored information when a predetermined signal is input to the second external terminal. Also good.
本適用例に係る半導体装置において、前記第2の外部端子に所定の信号が入力された場合に、前記プロセッサーが、前記不揮発性メモリーが記憶している情報を消去する制御を行ってもよい。 In the semiconductor device according to this application example, when a predetermined signal is input to the second external terminal, the processor may perform control to erase information stored in the nonvolatile memory.
本適用例に係る半導体装置によれば、第2の外部端子に所定の信号を入力することにより、不揮発性メモリーが記憶している情報を消去することができる。従って、プログラムの所望の位置に第1の命令が組み込まれていた場合、当該第1の命令が消去されることにより、以降は、リセット解除後の所定期間経過後に、第1の外部端子とデバッグ回路とが電気的に接続されるため、第1の外部端子から不揮発性メモリーの情報にアクセス可能となり得るが、プログラムが消去されているため不正利用されるおそれがない。 According to the semiconductor device of this application example, information stored in the nonvolatile memory can be erased by inputting a predetermined signal to the second external terminal. Therefore, when the first instruction is incorporated at a desired position in the program, the first instruction is erased. Thereafter, after the predetermined period after the reset is released, the first external terminal and the debug are deleted. Since the circuit is electrically connected, it is possible to access information in the nonvolatile memory from the first external terminal. However, since the program is erased, there is no possibility of unauthorized use.
また、本適用例に係る半導体装置によれば、所望の位置に第1の命令が組み込まれたプログラムが消去された後は、リセット解除後の所定期間経過後に、第1の外部端子とデバッグ回路とが電気的に接続されるため、第1の外部端子から不揮発性メモリーに情報を書き込むことが可能となる。従って、例えば、不揮発性メモリーに、消去されたプログラムを再度書き込みことや新たなプログラムに書き換えることが可能となる。 Further, according to the semiconductor device according to this application example, after the program in which the first instruction is incorporated at a desired position is erased, the first external terminal and the debug circuit are passed after a predetermined period after the reset is released. Are electrically connected to each other, so that information can be written to the nonvolatile memory from the first external terminal. Therefore, for example, the erased program can be rewritten to a non-volatile memory or rewritten with a new program.
[適用例5]
上記適用例に係る半導体装置において、前記不揮発性メモリーは、複数の記憶領域を有し、前記第2の外部端子に所定の信号が入力された場合に、前記情報を前記記憶領域ごとに消去し、前記第1の命令が記憶されている前記記憶領域の情報を最後に消去してもよい。
[Application Example 5]
In the semiconductor device according to the application example described above, the nonvolatile memory has a plurality of storage areas, and when a predetermined signal is input to the second external terminal, the information is erased for each storage area. The information in the storage area in which the first instruction is stored may be erased last.
本適用例に係る半導体装置によれば、仮に、不揮発性メモリーに記憶されている情報の消去が最後まで完了しなかった場合に、第1の命令が消去されずに残る確率が高まるので、消去されなかった情報が不正に利用されるおそれを低減させることができる。 According to the semiconductor device of this application example, if the information stored in the nonvolatile memory is not completely erased, the probability that the first instruction remains without being erased increases. The risk of unauthorized use of information that has not been made can be reduced.
[適用例6]
上記適用例に係る半導体装置において、前記所定期間は、前記プロセッサーが前記第1の命令を実行するのに要する時間よりも長くてもよい。
[Application Example 6]
In the semiconductor device according to the application example, the predetermined period may be longer than a time required for the processor to execute the first instruction.
本適用例に係る半導体装置によれば、プロセッサーは、第1の外部端子とデバッグ回路との電気的な接続が切断されている所定期間中に、第1の命令を実行することができるので、当該所定期間の経過後も第1の外部端子とデバッグ回路とが切断されたままになる。従って、プログラムの不正利用のおそれを低減させることができる。 According to the semiconductor device according to this application example, the processor can execute the first instruction during a predetermined period in which the electrical connection between the first external terminal and the debug circuit is disconnected. Even after the predetermined period has elapsed, the first external terminal and the debug circuit remain disconnected. Therefore, the risk of unauthorized use of the program can be reduced.
[適用例7]
上記適用例に係る半導体装置において、前記制御回路は、前記プロセッサーが第2の命令を実行した場合に、前記第1の外部端子と前記デバッグ回路とを電気的に接続してもよい。
[Application Example 7]
In the semiconductor device according to the application example described above, the control circuit may electrically connect the first external terminal and the debug circuit when the processor executes a second instruction.
本適用例に係る半導体装置によれば、例えば、リセット解除から所定期間が経過後も第1の外部端子とデバッグ回路との電気的な接続が切断される場合でも、プロセッサーが第2の命令を実行することで、第1の外部端子とデバッグ回路とを電気的に接続させることができる。これにより、第1の外部端子からプログラムのデバッグ等が可能となる。 According to the semiconductor device of this application example, for example, even when the electrical connection between the first external terminal and the debug circuit is disconnected even after a predetermined period has elapsed since the reset release, the processor outputs the second instruction. By executing, the first external terminal and the debug circuit can be electrically connected. This makes it possible to debug the program from the first external terminal.
なお、プログラムが不正に利用されるおそれを低減させるために、例えば、所定の外部端子に所定の信号が入力された場合に、プロセッサーが第2の命令を実行するようにし、
第2の命令、所定の外部端子及び所定の信号についての情報は、プログラムを使用する権限を有する正規のユーザーに対してのみ公開されるようにしてもよい。
In order to reduce the possibility of unauthorized use of the program, for example, when a predetermined signal is input to a predetermined external terminal, the processor executes the second instruction,
Information about the second command, the predetermined external terminal, and the predetermined signal may be disclosed only to authorized users who have the authority to use the program.
[適用例8]
本適用例に係る半導体装置は、検査回路と、検査に使用される第1の外部端子と、リセット解除から所定期間、前記第1の外部端子と前記検査回路との電気的な接続を切断するマスク回路と、前記所定期間において、前記所定期間の経過後も前記第1の外部端子と前記検査回路との電気的な接続を切断するか否かを制御する制御回路と、を含む。
[Application Example 8]
The semiconductor device according to this application example disconnects an electrical connection between the inspection circuit, the first external terminal used for the inspection, and the first external terminal and the inspection circuit for a predetermined period after the reset is released. A mask circuit; and a control circuit that controls whether or not to disconnect the electrical connection between the first external terminal and the inspection circuit even after the predetermined period has elapsed in the predetermined period.
本適用例に係る半導体装置によれば、リセット解除からの所定期間は、マスク回路によって第1の外部端子と検査回路との電気的な接続が切断され、第1の外部端子と検査回路との電気的な接続が切断されている当該所定期間において、制御回路によって所定期間の経過後も切断するように制御可能であるので、第1の外部端子から検査回路が不正に利用されるおそれを低減させることができる。また、本適用例に係る半導体装置は、マスク回路と制御回路により第1の外部端子と検査回路との電気的な接続を切断するという簡易な構成で実現することができる。従って、本適用例に係る半導体装置によれば、コストの増加を低減しながら検査回路の不正利用のおそれを低減させることができる。 According to the semiconductor device of this application example, the electrical connection between the first external terminal and the inspection circuit is disconnected by the mask circuit for a predetermined period after the reset is released, and the first external terminal and the inspection circuit are disconnected. Since the control circuit can be controlled to disconnect after the lapse of the predetermined period in the predetermined period in which the electrical connection is disconnected, the possibility that the inspection circuit is illegally used from the first external terminal is reduced. Can be made. In addition, the semiconductor device according to this application example can be realized with a simple configuration in which the electrical connection between the first external terminal and the inspection circuit is disconnected by the mask circuit and the control circuit. Therefore, according to the semiconductor device of this application example, it is possible to reduce the risk of unauthorized use of the inspection circuit while reducing the increase in cost.
また、本適用例に係る半導体装置によれば、第1の外部端子と検査回路との電気的な接続が切断されている所定期間において、制御回路によって、所定期間の経過後は、第1の外部端子と検査回路とが電気的に接続されるように制御可能であるので、第1の外部端子から検査回路を介して半導体装置の検査を容易に行うことができる。 Further, according to the semiconductor device according to this application example, the first circuit is disconnected from the first external terminal by the control circuit in the predetermined period after the predetermined period has elapsed. Since the external terminal and the inspection circuit can be controlled to be electrically connected, the semiconductor device can be easily inspected from the first external terminal via the inspection circuit.
[適用例9]
上記適用例に係る半導体装置は、不揮発性メモリーと、前記不揮発性メモリーに記憶されているプログラムを実行するプロセッサーと、をさらに含み、前記制御回路は、前記所定期間において、前記プロセッサーが前記プログラムに含まれる第1の命令を実行した場合に、前記所定期間の経過後も前記第1の外部端子と前記検査回路との電気的な接続を切断してもよい。
[Application Example 9]
The semiconductor device according to the application example further includes a non-volatile memory and a processor that executes a program stored in the non-volatile memory, and the control circuit is configured so that the processor stores the program in the predetermined period. When the included first instruction is executed, the electrical connection between the first external terminal and the inspection circuit may be disconnected even after the predetermined period has elapsed.
本適用例に係る半導体装置によれば、プログラムにおいて、リセット解除からの所定期間にプロセッサーによって実行される位置に第1の命令が組み込まれている場合には、当該所定期間の経過後も第1の外部端子と検査回路との電気的な接続が切断される。従って、例えば、プログラムの所望の位置に第1の命令を組み込んでおくことで、検査回路の不正利用のおそれを低減させることができる。 According to the semiconductor device of this application example, in the program, when the first instruction is incorporated at a position to be executed by the processor in a predetermined period from the reset release, the first instruction is passed even after the predetermined period has elapsed. The electrical connection between the external terminal and the inspection circuit is cut off. Therefore, for example, by incorporating the first instruction at a desired position in the program, the possibility of unauthorized use of the inspection circuit can be reduced.
また、上記適用例に係る半導体装置は、前記第1の外部端子と前記プロセッサーとの間における信号の入出力インターフェース回路をさらに含み、前記制御回路は、前記所定期間において、前記プロセッサーが前記第1の命令を実行した場合に、前記第1の外部端子と前記入出力インターフェース回路とを電気的に接続してもよい。 The semiconductor device according to the application example further includes an input / output interface circuit for a signal between the first external terminal and the processor, and the control circuit is configured such that the processor has the first circuit in the predetermined period. When the above command is executed, the first external terminal and the input / output interface circuit may be electrically connected.
この半導体装置によれば、プログラムにおいて、リセット解除からの所定期間にプロセッサーによって実行される位置に第1の命令が組み込まれている場合には、当該所定期間の経過後は、第1の外部端子と検査回路との電気的な接続が切断されたまま、第1の外部端子と入出力インターフェース回路とが電気的に接続される。従って、第1の外部端子を検査用の外部端子と入出力インターフェース用の外部端子として兼用することができる。 According to this semiconductor device, in the program, when the first instruction is incorporated at a position to be executed by the processor during a predetermined period from the reset cancellation, the first external terminal after the predetermined period elapses The first external terminal and the input / output interface circuit are electrically connected while disconnecting the electrical connection between the first external terminal and the inspection circuit. Therefore, the first external terminal can be used as an external terminal for inspection and an external terminal for input / output interface.
また、上記適用例に係る半導体装置において、前記所定期間は、前記プロセッサーが前記第1の命令を実行するのに要する時間よりも長くてもよい。 In the semiconductor device according to the application example, the predetermined period may be longer than a time required for the processor to execute the first instruction.
本適用例に係る半導体装置によれば、プロセッサーは、第1の外部端子と検査回路との電気的な接続が切断されている所定期間中に、第1の命令を実行することができるので、当該所定期間の経過後も第1の外部端子と検査回路とが切断されたままになる。従って、検査回路の不正利用のおそれを低減させることができる。 According to the semiconductor device according to this application example, the processor can execute the first instruction during a predetermined period in which the electrical connection between the first external terminal and the inspection circuit is disconnected. Even after the predetermined period has elapsed, the first external terminal and the inspection circuit remain disconnected. Therefore, the risk of unauthorized use of the inspection circuit can be reduced.
また、上記適用例に係る半導体装置において、前記制御回路は、前記プロセッサーが第2の命令を実行した場合に、前記第1の外部端子と前記検査回路とを電気的に接続してもよい。 In the semiconductor device according to the application example described above, the control circuit may electrically connect the first external terminal and the inspection circuit when the processor executes a second instruction.
この半導体装置によれば、例えば、リセット解除から所定期間が経過後も第1の外部端子と検査回路との電気的な接続が切断される場合でも、プロセッサーが第2の命令を実行することで、第1の外部端子と検査回路とを電気的に接続させることができる。これにより、第1の外部端子から半導体装置の検査が可能となる。 According to this semiconductor device, for example, even when the electrical connection between the first external terminal and the inspection circuit is disconnected even after a predetermined period has elapsed since reset release, the processor executes the second instruction. The first external terminal and the inspection circuit can be electrically connected. As a result, the semiconductor device can be inspected from the first external terminal.
なお、検査回路が不正に利用されるおそれを低減させるために、例えば、所定の外部端子に所定の信号が入力された場合に、プロセッサーが第2の命令を実行するようにし、第2の命令、所定の外部端子及び所定の信号についての情報は、プログラムを使用する権限を有する正規のユーザーに対してのみ公開されるようにしてもよい。 In order to reduce the possibility that the inspection circuit is illegally used, for example, when a predetermined signal is input to a predetermined external terminal, the processor executes the second instruction, and the second instruction The information about the predetermined external terminal and the predetermined signal may be disclosed only to an authorized user who has the authority to use the program.
[適用例10]
本適用例に係る電子機器は、上記のいずれかの半導体装置を備えている。
[Application Example 10]
An electronic apparatus according to this application example includes any one of the semiconductor devices described above.
本適用例によれば、半導体装置により、コストの増加を低減しながらプログラム又は検査回路の不正利用のおそれを低減させることができるので、低コストで信頼性の高い電子機器を実現することができる。 According to this application example, the semiconductor device can reduce the risk of unauthorized use of the program or the inspection circuit while reducing the increase in cost, so that a highly reliable electronic device can be realized at low cost. .
以下、本発明の好適な実施形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成の全てが本発明の必須構成要件であるとは限らない。 DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the present invention described in the claims. Also, not all of the configurations described below are essential constituent requirements of the present invention.
1.半導体装置
1−1.第1実施形態
[半導体装置の構成]
図1は、第1実施形態の半導体装置の構成例を示す図である。図1に示すように、第1実施形態の半導体装置1は、プロセッサー10、不揮発性メモリー20、RAM(Random
Access Memory)30、リセット回路40、発振回路50、GPIO(General Purpose Input Output)回路60、デバッグ回路70、マスク回路80、制御回路90及びこれらの要素が接続されるバス100を含んで構成されている。なお、本実施形態の半導体装置1は、これらの要素の一部を省略又は変更し、あるいは他の要素を追加した構成としてもよい。
1. 1. Semiconductor device 1-1. First Embodiment [Configuration of Semiconductor Device]
FIG. 1 is a diagram illustrating a configuration example of the semiconductor device according to the first embodiment. As shown in FIG. 1, the
(Access Memory) 30, reset
半導体装置1は、例えば、1チップのICで構成されていてもよいし、複数チップのICで構成されていてもよい。半導体装置1は、例えば、MCUやSOC(System On a Chip)であってもよい。
The
半導体装置1は、外部端子P01や不図示の通信インターフェース用の外部端子(クロック端子やデータ端子等)を介してホストCPU3と通信可能に構成されている。また、半導体装置1は、外部端子DBGを介してデバッグ装置2(デバッガーを実行する装置)と通信可能に構成されている。
The
プロセッサー10は、不揮発性メモリー20に記憶されているプログラムを実行し、当該プログラムに応じた処理を行う。例えば、半導体装置1が電子時計に使用される場合は、プロセッサー10は、プログラムを実行することにより、時刻の計算機能、ストップウォッチ機能、アラーム機能などを実現するための各種の処理を行ってもよい。
The
不揮発性メモリー20は、プロセッサー10が実行するプログラムや当該プログラムによって使用されるデータ等が記憶されている。不揮発性メモリー20は、例えば、フラッシュメモリーやEEPROM等で実現することができる。
The
RAM30は、一時的に必要な情報を記憶するための揮発性のメモリーであり、プロセッサー10が不揮発性メモリー20に記憶されているプログラムに応じた演算を行った結果のデータ等を一時的に記憶するなど、プロセッサー10の作業領域等として使用される。
The
リセット回路40は、半導体装置1に電源が投入された時に、あるいは、プロセッサー10がリセット命令を実行した場合に、ローレベルのリセット信号rst_nを発生させ、不揮発性メモリー20及び発振回路50を除く各回路を初期化する。
The
発振回路50は、半導体装置1に電源が投入されると発振動作を開始し、発振信号に基づくクロック信号clkを出力する。本実施形態では、半導体装置1に電源が投入された時、発振回路50の発振が安定した後にリセットが解除され(リセット信号rst_nがハイレベルになり)、プロセッサー10、デバッグ回路70、マスク回路80及び制御回路90は、クロック信号clkに同期して動作する。
When the
例えば、リセット回路40は、抵抗と容量を用いた時定数回路やクロック信号clkなどのクロックパルスを所定数カウントした場合にリセット信号rst_nをハイレベルにする回路によって実現してもよい。
For example, the
GPIO回路60は、外部端子P01とプロセッサー10との間における信号の入出力インターフェース回路であり、外部端子P01から入力される信号をプロセッサー10に伝搬させ、あるいは、プロセッサー10が出力する所望の信号を外部端子P01に伝搬さ
せる。例えば、外部端子P01がハイレベにプルアップされている場合に、ホストCPU3が、外部端子P01にローレベルの信号を供給すると、プロセッサー10は、GPIO回路60を介して、外部端子P01がハイレベルからローレベルに変化したことを認識し、所定の割り込み処理を実行するようにしてもよい。
The
デバッグ回路70は、不揮発性メモリー20に記憶されているプログラムやデータのデバッグ機能(ブレークポイントの設定やステップ実行などの機能)を備えた回路である。外部端子DBG(第1の外部端子の一例)は、当該プログラムやデータのデバッグに使用される外部端子であり、デバッグ装置2は、外部端子DBGを介してデバッグ回路70にアクセスすることでプログラムやデータのデバッグを実行することができる。具体的には、デバッグ装置2は、外部端子DBGを介してデバッグ回路70にデバッグ要求信号dbgreqを送信し、デバッグ回路70は、デバッグ要求信号dbgreqを受信すると、外部端子DBGを介してデバッグ装置2にデバッグ応答信号dbgackを送信する。デバッグ装置2は、デバッグ応答信号dbgackを受信した後、外部端子DBGを介してデバッグ回路70にデバッグ指令(ブレークポイントの設定やステップ実行などの指令)を送信し、デバッグ回路70はデバッグ指令に応じた処理を行う。
The
マスク回路80は、リセット解除から所定期間、外部端子DBGとデバッグ回路70との電気的な接続を切断する回路である。本実施形態では、マスク回路80は、この所定期間のみ、内部信号である不図示のマスク期間信号maskをハイレベルにする。そして、マスク回路80は、マスク期間信号maskがハイレベルの期間は、外部端子DBGから入力されるデバッグ要求信号dbgreqやデバッグ指令を伝搬させず、リセット解除から所定期間経過後(マスク期間信号maskがローレベルになった後)は、デバッグ要求信号dbgreqやデバッグ指令を伝搬させる。これにより、本実施形態では、少なくともリセット解除から所定期間は、外部端子DBGに入力される信号がすべて無効となり、外部端子DBGからデバッグ回路70に対するアクセスができない。
The
制御回路90は、リセット解除から所定期間(マスク期間信号maskがハイレベルの期間)において、当該所定期間の経過後も外部端子DBGとデバッグ回路70との電気的な接続を切断するか否かを制御する回路である。例えば、制御回路90は、所定期間(マスク期間信号maskがハイレベルの期間)において、プロセッサー10がプログラムに含まれるデバッグ端子無効命令(第1の命令の一例)を実行した場合に、当該所定期間の経過後も外部端子DBGとデバッグ回路70との電気的な接続を切断してもよい。また、制御回路90は、当該所定期間において、プロセッサー10がデバッグ端子無効命令を実行しなかった場合には、当該所定期間の経過後、外部端子DBGとデバッグ回路70とを電気的に接続するようにしてもよい。リセット解除からの所定期間(マスク期間信号maskがハイレベルの期間)は、プロセッサー10がデバッグ端子無効命令を実行するのに要する時間よりも長く設定される。
The control circuit 90 determines whether or not to disconnect the electrical connection between the external terminal DBG and the
本実施形態では、制御回路90は、スイッチ回路92及び端子制御回路94を含んで構成されている。
In the present embodiment, the control circuit 90 includes a
スイッチ回路92は、端子制御回路94からのデバッグイネーブル信号dbgenがハイレベルの時は、マスク回路80の出力信号(例えば、デバッグ要求信号dbgreqやデバッグ指令)をデバッグ回路70に伝搬させ、あるいは、デバッグ回路70の出力信号(例えば、デバッグ応答信号dbgack)をマスク回路80に伝搬させる。また、スイッチ回路92は、デバッグイネーブル信号dbgenがローレベルの時は、マスク回路80の出力信号をデバッグ回路70に伝搬させず、かつ、デバッグ回路70の出力信号をマスク回路80に伝搬させない。
When the debug enable signal dbgen from the
端子制御回路94は、リセット解除後にデバッグイネーブル信号dbgenをハイレベルに設定し、プロセッサー10がリセット解除後の所定期間(マスク期間信号maskがハイレベルの期間)においてデバッグ端子無効命令を実行した場合に、これ以降、デバッグイネーブル信号dbgenをローレベルに固定する。例えば、端子制御回路94は、デバッグイネーブル信号dbgenに対応するデバッグイネーブルビット(初期値は1)を含むレジスタ(不図示)を備え、デバッグ端子無効命令は、このデバッグイネーブルビットを0に設定するロード命令であってもよい。
The
このように構成された第1実施形態の半導体装置1によれば、プロセッサー10がリセット解除後の所定期間にデバッグ端子無効命令を実行しなければ、当該所定期間の経過後は外部端子DBGからデバッグ回路70に対するアクセスが可能になる。従って、不揮発性メモリー20に記憶されるプログラムやデータのデバッグが可能となる。
According to the
一方、プロセッサー10がリセット解除後の所定期間にデバッグ端子無効命令を実行した場合は、当該所定期間の経過後も外部端子DBGからデバッグ回路70に対するアクセスができなくなる。従って、不揮発性メモリー20に記憶されるプログラムやデータのデバッグが完了した後は、例えば、当該プログラムの先頭付近においてデバッグ端子無効命令を追加し、又は置き換えることにより、外部端子DBGからデバッグ回路70に対するアクセスができなくなり、デバッグ回路70を介したプログラムやデータの不正利用のおそれを低減させることができる。
On the other hand, when the
[半導体装置の動作例1]
図2は、不揮発性メモリー20に記憶されるデバッグ対象のプログラムの一例を示す図である。本実施形態では、プロセッサー10は、リセット解除後、最初に、不揮発性メモリー20の0x0000アドレスに配置された命令を実行する。図2の例では、0x0000アドレスにはベクターフェッチ命令が配置されており、プロセッサー10は、リセット解除後、最初にこのベクターフェッチ命令を実行する。ベクターフェッチ命令は、あらかじめ決められたリセットベクター(図2の例ではx0100アドレス)へのジャンプ命令であり、プロセッサー10は、次に、0x0100アドレス以降に記憶された各命令を順番に実行する。図2の例では、0x0100アドレス以降には、NOP命令(nop)、NOP命令(nop)、ロード命令(ld)、ロード命令(ld)、加算命令(add)、ロード命令(ld)、減算命令(sub)、ロード命令(ld)、ジャンプ命令(jp)、論理左シフト命令(sll)、ロード命令(ld)、ロード命令(ld)、・・・の命令列が順に配置されている。この0x0100アドレス以降に記憶されている命令列がデバッグ対象のプログラムである。
[Operation Example 1 of Semiconductor Device]
FIG. 2 is a diagram illustrating an example of a debug target program stored in the
図3は、プロセッサー10が図2の例のプログラムを実行する場合のタイミングチャートの一例を示す図である。図3の例では、時刻t0において、デバッグ装置2が外部端子DBGを介してデバッグ要求信号dbgreqを入力している。
FIG. 3 is a diagram showing an example of a timing chart when the
次に、時刻t1においてリセットが解除されると(リセット信号rst_nがローレベルからハイレベルに変化すると)、マスク期間信号maskとデバッグイネーブル信号dbgenはともにはハイレベルになっている。また、時刻t1においてリセットが解除された後、プロセッサー10は、クロック信号clkの立ち上がりエッジに同期して、不揮発性メモリー20の0x0000アドレスに配置されているベクターフェッチ命令(図2参照)を読み出して実行する。
Next, when the reset is released at time t 1 (when the reset signal rst_n changes from the low level to the high level), both the mask period signal mask and the debug enable signal dbgen are at the high level. Also, after the reset is released at time t 1, processor 10 reads in synchronism with the rising edge of the clock signal clk, the vector fetch is disposed 0x0000 address of the
そして、プロセッサー10は、時刻t2以降において、不揮発性メモリー20の0x0100アドレス以降に配置されている命令列(デバッグ対象のプログラム)(図2参照)を読み出して実行する。
Then, the
その後、時刻t3において、マスク期間信号maskがローレベルに変化し、デバッグイネーブル信号dbgenがハイレベルであるため、デバッグ回路70がデバッグ要求信号dbgreqを受け取り、外部端子DBGを介してデバッグ応答信号dbgackを出力する。
After that, at time t 3 , the mask period signal mask changes to low level, and the debug enable signal dbgen is high level. Therefore, the
デバッグ装置2は、デバッグ応答信号dbgackを受け取り、時刻t4において、デバッグ要求信号dbgreqを停止し、以降は、外部端子DBGを介して、デバッグ回路70にデバッグ指令を入力可能になる。
この図3の例では、リセット解除後、クロック信号clkのクロックパルスが8個分の期間はマスク期間信号maskがハイレベルであり、デバッグ装置2は、この期間は外部端子DBGからデバッグ回路70へのアクセスができないが、当該期間の経過後はアクセス可能となる。
In the example of FIG. 3, the mask period signal mask is at a high level during a period of eight clock pulses of the clock signal clk after the reset is released, and the
[半導体装置の動作例2]
図4は、図2のプログラムのデバッグが完了した後に不揮発性メモリー20に記憶されるプログラムの一例を示す図であり、図5は、プロセッサー10が図4の例のプログラムを実行する場合のタイミングチャートの一例を示す図である。図4の例では、図2の例において、デバッグ対象のプログラムの先頭の0x0100アドレスと0x0102アドレスに配置されていた2つのNOP命令(nop)がデバッグ端子無効命令に置き換わっており、その他は図2の例と同じである。
[Operation Example 2 of Semiconductor Device]
FIG. 4 is a diagram showing an example of a program stored in the
図5の例でも、図3の例と同様に、時刻t0において、外部端子DBGを介してデバッグ要求信号dbgreqが入力されている。また、時刻t1においてリセットが解除されると、マスク期間信号maskとデバッグイネーブル信号dbgenはともにハイレベルになっており、プロセッサー10は、クロック信号clkの立ち上がりエッジに同期してベクターフェッチ命令(図4参照)を読み出して実行する。
Also in the example of FIG. 5, the debug request signal dbgreq is input via the external terminal DBG at time t 0 as in the example of FIG. 3. When the reset at time t 1 is released, the mask period signal mask and debug enable signal dbgen has become both a high level, the
そして、プロセッサー10は、時刻t2以降において、不揮発性メモリー20の0x0100アドレス以降に配置されている命令列(デバッグが完了したプログラム)(図4参照)を読み出して実行する。ここで、プロセッサー10は、時刻t2〜時刻t3においてデバッグ端子無効命令を読み出して実行することで、デバッグイネーブル信号dbgenがハイレベルからローレベルに変化する。
Then, the
その後、時刻t4において、マスク期間信号maskがローレベルに変化するが、デバッグイネーブル信号dbgenがローレベルであるため、デバッグ回路70がデバッグ要求信号dbgreqを受け取ることができず、外部端子DBGからデバッグ応答信号dbgackが出力されない。
Then, at time t 4, but the mask period signal mask is changed to the low level, since the debug enable signal dbgen is at a low level, it is not possible to debug
この図5の例では、リセット解除後、クロック信号clkのクロックパルスが8個分の期間はマスク期間信号maskがハイレベルであり、この期間は外部端子DBGからデバッグ回路70へのアクセスができず、当該期間の経過後もデバッグイネーブル信号dbgenがローレベルのため、外部端子DBGからデバッグ回路70へのアクセスができない。従って、外部端子DBGからデバッグ回路70を介して不揮発性メモリーに記憶されているプログラムが不正利用されるおそれを低減させることができる。
In the example of FIG. 5, after the reset is released, the mask period signal mask is at a high level during a period of 8 clock pulses of the clock signal clk, and the
[半導体装置の動作例3]
本実施形態において、不揮発性メモリー20は、外部端子P01(第2の外部端子の一例)に所定の信号(例えば、ローレベルの信号)が入力された場合に、記憶している情報
を消去する。不揮発性メモリー20は、記憶している情報のうち、不正利用されたくないプログラムやデータのみを消去してもよいし、記憶しているすべての情報を消去してもよい。例えば、外部端子P01に所定の信号が入力された場合に、プロセッサー10が、割り込み処理によって、不揮発性メモリー20が記憶している情報を消去する制御を行ってもよい。
[Operation Example 3 of Semiconductor Device]
In the present embodiment, the
例えば、ユーザーが、不揮発性メモリー20に記憶されているプログラムを書き換える目的などで、外部端子P01からの入力信号gpio_nをハイレベルからローレベルに変化させると、これによって不揮発性メモリー20に記憶されている情報が消去されるようにしてもよい。
For example, when the user changes the input signal gpio_n from the external terminal P01 from a high level to a low level for the purpose of rewriting a program stored in the
また、半導体装置1のハイレベル又はローレベルに固定されるべき1又は複数の所定の外部端子(第2の外部端子の一例)のいずれかがハイレベルからローレベルに変化し、又はローレベルからハイレベルに変化した場合に不正なアクセスとみなして、プロセッサー10が不揮発性メモリー20に記憶されている情報を消去する制御を行ってもよい。
In addition, any one or a plurality of predetermined external terminals (an example of the second external terminal) to be fixed to the high level or the low level of the
不揮発性メモリー20は、例えば、消去対象の情報のすべてのビットを1にすることで消去し、すべてのビットが1のコードがNOP命令に割り当てられていてもよい。すなわち、消去された情報はすべてNOP命令になるようにしてもよい。
For example, the
図6は、不揮発性メモリー20の情報が全消去される場合のタイミングチャートの一例を示す図である。図6でも、図5の例と同様に、時刻t0において、外部端子DBGを介してデバッグ要求信号dbgreqが入力されている。時刻t1においてリセットが解除されると、マスク期間信号maskとデバッグイネーブル信号dbgenはともにハイレベルになっており、プロセッサー10は、時刻t1以降、クロック信号clkの立ち上がりエッジに同期して図4の例のプログラムを実行する。ここで、プロセッサー10は、時刻t2〜時刻t3においてデバッグ端子無効命令を読み出して実行することで、デバッグイネーブル信号dbgenがハイレベルからローレベルに変化する。
FIG. 6 is a diagram illustrating an example of a timing chart when information in the
その後、時刻t4において、マスク期間信号maskがローレベルに変化するが、デバッグイネーブル信号dbgenがローレベルであるため、デバッグ回路70がデバッグ要求信号dbgreqを受け取ることができず、外部端子DBGからデバッグ応答信号dbgackが出力されない。
Then, at time t 4, but the mask period signal mask is changed to the low level, since the debug enable signal dbgen is at a low level, it is not possible to debug
そして、時刻t5において、外部端子P01からの入力信号gpio_nがハイレベルからローレベルに変化すると、プロセッサー10は、時刻t5〜時刻t6において、割り込み処理によって、不揮発性メモリー20に記憶されている情報を全消去する。
Then, at time t 5, when the input signal gpio_n from the external terminal P01 is changed from the high level to the low level, the
その後、時刻t7において、リセット信号rst_nがハイレベルからローレベルに変化して半導体装置1に再びリセットがかかり、時刻t8において、外部端子DBGを介してデバッグ要求信号dbgreqが再び入力されている。そして、時刻t9においてリセットが解除されると、マスク期間信号maskとデバッグイネーブル信号dbgenはともにハイレベルになり、プロセッサー10は、クロック信号clkの立ち上がりエッジに同期して不揮発性メモリー20の0x0000アドレスに配置されている命令、すなわち、ベクターフェッチ命令が消去されることにより変化したNOP命令(nop)を読み出して実行する。不揮発性メモリー20は全消去されたため、すべてのアドレスにNOP命令(nop)が配置されている状態となっており、プロセッサー10は、その後、NOP命令(nop)を繰り返し実行する。
Then, at time t 7, again is reset to the
その後、時刻t10において、マスク期間信号maskがローレベルに変化し、デバッ
グイネーブル信号dbgenがハイレベルであるため、デバッグ回路70がデバッグ要求信号dbgreqを受け取り、外部端子DBGを介してデバッグ応答信号dbgackを出力する。
Then, at time t 10, the mask period signal mask is changed to the low level, since the debug enable signal dbgen is at a high level, the
このように、不揮発性メモリー20の情報を全消去した後(あるいは、不正利用されたくないプログラムやデータを消去した後)は、マスク期間信号maskがローレベルの期間にデバッグ端子無効命令が実行されないため、当該期間の経過後は、外部端子DBGからデバッグ回路70にアクセス可能となるが、不揮発性メモリー20には有益な情報が含まれていないため、不正利用のおそれを低減させることができる。
As described above, after the information in the
さらに、当該期間の経過後は、外部端子DBGからデバッグ回路70にアクセス可能となるため、外部端子DBGから不揮発性メモリー20の0x0000アドレスにベクターフェッチ命令を書き込み、かつ、リセットベクターのアドレス以降に、先頭付近にデバッグ端子無効命令が配置された新たなプログラムを書き込むことが可能となる。これにより、不正利用のおそれを低減させながらプログラムを書き換えることが可能となる。
Furthermore, since the
なお、不揮発性メモリー20は、複数の記憶領域(例えば、セクターやブロック)を有するように構成され、外部端子P01あるいはその他の所定の外部端子に所定の信号が入力された場合に、記憶している情報を記憶領域ごとに消去し、デバッグ端子無効命令が記憶されている記憶領域の情報を最後に消去するのが好ましい。例えば、図7に示すように、不揮発性メモリー20が、16個のセクターを有し、セクター単位で情報の消去を行う場合において、デバッグ端子無効命令がセクター1に記憶されている場合には、セクター2〜セクター16の情報の消去がすべて終了した後、最後に、セクター1の情報を消去する。このようにすれば、仮に、不揮発性メモリー20に記憶されている情報の消去が最後まで完了せずに、プログラムやデータの一部が消去されなかった場合でも、デバッグ端子無効命令も消去されずに残る確率が高まるので、消去されなかったプログラムやデータが不正に利用されるおそれを低減させることができる。
The
[半導体装置の動作例4]
本実施形態において、制御回路90は、プロセッサー10がデバッグ端子有効命令(第2の命令)を実行した場合に、外部端子DBGとデバッグ回路70とを電気的に接続するようにしてもよい。例えば、所定の外部端子に所定の信号が入力された場合に、プロセッサー10が、割り込み処理によってデバッグ端子有効命令を実行してもよい。例えば、外部端子P01からの入力信号gpio_nがハイレベルからローレベルに変化した場合に、プロセッサー10がデバッグ端子有効命令を実行してもよい。
[Operation Example 4 of Semiconductor Device]
In the present embodiment, the control circuit 90 may electrically connect the external terminal DBG and the
図8は、デバッグ端子有効命令が実行される場合のタイミングチャートの一例を示す図である。図8でも、図5の例と同様に、時刻t0において、外部端子DBGを介してデバッグ要求信号dbgreqが入力されている。時刻t1においてリセットが解除されると、マスク期間信号maskとデバッグイネーブル信号dbgenはともにハイレベルになっており、プロセッサー10は、時刻t1以降、クロック信号clkの立ち上がりエッジに同期して図4の例のプログラムを実行する。ここで、プロセッサー10は、時刻t2〜時刻t3においてデバッグ端子無効命令を読み出して実行することで、デバッグイネーブル信号dbgenがハイレベルからローレベルに変化する。
FIG. 8 is a diagram illustrating an example of a timing chart when the debug terminal valid instruction is executed. Also in FIG. 8, as in the example of FIG. 5, at time t 0, the debug request signal dbgreq via the external terminals DBG is input. When reset is at time t 1 is released, the mask period signal mask and debug enable signal dbgen has become both a high level, the
その後、時刻t4において、マスク期間信号maskがローレベルに変化するが、デバッグイネーブル信号dbgenがローレベルであるため、デバッグ回路70がデバッグ要求信号dbgreqを受け取ることができず、外部端子DBGからデバッグ応答信号dbgackが出力されない。
Then, at time t 4, but the mask period signal mask is changed to the low level, since the debug enable signal dbgen is at a low level, it is not possible to debug
そして、時刻t5において、外部端子P01からの入力信号gpio_nがハイレベルからローレベルに変化すると、プロセッサー10は、時刻t5において、割り込み処理によって、デバッグ端子有効命令を実行する。これにより、時刻t6において、デバッグイネーブル信号dbgenがローレベルからハイレベルに変化し、デバッグ回路70がデバッグ要求信号dbgreqを受け取り、外部端子DBGを介してデバッグ応答信号dbgackを出力する。
Then, at time t 5, when the input signal gpio_n from the external terminal P01 is changed from the high level to the low level, the
その後、デバッグ装置2は、デバッグ応答信号dbgackを受け取り、時刻t7において、デバッグ要求信号dbgreqを停止し、以降は、外部端子DBGを介して、デバッグ回路70にデバッグ指令を入力可能になる。
Then, the
例えば、所定の外部端子に所定の信号が入力された場合に外部端子DBGからデバッグ回路70にアクセス可能であるという情報を正規のユーザーのみに公開しておけば、不揮発性メモリー20に記憶されているプログラムやデータの不正利用のおそれを低減させることができる。また、正規のユーザーは、プログラムにデバッグ端子無効命令が実装された後であっても、プログラムのデバッグを行うことが可能となる。
For example, if information that the
[効果]
以上に説明したように、第1実施形態の半導体装置1によれば、リセット解除からの所定期間は、マスク回路80によって外部端子DBGとデバッグ回路70との電気的な接続が切断され、外部端子DBGとデバッグ回路70との電気的な接続が切断されている当該所定期間において、プロセッサー10がデバッグ端子無効命令を実行することによって、制御回路90が、所定期間の経過後も外部端子DBGとデバッグ回路70との電気的な切断するように制御する。従って、外部端子DBGからデバッグ回路70を介して不揮発性メモリー20に記憶されているプログラムが不正に利用されるおそれを低減させることができる。
[effect]
As described above, according to the
また、第1実施形態の半導体装置1は、マスク回路80と制御回路90により外部端子DBGとデバッグ回路70との電気的な接続を切断するという簡易な構成で実現することができる。従って、第1実施形態の半導体装置1によれば、コストの増加を低減しながらプログラムの不正利用のおそれを低減させることができる。
The
また、第1実施形態の半導体装置1によれば、外部端子DBGとデバッグ回路70との電気的な接続が切断されている当該所定期間において、プロセッサー10がデバッグ端子無効命令を実行しないことによって、制御回路90が、所定期間の経過後は外部端子DBGとデバッグ回路70とを電気的に接続するように制御する。従って、外部端子DBGからデバッグ回路70を介して不揮発性メモリー20に記憶されているプログラムのデバッグを容易に行うことができる。
Further, according to the
また、第1実施形態の半導体装置1によれば、プログラムの先頭付近にデバッグ端子無効命令を配置するか否かによって、外部端子DBGとデバッグ回路70とを電気的に接続させるか否かを制御することができる。従って、ユーザー(例えば、プログラムの開発者)が、外部端子DBGの有効/無効を任意に設定することができる。例えば、半導体装置1のリセット解除から所定期間の経過後、外部端子DBGが有効になり、デバッグ装置2が外部端子DBGからプログラムの先頭付近にデバッグ端子無効命令を書き込み、その後、半導体装置1をリセットすると外部端子DBGを無効にすることができる。
Further, according to the
1−2.第2実施形態
図9は、第2実施形態の半導体装置の構成例を示す図である。図9において、図1と同様の構成要素には、同じ符号を付している。図9に示すように、第2実施形態の半導体装
置1は、プロセッサー10、不揮発性メモリー20、RAM30、リセット回路40、発振回路50、GPIO回路60、GPIO回路62、デバッグ回路70、マスク回路80、制御回路90及びこれらの要素が接続されるバス100を含んで構成されている。なお、本実施形態の半導体装置1は、これらの要素の一部を省略又は変更し、あるいは他の要素を追加した構成としてもよい。以下では、第2実施形態の半導体装置1について、第1実施形態の半導体装置1との相違点を中心に説明し、重複する説明については適宜省略又は簡略する。
1-2. Second Embodiment FIG. 9 is a diagram illustrating a configuration example of a semiconductor device according to a second embodiment. In FIG. 9, the same components as those in FIG. As shown in FIG. 9, the
第2実施形態の半導体装置1は、第1実施形態の半導体装置1(図1)と比較すると、制御回路90の機能及びマスク回路80と制御回路90との接続関係が異なり、また、GPIO回路62が追加されている。さらに第1実施形態におけるデバッグ用の外部端子DBGは、デバッグ用の外部端子DBGと汎用入出力用の外部端子P00として兼用される外部端子DBG/P00に置き換わっている。
The
第2実施形態の半導体装置1は、第1実施形態の半導体装置1と同様に、外部端子P01や不図示の通信インターフェース用の外部端子(クロック端子やデータ端子等)を介してホストCPU3と通信可能に構成されている。また、第2実施形態の半導体装置1は、スイッチ4が切り替えられることにより、外部端子DBG/P00を介してデバッグ装置2(デバッガーを実行する装置)及びホストCPU3のいずれか一方と通信可能に構成されている。外部端子DBG/P00は、スイッチ4によりデバッグ装置2と電気的に接続される時はデバッグ用の外部端子DBGとして機能し、スイッチ4によりホストCPU3と電気的に接続される時は汎用入出力用の外部端子P00として機能する。
Similar to the
GPIO回路62は、外部端子DBG/P00(第1の外部端子の一例)とプロセッサー10との間における信号の入出力インターフェース回路であり、外部端子DBG/P00から入力される信号をプロセッサー10に伝搬させ、あるいは、プロセッサー10が出力する所望の信号を外部端子DBG/P00に伝搬させる。
The
マスク回路80は、リセット解除から所定期間、外部端子DBG/P00とデバッグ回路70との電気的な接続を切断する回路である。第2実施形態でも、マスク回路80は、この所定期間のみ、内部信号である不図示のマスク期間信号maskをハイレベルにする。そして、マスク回路80は、マスク期間信号maskがハイレベルの期間は、外部端子DBG/P00から入力されるデバッグ要求信号dbgreqやデバッグ指令を伝搬させず、リセット解除から所定期間経過後(マスク期間信号maskがローレベルになった後)は、デバッグ要求信号dbgreqやデバッグ指令を伝搬させる。これにより、本実施形態でも、少なくともリセット解除から所定期間は、外部端子DB/P00Gに入力される信号がすべて無効となり、外部端子DBG/P00からデバッグ回路70に対するアクセスができない。
The
制御回路90は、リセット解除から所定期間(マスク期間信号maskがハイレベルの期間)において、当該所定期間の経過後も外部端子DBG/P00とデバッグ回路70との電気的な接続を切断するか否かを制御する回路である。例えば、制御回路90は、リセット解除後、外部端子DBG/P00とマスク回路80とを電気的に接続し、かつ、外部端子DBG/P00とGPIO62との電気的な接続を切断する。そして、制御回路90は、所定期間(マスク期間信号maskがハイレベルの期間)において、プロセッサー10がプログラムに含まれるデバッグ端子無効命令(第1の命令の一例)を実行した場合に、外部端子DBG/P00とGPIO回路62とを電気的に接続し、かつ、外部端子DBG/P00とデバッグ回路70との電気的な接続を切断することにより、当該所定期間の経過後も、外部端子DBG/P00とデバッグ回路70との電気的な接続を切断してもよい。また、制御回路90は、当該所定期間において、プロセッサー10がデバッグ端子無
効命令を実行しなかった場合には、当該所定期間の経過後も、外部端子DBG/P00とマスク回路80とを電気的に接続し、かつ、外部端子DBG/P00とGPIO回路62との電気的な接続を切断することにより、外部端子DBG/P00とデバッグ回路70とを電気的に接続してもよい。
The control circuit 90 determines whether or not to disconnect the electrical connection between the external terminal DBG / P00 and the
本実施形態では、制御回路90は、端子制御回路94及びセレクター96を含んで構成されている。
In the present embodiment, the control circuit 90 includes a
端子制御回路94は、第1実施形態(図1)と同様に、リセット解除後にデバッグイネーブル信号dbgenをハイレベルに設定し、プロセッサー10がリセット解除後の所定期間(マスク期間信号maskがハイレベルの期間)においてデバッグ端子無効命令を実行した場合に、これ以降、デバッグイネーブル信号dbgenをローレベルに固定する。
Similarly to the first embodiment (FIG. 1), the
セレクター96は、端子制御回路94からのデバッグイネーブル信号dbgenに応じて、外部端子DBG/P00とデバッグ回路70及びGPIO回路62のうちの一方とを電気的に接続し、外部端子DBG/P00とデバッグ回路70及びGPIO回路62のうちの他方との電気的な接続を切断する回路である。
The selector 96 electrically connects the external terminal DBG / P00 and one of the
例えば、セレクター96は、デバッグイネーブル信号dbgenがハイレベルの時は、外部端子DBG/P00からの入力信号(例えば、デバッグ要求信号dbgreqやデバッグ指令)をマスク回路80に伝搬させ、あるいは、マスク回路80の出力信号(デバッグ回路70の出力信号(例えば、デバッグ応答信号dbgack))を外部端子DBG/P00に伝搬させる。また、セレクター96は、デバッグイネーブル信号dbgenがローレベルの時は、外部端子DBG/P00からの入力信号をGPIO回路62に伝搬させ、あるいは、GPIO回路62の出力信号を外部端子DBG/P00に伝搬させる。
For example, when the debug enable signal dbgen is at a high level, the selector 96 propagates an input signal (for example, a debug request signal dbgreq or a debug command) from the external terminal DBG / P00 to the
第2実施形態の半導体装置1におけるその他の構成及び機能は、第1実施形態の半導体装置1と同様であるため、その説明を省略する。また、第2実施形態の半導体装置1の動作例は、例えば、第1実施形態で例示した動作例1〜4(図2〜図7)と同様であってもよいため、その図示及び説明を省略する。
Other configurations and functions of the
このように構成された第2実施形態の半導体装置1によれば、プロセッサー10がリセット解除後の所定期間にデバッグ端子無効命令を実行しなければ、当該所定期間の経過後は外部端子DBG/P00からデバッグ回路70に対するアクセスが可能になる。従って、不揮発性メモリー20に記憶されるプログラムやデータのデバッグが可能となる。
According to the
一方、プロセッサー10がリセット解除後の所定期間にデバッグ端子無効命令を実行した場合は、当該所定期間の経過後も外部端子DBG/P00からデバッグ回路70に対するアクセスができなくなる。従って、不揮発性メモリー20に記憶されるプログラムやデータのデバッグが完了した後は、例えば、当該プログラムの先頭付近においてデバッグ端子無効命令を追加し、又は置き換えることにより、外部端子DBG/P00からデバッグ回路70に対するアクセスができなくなり、デバッグ回路70を介したプログラムやデータの不正利用のおそれを低減させることができる。
On the other hand, when the
さらに、第2実施形態の半導体装置1によれば、1つの外部端子DBG/P00をデバッグ用の外部端子DBGと汎用入出力用の外部端子P00として兼用するので、外部端子数に制限がある場合にも適用することができる。
Furthermore, according to the
1−3.第3実施形態
図10は、第3実施形態の半導体装置の構成例を示す図である。図10において、図1
と同様の構成要素には、同じ符号を付している。図10に示すように、第3実施形態の半導体装置1は、プロセッサー10、不揮発性メモリー20、RAM30、リセット回路40、発振回路50、GPIO回路60、テスト回路72、マスク回路80、制御回路90及びこれらの要素が接続されるバス100を含んで構成されている。なお、本実施形態の半導体装置1は、これらの要素の一部を省略又は変更し、あるいは他の要素を追加した構成としてもよい。以下では、第3実施形態の半導体装置1について、第1実施形態の半導体装置1との相違点を中心に説明し、重複する説明については適宜省略又は簡略する。
1-3. Third Embodiment FIG. 10 is a diagram illustrating a configuration example of a semiconductor device according to a third embodiment. In FIG. 10, FIG.
Constituent elements similar to those in FIG. As shown in FIG. 10, the
第3実施形態の半導体装置1は、第1実施形態の半導体装置1(図1)と比較すると、デバッグ回路70がテスト回路72に置き換わっており、また、マスク回路80及び制御回路90の機能が異なる。
In the
第3実施形態の半導体装置1は、第1実施形態の半導体装置1と同様に、外部端子P01や不図示の通信インターフェース用の外部端子(クロック端子やデータ端子等)を介してホストCPU3と通信可能に構成されている。また、半導体装置1は、外部端子TSTを介して検査装置5と通信可能に構成されている。
Similar to the
テスト回路72は、半導体装置1に含まれる各回路が設計通りに動作するか否かをテストするための検査回路である。すなわち、外部端子TST(第1の外部端子の一例)は、半導体装置1の検査に使用される外部端子であり、検査装置5は、外部端子TSTを介してテスト回路72にアクセスすることで半導体装置1の検査を実行うことができる。具体的には、検査装置5は、外部端子TSTを介してテスト回路72にテスト指令(各回路の動作をテストする指令)を送信し、テスト回路72はテスト指令に応じたテスト処理を行う。そして、テスト回路72は、外部端子TSTを介して、テスト指令に応じたテスト結果を検査装置5に送信する。
The
マスク回路80は、リセット解除から所定期間、外部端子TSTとテスト回路72との電気的な接続を切断する回路である。第3実施形態でも、マスク回路80は、この所定期間のみ、内部信号である不図示のマスク期間信号maskをハイレベルにする。そして、マスク回路80は、マスク期間信号maskがハイレベルの期間は、外部端子TSTから入力されるテスト指令を伝搬させず、リセット解除から所定期間経過後(マスク期間信号maskがローレベルになった後)は、テスト指令を伝搬させる。これにより、本実施形態では、少なくともリセット解除から所定期間は、外部端子TSTに入力される信号がすべて無効となり、外部端子TSTからテスト回路72に対するアクセスができない。
The
制御回路90は、リセット解除から所定期間(マスク期間信号maskがハイレベルの期間)において、当該所定期間の経過後も外部端子TSTとテスト回路72との電気的な接続を切断するか否かを制御する回路である。例えば、制御回路90は、所定期間(マスク期間信号maskがハイレベルの期間)において、プロセッサー10がプログラムに含まれるテスト端子無効命令(第1の命令の一例)を実行した場合に、当該所定期間の経過後も外部端子TSTとテスト回路72との電気的な接続を切断してもよい。また、制御回路90は、当該所定期間において、プロセッサー10がテスト端子無効命令を実行しなかった場合には、当該所定期間の経過後、外部端子TSTとテスト回路72とを電気的に接続するようにしてもよい。リセット解除からの所定期間(マスク期間信号maskがハイレベルの期間)は、プロセッサー10がテスト端子無効命令を実行するのに要する時間よりも長く設定される。
The control circuit 90 determines whether or not to disconnect the electrical connection between the external terminal TST and the
第3実施形態でも、第1実施形態と同様に、制御回路90は、スイッチ回路92及び端子制御回路94を含んで構成されている。
Also in the third embodiment, the control circuit 90 includes a
スイッチ回路92は、端子制御回路94からのテストイネーブル信号tstenがハイレベルの時は、マスク回路80の出力信号(例えば、テスト指令)をテスト回路72に伝搬させ、あるいは、テスト回路72の出力信号(例えば、テスト結果)をマスク回路80に伝搬させる。また、スイッチ回路92は、テストイネーブル信号tstenがローレベルの時は、マスク回路80の出力信号をテスト回路72に伝搬させず、かつ、テスト回路72の出力信号をマスク回路80に伝搬させない。
When the test enable signal tsten from the
端子制御回路94は、リセット解除後にテストイネーブル信号tstenをハイレベルに設定し、プロセッサー10がリセット解除後の所定期間(マスク期間信号maskがハイレベルの期間)においてテスト端子無効命令を実行した場合に、これ以降、テストイネーブル信号tstenをローレベルに固定する。例えば、端子制御回路94は、テストイネーブル信号tstenに対応するテストイネーブルビット(初期値は1)を含むレジスタ(不図示)を備え、テスト端子無効命令は、このテストイネーブルビットを0に設定するロード命令であってもよい。
The
第3実施形態の半導体装置1におけるその他の構成及び機能は、第1実施形態の半導体装置1と同様であるため、その説明を省略する。また、第3実施形態の半導体装置1の動作例は、例えば、第3実施形態で例示した動作例1〜4(図2〜図7)において、「デバッグ端子無効命令」を「テスト端子無効命令」に、「デバッグイネーブル信号dbgen」を「テストイネーブル信号tsten」に、「デバッグ要求信号dbgreq」や「デバッグ指令」をテスト指令に、「デバッグ応答信号dbgack」を「テスト結果」に、「デバッグ端子有効命令」を「テスト端子有効命令」に、それぞれ置き換えたものと同様であってもよいため、その図示及び説明を省略する。
Other configurations and functions of the
このように構成された第3実施形態の半導体装置1によれば、プロセッサー10がリセット解除後の所定期間にテスト端子無効命令を実行しなければ、当該所定期間の経過後は外部端子TSTからテスト回路72に対するアクセスが可能になる。半導体装置1の検査が可能となる。
According to the
一方、プロセッサー10がリセット解除後の所定期間にテスト端子無効命令を実行した場合は、当該所定期間の経過後も外部端子TSTからテスト回路72に対するアクセスができなくなる。従って、半導体装置1の検査が終了した後は、例えば、不揮発性メモリー20に記憶されるプログラムの先頭付近においてテスト端子無効命令を追加し、又は置き換えることにより、外部端子TSTからテスト回路72に対するアクセスができなくなり、テスト回路72の不正利用(意図しない使用も含む)のおそれを低減させることができる。
On the other hand, when the
その他、第3実施形態の半導体装置1によれば、第1実施形態の半導体装置1と同様の効果を奏することができる。
In addition, according to the
2.電子機器
図11は、本実施形態の電子機器の構成の一例を示す機能ブロック図である。また、図12(A)は、本実施形態の電子機器の一例であるスマートフォンの外観の一例を示す図であり、図12(B)は、本実施形態の電子機器の一例である電子時計の外観の一例を示す図である。
2. Electronic Device FIG. 11 is a functional block diagram showing an example of the configuration of the electronic device of the present embodiment. FIG. 12A is a diagram illustrating an example of the appearance of a smartphone that is an example of the electronic device of the present embodiment, and FIG. 12B is a diagram of an electronic timepiece that is an example of the electronic device of the present embodiment. It is a figure which shows an example of an external appearance.
本実施形態の電子機器300は、半導体装置310、電源生成部320、操作部330、CPU(Central Processing Unit)340、通信部350、表示部360及び音出力部370を含んで構成されている。なお、本実施形態の電子機器は、図11の構成要素(各部)の一部を省略又は変更し、あるいは、他の構成要素を付加した構成としてもよい。
The
電源生成部320は、電子機器300で使用される各種電源を生成するためのものである。
The
操作部330は、操作キーやボタンスイッチ等により構成される入力装置であり、ユーザーによる操作に応じた操作信号を半導体装置310あるいはCPU340に出力する。
The
CPU340は、各種の計算処理や制御処理を行うものであり、例えば、上記の各実施形態におけるホストCPU3であってもよい。
The
通信部350は、半導体装置310と外部装置との間のデータ通信を成立させるための各種制御を行う。
The
表示部360は、LCD(Liquid Crystal Display)等により構成される表示装置であり、半導体装置310あるいはCPU340から入力される表示信号に基づいて各種の情報を表示する。表示部360には操作部330として機能するタッチパネルが設けられていてもよい。
The
音出力部370は、半導体装置310あるいはCPU340から入力される音信号に基づいて各種の音(音声を含む)を出力するためのものであり、例えば、スピーカーやブザー等により構成される。
The
半導体装置310は、操作部330からの操作信号に応じた各種の処理、CPU340とのデータ通信に基づく各種の処理、通信部350を介して外部装置との間で行うデータ通信処理、表示部360に各種の情報を表示させるための表示信号を生成する処理、音出力部370に各種の音を出力させるための音出力信号を生成する処理等を行う。半導体装置310は、例えば、MCUであってもよい。
The
半導体装置310として例えば上述した各実施形態の半導体装置1を適用することにより、不正利用のおそれを低減させた信頼性の高い電子機器を実現することができる。
By applying, for example, the
このような電子機器300としては種々の電子機器が考えられ、例えば、パーソナルコンピューター(例えば、モバイル型パーソナルコンピューター、ラップトップ型パーソナルコンピューター、タブレット型パーソナルコンピューター)、スマートフォンや携帯電話機などの移動体端末、ディジタルスチールカメラ、インクジェット式吐出装置(例えば、インクジェットプリンター)、ルーターやスイッチなどのストレージエリアネットワーク機器、ローカルエリアネットワーク機器、移動体端末基地局用機器、テレビ、ビデオカメラ、ビデオレコーダー、カーナビゲーション装置、電子時計、リアルタイムクロック装置、ページャー、電子手帳(通信機能付も含む)、電子辞書、電卓、電子ゲーム機器、ゲーム用コントローラー、ワードプロセッサー、ワークステーション、テレビ電話、防犯用テレビモニター、電子双眼鏡、POS端末、医療機器(例えば電子体温計、血圧計、血糖計、心電図計測装置、超音波診断装置、電子内視鏡)、魚群探知機、各種測定機器、計器類(例えば、車両、航空機、船舶の計器類)、フライトシミュレーター、ヘッドマウントディスプレイ、モーショントレース、モーショントラッキング、モーションコントローラー、PDR(歩行者位置方位計測)等が挙げられる。
Various electronic devices can be considered as such an
本発明は本実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。 The present invention is not limited to the present embodiment, and various modifications can be made within the scope of the gist of the present invention.
例えば、上記の第3実施形態の半導体装置1は、テスト回路72の不正利用からの保護
を可能とするように、第1実施形態の半導体装置1を変形したものであったが、本発明は、テスト回路72の不正利用からの保護を可能とするように、第1実施形態の半導体装置1を第3実施形態の半導体装置1に変形したのと同様の方法により、第2実施形態の半導体装置1を変形した半導体装置にも適用することができる。
For example, the
上述した実施形態および変形例は一例であって、これらに限定されるわけではない。例えば、各実施形態および各変形例を適宜組み合わせることも可能である。 The above-described embodiments and modifications are merely examples, and the present invention is not limited to these. For example, it is possible to appropriately combine each embodiment and each modification.
本発明は、実施の形態で説明した構成と実質的に同一の構成(例えば、機能、方法及び結果が同一の構成、あるいは目的及び効果が同一の構成)を含む。また、本発明は、実施の形態で説明した構成の本質的でない部分を置き換えた構成を含む。また、本発明は、実施の形態で説明した構成と同一の作用効果を奏する構成又は同一の目的を達成することができる構成を含む。また、本発明は、実施の形態で説明した構成に公知技術を付加した構成を含む。 The present invention includes configurations that are substantially the same as the configurations described in the embodiments (for example, configurations that have the same functions, methods, and results, or configurations that have the same objects and effects). In addition, the invention includes a configuration in which a non-essential part of the configuration described in the embodiment is replaced. In addition, the present invention includes a configuration that exhibits the same operational effects as the configuration described in the embodiment or a configuration that can achieve the same object. Further, the invention includes a configuration in which a known technique is added to the configuration described in the embodiment.
1 半導体装置、2 デバッグ装置、3 ホストCPU、4 スイッチ、5 検査装置、10 プロセッサー、20 不揮発性メモリー、30 RAM、40 リセット回路、50 発振回路、60 GPIO回路、62 GPIO回路、70 デバッグ回路、72 テスト回路、80 マスク回路、90 制御回路、92 スイッチ回路、94 端子制御回路、96 セレクター、100 バス、300 電子機器、310 半導体装置、320 電源生成部、330 操作部、340 CPU、350 通信部、360 表示部、370 音出力部
DESCRIPTION OF
Claims (6)
前記不揮発性メモリーに記憶されているプログラムを実行するプロセッサーと、
前記プログラムのデバッグ機能を備えたデバッグ回路と、
前記プログラムのデバッグに使用される第1の外部端子と、
第2の外部端子と、
リセット解除から所定期間、前記第1の外部端子と前記デバッグ回路との電気的な接続を切断するマスク回路と、
前記所定期間において、前記所定期間の経過後も前記第1の外部端子と前記デバッグ回路との電気的な接続を切断するか否かを制御する制御回路と、を含み、
前記制御回路は、
前記所定期間において、前記プロセッサーが前記プログラムに含まれる第1の命令を実行した場合に、前記所定期間の経過後も前記第1の外部端子と前記デバッグ回路との電気的な接続を切断し、
前記不揮発性メモリーは、
複数の記憶領域を有し、
前記第2の外部端子に所定の信号が入力された場合に、記憶している情報を前記記憶領域ごとに消去し、前記第1の命令が記憶されている前記記憶領域の情報を最後に消去する、半導体装置。 Non-volatile memory,
A processor for executing a program stored in the nonvolatile memory;
A debugging circuit having a debugging function of the program;
A first external terminal used for debugging the program;
A second external terminal;
A mask circuit for disconnecting the electrical connection between the first external terminal and the debug circuit for a predetermined period from reset release;
Wherein the predetermined period, see contains a control circuit for controlling whether or not to disconnect after also with the first external terminal electrical connection between the debug circuit of the predetermined period,
The control circuit includes:
In the predetermined period, when the processor executes a first instruction included in the program, the electrical connection between the first external terminal and the debug circuit is disconnected even after the predetermined period has elapsed,
The nonvolatile memory is
A plurality of storage areas;
When a predetermined signal is input to the second external terminal, the stored information is erased for each storage area, and the information in the storage area in which the first instruction is stored is erased last. A semiconductor device.
前記制御回路は、
前記所定期間において、前記プロセッサーが前記第1の命令を実行した場合に、前記第1の外部端子と前記入出力インターフェース回路とを電気的に接続する、請求項1に記載の半導体装置。 A signal input / output interface circuit between the first external terminal and the processor;
The control circuit includes:
Wherein the predetermined period, when the processor executes the first instruction, electrically connecting the first external terminal and the input-output interface circuit, a semiconductor device according to claim 1.
前記プロセッサーが第2の命令を実行した場合に、前記第1の外部端子と前記デバッグ回路とを電気的に接続する、請求項1乃至3のいずれか一項に記載の半導体装置。 The control circuit includes:
When the processor executes the second instruction, the first electrically connecting the external terminal and the debug circuit, a semiconductor device according to any one of claims 1 to 3.
前記不揮発性メモリーに記憶されているプログラムを実行するプロセッサーと、
検査回路と、
検査に使用される第1の外部端子と、
第2の外部端子と、
リセット解除から所定期間、前記第1の外部端子と前記検査回路との電気的な接続を切断するマスク回路と、
前記所定期間において、前記所定期間の経過後も前記第1の外部端子と前記検査回路との電気的な接続を切断するか否かを制御する制御回路と、を含み、
前記制御回路は、
前記所定期間において、前記プロセッサーが前記プログラムに含まれる第1の命令を実行した場合に、前記所定期間の経過後も前記第1の外部端子と前記検査回路との電気的な接続を切断し、
前記不揮発性メモリーは、
複数の記憶領域を有し、
前記第2の外部端子に所定の信号が入力された場合に、記憶している情報を前記記憶領域ごとに消去し、前記第1の命令が記憶されている前記記憶領域の情報を最後に消去する、半導体装置。 Non-volatile memory,
A processor for executing a program stored in the nonvolatile memory;
An inspection circuit;
A first external terminal used for inspection;
A second external terminal;
A mask circuit for disconnecting the electrical connection between the first external terminal and the inspection circuit for a predetermined period from reset release;
Wherein the predetermined period, see contains a control circuit for controlling whether or not to disconnect after also with the first external terminal electrically connected with the inspection circuit of the predetermined period,
The control circuit includes:
In the predetermined period, when the processor executes a first instruction included in the program, the electrical connection between the first external terminal and the inspection circuit is disconnected even after the predetermined period has elapsed,
The nonvolatile memory is
A plurality of storage areas;
When a predetermined signal is input to the second external terminal, the stored information is erased for each storage area, and the information in the storage area in which the first instruction is stored is erased last. A semiconductor device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014206361A JP6390840B2 (en) | 2014-10-07 | 2014-10-07 | Semiconductor device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014206361A JP6390840B2 (en) | 2014-10-07 | 2014-10-07 | Semiconductor device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016076106A JP2016076106A (en) | 2016-05-12 |
JP6390840B2 true JP6390840B2 (en) | 2018-09-19 |
Family
ID=55949967
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014206361A Active JP6390840B2 (en) | 2014-10-07 | 2014-10-07 | Semiconductor device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6390840B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11256605B2 (en) | 2017-10-19 | 2022-02-22 | Samsung Electronics Co., Ltd. | Nonvolatile memory device |
KR102396448B1 (en) * | 2017-10-19 | 2022-05-11 | 삼성전자주식회사 | Nonvolatile memory device and operation method thereof |
JP7413832B2 (en) * | 2020-02-27 | 2024-01-16 | セイコーエプソン株式会社 | semiconductor equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4260984B2 (en) * | 1999-06-04 | 2009-04-30 | 株式会社東芝 | Information processing apparatus and information processing method |
EP1920377A2 (en) * | 2005-08-22 | 2008-05-14 | Nxp B.V. | Embedded memory protection |
JP2008152421A (en) * | 2006-12-15 | 2008-07-03 | Renesas Technology Corp | Semiconductor integrated circuit |
US7657722B1 (en) * | 2007-06-30 | 2010-02-02 | Cirrus Logic, Inc. | Method and apparatus for automatically securing non-volatile (NV) storage in an integrated circuit |
JP2012079152A (en) * | 2010-10-04 | 2012-04-19 | Yokogawa Electric Corp | Semiconductor device |
-
2014
- 2014-10-07 JP JP2014206361A patent/JP6390840B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016076106A (en) | 2016-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8316200B2 (en) | Microcomputer, electronic instrument, and flash memory protection method | |
US8621298B2 (en) | Apparatus for protecting against external attack for processor based on arm core and method using the same | |
US20150253387A1 (en) | Programmable interface-based validation and debug | |
KR20170055933A (en) | Method and apparatus for protecting kernel control-flow integrity using static binary instrumentaiton | |
KR20090118863A (en) | Reducing power-on time by simulating operating system memory hot add | |
JPH11282713A (en) | Microcomputer, electronic equipment and debug system | |
CN109388345B (en) | Data reading method of memory, display device and computer readable storage medium | |
JP6390840B2 (en) | Semiconductor device and electronic equipment | |
CN113077834A (en) | Storage device testing method and device, television and storage medium | |
US20080010541A1 (en) | Integrated circuit device, debugging tool, debugging system, microcomputer, and electronic instrument | |
KR100506031B1 (en) | Microcomputer, electronic equipment and emulation method | |
JP4235831B2 (en) | Target system, debug system, integrated circuit device, microcomputer and electronic device | |
US8924788B2 (en) | Replaying architectural execution with a probeless trace capture | |
JP4910119B2 (en) | Measuring device control method | |
JP6433966B2 (en) | Information processing apparatus, information processing method, and program | |
US7370186B1 (en) | Multi-tasking bootstrap system and method | |
KR100623279B1 (en) | Embedded system debugging device and method thereof | |
US9291672B2 (en) | Debug system, apparatus and method thereof for providing graphical pin interface | |
JP2007207075A (en) | Cpu, integrated circuit device, microcomputer, electronic equipment and method for controlling cpu | |
JP2010231607A (en) | Emulator | |
JP2007193572A (en) | Cpu, integrated circuit device, microcomputer, and electronic equipment | |
TW201321972A (en) | Debugging method and computer system using the same | |
CN117709253B (en) | Chip testing method and device, electronic equipment and readable storage medium | |
KR0150161B1 (en) | Device for displaying register and ram data | |
TWI760673B (en) | Electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20171003 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180418 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180516 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180711 |
|
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: 20180725 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180807 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6390840 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |