JP6070600B2 - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP6070600B2
JP6070600B2 JP2014031698A JP2014031698A JP6070600B2 JP 6070600 B2 JP6070600 B2 JP 6070600B2 JP 2014031698 A JP2014031698 A JP 2014031698A JP 2014031698 A JP2014031698 A JP 2014031698A JP 6070600 B2 JP6070600 B2 JP 6070600B2
Authority
JP
Japan
Prior art keywords
mode
test mode
communication
microcomputer
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.)
Expired - Fee Related
Application number
JP2014031698A
Other languages
Japanese (ja)
Other versions
JP2015156196A (en
Inventor
山田 健二
健二 山田
祐樹 浅田
祐樹 浅田
桂太 早川
桂太 早川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2014031698A priority Critical patent/JP6070600B2/en
Publication of JP2015156196A publication Critical patent/JP2015156196A/en
Application granted granted Critical
Publication of JP6070600B2 publication Critical patent/JP6070600B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、外部より動作モードを切り替えてテストモードの実行が可能であり、ブレーク要求信号が入力されると、実行中の動作を停止させるCPUを備えてなるマイクロコンピュータに関する。   The present invention relates to a microcomputer that includes a CPU capable of executing a test mode by switching an operation mode from the outside and stopping an operation being executed when a break request signal is input.

マイクロコンピュータ(以下、マイコンと称す)には、所謂オンチップ・デバッグ(以下、OCDと称す)機能を備えており、外部より動作モードを切り替えてテストモードの実行が可能に構成されているものがある。そして、テストモードを実行する際には、マイコンをパーソナルコンピュータ等のデバッガと接続して通信可能とし、デバッガがブレーク要求信号を発行した際にCPUが実行中の動作を停止させるOCDブレーク機能も必要となる。   A microcomputer (hereinafter referred to as a microcomputer) has a so-called on-chip debugging (hereinafter referred to as OCD) function, and is configured to be able to execute a test mode by switching the operation mode from the outside. is there. When executing the test mode, an OCD break function is required to connect the microcomputer to a debugger such as a personal computer so that communication is possible, and when the debugger issues a break request signal, the CPU stops the operation being executed. It becomes.

また、マイコンには、低コスト化及び小型化が不断に要求されているため、製品として通常モードで動作する際には不要となる検査用の端子は極力少なくしたいという事情がある。例えば、特許文献1に開示されている技術は、半導体集積回路にテスト用カウンタ31を備え、テスト信号T0がアサートされている期間をクロック信号にカウントし、最終カウント値C0をテストモードデコーダ33でデコードすることで、多様なテストモードを設定可能にしている。また、マイコンのリセット端子に与えるリセット信号の長さをリセット信号生成回路32でカウントし、そのカウント値が所定値未満の場合は通常(ユーザロジック回路20)のリセットを行い、所定値以上の場合はテスト用カウンタ31をリセットする。   In addition, since the microcomputer is constantly required to be low in cost and downsized, there is a circumstance that it is desired to minimize the number of inspection terminals that are unnecessary when operating in the normal mode as a product. For example, the technique disclosed in Patent Document 1 includes a test counter 31 in a semiconductor integrated circuit, counts a period during which the test signal T0 is asserted as a clock signal, and uses the test mode decoder 33 to calculate a final count value C0. By decoding, various test modes can be set. Further, the reset signal generation circuit 32 counts the length of the reset signal applied to the reset terminal of the microcomputer. When the count value is less than a predetermined value, the normal (user logic circuit 20) is reset, and when the count value is equal to or greater than the predetermined value. Resets the test counter 31.

特開2005−274357号公報JP 2005-274357 A

しかしながら、特許文献1では、半導体集積回路をデバッガに接続した状態でデバッグを行うことは想定しておらず、特定のテストモードを設定すると、そのモードに応じて自律的にテストを実行する構成となっている。したがって、デバッガが発行したブレーク要求を受け付けることも想定されていない。リセット信号の長さに応じて与える信号の種類を変化させる構成を利用してブレーク要求を与えることを想定すると、マイコンを起動させる際にCPUがブレーク供給を受け付けて、起動が停止することになってしまう。   However, Patent Document 1 does not assume that debugging is performed with a semiconductor integrated circuit connected to a debugger. When a specific test mode is set, a test is performed autonomously according to the mode. It has become. Therefore, it is not assumed that a break request issued by the debugger is accepted. Assuming that a break request is given by using a configuration that changes the type of signal to be applied according to the length of the reset signal, the CPU accepts the break supply when starting the microcomputer, and the start stops. End up.

本発明は上記事情に鑑みてなされたものであり、その目的は、動作モードの切り替えと、外部との通信と、ブレーク要求信号の入力とを、極力少ない端子で実現可能とするマイクロコンピュータを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a microcomputer capable of realizing operation mode switching, external communication, and break request signal input with as few terminals as possible. There is to do.

請求項1記載のマイクロコンピュータによれば、外部より動作モードの切り替えを行うために使用されると共に、回路動作をテストするためのテストモードにおいて、外部とCPUとが通信を行うために使用されるモード切替え/通信用端子を備える。また、初期状態で通常動作モードが設定されていると共に、モード切替え/通信用端子を介して行われる通信により、テストモード書き込みコマンドが入力されるとテストモードが設定されるテストモードレジスタを備える。   According to the microcomputer of the first aspect, the microcomputer is used for switching the operation mode from the outside, and is used for communication between the outside and the CPU in the test mode for testing the circuit operation. A mode switching / communication terminal is provided. In addition, a normal operation mode is set in the initial state, and a test mode register is provided in which a test mode is set when a test mode write command is input by communication performed via a mode switching / communication terminal.

そして、カウンタは、モード切替え/通信用端子に接続され、当該端子のレベルがアクティブに維持されている間カウント動作を継続し、第1比較器は、カウンタのカウンタ値が、前記通信に要する時間よりも長く設定される第1閾値以上で、且つ前記第1閾値よりも大きく設定される第2閾値未満であればCPUにブレーク要求信号を出力する。また、第2比較器は、前記カウンタ値が、前記第2閾値以上になると、テストモードを無効化して通常動作モードを設定するための信号を出力する。このように構成すれば、動作モードの切り替えと、外部との通信と、ブレーク要求信号の入力とを1つのモード切替え/通信用端子を利用して行うことができる。 The counter is connected to the mode switching / communication terminal and continues counting while the level of the terminal is maintained active. The first comparator determines that the counter value of the counter is the time required for the communication. A break request signal is output to the CPU if it is greater than or equal to the first threshold set longer than the first threshold and less than the second threshold set greater than the first threshold . The second comparator, the counter value becomes equal to or larger than the second threshold value, outputs a signal for setting the normal operation mode to disable the test mode. If comprised in this way, switching of an operation mode, communication with the exterior, and the input of a break request signal can be performed using one mode switching / communication terminal.

第1実施形態であり、マイクロコンピュータの構成を要旨に係る部分について示す機能ブロック図The functional block diagram which is 1st Embodiment and shows about the part which concerns on the structure of a microcomputer (a)はデバッグ通信、(b)はOCDブレーク要求、(c)はモード管理に対応する信号形態を示すタイミングチャート(A) is a debug communication, (b) is an OCD break request, and (c) is a timing chart showing a signal form corresponding to mode management. モード/通信端子がローレベルに固定されている場合のカウンタレジスタの動作を示すタイミングチャートTiming chart showing counter register operation when mode / communication terminal is fixed at low level デバッガによりマイコンのデバッグを行う場合の、デバッガとマイコンとの間の処理シーケンスを示す図Diagram showing the processing sequence between the debugger and the microcomputer when debugging the microcomputer with the debugger 第2実施形態を示す図1相当図FIG. 1 equivalent view showing the second embodiment

(第1実施形態)
図1に示すように、マイクロコンピュータ(マイコン)1は、CPU2と、ROM3,RAM4,周辺回路5A及び5Bなどが、アドレスバス6及びデータバス7を介して相互に接続されている。また、アドレスバス6及びデータバス7には、バス制御切替回路8が挿入されており、バス制御切替回路8を介してモード/通信回路9が接続されている。モード/通信回路9は、双方向I/O回路10を介して、マイコン1の外部端子であるモード/通信端子11(モード切替え/通信用端子)に接続されている。
(First embodiment)
As shown in FIG. 1, in a microcomputer 1, a CPU 2, a ROM 3, a RAM 4, peripheral circuits 5 </ b> A and 5 </ b> B are connected to each other via an address bus 6 and a data bus 7. A bus control switching circuit 8 is inserted in the address bus 6 and the data bus 7, and a mode / communication circuit 9 is connected via the bus control switching circuit 8. The mode / communication circuit 9 is connected via a bidirectional I / O circuit 10 to a mode / communication terminal 11 (mode switching / communication terminal) that is an external terminal of the microcomputer 1.

モード/通信端子11は、外部よりマイコン1の動作モードを切り替え設定するために使用されると共に、動作モードとしてテストモードが設定された際に、例えばパーソナルコンピュータ等のデバッガ(図示せず)が接続されてCPU2とシリアル通信を行うために使用される。モード/通信回路9は、上記の通信を仲介してマイコン1のOCD機能を実現するための回路である。   The mode / communication terminal 11 is used to switch and set the operation mode of the microcomputer 1 from the outside. When the test mode is set as the operation mode, for example, a debugger (not shown) such as a personal computer is connected. And used for serial communication with the CPU 2. The mode / communication circuit 9 is a circuit for realizing the OCD function of the microcomputer 1 through the above communication.

双方向I/O回路10は、モード/通信回路9の通信インターフェイス(I/F)部12に接続されている。通信I/F部12は、双方向I/O回路10との間で、信号の受信と送信とをそれぞれ1線式(シリアル)通信により行うもので、通信I/F部12が受信した信号は、受信デコーダ13においてデコードされてOCDコマンドが発行される。また、通信I/F部12の送信フレーム生成部14は、CPU2が出力したコマンド応答データが入力されると、そのデータを含む送信フレームを生成して双方向I/O回路10に送信する。   The bidirectional I / O circuit 10 is connected to a communication interface (I / F) unit 12 of the mode / communication circuit 9. The communication I / F unit 12 performs signal reception and transmission with the bidirectional I / O circuit 10 by 1-wire (serial) communication. The signal received by the communication I / F unit 12 Is decoded by the reception decoder 13 and an OCD command is issued. In addition, when command response data output from the CPU 2 is input, the transmission frame generation unit 14 of the communication I / F unit 12 generates a transmission frame including the data and transmits the transmission frame to the bidirectional I / O circuit 10.

上記OCDコマンドは、OCDコマンドI/F部15に入力され、ここでコマンドに対応したアドレス及びデータが生成されてバス制御切替回路8に出力される。また、OCDコマンドI/F部15は、入力されるOCDコマンドに応じて、バス制御切替回路8のバス制御状態を選択する信号を出力する。バス制御切替回路8は、マイコン1がノーマルモード(通常動作モード)に設定されている場合はモード/通信回路9を切り離し、CPU2が通常通り、アドレスバス6及びデータバス7を介してROM3,RAM4,周辺回路5にアクセス可能となるように制御する。   The OCD command is input to the OCD command I / F unit 15 where an address and data corresponding to the command are generated and output to the bus control switching circuit 8. The OCD command I / F unit 15 outputs a signal for selecting the bus control state of the bus control switching circuit 8 in accordance with the input OCD command. The bus control switching circuit 8 disconnects the mode / communication circuit 9 when the microcomputer 1 is set to the normal mode (normal operation mode), and the CPU 2 performs the ROM 3 and RAM 4 via the address bus 6 and the data bus 7 as usual. The peripheral circuit 5 is controlled to be accessible.

一方、マイコン1がテストモードに設定された場合、バス制御切替回路8は、OCDコマンドI/F部15を介して発行されたコマンドを、CPU2が受信可能となるように制御する。例えば、上記コマンドは、周辺回路5A内に設けられているOCDコマンドバッファに格納され、CPU2は周辺回路5AにアクセスしてOCDコマンドを取得する。その他、OCDコマンドバッファをバス制御切替回路8の内部に設けても良い。   On the other hand, when the microcomputer 1 is set to the test mode, the bus control switching circuit 8 performs control so that the CPU 2 can receive the command issued via the OCD command I / F unit 15. For example, the command is stored in an OCD command buffer provided in the peripheral circuit 5A, and the CPU 2 accesses the peripheral circuit 5A and acquires the OCD command. In addition, an OCD command buffer may be provided inside the bus control switching circuit 8.

また、テストモードでは、与えられたOCDコマンドに応じてCPU2が外部のデバッガに送信するデータが、バス制御切替回路8及びOCDコマンドI/F部15を介して通信I/F部12の送信フレーム生成部14に入力される。これにより、外部のデバッガとマイコン1のCPU2との間の双方向通信を可能にしている。   In the test mode, the data transmitted by the CPU 2 to the external debugger in response to the given OCD command is transmitted from the communication I / F unit 12 via the bus control switching circuit 8 and the OCD command I / F unit 15. Input to the generation unit 14. This enables bidirectional communication between the external debugger and the CPU 2 of the microcomputer 1.

また、OCDコマンドは、テストモードレジスタ16にも入力されている。テストモードレジスタ16は、リセットされた初期状態でノーマルモード設定信号を出力しており、OCDコマンドによりテストモードの設定が指示された場合にテストモード設定信号を出力する。これらのモード設定信号は、テストモード無効化部17を介して、例えば周辺回路5A,5B等に出力されている。   The OCD command is also input to the test mode register 16. The test mode register 16 outputs the normal mode setting signal in the reset initial state, and outputs the test mode setting signal when the test mode setting is instructed by the OCD command. These mode setting signals are output to the peripheral circuits 5A and 5B, for example, via the test mode invalidating unit 17.

双方向I/O回路10の出力端子は、カウンタレジスタ18の入力端子にも接続されており、カウンタレジスタ18は、上記出力端子がアクティブ(例えばロー)レベルとなっている期間をカウントし、カウント値を第1比較器19及び第2比較器20に出力する。尚、図示しないが、モード/通信回路9の各回路は、共通の内部クロック信号によりクロック同期で動作する。また、テストモードレジスタ16及びカウンタレジスタ18には、(マイコン1の)リセット信号が与えられている。   The output terminal of the bidirectional I / O circuit 10 is also connected to the input terminal of the counter register 18, and the counter register 18 counts a period during which the output terminal is in an active (for example, low) level. The value is output to the first comparator 19 and the second comparator 20. Although not shown, each circuit of the mode / communication circuit 9 operates in clock synchronization with a common internal clock signal. The test mode register 16 and the counter register 18 are supplied with a reset signal (of the microcomputer 1).

第1比較器19は、カウンタレジスタ18のカウント値が閾値Y以上になるとブレーク要求を検出し、OCDブレーク要求をOCDブレーク無効化部21を介してCPU2に出力する。第2比較器20は、カウンタレジスタ18のカウント値が閾値Z以上になるとノーマルモードの設定要求を検出し、テストモードの無効化信号をテストモード無効化部17に出力する。尚、モード無効化部17より出力されるノーマルモード設定信号は、OCDコマンドI/F部15及びOCDブレーク無効化部21にも入力されている。そして、テストモードレジスタ16がテストモード設定信号を出力している状態で、上記テストモード無効化信号が出力されると、テストモード設定信号は無効化されて、ノーマルモード設定信号が有効になる。   The first comparator 19 detects a break request when the count value of the counter register 18 becomes equal to or greater than the threshold value Y, and outputs the OCD break request to the CPU 2 via the OCD break invalidation unit 21. The second comparator 20 detects a normal mode setting request when the count value of the counter register 18 is equal to or greater than the threshold value Z, and outputs a test mode invalidation signal to the test mode invalidation unit 17. The normal mode setting signal output from the mode invalidation unit 17 is also input to the OCD command I / F unit 15 and the OCD break invalidation unit 21. When the test mode invalidation signal is output while the test mode register 16 is outputting the test mode setting signal, the test mode setting signal is invalidated and the normal mode setting signal is validated.

ここで、図2に示すように、モード/通信端子11を介した信号制御には3つのパタンがある。(a)のデバッグ通信では、ハイレベルからローレベルに切り替わるとそれがスタートビット(Start Of Flame)となり、それに続いて複数のデータビットがハイ/ロウの二値レベル変化で示される。そして、最後にハイレベルのエンドビット(End Of Flame)が配置され、そこまでが通信の1フレームとなる。そして、この通信フレーム長は、カウンタレジスタ18のカウント値X未満に設定されている。   Here, as shown in FIG. 2, the signal control via the mode / communication terminal 11 has three patterns. In the debug communication of (a), when switching from the high level to the low level, it becomes a start bit (Start Of Flame), and subsequently, a plurality of data bits are indicated by a binary level change of high / low. Finally, a high-level end bit (End Of Flame) is arranged, and that is one frame of communication. The communication frame length is set to be less than the count value X of the counter register 18.

(b)のOCDブレーク要求は、ローレベル期間をカウント値Y(>X,第1閾値)以上で且つZ未満とするように設定されている。そして、(c)のモード管理(ノーマルモード設定)は、ローレベル期間をカウント値Z(第2閾値)以上とするように設定されている。尚、OCDブレーク要求は、マイコン1がテストモードで動作している場合にのみ有効となる。   The OCD break request in (b) is set so that the low level period is not less than the count value Y (> X, first threshold) and less than Z. The mode management (normal mode setting) in (c) is set so that the low level period is equal to or greater than the count value Z (second threshold). The OCD break request is valid only when the microcomputer 1 is operating in the test mode.

すなわち、外部のデバッガは、これらのようにモード/通信端子11に与える信号を制御することで、マイコン1に与える信号に異なる意義を付与可能となっている。具体数値例を挙げると、(a)のデバッグ通信に要する時間は数μs程度,(b)のOCDブレーク要求を有効にする時間は数10μs程度,(c)のノーマルモード設定を有効にする時間は数1000μs程度である。   That is, the external debugger can give different meanings to the signal applied to the microcomputer 1 by controlling the signal applied to the mode / communication terminal 11 as described above. As a specific numerical example, the time required for debug communication in (a) is about several μs, the time for enabling the OCD break request in (b) is about several tens of μs, and the time for enabling normal mode setting in (c). Is about several thousand μs.

また、モード/通信端子11は、マイコン1を製品としてフィールドで使用する際には、ノーマルモードに設定するためローレベルに固定される。この時、カウンタレジスタ19がカウント動作を開始するタイミングは、マイコン1のリセットが解除された時点からとなる(図3参照)。   The mode / communication terminal 11 is fixed at a low level to set the normal mode when the microcomputer 1 is used as a product in the field. At this time, the timing at which the counter register 19 starts the count operation is from the time when the reset of the microcomputer 1 is released (see FIG. 3).

次に、本実施形態の作用について説明する。図4に示すように、マイコン1のデバッグを実行する際には、外部でデバッガを起動させてマイコン1の評価を開始する(D1)。先ず、モード/通信端子11を介してデバッグ通信を行い、テストモードレジスタ16への書き込みコマンド(テストモード設定)を発行する(D2)。すると、マイコン1側では、受信したコマンドを受けてテストモードレジスタ16への書き込みが行われ、テストモードが設定される(M1)。   Next, the operation of this embodiment will be described. As shown in FIG. 4, when debugging the microcomputer 1, the debugger is started externally and evaluation of the microcomputer 1 is started (D1). First, debug communication is performed via the mode / communication terminal 11 to issue a write command (test mode setting) to the test mode register 16 (D2). Then, the microcomputer 1 side receives the received command, writes to the test mode register 16, and sets the test mode (M1).

続いて、デバッガは、デバッグ通信によりCPUバス(アドレスバス6及びデータバス7)の制御コマンドを発行し、更にCPU2にソフトウェアリセットを実行させるコマンドを発行する(D3)。すると、マイコン1側では、受信したコマンドを受けて、ソフトウェアリセットが実行されてCPU2が初期化され、ソフトウェアの実行が再スタートされる(M2)。   Subsequently, the debugger issues a control command for the CPU bus (address bus 6 and data bus 7) through debug communication, and further issues a command for causing the CPU 2 to execute a software reset (D3). Then, the microcomputer 1 receives the received command, executes software reset, initializes the CPU 2, and restarts execution of software (M2).

以降、デバッガは、ステップD3と同様に、CPUバスの制御コマンドを発行し、評価を行うためのコマンドを発行する(D4)。すると、マイコン1は、受信したコマンドに応じてCPUバスに接続されている回路,周辺回路5やRAM4等の回路情報を読み出し、読み出した情報を「コマンド応答データ」として外部(デバッガ)に送信する(M3)。尚、「回路情報」とは、例えばRAM4に格納されているフラグやデータなどである。   Thereafter, the debugger issues a control command for the CPU bus and issues a command for evaluation (D4), as in step D3. Then, the microcomputer 1 reads out circuit information of the circuit connected to the CPU bus, the peripheral circuit 5 and the RAM 4 according to the received command, and transmits the read information as “command response data” to the outside (debugger). (M3). “Circuit information” is, for example, a flag or data stored in the RAM 4.

そして、評価の内容に応じてステップD3→M3を適宜繰り返して実行した後、デバッガがOCDブレーク要求を発行すると(D5)、マイコン1のCPU2は、OCDブレーク要求を受け付けて、その時点で通信を実行していれば転送中の通信を停止させる(M4)。そして、マイコン1のデバッグ,評価は終了となる(D6)。   Then, after repeatedly executing steps D3 → M3 according to the contents of the evaluation, when the debugger issues an OCD break request (D5), the CPU 2 of the microcomputer 1 accepts the OCD break request and communicates at that time. If it is being executed, the communication being transferred is stopped (M4). Then, debugging and evaluation of the microcomputer 1 are finished (D6).

以上のように本実施形態によれば、マイコン1に、外部より動作モードの切り替えを行うために使用されると共に、回路動作をテストするためのテストモードにおいて、外部とCPU2とが通信を行うために使用されるモード/通信端子11を備える。また、初期状態でノーマルモードが設定されていると共に、モード/通信端子11を介して行われる通信により、テストモード書き込みコマンドが入力されるとテストモードが設定されるテストモードレジスタ15を備える。   As described above, according to the present embodiment, the microcomputer 1 is used for switching the operation mode from the outside, and the outside and the CPU 2 communicate with each other in the test mode for testing the circuit operation. The mode / communication terminal 11 used in the above is provided. In addition, a normal mode is set in an initial state, and a test mode register 15 is provided which sets a test mode when a test mode write command is input by communication performed via the mode / communication terminal 11.

そして、カウンタレジスタ18は、モード/通信端子11に接続され、当該端子のレベルがアクティブに維持されている間カウント動作を継続し、第1比較器19は、カウンタレジスタ18のカウンタ値が、前記通信に要する時間よりも長く設定される第1閾値Y以上で、且つ前記第1閾値Yよりも大きく設定される第2閾値Z未満であれば、CPU2にブレーク要求信号を出力する。また、第2比較器20は、前記カウンタ値が、第2閾値Z以上になると、テストモードを無効化してノーマルモードを設定するための信号を出力する。このように構成すれば、動作モードの切り替えと、外部との通信と、ブレーク要求信号の入力とを1つのモード/通信端子11を利用して行うことができる。したがって、マイコン1を小型に構成することが可能になる。 The counter register 18 is connected to the mode / communication terminal 11 and continues the counting operation while the level of the terminal is kept active. The first comparator 19 indicates that the counter value of the counter register 18 A break request signal is output to the CPU 2 if it is greater than or equal to the first threshold Y set longer than the time required for communication and less than the second threshold Z set larger than the first threshold Y. Further, when the counter value is equal to or greater than the second threshold value Z, the second comparator 20 outputs a signal for invalidating the test mode and setting the normal mode. With this configuration, it is possible to switch the operation mode, communicate with the outside, and input a break request signal using one mode / communication terminal 11. Therefore, the microcomputer 1 can be configured in a small size.

(第2実施形態)
以下、第1実施形態と同一部分には同一符号を付して説明を省略し、異なる部分について説明する。図5に示すように、第2実施形態のマイコン31は、第1実施形態のマイコン1におけるテストモード無効化部17を削除し、第2比較器20が出力するノーマルモード検出信号をテストモードレジスタ32に入力している。そして、テストモードレジスタ32は、ノーマルモード検出信号が与えられるとリセットされて、テストモード設定信号を出力している状態であればその出力を停止し、ノーマルモード検出信号を出力する。
(Second Embodiment)
Hereinafter, the same parts as those in the first embodiment are denoted by the same reference numerals, description thereof will be omitted, and different parts will be described. As shown in FIG. 5, the microcomputer 31 of the second embodiment deletes the test mode invalidation unit 17 in the microcomputer 1 of the first embodiment, and uses the test mode register to output the normal mode detection signal output from the second comparator 20. 32. Then, the test mode register 32 is reset when a normal mode detection signal is given, and stops outputting the test mode setting signal and outputs a normal mode detection signal if the test mode setting signal is being output.

以上のように第2実施形態によれば、第2比較器20は、テストモードレジスタ32をリセットする信号を出力してテストモードを無効化するので、第1実施形態と同様の効果が得られる。   As described above, according to the second embodiment, since the second comparator 20 outputs a signal for resetting the test mode register 32 and invalidates the test mode, the same effect as the first embodiment can be obtained. .

本発明は上記し、又は図面に記載した実施形態にのみ限定されるものではなく、以下のような変形又は拡張が可能である。
アドレスバス6及びデータバス7に接続される周辺回路の構成,種類は任意である。
CPU2がステップM2で実行するソフトウェアは、アプリケーションプログラムとは別個に用意されているテスト用のプログラムであっても良い。
The present invention is not limited to the embodiments described above or shown in the drawings, and the following modifications or expansions are possible.
The configuration and type of peripheral circuits connected to the address bus 6 and the data bus 7 are arbitrary.
The software executed by the CPU 2 in step M2 may be a test program prepared separately from the application program.

図面中、1はマイクロコンピュータ、2はCPU、9はモード/通信回路、11はモード/通信端子(モード切替え/通信用端子)、16はテストモードレジスタ、18はカウンタレジスタ、19は第1比較器、20は第2比較器を示す。   In the drawings, 1 is a microcomputer, 2 is a CPU, 9 is a mode / communication circuit, 11 is a mode / communication terminal (mode switching / communication terminal), 16 is a test mode register, 18 is a counter register, and 19 is a first comparison. 20 represents a second comparator.

Claims (2)

ブレーク要求信号が入力されると、実行中の動作を停止させるCPU(2)と、
外部より動作モードの切り替えを行うために使用されると共に、回路動作をテストするためのテストモードにおいて、外部と前記CPUとが通信を行うために使用されるモード切替え/通信用端子(11)と、
このモード切替え/通信用端子に接続され、当該端子のレベルがアクティブに維持されている間カウント動作を継続するカウンタ(18)と、
初期状態で通常動作モードが設定されていると共に、前記モード切替え/通信用端子を介して行われる通信により、テストモード書き込みコマンドが入力されるとテストモードが設定されるテストモードレジスタ(16,32)と、
前記カウンタのカウンタ値が、前記通信に要する時間よりも長く設定される第1閾値以上で、且つ前記第1閾値よりも大きく設定される第2閾値未満であれば前記ブレーク要求信号を出力する第1比較器(19)と、
前記カウンタのカウンタ値が、前記第2閾値以上になると、前記テストモードを無効化して前記通常動作モードを設定するための信号を出力する第2比較器(20)とを備えたことを特徴とするマイクロコンピュータ。
When the break request signal is input, the CPU (2) that stops the operation being executed;
A mode switching / communication terminal (11) used for switching the operation mode from the outside and used for communication between the CPU and the outside in a test mode for testing the circuit operation ,
A counter (18) connected to the mode switching / communication terminal and continuing the counting operation while the level of the terminal is maintained active;
A normal operation mode is set in the initial state, and a test mode register (16, 32) that sets a test mode when a test mode write command is input by communication performed via the mode switching / communication terminal. )When,
Count value of the counter is, at the least the first threshold value is set longer than the time required for communication, the you output a break request signal if and second less than a threshold value is set larger than the first threshold value A first comparator (19);
Count value of the counter becomes equal to or larger than before Symbol second threshold, further comprising a second comparator for outputting a signal for setting the normal operation mode to disable the test mode (20) A featured microcomputer.
前記第2比較器(20)は、前記テストモードレジスタ(32)をリセットする信号を出力して、前記テストモードを無効化することを特徴とする請求項1記載のマイクロコンピュータ。   The microcomputer according to claim 1, wherein the second comparator (20) outputs a signal for resetting the test mode register (32) to invalidate the test mode.
JP2014031698A 2014-02-21 2014-02-21 Microcomputer Expired - Fee Related JP6070600B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014031698A JP6070600B2 (en) 2014-02-21 2014-02-21 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014031698A JP6070600B2 (en) 2014-02-21 2014-02-21 Microcomputer

