JP2005165812A - Apparatus for reading microcontroller internal information - Google Patents

Apparatus for reading microcontroller internal information Download PDF

Info

Publication number
JP2005165812A
JP2005165812A JP2003405566A JP2003405566A JP2005165812A JP 2005165812 A JP2005165812 A JP 2005165812A JP 2003405566 A JP2003405566 A JP 2003405566A JP 2003405566 A JP2003405566 A JP 2003405566A JP 2005165812 A JP2005165812 A JP 2005165812A
Authority
JP
Japan
Prior art keywords
internal information
microcontroller
circuit
information reading
built
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003405566A
Other languages
Japanese (ja)
Inventor
Yasuhiko Enami
康彦 江波
Akihiko Ukibe
昭彦 浮辺
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003405566A priority Critical patent/JP2005165812A/en
Publication of JP2005165812A publication Critical patent/JP2005165812A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the capacity of a ROM by reducing the number of connection terminals between an internal information reading circuit and a microcontroller and controlling the exchange of data without depending on a program, concerning a microcomputer internal information reading apparatus. <P>SOLUTION: The microcontroller 101 is connected to the internal information reading circuit 109 via an IIC bus 111, so as to control the microcontroller from an outer part by allowing the internal information reading circuit to be the master of the IIC bath. Data of a designation address on the ROM 103, a RAM 104, or a built-in register 105 can be read with a little amount of wiring and without depending on the program by providing an IIC bath control circuit 110, an internal bath arbitration circuit 119, and an address designating circuit 121. Besides, access check is performed with a slave address 115 for an built-in memory access, so as to prevent the access of a third person. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明はマイクロコントローラの内部情報読み出し装置に関するものである。   The present invention relates to an internal information reading device for a microcontroller.

従来、コンピュータやワークステーション等で使用されるファイルのバージョンを管理する方法として、人為的操作による信頼性の低下を避けるために、ファイルを構成するビット列に対して所定の演算を行った結果を用いる方法が知られている。   Conventionally, as a method for managing the version of a file used on a computer, workstation, etc., in order to avoid a decrease in reliability due to an artificial operation, a result obtained by performing a predetermined operation on a bit string constituting the file is used. The method is known.

しかしながら、組み込み式マイクロコントローラ等の内部のROMあるいは外付けROM等に書き込まれたソフトウェアのバージョンを知るには、組み込み式マイクロコントローラ等を基板から取り外すことが必要になるため、この方法は必ずしも適切ではない。   However, in order to know the version of the software written in the internal ROM or external ROM of the embedded microcontroller etc., it is necessary to remove the embedded microcontroller etc. from the board, so this method is not always appropriate. Absent.

その解決策として、組み込み式マイクロコントローラ等のソフトウェアの内部に、ROMの特定範囲のアドレスに格納されたデータに対して所定の演算を行うプログラムを組み込み、その演算結果を外部から読み出してバージョンを判定する方法が提案されている(例えば、特許文献1参照)。   As a solution, a program that performs a predetermined operation on the data stored in a specific range of addresses in the ROM is built into software such as an embedded microcontroller, and the result is read from the outside to determine the version. A method has been proposed (see, for example, Patent Document 1).

図7は、このような組み込み式マイクロコントローラの内部のROMデータ等を読み出すための、従来のマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図7において、701はマイクロコントローラ、709はマイクロコントローラ701の内部情報を読み出すための内部情報読み出し回路である。   FIG. 7 is a block diagram showing the configuration of a conventional microcontroller internal information reading device for reading ROM data and the like inside such an embedded microcontroller. In FIG. 7, reference numeral 701 denotes a microcontroller, and reference numeral 709 denotes an internal information reading circuit for reading internal information of the microcontroller 701.

マイクロコントローラ701において、702はマイクロコントローラ701を制御するCPU、703はCPU702を動作させるためのプログラムを格納するROM、704はROM703上のプログラムによりアクセスされるRAM、705はROM703上のプログラムによりアクセスされる内蔵レジスタ、706はROM703とRAM704と内蔵レジスタ705のアドレスを指定するアドレスバス、707はアドレスバス706によりアドレス指定されたデータをCPU702がアクセスするためのデータバス、708はROM703とRAM704と内蔵レジスタ705を制御するためのコントロールバス、710は通信クロック信号、711は通信出力信号、712は通信入力信号、713はリセット信号、714、715はモード設定信号、716はシリアル通信回路である。   In the microcontroller 701, 702 is a CPU that controls the microcontroller 701, 703 is a ROM that stores a program for operating the CPU 702, 704 is a RAM that is accessed by a program on the ROM 703, and 705 is accessed by a program on the ROM 703. 706 is an address bus for designating the addresses of the ROM 703, RAM 704 and built-in register 705, 707 is a data bus for the CPU 702 to access data addressed by the address bus 706, and 708 is a ROM 703, RAM 704 and built-in registers. 710 is a communication clock signal, 711 is a communication output signal, 712 is a communication input signal, 713 is a reset signal, 714 and 71 Mode setting signal 716 is a serial communication circuit.

このような構成のマイクロコントローラ内部情報読み出し装置は次のように動作する。まず、モード設定信号714、715を規定の電圧に設定することで、マイクロコントローラ701はROM703とRAM704と内蔵レジスタ705を読み出し可能な状態とする。   The microcontroller internal information reading device having such a configuration operates as follows. First, by setting the mode setting signals 714 and 715 to a prescribed voltage, the microcontroller 701 makes the ROM 703, the RAM 704, and the built-in register 705 readable.

リセット信号713によりマイクロコントローラ701にリセットをかけると、ROM703上のプログラムの実行によりシリアル通信回路716を動作させ、内部情報読み出し回路709との通信を行う。内部情報読み出し回路709は通信クロック710に従い、通信出力信号711と通信入力信号712を用いたデータの送受信を行うことで内部情報の読み出しを行う。   When the microcontroller 701 is reset by the reset signal 713, the serial communication circuit 716 is operated by executing a program on the ROM 703 to communicate with the internal information reading circuit 709. The internal information reading circuit 709 reads internal information by transmitting and receiving data using the communication output signal 711 and the communication input signal 712 in accordance with the communication clock 710.

特開平11−203112号公報JP-A-11-203112

上記従来の構成によりソフトウェアのバージョン情報等のマイクロコントローラの内部情報を読み出すことができる。しかしながら、内部情報読み出し回路とマイクロコントローラ間の接続に多くの端子を必要とするため、回路が複雑となるという問題がある。またデータの送受信はプログラムを用いた制御を必要とするため、ROM容量が増大するという問題がある。   With the above conventional configuration, internal information of the microcontroller such as software version information can be read. However, since many terminals are required for connection between the internal information reading circuit and the microcontroller, there is a problem that the circuit becomes complicated. In addition, since transmission / reception of data requires control using a program, there is a problem that ROM capacity increases.

本発明は内部情報読み出し回路とマイクロコントローラ間の接続端子数を減らし、さらに、プログラムによらずにデータの送受信制御を行うことでROM容量を削減することができるマイクロコントローラ内部情報読み出し装置を提供することを目的とする。   The present invention provides a microcontroller internal information reading device capable of reducing the ROM capacity by reducing the number of connection terminals between an internal information reading circuit and a microcontroller and further performing data transmission / reception control without depending on a program. For the purpose.

本発明のマイクロコントローラ内部情報読み出し装置は、ROMおよびRAMで構成されるメモリおよび内蔵レジスタ等を有するマイクロコントローラと、前記メモリおよび内蔵レジスタ等に格納された内部情報を読み出す内部情報読み出し回路とで構成され、前記マイクロコントローラと前記内部情報読み出し回路はIIC通信データ信号およびIIC通信クロック信号で構成されるIIC(Inter−Integrated Circuit)バスを介して接続され、前記マイクロコントローラは、前記IICバスを制御するIICバス制御回路と、前記IICバス制御回路に付加された内蔵メモリアクセス用スレーブアドレス指定手段と、前記IICバス制御回路に内蔵され前記IIC通信データ信号に対してシリアル入出力が行われるシリアルバッファと、前記メモリおよび内蔵レジスタ等に対するアクセスを制御する内部バス調停回路と、前記IIC通信クロック信号をカウントするクロックカウンタと、前記クロックカウンタの値により前記シリアルバッファ上のデータを用いて前記メモリおよび内蔵レジスタ等のアドレスを指定するアドレス指定回路とを備え、前記内部情報読み出し回路は、前記IICバスを介して指定するアドレスが前記内蔵メモリアクセス用スレーブアドレス指定手段が指定するアドレスに一致した場合にのみ前記マイクロコントローラの内部情報読み出しを可能にする。   A microcontroller internal information reading device according to the present invention includes a microcontroller having a memory and a built-in register, etc. composed of a ROM and a RAM, and an internal information reading circuit for reading the internal information stored in the memory and the built-in register The microcontroller and the internal information reading circuit are connected via an IIC (Inter-Integrated Circuit) bus composed of an IIC communication data signal and an IIC communication clock signal, and the microcontroller controls the IIC bus. IIC bus control circuit, built-in memory access slave address designating means added to the IIC bus control circuit, and serial I / O to the IIC communication data signal built in the IIC bus control circuit A serial buffer, an internal bus arbitration circuit that controls access to the memory and the built-in register, the clock counter that counts the IIC communication clock signal, and the data on the serial buffer according to the value of the clock counter. An address designating circuit for designating an address of a memory, a built-in register, etc., wherein the internal information read circuit matches an address designated via the IIC bus with an address designated by the slave address designating means for accessing the built-in memory Only when the internal information of the microcontroller can be read out.

上記構成によれば、マイクロコントローラと内部情報読み出し回路がIICバスで接続されることにより接続端子数が削減され、内部情報読み出し回路をIICバスのマスタとすることでマイクロコントローラを外部から制御することができ、さらに、IICバス制御回路および内部バス調停回路およびアドレス指定回路を備えることでプログラムによらずにデータの送受信制御を行うことができるため、ROM容量を削減することができる。さらに、内部情報読み出し回路が指定するアドレスが内蔵メモリアクセス用スレーブアドレス指定手段による所定のアドレスであるかがチェックされるため、第三者が内部情報を読み出すことを防止することができる。   According to the above configuration, the number of connection terminals is reduced by connecting the microcontroller and the internal information readout circuit via the IIC bus, and the microcontroller is controlled from the outside by making the internal information readout circuit the master of the IIC bus. Furthermore, since the IIC bus control circuit, the internal bus arbitration circuit, and the addressing circuit are provided, data transmission / reception control can be performed without using a program, so that the ROM capacity can be reduced. Furthermore, since it is checked whether the address designated by the internal information reading circuit is a predetermined address by the built-in memory access slave address designating means, it is possible to prevent a third party from reading the internal information.

さらに好ましくは、本発明のマイクロコントローラ内部情報読み出し装置は、前記内蔵メモリアクセス用スレーブアドレス指定手段が指定するアドレスとして、マイクロコントローラに内蔵されるROM上のデータを用いるように構成される。   More preferably, the microcontroller internal information reading device of the present invention is configured to use data on a ROM built in the microcontroller as an address designated by the slave address designating means for accessing the built-in memory.

上記構成によれば、ROMデータを作成するときに内蔵メモリアクセス用スレーブアドレス指定手段が指定するアドレスを任意の値に決定することが可能であり、この値を知らない限り内部情報の読み出しができないため、第三者が内部情報を読み出すことを防止することができる。   According to the above configuration, when the ROM data is created, the address designated by the built-in memory access slave address designating means can be determined to an arbitrary value, and internal information cannot be read out unless this value is known. Therefore, it is possible to prevent a third party from reading the internal information.

さらに好ましくは、本発明のマイクロコントローラ内部情報読み出し装置は、マイクロコントローラの外部端子として内部情報読み出し禁止信号を有し、前記内部情報読み出し禁止信号によりマイクロコントローラの内部情報読み出しを抑止するように構成される。   More preferably, the microcontroller internal information reading device of the present invention has an internal information read prohibition signal as an external terminal of the microcontroller, and is configured to suppress reading of the internal information of the microcontroller by the internal information read prohibition signal. The

上記構成によれば、内部情報読み出し禁止信号を設定することで外部から内部情報の読み出しを防止することが可能であるため、内部情報読み出し禁止信号を適切に管理することにより第三者が内部情報を読み出すことを防止することができる。   According to the above configuration, it is possible to prevent internal information from being read from the outside by setting the internal information read prohibition signal. Can be prevented from being read out.

さらに好ましくは、本発明のマイクロコントローラ内部情報読み出し装置は、マイクロコントローラの内蔵レジスタに内部情報読み出し禁止情報の設定が可能であり、前記内部情報読み出し禁止情報によりマイクロコントローラの内部情報読み出しを抑止するように構成される。   More preferably, in the microcontroller internal information reading device according to the present invention, internal information reading prohibition information can be set in a built-in register of the microcontroller, and the internal information reading prohibition information is inhibited by the internal information reading prohibition information. Configured.

上記構成によれば、内蔵レジスタに内部情報読み出し禁止情報を設定することで内部情報の読み出しを防止することが可能であるため、内蔵レジスタへの内部情報読み出し禁止情報の設定を適切に管理することにより第三者が内部情報を読み出すことを防止することができる。   According to the above configuration, it is possible to prevent reading of internal information by setting internal information reading prohibition information in the built-in register, so the setting of internal information reading prohibition information in the internal register can be appropriately managed. This prevents a third party from reading internal information.

さらに好ましくは、本発明のマイクロコントローラ内部情報読み出し装置は、内部情報読み出し回路に解読キー情報を保持し、マイクロコントローラは内部情報読み出し回路から送信された解読キー情報が所定の情報と一致した場合にのみマイクロコントローラの内部情報読み出しを可能にするように構成される。   More preferably, the microcontroller internal information reading device according to the present invention holds the decryption key information in the internal information readout circuit, and the microcontroller detects that the decryption key information transmitted from the internal information readout circuit matches the predetermined information. Only configured to allow the microcontroller to read internal information.

上記構成によれば、正しいキー情報が送信された場合にのみ内部情報読み出しが可能であるため、正しいキー情報を持たない第三者が内部情報読み出し回路を使用して内部情報を読み出すことを防止することができる。   According to the above configuration, the internal information can be read only when the correct key information is transmitted, so that a third party who does not have the correct key information is prevented from reading the internal information using the internal information read circuit. can do.

以上説明したように、本発明のマイクロコントローラ内部情報読み出し装置によれば、少ない配線接続によりマイクロコントローラの内部情報の読み出しが可能となるため接続端子数が削減され、回路を簡素化することが可能となる。また、プログラムを用いた制御を必要としないためROM容量の削減が可能となる。さらに、内部情報読み出し回路が指定するアドレスが内蔵メモリアクセス用スレーブアドレス指定手段による所定のアドレスであるかがチェックされるため、第三者が内部情報を読み出すことを防止することができる。   As described above, according to the microcontroller internal information reading device of the present invention, the internal information of the microcontroller can be read with a small number of wiring connections, so the number of connection terminals can be reduced and the circuit can be simplified. It becomes. Further, since control using a program is not required, the ROM capacity can be reduced. Furthermore, since it is checked whether the address designated by the internal information reading circuit is a predetermined address by the built-in memory access slave address designating means, it is possible to prevent a third party from reading the internal information.

図1は本発明の第1の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図1において、101はマイクロコントローラ、109はマイクロコントローラ101の内部情報を読み出すための内部情報読み出し回路である。   FIG. 1 is a block diagram showing the configuration of a microcontroller internal information reading apparatus according to the first embodiment of the present invention. In FIG. 1, 101 is a microcontroller, and 109 is an internal information reading circuit for reading internal information of the microcontroller 101.

マイクロコントローラ101において、102はマイクロコントローラ101を制御するCPU、103はCPU102を動作させるためのプログラムを格納するROM、104はROM103上のプログラムによりアクセスされるRAM、105はROM103上のプログラムによりアクセスされる内蔵レジスタ、106はROM103とRAM104と内蔵レジスタ105のアドレスを指定するアドレスバス、107はアドレスバス106によりアドレス指定されたデータをCPU102がアクセスするためのデータバス、108はROM103とRAM104と内蔵レジスタ105を制御するためのコントロールバスである。   In the microcontroller 101, 102 is a CPU that controls the microcontroller 101, 103 is a ROM that stores a program for operating the CPU 102, 104 is a RAM accessed by a program on the ROM 103, and 105 is accessed by a program on the ROM 103. 106 is an address bus for designating the addresses of the ROM 103, RAM 104 and built-in register 105, 107 is a data bus for the CPU 102 to access data addressed by the address bus 106, and 108 is a ROM 103, RAM 104 and built-in register. A control bus for controlling 105.

さらにマイクロコントローラ101において、110はマイクロコントローラ101に内蔵されたIIC(Inter−Integrated Circuit)バス制御回路、111は内部情報読み出し回路109とIICバス制御回路110を接続するIICバス、112はIICバス111上のIIC通信データ信号、113はIICバス111上のIIC通信クロック信号、114はIICバス制御回路110に内蔵されるシリアルバッファ、115はIICバス制御回路110に付加された内蔵メモリアクセス用スレーブアドレス、116はシリアルバッファ114の値と内蔵メモリアクセス用スレーブアドレス115の値との一致信号、117はシリアルバッファからのIICデータ出力信号、118はIICデータ出力信号117の出力を制御する出力制御信号、119はIICバス制御回路110の情報によりマイクロコントローラ101の内部バスを制御する内部バス調停回路、120はIICバス制御回路110上のIIC通信クロック信号113をカウントするクロックカウンタ、121はクロックカウンタ120の値によりシリアルバッファ114のデータを用いてROM103とRAM104と内蔵レジスタ105のアドレスを指定するアドレス指定回路である。   Further, in the microcontroller 101, 110 is an IIC (Inter-Integrated Circuit) bus control circuit built in the microcontroller 101, 111 is an IIC bus connecting the internal information reading circuit 109 and the IIC bus control circuit 110, and 112 is an IIC bus 111. The IIC communication data signal above, 113 is the IIC communication clock signal on the IIC bus 111, 114 is the serial buffer built in the IIC bus control circuit 110, and 115 is the slave address for accessing the built-in memory added to the IIC bus control circuit 110. , 116 is a coincidence signal between the value of the serial buffer 114 and the value of the slave address 115 for accessing the built-in memory, 117 is an IIC data output signal from the serial buffer, and 118 is an IIC data output signal 1 7 is an output control signal for controlling the output of 7, 119 is an internal bus arbitration circuit for controlling the internal bus of the microcontroller 101 based on information of the IIC bus control circuit 110, and 120 is for counting the IIC communication clock signal 113 on the IIC bus control circuit 110. The clock counter 121 is an address designating circuit for designating the addresses of the ROM 103, the RAM 104 and the built-in register 105 using the data of the serial buffer 114 according to the value of the clock counter 120.

以下、上記構成のマイクロコントローラ内部情報読み出し装置の動作を説明する。まず、IIC通信クロック信号113およびIIC通信データ信号112で構成される一般的なIICバスによる通信フォーマットについて、図2のタイムチャートに示すIICバスの信号波形を用いて説明する。   The operation of the microcontroller internal information reading device having the above configuration will be described below. First, a general IIC bus communication format composed of the IIC communication clock signal 113 and the IIC communication data signal 112 will be described using signal waveforms of the IIC bus shown in the time chart of FIG.

図2において、SDAはIIC通信データ信号112の信号波形、SCLはIIC通信クロック信号113の信号波形を示している。また、201はSTARTコンディション、202はSTOPコンディション、203はアドレス、204はアドレス203に対するACK、205はデータ、206はデータ205に対するACK、207はアドレス203の一部として送信される方向制御ビットである。   In FIG. 2, SDA indicates the signal waveform of the IIC communication data signal 112, and SCL indicates the signal waveform of the IIC communication clock signal 113. Also, 201 is a START condition, 202 is a STOP condition, 203 is an address, 204 is an ACK for the address 203, 205 is data, 206 is an ACK for the data 205, and 207 is a direction control bit transmitted as part of the address 203. .

SCLが“H”の区間にSDAを“H”から“L”に変化させることでSTARTコンディション201が生成される。IICバスにより接続されている2つのデバイスは共にSTARTコンディション201を生成することが可能であり、先にSTARTコンディション201を発生させたデバイスがIICバスの主導権を得ることができる。IICバスの主導権を得たデバイスをマスタ、相手側をスレーブと呼ぶ。STARTコンディション201の後にアドレス203を指定することで通信相手を特定することが可能である。   The START condition 201 is generated by changing the SDA from “H” to “L” during the period in which the SCL is “H”. Two devices connected by the IIC bus can both generate the START condition 201, and the device that previously generated the START condition 201 can take the initiative of the IIC bus. The device that has taken the initiative of the IIC bus is called the master, and the other side is called the slave. By specifying the address 203 after the START condition 201, the communication partner can be specified.

アドレス203の後のACK204は通信相手からの返信ビットで、アドレスが正しく受理された場合には“L”が返される。ACK204以降は1バイト以上の送受信のデータ205が続き、アドレス同様9ビット目にACK206を返す。   The ACK 204 after the address 203 is a reply bit from the communication partner, and “L” is returned when the address is correctly accepted. After the ACK 204, the transmission / reception data 205 of 1 byte or more follows, and the ACK 206 is returned to the 9th bit like the address.

通信に必要なnバイトのデータを送受信した後に、マスタのデバイスによりSCLが“H”の区間にSDAを“L”から“H”に変化させることでSTOPコンディション202が生成される。STOPコンディション202を生成することでIICバスは開放され一連の通信が終了する。   After transmitting / receiving n bytes of data necessary for communication, the master device changes the SDA from “L” to “H” in the section where the SCL is “H”, thereby generating the STOP condition 202. By generating the STOP condition 202, the IIC bus is released and a series of communication is completed.

本発明では内部情報読み出し回路109がSTARTコンディション201を生成することでマスタとなりIICバスの主導権を得る。IICバスの主導権を得ることで内部情報読み出し回路109からマイクロコントローラ101が制御可能となる。   In the present invention, the internal information reading circuit 109 generates the START condition 201 to become the master and obtain the initiative of the IIC bus. By obtaining the initiative of the IIC bus, the microcontroller 101 can be controlled from the internal information reading circuit 109.

スレーブ側のマイクロコントローラ101はSTARTコンディション201を受理すると、内部情報読み出し回路109から送信されるIIC通信データ信号112上の通信データが内蔵メモリアクセス用スレーブアドレス115と一致するかを判断する。一致した場合は一致信号116が発生し、この一致信号116により内部バス調停回路119はコントロールバス108を制御し、CPU102からアドレスバス106とデータバス107の主導権を得る。   When receiving the START condition 201, the slave-side microcontroller 101 determines whether the communication data on the IIC communication data signal 112 transmitted from the internal information reading circuit 109 matches the internal memory access slave address 115. If they match, a match signal 116 is generated, and the internal bus arbitration circuit 119 controls the control bus 108 by this match signal 116, and obtains the initiative of the address bus 106 and the data bus 107 from the CPU 102.

次に内部情報読み出し回路109はROM103またはRAM104または内蔵レジスタ105のアドレス情報をデータとして送信する。内部情報読み出し回路109から送信されるデータをシリアルバッファ114に受信すると同時にIIC通信クロック信号113をクロックカウンタ120によりカウントし、IIC通信クロック信号113を9クロックカウントするごとにシリアルバッファ114の値をアドレス指定回路121に取り込む。アドレスバス106のビット長分のデータを取り込んだ時点でアドレス指定回路121は取り込んだデータをアドレスバス106に出力することでROM103またはRAM104または内蔵レジスタ105のアドレスを指定する。   Next, the internal information reading circuit 109 transmits the address information of the ROM 103, RAM 104, or built-in register 105 as data. The data transmitted from the internal information reading circuit 109 is received by the serial buffer 114, and at the same time the IIC communication clock signal 113 is counted by the clock counter 120, and the value of the serial buffer 114 is addressed every time the IIC communication clock signal 113 is counted 9 clocks. The data is taken into the designation circuit 121. When the data corresponding to the bit length of the address bus 106 is fetched, the address designating circuit 121 outputs the fetched data to the address bus 106 to designate the address of the ROM 103 or RAM 104 or the built-in register 105.

方向制御ビット207が読み出し側に設定されている場合は、内部バス調停回路119は指定したROM103またはRAM104または内蔵レジスタ105のアドレスのデータをデータバス107を介し、読み出しシリアルバッファ114に格納する。また出力制御信号118によりIICデータ出力信号117をIIC通信データ信号112に接続する。内部情報読み出し回路109はIICクロック信号113を送信することでシリアルバッファのデータをマイクロコントローラ101の内部情報として受信する。   When the direction control bit 207 is set to the read side, the internal bus arbitration circuit 119 reads the data at the address of the designated ROM 103 or RAM 104 or built-in register 105 via the data bus 107 and stores it in the read serial buffer 114. Further, the output control signal 118 connects the IIC data output signal 117 to the IIC communication data signal 112. The internal information reading circuit 109 receives the serial buffer data as internal information of the microcontroller 101 by transmitting the IIC clock signal 113.

方向制御ビット207が書き込み側に設定されている場合は、IICバス制御回路110は内部情報読み出し回路109から送信されるデータをさらに受信し、内部バス調停回路119はシリアルバッファ114の値をROM103またはRAM104または内蔵レジスタ105の指定したアドレスに書き込む。   When the direction control bit 207 is set to the writing side, the IIC bus control circuit 110 further receives data transmitted from the internal information reading circuit 109, and the internal bus arbitration circuit 119 stores the value of the serial buffer 114 in the ROM 103 or Write to the specified address in RAM 104 or internal register 105.

最後にSTOPコンディション202を受信した時点で内部バス調停回路119はアドレスバスとデータバスの主導権をCPU側に返す。これにより、内部情報読み出し回路による指定アドレスが内蔵メモリアクセス用スレーブアドレスに一致した場合の指定アドレスからの内部情報読み出しが終了する。   Finally, when the STOP condition 202 is received, the internal bus arbitration circuit 119 returns the initiative of the address bus and data bus to the CPU side. As a result, reading of the internal information from the specified address when the specified address by the internal information reading circuit matches the internal memory access slave address is completed.

このような構成により、内部情報読み出し回路とマイクロコントローラ間の少ない配線接続で、マイクロコントローラの内部情報を読み出すことが可能となり、また、IICバス制御回路と内部バス調停回路を設けることで、プログラムを用いずに内部情報読み出し制御を行うことが可能となる。   With such a configuration, it is possible to read the internal information of the microcontroller with a small number of wiring connections between the internal information reading circuit and the microcontroller, and the program can be executed by providing the IIC bus control circuit and the internal bus arbitration circuit. It is possible to perform internal information read control without using it.

図3は本発明の第2の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図3において、301はROM103上のデータとして存在するスレーブアドレスデータであり、第1の実施形態における内蔵メモリアクセス用スレーブアドレス115の値を与え、内部情報読み出し回路による指定アドレスと一致するかが判断される。   FIG. 3 is a block diagram showing a configuration of a microcontroller internal information reading apparatus according to the second embodiment of the present invention. In FIG. 3, reference numeral 301 denotes slave address data existing as data on the ROM 103, which gives the value of the built-in memory access slave address 115 in the first embodiment and determines whether it matches the designated address by the internal information reading circuit. Is done.

このような構成のマイクロコントローラ内部情報読み出し装置は、ROMデータを作成するときにスレーブアドレスデータ301を任意の値に決定することが可能である。スレーブアドレスデータ301に設定されている値を知らない限り内部情報の読み出しができないため、第三者が内部情報を読み出すことを防止することができる。   The microcontroller internal information reading device having such a configuration can determine the slave address data 301 to an arbitrary value when creating ROM data. Since the internal information cannot be read unless the value set in the slave address data 301 is known, it is possible to prevent a third party from reading the internal information.

図4は本発明の第3の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図4において、401は内部情報読み出し防止端子、402は内部情報読み出し防止回路である。   FIG. 4 is a block diagram showing a configuration of a microcontroller internal information reading apparatus according to the third embodiment of the present invention. In FIG. 4, 401 is an internal information read prevention terminal, and 402 is an internal information read prevention circuit.

上記構成のマイクロコントローラ内部情報読み出し装置は次の様に動作する。内部情報読み出し防止端子401は、そのレベルにより内部情報の読み出し禁止を設定する。内部情報読み出し防止回路402は内部情報読み出し防止端子401のレベルが読み出し禁止であると、前記第1の実施形態の方法により内部情報を読み出そうとした場合も、出力制御信号118を動作させないことにより内部情報の読み出しを禁止する。   The microcontroller internal information reading device having the above-described configuration operates as follows. The internal information read prevention terminal 401 sets prohibition of reading internal information according to the level. If the level of the internal information read prevention terminal 401 is prohibited from being read, the internal information read prevention circuit 402 does not operate the output control signal 118 even when trying to read internal information by the method of the first embodiment. This prohibits reading of internal information.

このような構成のマイクロコントローラ内部情報読み出し装置は、内部情報読み出し防止端子のレベルを設定することで外部から内部情報の読み出しを防止することが可能であるため、内部情報読み出し防止端子のレベル制御を適切に管理することにより第三者が内部情報を読み出すことを防止することができる。   The microcontroller internal information reading device having such a configuration can prevent reading of internal information from the outside by setting the level of the internal information reading preventing terminal, and therefore controls the level of the internal information reading preventing terminal. Appropriate management can prevent a third party from reading internal information.

図5は本発明の第4の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図5において、501は内蔵レジスタ105内の内部情報読み出し防止レジスタであり、前記第3の実施形態における内部情報読み出し防止端子401の代わりに内部情報読み出し防止回路402に接続されている。   FIG. 5 is a block diagram showing a configuration of a microcontroller internal information reading device according to the fourth embodiment of the present invention. In FIG. 5, reference numeral 501 denotes an internal information read prevention register in the built-in register 105, which is connected to the internal information read prevention circuit 402 instead of the internal information read prevention terminal 401 in the third embodiment.

上記構成のマイクロコントローラ内部情報読み出し装置は次の様に動作する。内部情報読み出し防止レジスタ501はマイクロコントローラ101がリセットされたときに常に読み出し禁止の状態になるようにする。通常時は内部情報読み出し防止レジスタ501が禁止状態であり、内部情報読み出し防止回路402は第1の実施形態の方法により内部情報を読み出そうとした場合も出力制御信号118を動作させないことにより内部情報の読み出しを禁止する。   The microcontroller internal information reading device having the above-described configuration operates as follows. The internal information read prevention register 501 is always in a read prohibition state when the microcontroller 101 is reset. Normally, the internal information read prevention register 501 is in a prohibited state, and the internal information read prevention circuit 402 does not operate the output control signal 118 even when trying to read the internal information by the method of the first embodiment. Prohibits reading of information.

内部情報を読み出す場合は、第1の実施形態の方法により内部情報読み出し防止レジスタ501を読み出し禁止から読み出し許可の状態に書き換える。内部情報読み出し防止レジスタ501が読み出し許可の状態になると、内部情報読み出し防止回路402は出力制御信号118を動作可能にし、第1の実施形態の方法により内部状態を読み出すことができるようになる。   When reading the internal information, the internal information read prevention register 501 is rewritten from the read prohibition state to the read permission state by the method of the first embodiment. When the internal information read prevention register 501 is in a read permission state, the internal information read prevention circuit 402 enables the output control signal 118 and can read the internal state by the method of the first embodiment.

このような構成のマイクロコントローラ内部情報読み出し装置は、内部情報読み出し防止レジスタの値を設定することで内部情報の読み出しを防止することが可能であるため、内部情報読み出し防止レジスタの設定を適切に管理することにより第三者が内部情報を読み出すことを防止することができる。   The microcontroller internal information reading device configured as described above can prevent reading of internal information by setting the value of the internal information reading prevention register, and therefore appropriately manages the setting of the internal information reading prevention register. By doing so, it is possible to prevent a third party from reading the internal information.

図6は本発明の第5の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図である。図6において、601は内部情報読み出し回路109の内部に保持されているキー情報、602はキー情報601が正しいかを判定するキー情報判定回路である。   FIG. 6 is a block diagram showing a configuration of a microcontroller internal information reading apparatus according to the fifth embodiment of the present invention. In FIG. 6, reference numeral 601 denotes key information held in the internal information reading circuit 109, and reference numeral 602 denotes a key information determination circuit that determines whether the key information 601 is correct.

上記構成のマイクロコントローラ内部情報読み出し装置は次の様に動作する。第1の実施形態の方法に従い、内部情報読み出し回路109は読み出すデータのアドレス情報をデータとして送信した後、続けてキー情報601の値をデータとして送信する。   The microcontroller internal information reading device having the above-described configuration operates as follows. According to the method of the first embodiment, the internal information reading circuit 109 transmits the address information of the data to be read as data, and subsequently transmits the value of the key information 601 as data.

キー情報判定回路602は受信したデータをシリアルバッファ114から読み出し、キー情報601が正しいかを判定する。キー情報が正しく無い場合は、第1の実施形態の方法により内部情報を読み出そうとした場合も出力制御信号118を動作させないことにより内部情報の読み出しを禁止する。   The key information determination circuit 602 reads the received data from the serial buffer 114 and determines whether the key information 601 is correct. If the key information is not correct, reading of the internal information is prohibited by not operating the output control signal 118 even when trying to read the internal information by the method of the first embodiment.

このような構成のマイクロコントローラ内部情報読み出し装置は、正しいキー情報が送信された場合にのみ内部情報読み出しが可能であるため、正しいキー情報を持たない第三者が109と同様の内部情報読み出し回路を使用して内部情報を読み出すことを防止することができる。   The microcontroller internal information reading device having such a configuration can read the internal information only when the correct key information is transmitted, so that a third party who does not have the correct key information can use the same internal information reading circuit as 109. It is possible to prevent the reading of internal information using.

本発明のマイクロコントローラ内部情報読み出し装置は、少ない配線接続によりマイクロコントローラの内部情報の読み出しが可能となるため接続端子数が削減され、回路を簡素化することが可能となるという効果を有し、また、プログラムを用いた制御を必要としないためROM容量の削減が可能となるという効果を有し、さらに、内部情報読み出し回路が指定するアドレスが内蔵メモリアクセス用スレーブアドレス指定手段による所定のアドレスであるかがチェックされるため、第三者が内部情報を読み出すことを防止することができるという効果を有し、マイクロコントローラの内部情報読み出し技術等として有用である。   The microcontroller internal information reading device of the present invention has the effect that the number of connection terminals is reduced because the internal information of the microcontroller can be read with a small number of wiring connections, and the circuit can be simplified. In addition, since control using a program is not required, the ROM capacity can be reduced. Further, the address designated by the internal information reading circuit is a predetermined address by the slave address designating means for accessing the built-in memory. Since there is a check, there is an effect that it is possible to prevent a third party from reading the internal information, which is useful as a technique for reading internal information of the microcontroller.

本発明の第1の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。1 is a block diagram showing a configuration of a microcontroller internal information reading device according to a first embodiment of the present invention. IICバスの信号波形を示すタイムチャート。The time chart which shows the signal waveform of an IIC bus. 本発明の第2の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。The block diagram which shows the structure of the microcontroller internal information read-out apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。The block diagram which shows the structure of the microcontroller internal information read-out apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。The block diagram which shows the structure of the microcontroller internal information read-out apparatus which concerns on the 4th Embodiment of this invention. 本発明の第5の実施形態に係るマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。The block diagram which shows the structure of the microcontroller internal information read-out apparatus which concerns on the 5th Embodiment of this invention. 従来のマイクロコントローラ内部情報読み出し装置の構成を示すブロック図。The block diagram which shows the structure of the conventional microcontroller internal information reading apparatus.

符号の説明Explanation of symbols

101、701 マイクロコントローラ
102、702 CPU
103、703 ROM
104、704 RAM
105、705 内蔵レジスタ
106、706 アドレスバス
107、707 データバス
108、708 コントロールバス
109、709 内部情報読み出し回路
110 IICバス制御回路
111 IICバス
112 IIC通信データ信号
113 IIC通信クロック信号
114 シリアルバッファ
115 内蔵メモリアクセス用スレーブアドレス
116 一致信号
117 IICデータ出力信号
118 出力制御信号
119 内部バス調停回路
120 クロックカウンタ
121 アドレス指定回路
201 STARTコンディション
202 STOPコンディション
203 アドレス
204 アドレスに対するACK
205 データ
206 データに対するACK
207 方向制御ビット
301 ROM上のスレーブアドレスデータ
401 内部情報読み出し防止端子
402 内部情報読み出し防止回路
501 内部情報読み出し防止レジスタ
601 キー情報
602 情報判定回路
710 通信クロック信号
711 通信出力信号
712 通信入力信号
713 リセット信号
714、715 モード設定信号
716 シリアル通信回路
101, 701 Microcontroller 102, 702 CPU
103, 703 ROM
104, 704 RAM
105, 705 Built-in register 106, 706 Address bus 107, 707 Data bus 108, 708 Control bus 109, 709 Internal information read circuit 110 IIC bus control circuit 111 IIC bus 112 IIC communication data signal 113 IIC communication clock signal 114 Serial buffer 115 Built-in Slave address for memory access 116 Match signal 117 IIC data output signal 118 Output control signal 119 Internal bus arbitration circuit 120 Clock counter 121 Address specifying circuit 201 START condition 202 STOP condition 203 Address 204 ACK for address
205 Data 206 ACK for data
207 Direction control bit 301 Slave address data on ROM 401 Internal information read prevention terminal 402 Internal information read prevention circuit 501 Internal information read prevention register 601 Key information 602 Information determination circuit 710 Communication clock signal 711 Communication output signal 712 Communication input signal 713 Reset Signal 714, 715 Mode setting signal 716 Serial communication circuit

Claims (5)

ROMおよびRAMで構成されるメモリおよび内蔵レジスタ等を有するマイクロコントローラと、前記メモリおよび内蔵レジスタ等に格納された内部情報を読み出す内部情報読み出し回路とで構成されるマイクロコントローラ内部情報読み出し装置であって、
前記マイクロコントローラと前記内部情報読み出し回路はIIC通信データ信号およびIIC通信クロック信号で構成されるIICバスを介して接続され、
前記マイクロコントローラは、前記IICバスを制御するIICバス制御回路と、前記IICバス制御回路に付加された内蔵メモリアクセス用スレーブアドレス指定手段と、前記IICバス制御回路に内蔵され前記IIC通信データ信号に対してシリアル入出力が行われるシリアルバッファと、前記メモリおよび内蔵レジスタ等に対するアクセスを制御する内部バス調停回路と、
前記IIC通信クロック信号をカウントするクロックカウンタと、前記クロックカウンタの値により前記シリアルバッファ上のデータを用いて前記メモリおよび内蔵レジスタ等のアドレスを指定するアドレス指定回路とを備え、
前記内部情報読み出し回路は、前記IICバスを介して指定するアドレスが前記内蔵メモリアクセス用スレーブアドレス指定手段が指定するアドレスに一致した場合にのみ前記マイクロコントローラの内部情報読み出しを可能にするマイクロコントローラ内部情報読み出し装置。
A microcontroller internal information reading device comprising a microcontroller having a memory and a built-in register, etc. composed of ROM and RAM, and an internal information reading circuit for reading internal information stored in the memory, the built-in register, etc. ,
The microcontroller and the internal information reading circuit are connected via an IIC bus composed of an IIC communication data signal and an IIC communication clock signal,
The microcontroller includes an IIC bus control circuit for controlling the IIC bus, a built-in memory access slave address designating unit added to the IIC bus control circuit, and an IIC communication data signal incorporated in the IIC bus control circuit. A serial buffer for serial input / output, an internal bus arbitration circuit for controlling access to the memory and the built-in register,
A clock counter for counting the IIC communication clock signal; and an address designating circuit for designating addresses of the memory and the built-in register using data on the serial buffer according to the value of the clock counter,
The internal information reading circuit is configured to read the internal information of the microcontroller only when the address specified via the IIC bus matches the address specified by the slave address specifying means for accessing the built-in memory. Information reading device.
前記内蔵メモリアクセス用スレーブアドレス指定手段が指定するアドレスは、前記マイクロコントローラに内蔵されるROM上のデータによる請求項1記載のマイクロコントローラ内部情報読み出し装置。   2. The microcontroller internal information reading device according to claim 1, wherein the address designated by the built-in memory access slave address designating means is based on data on a ROM built in the microcontroller. 前記マイクロコントローラの外部端子として内部情報読み出し禁止信号を有し、前記内部情報読み出し禁止信号により前記マイクロコントローラの内部情報読み出しを抑止する請求項1記載のマイクロコントローラ内部情報読み出し装置。   2. The microcontroller internal information reading device according to claim 1, further comprising an internal information read prohibiting signal as an external terminal of the microcontroller, wherein the internal information reading prohibiting signal is inhibited by the internal information reading prohibiting signal. 前記マイクロコントローラの内蔵レジスタに内部情報読み出し禁止情報の設定が可能であり、前記内部情報読み出し禁止情報により前記マイクロコントローラの内部情報読み出しを抑止する請求項1記載のマイクロコントローラ内部情報読み出し装置。   2. The microcontroller internal information reading device according to claim 1, wherein internal information reading prohibition information can be set in an internal register of the microcontroller, and internal information reading of the microcontroller is suppressed by the internal information read prohibition information. 前記内部情報読み出し回路は解読キー情報を保持し、前記マイクロコントローラは前記内部情報読み出し回路から送信された解読キー情報が所定の情報と一致した場合にのみ前記マイクロコントローラの内部情報読み出しを可能にする請求項1記載のマイクロコントローラ内部情報読み出し装置。   The internal information read circuit holds decryption key information, and the microcontroller enables the microcontroller to read internal information only when the decryption key information transmitted from the internal information read circuit matches predetermined information. The microcontroller internal information reading device according to claim 1.
JP2003405566A 2003-12-04 2003-12-04 Apparatus for reading microcontroller internal information Pending JP2005165812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003405566A JP2005165812A (en) 2003-12-04 2003-12-04 Apparatus for reading microcontroller internal information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003405566A JP2005165812A (en) 2003-12-04 2003-12-04 Apparatus for reading microcontroller internal information

Publications (1)

Publication Number Publication Date
JP2005165812A true JP2005165812A (en) 2005-06-23

Family

ID=34728201

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003405566A Pending JP2005165812A (en) 2003-12-04 2003-12-04 Apparatus for reading microcontroller internal information

Country Status (1)

Country Link
JP (1) JP2005165812A (en)

Similar Documents

Publication Publication Date Title
US8102710B2 (en) System and method for setting access and modification for synchronous serial interface NAND
EP3242199B1 (en) Flash memory controller and control method for flash memory controller
JP4901334B2 (en) Memory controller
US20050198419A1 (en) Data transfer memory
JP2008539498A (en) Programming parallel I2C slave devices from a single I2C data stream
JP4452690B2 (en) Electronic device, control method thereof, host device and control method thereof
CN108694140B (en) For addressing I2Method for non-volatile memory on a C bus and corresponding memory device
KR100625811B1 (en) Method and apparatus for correcting code data error
CN112148629A (en) Method for addressing an integrated circuit on a bus and corresponding device
US20080235428A1 (en) Method and system for dynamic switching between multiplexed interfaces
JP2016143422A (en) Configuring serial devices
US20160055853A9 (en) Method for processing sound data and circuit therefor
JP2005165812A (en) Apparatus for reading microcontroller internal information
EP3242237A1 (en) Sub-area-based method and device for protecting information of mcu chip
KR20070102823A (en) Device for controlling address in a i2c protocol
KR20050046932A (en) System for checking state of slave devices using i2c bus
JP4291368B2 (en) Memory bus check procedure
JP5110701B2 (en) Semiconductor memory device and computer system
JP2005234957A (en) Method and program for controlling data access for flash memory
EP0940767A1 (en) Ic memory card
CN112905234B (en) Processing device and data access method thereof
US20020157085A1 (en) Information processing apparatus
JP2002245023A (en) Microcomputer
KR20070061021A (en) Method and apparatus for correcting code data error
JP2006018610A (en) Digital data processing card and method for controlling digital data processing system

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060327