Publications (2)

Publication Number Publication Date
JP2015156196A JP2015156196A (en) 2015-08-27
JP6070600B2 true JP6070600B2 (en) 2017-02-01

Family

ID=54775456

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014031698A Expired - Fee Related JP6070600B2 (en) 2014-02-21 2014-02-21 Microcomputer

Country Status (1)

Country Link
JP (1) JP6070600B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7202225B2 (en) * 2019-03-12 2023-01-11 ローム株式会社 Semiconductor device and debug system
US20200341058A1 (en) * 2019-04-28 2020-10-29 Nuvoton Technology Corporation Time-limited debug mode
EP4331838A1 (en) 2021-04-28 2024-03-06 Kureha Corporation Piezoelectric laminated film and method for producing piezoelectric laminated film

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5727041A (en) * 1980-07-25 1982-02-13 Hitachi Ltd Large-scale integrated circuit having testing function
JPS63228336A (en) * 1987-03-18 1988-09-22 Fujitsu Ltd Runaway prevention circuit for processor
JPH0219931A (en) * 1988-07-08 1990-01-23 Fujitsu Ltd Test mode control system for microprocessor
JP2002202900A (en) * 2000-12-28 2002-07-19 Seiko Epson Corp Debug device
JP2005274357A (en) * 2004-03-25 2005-10-06 Kawasaki Microelectronics Kk Semiconductor integrated circuit

Also Published As

Publication number Publication date
JP2015156196A (en) 2015-08-27

Similar Documents

Publication Publication Date Title
JP4652394B2 (en) Multiburst protocol device controller
US9275000B2 (en) Electronic device with address programmable through reduced number of terminals
KR101283431B1 (en) Microcomputer
JP2009099054A (en) Semiconductor integrated circuit and debug mode determination method
JP6070600B2 (en) Microcomputer
JP6546479B2 (en) Information processing device
US20160350024A1 (en) Integrated circuit chip and method therefor
US20150106636A1 (en) Data processor and data processing system
US10977206B2 (en) Data communication device and method for data communication
JP5918192B2 (en) Data processing apparatus and method in PLC system
US10067852B2 (en) Switching between traditional and history program trace modes without halting a processor
KR100826496B1 (en) Semiconductor integrated circuit device and operating method thereof
JP2008041059A (en) Multiprocessor controller and information processor
TWI473110B (en) Flash memory apparatus with serial interface and rsest method thereof
JP2009163531A (en) Interruption management mechanism and microcomputer
US9378782B1 (en) Apparatus with write-back buffer and associated methods
JP2020140380A (en) Semiconductor device and debugging system
JP5917325B2 (en) Bridge circuit
JP6396352B2 (en) Semiconductor device
US11841782B2 (en) Semiconductor device and debugging system
JP2008033657A (en) Memory control device, information processor and memory control method
JP2012216108A (en) Information processing apparatus and program transfer method
TWI581103B (en) Method and system for implementing bus operations with precise timing
JP6626216B2 (en) controller
US20140281759A1 (en) Bus protocol checker, system on chip including the same, bus protocol checking method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160415

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160907

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161018

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161116

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161219

R151 Written notification of patent or utility model registration

Ref document number: 6070600

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees