JP2021022040A - Communication control system and information processor - Google Patents

Communication control system and information processor Download PDF

Info

Publication number
JP2021022040A
JP2021022040A JP2019136847A JP2019136847A JP2021022040A JP 2021022040 A JP2021022040 A JP 2021022040A JP 2019136847 A JP2019136847 A JP 2019136847A JP 2019136847 A JP2019136847 A JP 2019136847A JP 2021022040 A JP2021022040 A JP 2021022040A
Authority
JP
Japan
Prior art keywords
data
controlled device
transmitted
bits
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019136847A
Other languages
Japanese (ja)
Other versions
JP7265953B2 (en
Inventor
松木 逸応
Toshimasa Matsuki
逸応 松木
一幸 大西
Kazuyuki Onishi
一幸 大西
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2019136847A priority Critical patent/JP7265953B2/en
Publication of JP2021022040A publication Critical patent/JP2021022040A/en
Application granted granted Critical
Publication of JP7265953B2 publication Critical patent/JP7265953B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To avoid deterioration in the efficiency of data transfer between a controller (a master side device) and a controlled device (a slave side device) without destroying data output circuits of both of the devices even upon occurrence of the timing at which both of the devices are in a transmitted state.SOLUTION: In a communication control system which connects together a controller and a controlled device with a bus and performs bi-directional communication, after a predetermined request command composed of n (where n is greater than 1) bits is transmitted from the controller to the controlled device, the bus transfer direction is switched, and upon transmission of replay data corresponding to a request command composed of m (where m is greater than 1) bits from the controlled device to the controller, contents of first binary data composed of a (where a is smaller than n but greater than 1) bits included in the request command and finally transmitted and contents of second binary data composed of b (where b is smaller than m but greater than 1) bits included in the replay data and initially transmitted are identical.SELECTED DRAWING: Figure 8

Description

この発明は、通信制御システムおよび情報処理装置に関し、特に、主従関係にあるマスター側装置とスレーブ側装置との間でデータ通信を行う通信インタフェースに一組の通信経路を使用し、データの転送方向を切り替えて双方向のデータ通信を行うようにした通信制御システムと、双方向のデータ通信を行う一組の通信経路で接続されたマスター側装置とスレーブ側装置とを備えた情報処理装置に関する。 The present invention relates to a communication control system and an information processing device, and in particular, uses a set of communication paths for a communication interface for performing data communication between a master-side device and a slave-side device in a master-slave relationship, and data transfer directions. The present invention relates to a communication control system in which bidirectional data communication is performed by switching between the two, and an information processing device including a master side device and a slave side device connected by a set of communication paths for bidirectional data communication.

今日利用されているパソコンや携帯端末などの情報処理装置では、装置全体の動作を制御するCPUを備え、周辺デバイスであるメモリ、画像処理など特定機能を実行するための集積回路であるASIC(application specific integrated circuit)などと、CPUとを、所定のバスを介して接続し、CPUと周辺デバイスとの間で、双方向のデータ通信を行っている。 Information processing devices such as personal computers and mobile terminals used today are equipped with a CPU that controls the operation of the entire device, and are ASICs (applications) that are integrated circuits for executing specific functions such as memory and image processing, which are peripheral devices. A specific integrated circuit) and the like are connected to the CPU via a predetermined bus, and bidirectional data communication is performed between the CPU and peripheral devices.

CPUと周辺デバイスとを接続するバスには、種々の形式の通信インタフェースが利用されているが、たとえば、高速通信が可能なSPI(Serial Peripheral Interface)バスが利用されている。
特に、1クロックで4ビットのデータを同時に送信可能なQuad SPI形式の通信インタフェースが利用されるようになってきた。
Various types of communication interfaces are used for the bus connecting the CPU and peripheral devices. For example, an SPI (Serial Peripheral Interface) bus capable of high-speed communication is used.
In particular, Quad SPI format communication interfaces that can simultaneously transmit 4-bit data with one clock have come to be used.

Quad SPI形式の通信インタフェースでは、たとえば、マスター側装置であるCPUと、スレーブ側装置であるASICとを、クロック信号線と、チップセレクト信号線と、データの送信経路である4本のデータ線からなる合計6本の信号線で接続し、4本のデータ線でデータの衝突が起こらないように、データの転送方向を切り替えて、CPUとASICとの間で双方向の通信(半二重通信)を行う。
すなわち、たとえば、4本のデータ線を介して、送信状態にあるマスター側装置から、受信状態にあるスレーブ側装置にデータの送信を行った後、少なくとも1クロックサイクル以上の所定の待ち時間を設けて両者の通信状態を切り替えて、マスター側装置が受信状態となり、スレーブ側装置が送信状態に切り替わった後に、スレーブ側装置から、マスター側装置にデータの送信を行う。
In the Quad SPI format communication interface, for example, the CPU which is the master side device and the ASIC which is the slave side device are connected from the clock signal line, the chip select signal line, and the four data lines which are the data transmission paths. Connect with a total of 6 signal lines, switch the data transfer direction so that data collision does not occur with 4 data lines, and bidirectional communication (half-duplex communication) between the CPU and ASIC. )I do.
That is, for example, after transmitting data from the master side device in the transmitting state to the slave side device in the receiving state via the four data lines, a predetermined waiting time of at least one clock cycle or more is provided. After switching the communication state between the two, the master side device is in the reception state, and the slave side device is switched to the transmission state, data is transmitted from the slave side device to the master side device.

また、特許文献1では、マスター側デバイスと、複数のスレーブ側デバイスとをSPIバス形式のバスシステムに接続し、データの同期用クロックを各スレーブ側デバイスへ供給するSCK信号線の構成を工夫し、各スレーブ側デバイスへ供給する同期用クロックのタイミングを、順次、所定ビット数ずつシフトさせて、同期用クロックが供給されている1つのスレーブ側デバイスとマスター側デバイスとの間でデータの送受信を行い、スレーブ側デバイスの数が増減しても信号線の本数を変更することがないバスシステムが提案されている。 Further, in Patent Document 1, the master side device and a plurality of slave side devices are connected to the SPI bus type bus system, and the configuration of the SCK signal line that supplies the data synchronization clock to each slave side device is devised. , The timing of the synchronization clock supplied to each slave side device is sequentially shifted by a predetermined number of bits to send and receive data between one slave side device and the master side device to which the synchronization clock is supplied. A bus system has been proposed in which the number of signal lines does not change even if the number of slave-side devices increases or decreases.

特開2013−125315号公報Japanese Unexamined Patent Publication No. 2013-125315

しかし、SPIバスを利用した従来技術においては、データを送受信するデータ線でデータの衝突が起こらないように、データの転送方向を切り替えるために、少なくとも1クロックサイクル以上の所定の待ち時間を設けているので、スレーブ側デバイスとマスター側デバイスとの間のデータの転送効率が低下してしまう。 However, in the prior art using the SPI bus, a predetermined waiting time of at least one clock cycle or more is provided in order to switch the data transfer direction so that data collision does not occur in the data lines for transmitting and receiving data. Therefore, the efficiency of data transfer between the slave side device and the master side device is lowered.

また、マスター側デバイスからの要求に応じて、スレーブ側デバイスのデバイス識別番号(デバイスID)や、スレーブ側デバイスのステータス情報をマスター側デバイスに送信する場合は、スレーブ側デバイスでは、その要求を受信した後、すぐにデバイス識別番号等を送信できる準備ができるにもかかわらず、上記した所定の待ち時間を設けるので、転送効率が低下する。 When transmitting the device identification number (device ID) of the slave side device and the status information of the slave side device to the master side device in response to the request from the master side device, the slave side device receives the request. After that, although the device identification number and the like can be prepared to be transmitted immediately, the above-mentioned predetermined waiting time is provided, so that the transfer efficiency is lowered.

特許文献1のバスシステムでは、マスター側デバイスとスレーブ側デバイスとの間で送受信されるデータの衝突を防止する対策は考慮されておらず、双方向のピンポン伝送が可能な1本のみのSDIO信号線によりデータ通信を行う場合には、データ衝突が起こらないように、データの転送方向を切り替える際に、上記と同様な所定の待ち時間を設ける必要がある。 In the bus system of Patent Document 1, measures to prevent data collision between the master side device and the slave side device are not considered, and only one SDIO signal capable of bidirectional ping-pong transmission is not considered. When data communication is performed by line, it is necessary to provide a predetermined waiting time similar to the above when switching the data transfer direction so that data collision does not occur.

一方、所定の待ち時間を設けない場合や、待ち時間を短くした場合には、データの転送方向を切り替える際に、マスター側デバイスとスレーブ側デバイスとが、どちらも、データの送信状態となるタイミングが発生する可能性がある。
どちらもデータの送信状態となった場合、SPIバスの同じデータ線上に双方から出力される送信信号が衝突する。
On the other hand, when a predetermined waiting time is not provided or the waiting time is shortened, when the data transfer direction is switched, both the master side device and the slave side device are in the data transmission state. May occur.
When both are in the data transmission state, the transmission signals output from both sides collide on the same data line of the SPI bus.

たとえば、SPIバスの同じデータ線に、マスター側デバイスがデータ「1」に相当する送信信号を出力し、スレーブ側デバイスがデータ「0」に相当する送信信号を出力した場合、送信信号の衝突が発生する。
このような衝突が発生した場合、データ「1」に相当する送信信号とデータ「0」に相当する送信信号の電圧レベルが異なるため、マスター側デバイスとスレーブ側デバイスのデータ出力用バッファ回路に、規格値以上の過電流が流れ、そのデータ出力用バッファ回路が破壊する可能性がある。
For example, if the master side device outputs a transmission signal corresponding to data "1" and the slave side device outputs a transmission signal corresponding to data "0" on the same data line of the SPI bus, the transmission signal collision occurs. appear.
When such a collision occurs, the voltage levels of the transmission signal corresponding to the data "1" and the transmission signal corresponding to the data "0" are different, so that the data output buffer circuit of the master side device and the slave side device can be used. An overcurrent exceeding the standard value may flow, and the data output buffer circuit may be destroyed.

したがって、マスター側デバイスとスレーブ側デバイスに規格値以上の過電流が流れることによりデータ出力用バッファ回路が破壊することなく、マスター側デバイスとスレーブ側デバイスとの間のデータの転送効率が低下しないようにすることが望ましい。 Therefore, the data transfer buffer circuit will not be destroyed due to the overcurrent flowing through the master side device and the slave side device, and the data transfer efficiency between the master side device and the slave side device will not decrease. It is desirable to.

そこで、この発明は、以上のような事情を考慮してなされたものであり、主従関係にあるマスター側装置とスレーブ側装置との間でデータ通信を行う通信インタフェースにおいて、マスター側装置とスレーブ側装置とがともに、データの送信状態になるタイミングが発生したとしても、双方の装置のデータ出力用回路が破壊することなく、マスター側装置とスレーブ側装置の間におけるデータの転送効率が低下しないようにすることを課題とする。 Therefore, the present invention has been made in consideration of the above circumstances, and in a communication interface for performing data communication between a master side device and a slave side device in a master-slave relationship, the master side device and the slave side Even if the data transmission state occurs with both devices, the data output circuits of both devices will not be destroyed and the data transfer efficiency between the master side device and the slave side device will not decrease. The task is to make it.

この発明は、主従関係にある制御装置と被制御装置とをバスで接続し、バスの転送方向を切り替えて、制御装置と被制御装置との間の双方向通信を行う通信制御システムであって、前記制御装置から、n個(n>1)のビット数からなる所定の要求コマンドを、前記バスを介して前記被制御装置に送信した後、バスの転送方向を切り替えて、前記被制御装置から、m個(m>1)のビット数からなる前記要求コマンドに対応した返信データを、前記バスを介して前記制御装置に送信する場合、前記要求コマンドのうち、最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、前記返信データのうち、最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とが同一の内容であることを特徴とする通信制御システムを提供するものである。 The present invention is a communication control system in which a control device and a controlled device in a master-slave relationship are connected by a bus, the transfer direction of the bus is switched, and bidirectional communication is performed between the control device and the controlled device. After transmitting a predetermined request command consisting of n (n> 1) bits from the control device to the controlled device via the bus, the transfer direction of the bus is switched to obtain the controlled device. When the reply data corresponding to the request command consisting of m (m> 1) bits is transmitted to the control device via the bus, a of the request commands to be transmitted last is transmitted. The content of the first binary data consisting of the number of bits of (n> a> 1) and the second binary consisting of the number of bits of b (m> b> 1) transmitted first among the reply data. It provides a communication control system characterized in that the contents of data are the same.

また、前記第1のバイナリデータの内容と、前記第2のバイナリデータの内容とが、同一電圧レベルの信号として、バスに出力されることを特徴とする。 Further, the content of the first binary data and the content of the second binary data are output to the bus as signals of the same voltage level.

また、前記第1のバイナリデータの内容と、前記第2のバイナリデータの内容とが、どちらも、複数のビット数からなる0に相当するバイナリデータであるか、あるいは、複数のビット数からなる1に相当するバイナリデータであることを特徴とする。 Further, the content of the first binary data and the content of the second binary data are both binary data corresponding to 0 having a plurality of bits, or are composed of a plurality of bits. It is characterized in that it is binary data corresponding to 1.

また、前記バスが、4本のデータ線を含むQuad SPI(Serial Peripheral Interface)バスであり、前記要求コマンドと、前記返信データは、4本のデータ線を介して、異なるタイミングで送信されることを特徴とする。 Further, the bus is a Quad SPI (Serial Peripheral Interface) bus including four data lines, and the request command and the reply data are transmitted at different timings via the four data lines. It is characterized by.

また、前記4本のデータ線を介して送信される要求コマンドのうち、最後に送信される少なくとも4ビット以上からなる前記第1のバイナリデータと、前記4本のデータ線を介して送信される前記返信データのうち、最初に送信される少なくとも4ビット以上からなる前記第2のバイナリデータとが、複数のビット数からなる0に相当するバイナリデータであるか、あるいは、複数のビット数からなる1に相当するバイナリデータであることを特徴とする。 Further, among the request commands transmitted via the four data lines, the first binary data consisting of at least 4 bits or more to be transmitted last and the request commands transmitted via the four data lines are transmitted. Of the reply data, the second binary data consisting of at least 4 bits or more initially transmitted is binary data corresponding to 0 consisting of a plurality of bits, or is composed of a plurality of bits. It is characterized in that it is binary data corresponding to 1.

また、前記被制御装置が、被制御装置を識別するためのデバイスIDを予め記憶し、前記制御装置から、前記デバイスIDを送信することを要求する情報を含む要求コマンドが被制御装置に送信された場合、前記被制御装置から、被制御装置のデバイスIDを含む返信データが制御装置に送信されることを特徴とする。 Further, the controlled device stores the device ID for identifying the controlled device in advance, and the control device transmits a request command including information requesting the device ID to be transmitted to the controlled device. In this case, the controlled device is characterized in that reply data including the device ID of the controlled device is transmitted to the control device.

また、前記被制御装置が、被制御装置の動作状態を示す情報を記憶したステータスレジスタを備え、前記制御装置から、前記ステータスレジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置に送信された場合、前記被制御装置から、被制御装置のステータスレジスタに記憶されている情報を含む返信データが制御装置に送信されることを特徴とする。 Further, the controlled device includes a status register that stores information indicating the operating state of the controlled device, and the control device receives a request command requesting that the information stored in the status register be transmitted. When transmitted to the control device, the controlled device transmits reply data including information stored in the status register of the controlled device to the control device.

また、前記被制御装置が、被制御装置の設定内容を示す情報を記憶した設定レジスタを備え、前記制御装置から、前記設定レジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置に送信された場合、前記被制御装置から、被制御装置の設定レジスタに記憶されている情報を含む返信データが制御装置に送信されることを特徴とする。 Further, the controlled device includes a setting register that stores information indicating the setting contents of the controlled device, and the control device receives a request command requesting that the information stored in the setting register be transmitted. When transmitted to the control device, the controlled device transmits reply data including information stored in the setting register of the controlled device to the control device.

また、この発明は、上記したいずれかの通信制御システムを備えた情報処理装置を提供するものである。 The present invention also provides an information processing apparatus including any of the above-mentioned communication control systems.

また、この発明は、 制御装置と被制御装置とをバスで接続し、バスの転送方向を切り替えて、制御装置と被制御装置との間の双方向通信を行う通信制御システムの通信制御方法であって、前記制御装置が前記バスに所定のデータを送信可能な送信状態であり、前記被制御装置が前記バスから所定のデータを受信可能な受信状態である場合に、前記制御装置から、n個(n>1)のビット数からなる所定の要求コマンドを、前記バスを介して前記被制御装置に送信し、前記バスの転送方向を切り替えて、前記制御装置が受信状態となり、前記被制御装置が送信状態となった後、前記被制御装置から、m個(m>1)のビット数からなる前記要求コマンドに対応した返信データを、前記バスを介して前記制御装置に送信し、前記要求コマンドのうち、最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、前記返信データのうち、最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とが同一の内容であることを特徴とする通信制御システムの通信制御方法を提供するものである。 Further, the present invention is a communication control method of a communication control system in which a control device and a controlled device are connected by a bus, the transfer direction of the bus is switched, and bidirectional communication is performed between the control device and the controlled device. When the control device is in a transmission state capable of transmitting predetermined data to the bus and the controlled device is in a reception state capable of receiving predetermined data from the bus, n from the control device. A predetermined request command consisting of the number of bits (n> 1) is transmitted to the controlled device via the bus, the transfer direction of the bus is switched, the control device is in the receiving state, and the controlled device is controlled. After the device is in the transmission state, reply data corresponding to the request command consisting of m (m> 1) bits is transmitted from the controlled device to the control device via the bus, and the control device is transmitted. Of the request commands, the content of the first binary data consisting of a (n> a> 1) bits to be transmitted last, and b (m> b) of the reply data to be transmitted first. It provides a communication control method of a communication control system characterized in that the content of the second binary data consisting of the number of bits of> 1) is the same.

この発明によれば、制御装置からn個(n>1)のビット数からなる所定の要求コマンドを被制御装置に送信した後、バスの転送方向を切り替えて、被制御装置からm個(m>1)のビット数からなる要求コマンドに対応した返信データを制御装置に送信する場合に、要求コマンドのうち最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、返信データのうち最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とが同一の内容であるので、制御装置(マスター側装置)と被制御装置(スレーブ側装置)とがともに、データの送信状態になるタイミングが発生したとしても、制御装置(マスター側装置)と被制御装置(スレーブ側装置)の回路が破壊することを防止でき、制御装置(マスター側装置)と被制御装置(スレーブ側装置)の間におけるデータの転送効率が低下しないようにすることができる。 According to the present invention, after transmitting a predetermined request command consisting of n (n> 1) bits from the control device to the controlled device, the transfer direction of the bus is switched and m (m) from the controlled device. When the reply data corresponding to the request command consisting of the number of bits of> 1) is transmitted to the control device, the first one consisting of the number of a (n> a> 1) bits transmitted last of the request commands. Since the content of the binary data and the content of the second binary data consisting of b (m> b> 1) bits of the first transmitted reply data are the same, the control device (master side). Even if the timing to enter the data transmission state occurs in both the controlled device (device) and the controlled device (slave side device), the circuits of the control device (master side device) and the controlled device (slave side device) are destroyed. It is possible to prevent the data transfer efficiency between the control device (master side device) and the controlled device (slave side device) from being lowered.

この発明のSPIを利用した通信制御システムの一実施例の説明図である。It is explanatory drawing of one Example of the communication control system using the SPI of this invention. この発明の制御装置(マスター側装置)の一実施例の構成ブロック図である。It is a block diagram of one Example of the control device (master side device) of this invention. この発明の被制御装置(スレーブ側装置)の一実施例の構成ブロック図である。It is a block diagram of one Example of the controlled device (slave side device) of this invention. 制御装置と被制御装置で衝突が発生しない場合の通信タイミングなどの一実施例の説明図である。It is explanatory drawing of one Example such as a communication timing when a collision does not occur between a control device and a controlled device. 被制御装置のデバイスIDを読み出す場合の通信タイミングの一実施例の説明図である。It is explanatory drawing of one Example of communication timing at the time of reading a device ID of a controlled device. 制御装置と被制御装置で衝突が発生しない場合の通信タイミングと通信シーケンスの一実施例の概略説明図である。It is a schematic explanatory diagram of an Example of communication timing and communication sequence when a collision does not occur between a control device and a controlled device. 制御装置と被制御装置で衝突が発生する場合の通信タイミングと通信シーケンスの一実施例の概略説明図である。It is a schematic explanatory diagram of an Example of communication timing and communication sequence when a collision occurs between a control device and a controlled device. この発明において、被制御装置に記憶されたデバイスIDを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図である。In the present invention, it is explanatory drawing of the reading timing at the time of reading a device ID stored in a controlled device, and one Example of the data content transmitted from a controlled device and a controlled device. この発明において、衝突が発生するが、過電流は流れない通信タイミングと通信シーケンスの一実施例の概略説明図である。In the present invention, it is a schematic explanatory view of an embodiment of a communication timing and a communication sequence in which a collision occurs but an overcurrent does not flow. この発明において、被制御装置に記憶されたデバイスIDを読み出すコマンドと、デバイスIDデータと、衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図である。In the present invention, it is a schematic explanatory view of an embodiment of a communication sequence in which a command for reading a device ID stored in a controlled device, a device ID data, and a collision occurs but an overcurrent does not flow. この発明において、衝突が発生しない場合の通信タイミングと通信シーケンスの一実施例の概略説明図である。In this invention, it is schematic explanatory diagram of one Example of communication timing and communication sequence when a collision does not occur. この発明において、被制御装置に記憶されたステータスレジスタを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図である。In the present invention, it is explanatory drawing of the read timing at the time of reading the status register stored in the controlled device, and one Example of the data content transmitted from a controlled device and a controlled device. この発明において、被制御装置に記憶されたステータスレジスタを読み出すコマンドと、ステータスレジスタデータと、衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図である。In the present invention, it is a schematic explanatory view of an embodiment of a communication sequence in which a command for reading a status register stored in a controlled device, status register data, and a collision occurs but an overcurrent does not flow. この発明において、被制御装置に記憶された設定レジスタを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図である。In the present invention, it is explanatory drawing of the reading timing at the time of reading a setting register stored in a controlled device, and one Example of the data content transmitted from a controlled device and a controlled device. この発明において、被制御装置に記憶されたデバイスIDを送信するデータ出力用回路の一実施例の説明図である。In the present invention, it is explanatory drawing of one Example of the data output circuit which transmits the device ID stored in the controlled device. この発明において、被制御装置に記憶されたステータスレジスタ情報を送信するデータ出力用回路の一実施例の説明図である。In the present invention, it is explanatory drawing of one Example of the data output circuit which transmits the status register information stored in the controlled device. この発明において、被制御装置に記憶された設定レジスタ情報を送信するデータ出力用回路の一実施例の説明図である。In the present invention, it is explanatory drawing of one Example of the data output circuit which transmits the setting register information stored in the controlled device.

以下、図面を使用して本発明の実施の形態を説明する。なお、以下の実施例の記載によって、この発明が限定されるものではない。
この発明の通信制御システムは、主従関係にある制御装置(以下、マスター側装置、単にマスターとも呼ぶ)と、被制御装置(以下、スレーブ側装置、単にスレーブとも呼ぶ)とからなる。
制御装置と被制御装置とは、1組の通信経路を介して接続され、データの転送方向を切り替えて、双方向の通信を行うものであり、原則として、制御装置からの要求に基づいて、被制御装置が動作する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. The description of the following examples does not limit the present invention.
The communication control system of the present invention includes a control device having a master-slave relationship (hereinafter, also referred to as a master side device, simply referred to as a master) and a controlled device (hereinafter, also referred to as a slave side device, simply referred to as a slave).
The control device and the controlled device are connected via a set of communication paths, switch the data transfer direction, and perform bidirectional communication. In principle, based on a request from the control device, The controlled device operates.

1組の通信経路としては、たとえば、バスが利用できる。
バスを利用する場合、制御装置と被制御装置とをバスで接続し、バスの転送方向を切り替えて、制御装置と被制御装置との間の双方向通信を行う。
As a set of communication paths, for example, a bus can be used.
When using a bus, the control device and the controlled device are connected by a bus, the transfer direction of the bus is switched, and bidirectional communication is performed between the control device and the controlled device.

また、制御装置と被制御装置は、情報処理装置に組み込まれ、情報処理装置は、この発明の通信制御システムを備える。
また、制御装置と被制御装置との間で、所定のデータ通信を行うことにより、情報処理装置の所定の機能を実行する。
制御装置は、主として、情報処理装置の全体の動作を制御するCPUと、内部バスを介して、外部の被制御装置などとデータ通信を行う通信回路を含む。
被制御装置は、主として、被制御装置が担当する機能を実行する制御回路と、内部バスを介して、外部の制御装置などとデータ通信を行う通信回路を含む。
被制御装置は、たとえば、ROM、RAM、フラッシュメモリなどの半導体記憶素子、特定の機能を実行するASIC、FPGA、CPLDなどに相当する。
情報処理装置は、たとえば、パソコン、携帯端末、画像形成装置、画像読取装置、デジタル複合機などに相当する。
Further, the control device and the controlled device are incorporated in the information processing device, and the information processing device includes the communication control system of the present invention.
In addition, a predetermined function of the information processing device is executed by performing a predetermined data communication between the control device and the controlled device.
The control device mainly includes a CPU that controls the overall operation of the information processing device, and a communication circuit that performs data communication with an external controlled device or the like via an internal bus.
The controlled device mainly includes a control circuit that executes a function that the controlled device is in charge of, and a communication circuit that performs data communication with an external control device or the like via an internal bus.
The controlled device corresponds to, for example, a semiconductor storage element such as a ROM, RAM, or a flash memory, an ASIC, an FPGA, a CPLD, or the like that executes a specific function.
The information processing device corresponds to, for example, a personal computer, a mobile terminal, an image forming device, an image reading device, a digital multifunction device, or the like.

1組の通信経路は、後述するように、クロック等を転送する制御線と、データそのものを転送するデータ線からなるバスである。
データ線は、データの転送方向を切り替えて使用する信号ラインであり、データ線を介して、半二重通信を行うものとする。データ線は、1本の信号ラインでもよく、複数の信号ラインでもよい。
1組の通信経路の通信インタフェースの形態としては、現在利用されている種々の通信インタフェースが利用できる。
As will be described later, one set of communication paths is a bus composed of a control line for transferring a clock or the like and a data line for transferring the data itself.
The data line is a signal line used by switching the data transfer direction, and half-duplex communication is performed via the data line. The data line may be one signal line or a plurality of signal lines.
As a form of the communication interface of one set of communication paths, various communication interfaces currently used can be used.

たとえば、1組の通信経路として、上記したSPIバスや、データ線がオープンドレイン接続でない高速I2C、その他同期シリアルインターフェースなどを使用することができる。
SPIバスであっても、シングルモードのSPIバス、デュアルモードのSPIバス、QuadモードのSPIバスなどの通信インタフェースの形態が利用できる。
以下の実施例では、制御装置と被制御装置とを接続する1組の通信経路として、QuadモードのSPIバス(単に、QuadSPIとも呼ぶ)を使用するものとして説明する。
ただし、制御装置と被制御装置とを接続する1組の通信経路は、QuadSPIに限るものではない。
For example, as a set of communication paths, the above-mentioned SPI bus, high-speed I2C whose data line is not an open drain connection, or other synchronous serial interface can be used.
Even if it is an SPI bus, a communication interface form such as a single mode SPI bus, a dual mode SPI bus, or a Quad mode SPI bus can be used.
In the following embodiment, the SPI bus in Quad mode (simply also referred to as QuadSPI) will be used as a set of communication paths connecting the control device and the controlled device.
However, the set of communication paths connecting the control device and the controlled device is not limited to the Quad SPI.

<制御装置と被制御装置の接続形態>
図1に、この発明のSPIを利用した通信制御システムの一実施例の説明図を示す。
図1(a)に、制御装置と被制御装置との接続に、SPIバスを利用した接続形態の通信制御システムの概略説明図を示す。
制御装置(マスター)1は、主として、制御部11と、マスター通信部12と、制御部11とマスター通信部12を接続する内部バス13を備えるものとする。
被制御装置(スレーブ)2は、主として、被制御部22と、スレーブ通信部21と、被制御部22とスレーブ通信部21を接続する内部バス23を備えるものとする。
また、制御装置1と被制御装置2とは、SPIバスを介して接続され、SPIバスは、制御線31と、データ線32とからなるものとする。
<Connection form between control device and controlled device>
FIG. 1 shows an explanatory diagram of an embodiment of a communication control system using the SPI of the present invention.
FIG. 1A shows a schematic explanatory diagram of a communication control system in a connection form using an SPI bus for connecting a control device and a controlled device.
The control device (master) 1 mainly includes a control unit 11, a master communication unit 12, and an internal bus 13 that connects the control unit 11 and the master communication unit 12.
The controlled device (slave) 2 mainly includes a controlled unit 22, a slave communication unit 21, and an internal bus 23 that connects the controlled unit 22 and the slave communication unit 21.
Further, the control device 1 and the controlled device 2 are connected via an SPI bus, and the SPI bus is composed of a control line 31 and a data line 32.

制御部11は、制御装置1全体の動作を制御する部分である。
マスター通信部12は、SPIバスを介して被制御装置2と通信を行う部分であり、被制御装置2に対してデータを送信するデータ送信用回路、被制御装置2から転送されてきたデータを受信するデータ受信用回路、データの転送方向を切り替える切替回路などからなる。
被制御部22は、被制御装置全体の動作を制御する部分であり、被制御装置2が担当する機能を実行する。
スレーブ通信部21は、SPIバスを介して制御装置1と通信を行う部分であり、制御装置1に対してデータを送信するデータ送信用回路、制御装置1から転送されてきたデータを受信するデータ受信用回路、データの転送方向を切り替える切替回路などからなる。
The control unit 11 is a part that controls the operation of the entire control device 1.
The master communication unit 12 is a part that communicates with the controlled device 2 via the SPI bus, and receives data transferred from the controlled device 2 and a data transmission circuit that transmits data to the controlled device 2. It consists of a data reception circuit for receiving data, a switching circuit for switching the data transfer direction, and the like.
The controlled unit 22 is a part that controls the operation of the entire controlled device, and executes the function that the controlled device 2 is in charge of.
The slave communication unit 21 is a part that communicates with the control device 1 via the SPI bus, and is a data transmission circuit that transmits data to the control device 1 and data that receives data transferred from the control device 1. It consists of a receiving circuit and a switching circuit that switches the data transfer direction.

制御線31は、クロックを伝送するCLK信号線と、制御対象のデバイスを選択するチップセレクト信号を伝送するCS信号線とからなる。
データ線32には、制御線31に伝送されるクロックに同期させて、バイナリデータが送信される。
バイナリデータは、0と1で表される2進数のデータであり、SPIバスを介して送信される情報は、2値化され、0と1を組み合わせた所定のビット数のバイナリデータで送信される。
0に相当するバイナリデータと、1に相当するバイナリデータとは、異なる電圧レベルを持つ信号として、SPIバスに出力される。
The control line 31 includes a CLK signal line that transmits a clock and a CS signal line that transmits a chip select signal that selects a device to be controlled.
Binary data is transmitted to the data line 32 in synchronization with the clock transmitted to the control line 31.
The binary data is binary data represented by 0 and 1, and the information transmitted via the SPI bus is binarized and transmitted as binary data having a predetermined number of bits combining 0 and 1. To.
The binary data corresponding to 0 and the binary data corresponding to 1 are output to the SPI bus as signals having different voltage levels.

制御装置1と被制御装置2との間で通信される情報には種々のものがあるが、以下の実施形態では、制御装置1から被制御装置2に送信される情報を、要求コマンドと称し、
被制御装置2から制御装置1に送信される情報を、返信データと称して説明する。
返信データは、主として、要求コマンドに対応した情報であり、制御装置1に送信することを要求された情報である。
ただし、両者の装置間で通信される情報は、要求コマンドや返信データと称されるものに限るものではない。
There are various types of information communicated between the control device 1 and the controlled device 2, but in the following embodiments, the information transmitted from the control device 1 to the controlled device 2 is referred to as a request command. ,
Information transmitted from the controlled device 2 to the control device 1 will be described as return data.
The reply data is mainly information corresponding to the request command, and is information requested to be transmitted to the control device 1.
However, the information communicated between the two devices is not limited to what is called a request command or reply data.

たとえば、制御装置1がバスであるSPIバスに所定のデータを送信可能な送信状態であり、被制御装置2がSPIバスから所定のデータを受信可能な受信状態である場合に、制御装置1から、n個(n>1)のビット数からなる所定の要求コマンドを、SPIバスを介して被制御装置2に送信する。
その後、SPIバスの転送方向を切り替えて、制御装置1が受信状態となり、被制御装置2が送信状態となった後、被制御装置2から、m個(m>1)のビット数からなる要求コマンドに対応した返信データを、バスを介して制御装置1に送信する。
For example, when the control device 1 is in a transmission state capable of transmitting predetermined data to the SPI bus, which is a bus, and the controlled device 2 is in a reception state capable of receiving predetermined data from the SPI bus, the control device 1 , A predetermined request command consisting of n (n> 1) bits is transmitted to the controlled device 2 via the SPI bus.
After that, the transfer direction of the SPI bus is switched, the control device 1 is in the receiving state, the controlled device 2 is in the transmitting state, and then the controlled device 2 requests a request consisting of m (m> 1) bits. The reply data corresponding to the command is transmitted to the control device 1 via the bus.

このような要求コマンドと返信データの送受信が行われる場合、この発明では、要求コマンドのうち、最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、返信データのうち、最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とを同一の内容とする。
たとえば、第1のバイナリデータの内容と第2のバイナリデータの内容を、それぞれ複数のビット数からなる0に相当するバイナリデータとする。
ビット数を4ビットとすると、第1のバイナリデータの内容と第2のバイナリデータの内容を、「0000」とする。
When such a request command and reply data are transmitted and received, in the present invention, the content of the first binary data consisting of a (n>a> 1) bits of the request command to be transmitted last. And, of the reply data, the content of the second binary data consisting of b (m>b> 1) bits to be transmitted first is set to be the same content.
For example, the content of the first binary data and the content of the second binary data are set as binary data corresponding to 0, each consisting of a plurality of bits.
Assuming that the number of bits is 4 bits, the content of the first binary data and the content of the second binary data are set to "0000".

あるいは、第1のバイナリデータの内容と第2のバイナリデータの内容を、それぞれ複数のビット数からなる1に相当するバイナリデータとする。
ビット数を4ビットとすると、第1のバイナリデータの内容と第2のバイナリデータの内容を、「1111」とする。
Alternatively, the content of the first binary data and the content of the second binary data are set as binary data corresponding to 1 each consisting of a plurality of bits.
Assuming that the number of bits is 4 bits, the content of the first binary data and the content of the second binary data are set to "1111".

要求コマンドのうち第1のバイナリデータの内容と、返信データのうち第2のバイナリデータの内容とが同一の内容であるので、どちらも、同一電圧レベルの信号として、バスであるSPIバスに出力される。 Since the content of the first binary data of the request command and the content of the second binary data of the reply data are the same, both are output to the SPI bus, which is a bus, as a signal of the same voltage level. Will be done.

後述するように、SPIバスに出力された要求コマンドの第1のバイナリデータと、SPIバスに出力された返信データの第2のバイナリデータが、SPIバスで衝突したとしても、第1のバイナリデータと第2のバイナリデータのどちらも、同一電圧レベルの信号としてSPIバスに出力されているので、制御装置1と被制御装置2の回路に、規格値以上の過電流が流れることはなく、破壊されることを防止できる。
なお、この発明では、SPIバスの転送方向を切り替える場合に、所定の待ち時間を設ける必要はない。たとえば、制御装置1において、要求コマンドの送信を完了した後、待ち時間を設けることなく、SPIバスの転送方向を受信状態に切り替えればよい。したがって、転送方向の切替時に待ち時間を設けないので、転送効率が低下することはない。
As will be described later, even if the first binary data of the request command output to the SPI bus and the second binary data of the reply data output to the SPI bus collide with each other on the SPI bus, the first binary data Since both the second binary data and the second binary data are output to the SPI bus as signals of the same voltage level, overcurrent exceeding the standard value does not flow in the circuits of the control device 1 and the controlled device 2, and the data is destroyed. It can be prevented from being done.
In the present invention, it is not necessary to provide a predetermined waiting time when switching the transfer direction of the SPI bus. For example, in the control device 1, after the transmission of the request command is completed, the transfer direction of the SPI bus may be switched to the reception state without providing a waiting time. Therefore, since no waiting time is provided when switching the transfer direction, the transfer efficiency does not decrease.

図1(b)に、制御装置と被制御装置との接続に、QuadSPIバスを利用した接続形態の通信制御システムの概略説明図を示す。
QuadSPIバスは、4本のデータ線を含むバスである。
ここでは、図1(a)に示したSPIバスの制御線31とデータ線32を、QuadSPIバスで使用する信号線で表したものである。
QuadSPIバスでは、制御線31は、クロックを伝送するCLK信号線(以下、単に、CLKとも呼ぶ)と、制御対象のデバイスを選択するチップセレクト信号を伝送するCS信号線(以下、単に、CSとも呼ぶ)とからなる。
FIG. 1B shows a schematic explanatory diagram of a communication control system in a connection form using a Quad SPI bus for connecting a control device and a controlled device.
The QuadSPI bus is a bus that includes four data lines.
Here, the control line 31 and the data line 32 of the SPI bus shown in FIG. 1A are represented by signal lines used in the Quad SPI bus.
In the Quad SPI bus, the control line 31 is a CLK signal line that transmits a clock (hereinafter, also simply referred to as CLK) and a CS signal line that transmits a chip select signal that selects a device to be controlled (hereinafter, also simply referred to as CS). Call).

クロックとチップセレクト信号は、常に、制御装置1から被制御装置2に伝送される。
また、データ線32は、データを転送する4本の信号線(DQ0、DQ1、DQ2、DQ3)からなり、双方向にデータを転送可能な信号線である。
4本の信号線(DQ0、DQ1、DQ2、DQ3)を利用し、1クロックサイクルで、4ビットのデータを転送することができる。
The clock and chip select signals are always transmitted from the control device 1 to the controlled device 2.
Further, the data line 32 is composed of four signal lines (DQ0, DQ1, DQ2, DQ3) for transferring data, and is a signal line capable of transferring data in both directions.
By using four signal lines (DQ0, DQ1, DQ2, DQ3), 4-bit data can be transferred in one clock cycle.

また、上記した要求コマンドと、返信データは、4本のデータ線32を介して、異なるタイミングで送信される。
バスとして、QuadSPIバスを利用する場合は、4本のデータ線を介して送信される要求コマンドのうち、最後に送信される少なくとも4ビット以上からなる第1のバイナリデータと、4本のデータ線を介して送信される返信データのうち、最初に送信される少なくとも4ビット以上からなる第2のバイナリデータとが、複数のビット数からなる0に相当するバイナリデータであるか、あるいは、複数のビット数からなる1に相当するバイナリデータとする。
Further, the above-mentioned request command and reply data are transmitted at different timings via the four data lines 32.
When using the QuadSPI bus as a bus, of the request commands transmitted via the four data lines, the first binary data consisting of at least 4 bits or more transmitted at the end and the four data lines Of the reply data transmitted via, the second binary data consisting of at least 4 bits or more initially transmitted is the binary data corresponding to 0 consisting of a plurality of bits, or a plurality of binary data. Binary data corresponding to 1 consisting of the number of bits.

制御装置1と被制御装置2の構成は、図1(a)と同一であり、制御装置1の制御部(CPU)11と、マスター通信部(SPI-M)12とが、内部バス(BUS-M)13で接続され、被制御装置2の被制御部(CNT)22と、スレーブ通信部(SPI-S)21とが、内部バス(BUS-S)23で接続されている。
たとえば、図示しないマスター通信部(SPI-M)12のデータ送信用回路がアクティブに設定され、図示しないスレーブ通信部(SPI-S)21のデータ受信用回路がアクティブに設定されている状態で、CS信号線に被制御装置2を選択するチップセレクト信号が伝送されている場合に、所定の4ビット単位のデータが、CLK信号線に出力されているクロックに同期したタイミングで、4本の信号線(DQ0、DQ1、DQ2、DQ3)を介して、制御装置1から被制御装置2に転送される。
The configuration of the control device 1 and the controlled device 2 is the same as that in FIG. 1A, and the control unit (CPU) 11 of the control device 1 and the master communication unit (SPI-M) 12 are connected to an internal bus (BUS). -M) 13 is connected, and the controlled unit (CNT) 22 of the controlled device 2 and the slave communication unit (SPI-S) 21 are connected by an internal bus (BUS-S) 23.
For example, in a state where the data transmission circuit of the master communication unit (SPI-M) 12 (not shown) is actively set and the data reception circuit of the slave communication unit (SPI-S) 21 (not shown) is actively set. When a chip select signal for selecting the controlled device 2 is transmitted to the CS signal line, four signals are transmitted at the timing when the predetermined 4-bit unit data is synchronized with the clock output to the CLK signal line. It is transferred from the control device 1 to the controlled device 2 via a line (DQ0, DQ1, DQ2, DQ3).

逆に、図示しないマスター通信部(SPI-M)12のデータ受信用回路がアクティブに設定され、図示しないスレーブ通信部(SPI-S)21のデータ送信用回路がアクティブに設定されている状態で、CS信号線に被制御装置2を選択するチップセレクト信号が伝送されている場合に、所定の4ビット単位のデータが、CLK信号線に出力されているクロックに同期したタイミングで、4本の信号線(DQ0、DQ1、DQ2、DQ3)を介して、被制御装置2から制御装置1に転送される。 On the contrary, in a state where the data reception circuit of the master communication unit (SPI-M) 12 (not shown) is actively set and the data transmission circuit of the slave communication unit (SPI-S) 21 (not shown) is actively set. , When a chip select signal for selecting the controlled device 2 is transmitted to the CS signal line, four predetermined 4-bit unit data are synchronized with the clock output to the CLK signal line. It is transferred from the controlled device 2 to the control device 1 via the signal lines (DQ0, DQ1, DQ2, DQ3).

また、図示しないマスター通信部(SPI-M)12のデータ送信用回路がアクティブに設定され、図示しないスレーブ通信部(SPI-S)21のデータ送信用回路がアクティブに設定されている状態となった場合、制御装置1と被制御装置2のどちらも、送信状態となっているので、同時に互いにデータを転送すると、データ線32の4本の信号線で衝突が発生し、転送データは、正確に伝送できなくなる。 Further, the data transmission circuit of the master communication unit (SPI-M) 12 (not shown) is actively set, and the data transmission circuit of the slave communication unit (SPI-S) 21 (not shown) is actively set. In this case, since both the control device 1 and the controlled device 2 are in the transmission state, if data is transferred to each other at the same time, a collision occurs in the four signal lines of the data line 32, and the transferred data is accurate. Cannot be transmitted to.

特に、データ線32のうち同一の信号線(たとえば、DQ0)において、制御装置1から「1」に相当する送信信号が出力され、被制御装置2から「0」に相当する送信信号が出力された場合、その信号線DQ0で衝突が発生し、さらに、アクティブに設定されているどちらか一方または両方のデータ送信用回路に、規格値以上の過電流が流れ、データ送信用回路が破壊される可能性がある。 In particular, in the same signal line (for example, DQ0) of the data lines 32, the transmission signal corresponding to "1" is output from the control device 1 and the transmission signal corresponding to "0" is output from the controlled device 2. If this happens, a collision will occur at the signal line DQ0, and an overcurrent exceeding the standard value will flow through either or both of the actively set data transmission circuits, destroying the data transmission circuit. there is a possibility.

また、同様に、データ線32のうち同一の信号線DQ0において、制御装置1から「0」に相当する送信信号が出力され、被制御装置2から「1」に相当する送信信号が出力された場合も、その信号線DQ0で衝突が発生し、どちらか一方または両方のデータ送信用回路に、規格値以上の過電流が流れ、データ送信用回路が破壊される可能性がある。
すなわち、データ線32のうち同一の信号線で、異なる電圧レベルを持つ送信信号が送信されて衝突が発生した場合、データ送信用回路に規格値以上の過電流が流れて、データ送信用回路が破壊される可能性がある。
Similarly, on the same signal line DQ0 of the data lines 32, the transmission signal corresponding to "0" is output from the control device 1, and the transmission signal corresponding to "1" is output from the controlled device 2. In this case as well, a collision may occur at the signal line DQ0, an overcurrent exceeding the standard value may flow in one or both of the data transmission circuits, and the data transmission circuit may be destroyed.
That is, when transmission signals having different voltage levels are transmitted on the same signal line among the data lines 32 and a collision occurs, an overcurrent exceeding the standard value flows in the data transmission circuit, and the data transmission circuit becomes It can be destroyed.

なお、制御装置1と被制御装置2から同じ電圧レベルを持つ送信信号が同時に送信された場合、同様にデータの衝突が発生するが、双方のデータ送信用回路に規格値以上の過電流が流れることはなく、データ送信用回路が破壊される可能性はない。また、この時、データは相手側に正確に送信される。
すなわち、制御装置1と被制御装置2の双方から、「1」に相当する送信信号が同時に出力された場合と、「0」に相当する送信信号が同時に出力された場合は、データの衝突が発生するが、データ送信用回路に規格値以上の過電流が流れることはなく、データ送信用回路が破壊されることはない。
When transmission signals having the same voltage level are simultaneously transmitted from the control device 1 and the controlled device 2, data collisions occur in the same manner, but an overcurrent exceeding the standard value flows in both data transmission circuits. There is no possibility that the data transmission circuit will be destroyed. Also, at this time, the data is accurately transmitted to the other party.
That is, when both the control device 1 and the controlled device 2 simultaneously output the transmission signal corresponding to "1" and the transmission signal corresponding to "0" are simultaneously output, data collision occurs. Although it occurs, an overcurrent exceeding the standard value does not flow in the data transmission circuit, and the data transmission circuit is not destroyed.

<制御装置の構成>
図2に、この発明の制御装置(マスター側装置)の一実施例の構成ブロック図を示す。
ここでは、制御装置(マスター)1は、上記した制御部(CPU)11とマスター通信部(SPI-M)12に加え、内部バス(BUS-M)13に接続された記憶部50を備えたものを示している。
また、QuadSPIバスの6つの信号線にそれぞれ接続する6つの接続端子からなる接続部14を備え、マスター通信部12のデータ送信用回路とデータ受信用回路は、接続部14に接続される。
<Control device configuration>
FIG. 2 shows a block diagram of an embodiment of the control device (master side device) of the present invention.
Here, the control device (master) 1 includes a storage unit 50 connected to the internal bus (BUS-M) 13 in addition to the control unit (CPU) 11 and the master communication unit (SPI-M) 12 described above. Shows things.
Further, a connection unit 14 composed of six connection terminals connecting to each of the six signal lines of the Quad SPI bus is provided, and the data transmission circuit and the data reception circuit of the master communication unit 12 are connected to the connection unit 14.

記憶部50は、データを一時的に記憶するメモリであり、たとえば、RAMやフラッシュメモリなどのデータの読み書きが可能な半導体記憶素子や、その他の記憶媒体が用いられる。ただし、記憶部50は、制御部11の内部に備えてもよい。
記憶部50には、被制御装置2に転送するデータや、被制御装置2から送信されてきたデータなど、種々のデータが記憶されるが、たとえば、被制御装置2に転送した要求データ(要求コマンド)に応答して、被制御装置2から取得したデバイスID51,ステータスレジスタ情報52、設定レジスタ情報53などが、返信データとして記憶される。
The storage unit 50 is a memory for temporarily storing data, and for example, a semiconductor storage element such as a RAM or a flash memory capable of reading and writing data, and other storage media are used. However, the storage unit 50 may be provided inside the control unit 11.
Various data such as data to be transferred to the controlled device 2 and data transmitted from the controlled device 2 are stored in the storage unit 50. For example, request data transferred to the controlled device 2 (request). In response to the command), the device ID 51, the status register information 52, the setting register information 53, and the like acquired from the controlled device 2 are stored as reply data.

デバイスID51は、被制御装置2を一意的に識別するための識別番号である。
ステータスレジスタ情報52は、被制御装置2に備えられたステータスレジスタに記憶されている情報である。
ステータスレジスタには、被制御装置2の動作状態を示す情報が記憶され、たとえば、被制御装置2の内部アクセス中BUSYステータス、IDLEステータス、不正なアクセス検出ステータスなどの情報が記憶されている。
設定レジスタ情報53は、被制御装置2に備えられた設定レジスタに記憶されている情報である。
設定レジスタには、被制御装置2の設定内容を示す情報が記憶され、たとえば、被制御装置2のアクセス空間切り替え設定、バーストアクセス数設定、アクセス遅延量設定などの情報が記憶されている。
The device ID 51 is an identification number for uniquely identifying the controlled device 2.
The status register information 52 is information stored in the status register provided in the controlled device 2.
Information indicating the operating state of the controlled device 2 is stored in the status register, and for example, information such as the BUSY status, IDLE status, and unauthorized access detection status during internal access of the controlled device 2 is stored.
The setting register information 53 is information stored in the setting register provided in the controlled device 2.
Information indicating the setting contents of the controlled device 2 is stored in the setting register, and for example, information such as the access space switching setting, the burst access number setting, and the access delay amount setting of the controlled device 2 is stored.

マスター通信部12は、QuadSPIバスを介して被制御装置2と通信を行う部分であるが、機能的なブロックに分けると、主として、データ送信部15、データ受信部16、衝突防止データ生成部17から構成される。 The master communication unit 12 is a part that communicates with the controlled device 2 via the Quad SPI bus, but when divided into functional blocks, it is mainly divided into a data transmission unit 15, a data reception unit 16, and a collision prevention data generation unit 17. Consists of.

データ送信部15は、被制御装置2に送信するデータを組み立て、そのデータに相当する送信信号をQuadSPIバスに出力するデータ送信用回路を含む部分である。
上記したように、制御装置1から被制御装置2へは、要求コマンドが送信されるが、要求コマンドには、たとえば、被制御装置2にデバイスIDを送信することを要求する情報、
被制御装置2のステータスレジスタに記憶されている情報を送信することを要求する情報、
被制御装置2の設定レジスタに記憶されている情報を送信することを要求する情報などが含まれる。
The data transmission unit 15 is a part including a data transmission circuit that assembles data to be transmitted to the controlled device 2 and outputs a transmission signal corresponding to the data to the Quad SPI bus.
As described above, the request command is transmitted from the control device 1 to the controlled device 2, and the request command includes, for example, information requesting that the device ID be transmitted to the controlled device 2.
Information that requires transmission of information stored in the status register of the controlled device 2.
It includes information requesting transmission of information stored in the setting register of the controlled device 2.

データ受信部16は、QuadSPIバスを介して送信されてきた信号を受信して、受信データを取得するデータ受信用回路を含む部分である。
上記したように、制御装置1から被制御装置2に要求コマンドを送信した後、被制御装置2から送信された返信データを受信する。
The data receiving unit 16 is a part including a data receiving circuit that receives a signal transmitted via the Quad SPI bus and acquires received data.
As described above, after the request command is transmitted from the control device 1 to the controlled device 2, the reply data transmitted from the controlled device 2 is received.

たとえば、デバイスIDを送信することを要求する要求コマンドが被制御装置2に送信された場合、被制御装置2のデバイスIDを含む返信データを受信する。
また、ステータスレジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置2に送信された場合、被制御装置2のステータスレジスタに記憶されている情報を含む返信データを受信する。
設定レジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置2に送信された場合、被制御装置2の設定レジスタに記憶されている情報を含む返信データを受信する。
For example, when a request command requesting transmission of a device ID is transmitted to the controlled device 2, reply data including the device ID of the controlled device 2 is received.
Further, when a request command requesting transmission of the information stored in the status register is transmitted to the controlled device 2, the reply data including the information stored in the status register of the controlled device 2 is received. ..
When a request command requesting transmission of the information stored in the setting register is transmitted to the controlled device 2, the reply data including the information stored in the setting register of the controlled device 2 is received.

衝突防止データ生成部17は、制御装置1の通信状態を、送信状態から受信状態に切り替える場合に、所定ビット数の意味ある一連のデータの最後のデータとして転送される衝突防止データを生成し、データ送信部15に与える部分である。
衝突防止データは、たとえば、4ビットのデータ「0000」であり、各ビットデータ「0」は、4つのデータ線(DQ0〜DQ3)に、同じタイミングで出力される。
The collision prevention data generation unit 17 generates collision prevention data to be transferred as the last data of a meaningful series of data having a predetermined number of bits when the communication state of the control device 1 is switched from the transmission state to the reception state. This is a part given to the data transmission unit 15.
The collision prevention data is, for example, 4-bit data "0000", and each bit data "0" is output to four data lines (DQ0 to DQ3) at the same timing.

制御装置1で生成される衝突防止データが、4ビットのデータ「0000」である場合、後述する被制御装置2で生成される衝突防止データも、同じ4ビットのデータ「0000」である。
すなわち、制御装置1から出力される衝突防止データと、被制御装置2から出力される衝突防止データを、同一の電圧レベルを持つ同一のビット構成のデータ(信号値)とする。
When the collision prevention data generated by the control device 1 is the 4-bit data "0000", the collision prevention data generated by the controlled device 2 described later is also the same 4-bit data "0000".
That is, the collision prevention data output from the control device 1 and the collision prevention data output from the controlled device 2 are set as data (signal values) having the same bit configuration having the same voltage level.

このように、制御装置1と被制御装置2から出力される衝突防止データを、同一のビット構成のデータ(信号値)とするのは、後述するように、制御装置1と被制御装置2とがどちらも送信状態となった場合に、双方から出力される衝突防止データ同士が、QuadSPIバス上で衝突する可能性があるが、衝突防止データ同士が衝突しても、規格値以上の電流がデータ送信用回路に流れてデータ送信用回路を破壊することがないようにするためである。 In this way, the collision prevention data output from the control device 1 and the controlled device 2 is set to the data (signal value) having the same bit configuration as the control device 1 and the controlled device 2 as described later. When both are in the transmission state, the collision prevention data output from both may collide with each other on the QuadSPI bus, but even if the collision prevention data collide with each other, the current exceeding the standard value is generated. This is to prevent the data transmission circuit from being damaged by flowing into the data transmission circuit.

また、衝突防止データとしては、同一のビット構成のデータ(信号値)であればよいので、4ビットのデータ「1111」であってもよく、各ビットデータ「1」は、4つのデータ線(DQ0〜DQ3)に、同じタイミングで出力される。
ただし、制御装置1で生成される衝突防止データが、4ビットのデータ「1111」である場合、後述する被制御装置2で生成される衝突防止データも、同じ4ビットのデータ「1111」である。
したがって、衝突防止データとして、「0000」を利用するか、あるいは「1111」を利用するかを、制御装置1と被制御装置2で、予め統一しておく。
Further, since the collision prevention data may be data (signal value) having the same bit configuration, it may be 4-bit data "1111", and each bit data "1" may be four data lines (4 data lines). It is output to DQ0 to DQ3) at the same timing.
However, when the collision prevention data generated by the control device 1 is the 4-bit data "1111", the collision prevention data generated by the controlled device 2 described later is also the same 4-bit data "1111". ..
Therefore, whether to use "0000" or "1111" as the collision prevention data is unified in advance between the control device 1 and the controlled device 2.

なお、QuadSPIバスを利用する通信制御システムでは、衝突防止データのビット数は、4ビットに限るものではなく、8ビットなど、4の整数倍であればよい。ただし、転送効率の点からは、衝突防止データのビット数は短い方がよいので、4ビットが最も好ましい。 In the communication control system using the Quad SPI bus, the number of bits of the collision prevention data is not limited to 4 bits, and may be an integral multiple of 4 such as 8 bits. However, from the viewpoint of transfer efficiency, it is preferable that the number of bits of the collision prevention data is short, so 4 bits is most preferable.

<被制御装置の構成>
図3に、この発明の被制御装置(スレーブ側装置)の一実施例の構成ブロック図を示す。
ここでは、被制御装置(スレーブ)2は、上記した被制御部(CNT)22とスレーブ通信部(SPI-S)21に加え、内部バス(BUS-S)23に接続された記憶部70を備えたものを示している。記憶部70には、ステータスレジスタと設定レジスタが含まれる。
また、QuadSPIバスの6つの信号線にそれぞれ接続する6つの接続端子からなる接続部24を備え、スレーブ通信部(SPI-S)21のデータ送信用回路とデータ受信用回路は、接続部24に接続される。
<Configuration of controlled device>
FIG. 3 shows a block diagram of an embodiment of the controlled device (slave side device) of the present invention.
Here, the controlled device (slave) 2 includes a storage unit 70 connected to the internal bus (BUS-S) 23 in addition to the controlled unit (CNT) 22 and the slave communication unit (SPI-S) 21 described above. Shows what you have. The storage unit 70 includes a status register and a setting register.
Further, a connection unit 24 consisting of six connection terminals connected to each of the six signal lines of the Quad SPI bus is provided, and the data transmission circuit and the data reception circuit of the slave communication unit (SPI-S) 21 are connected to the connection unit 24. Be connected.

記憶部70は、データを記憶するメモリであり、たとえば、RAMやフラッシュメモリなどのデータの読み書きが可能な半導体記憶素子や、その他の記憶媒体が用いられる。ただし、記憶部70は、被制御部(CNT)22の内部に備えてもよい。
記憶部70には、制御装置1に転送するデータや、制御装置1から送信されてきたデータなど、種々のデータが記憶されるが、たとえば、上記したように、被制御装置固有のデバイスID71,ステータスレジスタ情報72、設定レジスタ情報73などが記憶される。
デバイスID71は,予め設定されて変更されることのないデータであるが、ステータスレジスタ情報72と設定レジスタ情報73は、被制御装置2の動作状況によって変化する。
The storage unit 70 is a memory for storing data, and for example, a semiconductor storage element such as a RAM or a flash memory capable of reading and writing data, and other storage media are used. However, the storage unit 70 may be provided inside the controlled unit (CNT) 22.
Various data such as data to be transferred to the control device 1 and data transmitted from the control device 1 are stored in the storage unit 70. For example, as described above, the device ID 71 unique to the controlled device, Status register information 72, setting register information 73, and the like are stored.
The device ID 71 is data that is set in advance and is not changed, but the status register information 72 and the setting register information 73 change depending on the operating status of the controlled device 2.

スレーブ通信部(SPI-S)21は、QuadSPIバスを介して制御装置1と通信を行う部分であるが、機能的なブロックに分けると、マスター通信部12と同様に、主として、データ送信部25、データ受信部26、衝突防止データ生成部27から構成される。
データ送信部25は、制御装置1に送信するデータを組み立て、そのデータに相当する送信信号をQuadSPIバスに出力するデータ送信用回路を含む部分である。
データ受信部26は、QuadSPIバスを介して送信されてきた信号を受信して、受信データを取得するデータ受信用回路を含む部分である。
The slave communication unit (SPI-S) 21 is a part that communicates with the control device 1 via the Quad SPI bus, but when divided into functional blocks, like the master communication unit 12, mainly the data transmission unit 25 , A data receiving unit 26, and a collision prevention data generating unit 27.
The data transmission unit 25 is a part including a data transmission circuit that assembles data to be transmitted to the control device 1 and outputs a transmission signal corresponding to the data to the Quad SPI bus.
The data receiving unit 26 is a part including a data receiving circuit that receives a signal transmitted via the Quad SPI bus and acquires received data.

上記したように、制御装置1から被制御装置2に要求コマンドが送信された場合、被制御装置2から制御装置1に、その要求コマンドに対応した返信データが送信される。
たとえば、制御装置1からデバイスIDを送信することを要求する要求コマンドが受信された場合、被制御装置2から、被制御装置2のデバイスIDを含む返信データが制御装置1に送信される。
As described above, when the request command is transmitted from the control device 1 to the controlled device 2, the reply data corresponding to the request command is transmitted from the controlled device 2 to the control device 1.
For example, when a request command requesting transmission of a device ID is received from the control device 1, the control device 2 transmits reply data including the device ID of the controlled device 2 to the control device 1.

また、制御装置1からステータスレジスタに記憶されている情報を送信することを要求する要求コマンドが受信された場合、被制御装置2から、被制御装置2のステータスレジスタに記憶されている情報を含む返信データが制御装置1に送信される。
制御装置1から設定レジスタに記憶されている情報を送信することを要求する要求コマンドが受信された場合、被制御装置2から、被制御装置2の設定レジスタに記憶されている情報を含む返信データが制御装置1に送信される。
Further, when a request command requesting transmission of the information stored in the status register is received from the control device 1, the controlled device 2 includes the information stored in the status register of the controlled device 2. The reply data is transmitted to the control device 1.
When a request command requesting transmission of the information stored in the setting register is received from the control device 1, the reply data including the information stored in the setting register of the controlled device 2 is received from the controlled device 2. Is transmitted to the control device 1.

衝突防止データ生成部27は、被制御装置2の通信状態を、受信状態から送信状態に切り替える場合に、所定ビット数の意味ある一連のデータの最初のデータとして転送される衝突防止データを生成し、データ送信部25に与える部分である。
被制御装置2から出力される衝突防止データは、上記したように、制御装置1から出力される衝突防止データと同一の電圧レベルを持つ同一のビット構成のデータ(信号値)とする。
The collision prevention data generation unit 27 generates collision prevention data to be transferred as the first data of a meaningful series of data having a predetermined number of bits when the communication state of the controlled device 2 is switched from the reception state to the transmission state. , Is a part given to the data transmission unit 25.
As described above, the collision prevention data output from the controlled device 2 is data (signal value) having the same bit configuration having the same voltage level as the collision prevention data output from the control device 1.

たとえば、制御装置1から出力される衝突防止データが4ビットのデータ「0000」である場合、被制御装置2から出力される衝突防止データも4ビットのデータ「0000」であり、各ビットデータ「0」は、4つのデータ線(DQ0〜DQ3)に、同じタイミングで出力される。
あるいは、制御装置1から出力される衝突防止データが4ビットのデータ「1111」である場合、被制御装置2から出力される衝突防止データも4ビットのデータ「1111」であり、各ビットデータ「1」は、4つのデータ線(DQ0〜DQ3)に、同じタイミングで出力される。
For example, when the collision prevention data output from the control device 1 is 4-bit data "0000", the collision prevention data output from the controlled device 2 is also 4-bit data "0000", and each bit data "0000". "0" is output to four data lines (DQ0 to DQ3) at the same timing.
Alternatively, when the collision prevention data output from the control device 1 is 4-bit data "1111", the collision prevention data output from the controlled device 2 is also 4-bit data "1111", and each bit data "1111". "1" is output to four data lines (DQ0 to DQ3) at the same timing.

<衝突が発生しない場合の通信タイミングの説明>
図4に、制御装置と被制御装置で衝突が発生しない場合の通信タイミングなどの一実施例の説明図を示す。
ここで説明する通信タイミングは、従来技術のQuadSPIバスを介したデータ通信の
通信タイミングであり、データの転送方向を切り替える場合に、所定の待ち時間T0を設けた通信タイミングである。
<Explanation of communication timing when no collision occurs>
FIG. 4 shows an explanatory diagram of an embodiment such as communication timing when a collision does not occur between the control device and the controlled device.
The communication timing described here is a communication timing of data communication via the Quad SPI bus of the prior art, and is a communication timing provided with a predetermined waiting time T0 when switching the data transfer direction.

図4(a)は、被制御装置2が記憶デバイスであり、制御装置1がその記憶デバイスに記憶されているデータを読み出す場合に、衝突が発生しないデータの読み出しタイミングの例を示している。
図4(a)において、DQ[3:0]は、4つのデータ線(DQ0〜DQ3)をまとめて記載したものである。
図4(b)は、衝突が発生しない場合のデータの通信シーケンスの概略を示している。
FIG. 4A shows an example of data reading timing in which a collision does not occur when the controlled device 2 is a storage device and the control device 1 reads the data stored in the storage device.
In FIG. 4A, DQ [3: 0] is a collective description of the four data lines (DQ0 to DQ3).
FIG. 4B shows an outline of a data communication sequence when no collision occurs.

まず、初期状態として、制御装置(マスター)1が送信状態にあり、被制御装置(スレーブ)2が受信状態にあるとする。
このとき、制御装置(マスター)1において、被制御装置(スレーブ)2である記憶デバイスに記憶されているデータを読み出すイベントが発生した場合、制御装置(マスター)1が、データの読出要求を意味するコマンドを、QuadSPIバスに出力する。
コマンドは、読出要求コマンドCMと、読み出すデータが記憶されている読出アドレスADとからなる。
First, as an initial state, it is assumed that the control device (master) 1 is in the transmission state and the controlled device (slave) 2 is in the reception state.
At this time, when an event to read the data stored in the storage device which is the controlled device (slave) 2 occurs in the control device (master) 1, the control device (master) 1 means a data read request. The command to be executed is output to the QuadSPI bus.
The command consists of a read request command CM and a read address AD in which the data to be read is stored.

制御装置(マスター)1から出力された読出要求コマンドCMと読出アドレスADからなるコマンドが、被制御装置(スレーブ)2に受信されると、被制御装置(スレーブ)2では、読出アドレスADに格納されているデータ(読出データDT)を読み出す。
制御装置(マスター)1では、コマンドを出力した後、所定の待ち時間T0が経過する間に、送信状態から受信状態に切り替える。
一方、被制御装置(スレーブ)2では、読出アドレスADを受信した後、所定の待ち時間T0が経過する間に、上記のようにデータを読み出し、受信状態から送信状態に切り替える。
このように、所定の待ち時間T0の間に、データの転送方向が切り替えられた後に、被制御装置(スレーブ)2から、制御装置(マスター)1に、要求されたアドレスに記憶されていたデータ(読出データDT)が送信される。
When the command consisting of the read request command CM and the read address AD output from the control device (master) 1 is received by the controlled device (slave) 2, the controlled device (slave) 2 stores the command in the read address AD. Read the data (read data DT).
After outputting the command, the control device (master) 1 switches from the transmission state to the reception state while the predetermined waiting time T0 elapses.
On the other hand, the controlled device (slave) 2 reads the data as described above while the predetermined waiting time T0 elapses after receiving the read address AD, and switches from the reception state to the transmission state.
In this way, after the data transfer direction is switched during the predetermined waiting time T0, the data stored in the controlled device (slave) 2 to the control device (master) 1 at the requested address. (Read data DT) is transmitted.

QuadSPIバスを介したデータ通信では、1クロックサイクルごとに、4ビットのデータが送信される。
図4(a)では、コマンドCMの部分は、2クロックサイクルで送信されるので、コマンドCMのビット数は8ビットである。読出アドレスADの部分は、4クロックサイクルで送信されるので、読出アドレスADのビット数は16ビットである。読出データDTは4クロックサイクルで送信されるので、読み出されたデータDTのビット数は16ビットである場合を示している。
ただし、それぞれのビット数は、上記のものに限るものではない。
また、図4(a)では、データの転送方向を切り替えるときの待ち時間T0として、2クロックサイクルの時間を設けている。
In data communication via the Quad SPI bus, 4-bit data is transmitted every clock cycle.
In FIG. 4A, since the command CM portion is transmitted in two clock cycles, the number of bits of the command CM is 8 bits. Since the read address AD portion is transmitted in 4 clock cycles, the number of bits of the read address AD is 16 bits. Since the read data DT is transmitted in 4 clock cycles, the number of bits of the read data DT is 16 bits.
However, the number of each bit is not limited to the above.
Further, in FIG. 4A, a time of 2 clock cycles is provided as a waiting time T0 when switching the data transfer direction.

したがって、待ち時間T0を設けた場合、制御装置(マスター)1と被制御装置(スレーブ)2とが、同時に、送信状態となることはないので、QuadSPIバスでの衝突は起こらない。
ただし、被制御装置(スレーブ)2において、読出データDTの読み出しが完了し、読出データDTを出力する準備が早くできたとしても、待ち時間T0として設けられた2クロックサイクルが経過した後に、読出データDTの送信が行われるので、送信タイミングが遅延することになる。
Therefore, when the waiting time T0 is provided, the control device (master) 1 and the controlled device (slave) 2 do not enter the transmission state at the same time, so that a collision on the Quad SPI bus does not occur.
However, even if the controlled device (slave) 2 completes reading the read data DT and is ready to output the read data DT quickly, it reads after the two clock cycles provided as the waiting time T0 have elapsed. Since the data DT is transmitted, the transmission timing will be delayed.

<待ち時間T0を設けずにデバイスIDを読み出す場合の通信タイミングの説明>
被制御装置(スレーブ)のデバイスIDを読み出す場合も、上記のように、データの転送方向を切り替える場合に、待ち時間T0を設ければ、QuadSPIバスでの衝突は起こらないようにすることができる。
ここでは、待ち時間T0を設けずに、被制御装置(スレーブ)のデバイスIDを読み出した場合に、QuadSPIバスで衝突が起こらない通信タイミングと、衝突が起こる通信タイミングがあることを示す。
<Explanation of communication timing when reading the device ID without providing the waiting time T0>
Even when reading the device ID of the controlled device (slave), if a waiting time T0 is provided when switching the data transfer direction as described above, it is possible to prevent a collision on the QuadSPI bus. ..
Here, it is shown that there is a communication timing in which a collision does not occur in the QuadSPI bus and a communication timing in which a collision occurs when the device ID of the controlled device (slave) is read without providing the waiting time T0.

図5に、被制御装置のデバイスIDを読み出す場合の通信タイミングの一実施例の説明図を示す。
図5では、2クロックサイクルの間に、制御装置(マスター)から、ビット数が8ビットのデバイスID読出コマンドが、4ビットずつ2回に分けて出力される。
その後、待ち時間T0を待たずに、4クロックサイクルの間に、被制御装置(スレーブ)から、ビット数が16ビットのデバイスIDが、4ビットずつ4回に分けて出力される。
FIG. 5 shows an explanatory diagram of an embodiment of communication timing when the device ID of the controlled device is read out.
In FIG. 5, a device ID read command having 8 bits is output from the control device (master) in two steps of 4 bits each during 2 clock cycles.
After that, without waiting for the waiting time T0, the device ID having 16 bits is output from the controlled device (slave) in four times of 4 bits each during 4 clock cycles.

制御装置(マスター)の転送方向の切替タイミングと、被制御装置(スレーブ)の転送方向の切替タイミングとが、ほぼ同時であり、制御装置(マスター)と被制御装置(スレーブ)が同時に送信状態となるタイミングが無ければ、衝突は発生しない。
しかし、両者の転送方向の切替タイミングがずれ、制御装置(マスター)と被制御装置(スレーブ)が同時に送信状態となるタイミングが生じた場合は、デバイスID読出コマンドの後半の4ビットデータと、デバイスIDの最初の4ビットデータとの間で、衝突が発生する可能性がある。
The transfer direction switching timing of the control device (master) and the transfer direction switching timing of the controlled device (slave) are almost the same, and the control device (master) and the controlled device (slave) are in the transmission state at the same time. If there is no timing, no collision will occur.
However, if the switching timing of the transfer directions of both is different and the control device (master) and the controlled device (slave) are in the transmission state at the same time, the 4-bit data in the latter half of the device ID read command and the device A conflict may occur with the first 4-bit data of the ID.

(衝突が発生しない場合の通信タイミング)
図6に、制御装置と被制御装置で衝突が発生しない場合の通信タイミングと通信シーケンスの一実施例の概略説明図を示す。
図6(a)では、クロックの立ち下がりタイミングT1と、QuadSPIバスの4つのデータ線DQ[3:0]の信号状態(電圧レベル)の変化を示している。
たとえば、制御装置(マスター)側のデータ線DQ[3:0]では、立ち下がりタイミングT1で、信号値「1」のデータを送信していた状態から、ハイインピーダンス(以下、Hi-Zと呼ぶ)の受信状態に変化する。このとき、データ線DQ[3:0]の電圧レベルが、「1」の送信状態から、Hi-Zの受信状態に変化するまでに、わずかの遅延時間がある。
(Communication timing when no collision occurs)
FIG. 6 shows a schematic explanatory diagram of an embodiment of communication timing and communication sequence when a collision does not occur between the control device and the controlled device.
FIG. 6A shows changes in the signal state (voltage level) of the clock fall timing T1 and the four data lines DQ [3: 0] of the Quad SPI bus.
For example, in the data line DQ [3: 0] on the control device (master) side, high impedance (hereinafter referred to as Hi-Z) is used from the state in which the data of the signal value "1" is transmitted at the fall timing T1. ) Changes to the reception status. At this time, there is a slight delay time until the voltage level of the data line DQ [3: 0] changes from the transmission state of "1" to the reception state of Hi-Z.

また、Hi-Zの受信状態にあった被制御装置(スレーブ)側のデータ線DQ[3:0]において、Hi-Zの受信状態から、たとえば、信号値「0」のデータを送信する状態に変化するタイミングが、図6(a)に示すように、上記の制御装置(マスター)においてHi-Zの受信状態に変化したタイミングよりも遅かったとする。
この場合、データ線DQ[3:0]において、マスターとスレーブの両者が、どちらも同時に、ハイインピーダンス(Hi-Z)となるタイミングが生じるが、信号値「0」のデータと信号値「1」のデータを同時に出力するタイミングは生じない。
すなわち、データ線DQ[3:0]において、信号値「0」のデータと信号値「1」のデータは衝突しない。
Further, in the data line DQ [3: 0] on the controlled device (slave) side that was in the Hi-Z reception state, for example, a state in which data having a signal value "0" is transmitted from the Hi-Z reception state. As shown in FIG. 6A, it is assumed that the timing of the change to is later than the timing of the change to the Hi-Z reception state in the above control device (master).
In this case, in the data line DQ [3: 0], the timing at which both the master and the slave become high impedance (Hi-Z) occurs at the same time, but the data with the signal value “0” and the signal value “1” There is no timing to output the data of "" at the same time.
That is, in the data line DQ [3: 0], the data of the signal value "0" and the data of the signal value "1" do not collide.

図6(b)では、図6(a)に示すように衝突が発生しない場合の通信シーケンスの概略説明図を示す。
図6(b)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にある場合に、マスターから信号値「1」のコマンドが送信されると、スレーブにおいて、この信号値「1」のコマンドが受信される。
マスターでは、信号値「1」のコマンドを送信した後、データの転送方向を切り替え、受信状態(Hi-Z)にする。
一方、スレーブでは、信号値「1」のコマンドを受信した後、データの転送方向を切り替え、送信状態にする。
FIG. 6B shows a schematic explanatory diagram of a communication sequence when a collision does not occur as shown in FIG. 6A.
In FIG. 6B, when the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z), the command with the signal value “1” is transmitted from the master. Then, the slave receives the command of this signal value "1".
After transmitting the command with the signal value "1", the master switches the data transfer direction to enter the reception state (Hi-Z).
On the other hand, in the slave, after receiving the command of the signal value "1", the data transfer direction is switched and the transmission state is set.

このとき、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも、早い場合は、データ線DQ[3:0]で衝突は発生せず、その後、スレーブから信号値「0」のデータが出力された場合、マスターにおいて、この信号値「0」のデータが受信される。
すなわち、データの転送方向を切り替えるタイミングで、待ち時間T0を設けなくても衝突が発生しない場合もある。しかし、以下に示すように、待ち時間T0を設けない場合は、衝突が発生する場合がありうる。
At this time, if the timing of the reception state (Hi-Z) in the master is earlier than the timing of the transmission state in the slave, no collision occurs in the data line DQ [3: 0], and then from the slave. When the data of the signal value "0" is output, the data of the signal value "0" is received in the master.
That is, a collision may not occur even if the waiting time T0 is not provided at the timing of switching the data transfer direction. However, as shown below, if the waiting time T0 is not provided, a collision may occur.

(衝突が発生する場合の通信タイミング)
図7に、制御装置と被制御装置で衝突が発生する場合の通信タイミングと通信シーケンスの一実施例の概略説明図を示す。
図7(a)では、図6(a)と同様に、クロックの立ち下がりタイミングT1と、QuadSPIバスの4つのデータ線DQ[3:0]の信号状態(電圧レベル)の変化を示している。
(Communication timing when a collision occurs)
FIG. 7 shows a schematic explanatory diagram of an embodiment of communication timing and communication sequence when a collision occurs between the control device and the controlled device.
FIG. 7 (a) shows changes in the signal state (voltage level) of the clock fall timing T1 and the four data lines DQ [3: 0] of the Quad SPI bus, as in FIG. 6 (a). ..

ただし、図7(a)では、制御装置(マスター)側のデータ線DQ[3:0]では、立ち下がりタイミングT1からわずかに遅れたタイミングで、信号値「1」のデータを送信していた状態から、ハイインピーダンス(以下、Hi-Zと呼ぶ)の受信状態に変化したとする。
このとき、データ線DQ[3:0]の電圧レベルが、「1」の送信状態から、Hi-Zの受信状態に変化するまでに、さらに、わずかの遅延時間がある。
However, in FIG. 7A, the data line DQ [3: 0] on the control device (master) side transmits the data of the signal value “1” at a timing slightly delayed from the fall timing T1. It is assumed that the state has changed to a high impedance (hereinafter referred to as Hi-Z) reception state.
At this time, there is a slight delay time until the voltage level of the data line DQ [3: 0] changes from the transmission state of "1" to the reception state of Hi-Z.

また、Hi-Zの受信状態にあった被制御装置(スレーブ)側のデータ線DQ[3:0]において、Hi-Zの受信状態から、たとえば、信号値「0」のデータを送信する状態に変化するタイミングが、図7(a)に示すように、クロックの立ち下がりタイミングT1とほぼ同じタイミングであり、上記の制御装置(マスター)においてHi-Zの受信状態に変化したタイミングよりも早かったとする。 Further, in the data line DQ [3: 0] on the controlled device (slave) side that was in the Hi-Z reception state, for example, a state in which data having a signal value "0" is transmitted from the Hi-Z reception state. As shown in FIG. 7A, the timing of the change to is almost the same as the clock fall timing T1, which is earlier than the timing of the change to the Hi-Z reception state in the above control device (master). Suppose.

この場合、データ線DQ[3:0]において、マスターとスレーブの両者が、どちらも同時に、ハイインピーダンス(Hi-Z)となるタイミングが生じず、マスターから信号値「1」のデータを出力するタイミングと、スレーブから信号値「0」のデータを出力するタイミングが、重複するタイミングが生じる。
すなわち、データ線DQ[3:0]において、信号値「0」のデータと信号値「1」のデータの衝突が発生する。
In this case, in the data line DQ [3: 0], both the master and the slave do not have the timing of becoming high impedance (Hi-Z) at the same time, and the data of the signal value "1" is output from the master. The timing and the timing of outputting the data of the signal value "0" from the slave overlap each other.
That is, in the data line DQ [3: 0], a collision between the data having the signal value “0” and the data having the signal value “1” occurs.

図7(b)では、図7(a)に示すように衝突が発生する場合の通信シーケンスの概略説明図を示す。
図7(b)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にある場合に、マスターから信号値「1」のコマンドが送信されると、スレーブにおいて、この信号値「1」のコマンドが受信される。
マスターでは、信号値「1」のコマンドを送信した後、しばらくその送信状態にあり、その後、データの転送方向を切り替え、受信状態(Hi-Z)になったとする。
一方、スレーブでは、信号値「1」のコマンドを受信した後、データの転送方向を切り替え、送信状態にし、ただちに信号値「0」のデータを送信したとする。
このとき、スレーブが、送信状態になり信号値「0」のデータを送信したタイミングが、マスターが送信状態にあるタイミングと重複していたとする。
FIG. 7B shows a schematic explanatory diagram of a communication sequence when a collision occurs as shown in FIG. 7A.
In FIG. 7B, when the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z), the command with the signal value “1” is transmitted from the master. Then, the slave receives the command of this signal value "1".
It is assumed that the master has been in the transmission state for a while after transmitting the command with the signal value "1", and then switches the data transfer direction to enter the reception state (Hi-Z).
On the other hand, it is assumed that the slave receives the command with the signal value "1", switches the data transfer direction, puts it in the transmission state, and immediately transmits the data with the signal value "0".
At this time, it is assumed that the timing at which the slave enters the transmission state and transmits the data of the signal value "0" overlaps with the timing at which the master is in the transmission state.

このように、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも遅く、マスターからの信号値「1」のコマンドの送信状態と、スレーブからの信号値「0」のデータの送信状態とが重複した場合、衝突が発生する。
信号値「1」の出力と信号値「0」の出力とが衝突した場合、電圧レベルの高いほうから、電圧レベルの低いほうに向かって過電流が流れることになり、規格値以上の過電流が流れた側のデータ送信用回路が、破壊される場合もある。
In this way, the timing of the reception state (Hi-Z) in the master is later than the timing of the transmission state in the slave, and the transmission state of the command with the signal value "1" from the master and the signal value "1" from the slave. When the transmission state of the data of "0" is duplicated, a collision occurs.
When the output of the signal value "1" and the output of the signal value "0" collide, an overcurrent flows from the one with the higher voltage level to the one with the lower voltage level, and the overcurrent exceeds the standard value. The data transmission circuit on the side where the current flows may be destroyed.

ただし、データの転送方向を切り替えるタイミングにおいて、マスターとスレーブが同時に送信状態となるタイミングが発生した場合において、双方から、同じ信号値の電圧レベルを出力した場合は、データの衝突が発生するが、規格値以上の過電流が流れ込むことはなく、データ送信用回路が破壊されることもない。
すなわち、マスターとスレーブから、同時に信号値「1」の電圧レベルを出力するタイミング、あるいは、同時に信号値「0」の電圧レベルを出力するタイミングが発生して、データの衝突が発生した場合は、データ送信用回路が破壊されることもない。
However, when the master and slave are in the transmission state at the same time when the data transfer direction is switched, if the voltage level of the same signal value is output from both, data collision will occur. An overcurrent exceeding the standard value does not flow in, and the data transmission circuit is not destroyed.
That is, when the master and the slave simultaneously output the voltage level of the signal value "1" or the timing of outputting the voltage level of the signal value "0" at the same time, and a data collision occurs, The data transmission circuit is not destroyed.

そこで、この発明では、以下に示すように、データの転送効率が低下するのを防止する観点から、データの転送方向を切り替えるタイミングにおいて、待ち時間T0を設けないが、その切替タイミングで衝突する可能性のある部分におけるマスターから出力されるデータの構成とスレーブから出力されるデータの構成を、同じ電圧レベルを持つ信号値に固定的に設定する。これにより、マスター通信部12とスレーブ通信部21におけるデータ送信用回路が破壊されることを防止することができる。 Therefore, in the present invention, as shown below, from the viewpoint of preventing the data transfer efficiency from being lowered, the waiting time T0 is not provided at the timing of switching the data transfer direction, but collision is possible at the switching timing. The configuration of the data output from the master and the configuration of the data output from the slave in the probable part are fixedly set to the signal values having the same voltage level. As a result, it is possible to prevent the data transmission circuits in the master communication unit 12 and the slave communication unit 21 from being destroyed.

<実施例1:この発明において、デバイスIDを読み出す場合の通信タイミングの説明>
図8に、被制御装置に記憶されたデバイスIDを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図を示す。
図8に示したデバイスIDの読み出しタイミングは、図5に示した読み出しタイミングとほぼ同じものであるが、出力されるコマンドとデバイスIDの一部分のデータ構成を固定的に設定している。
<Example 1: In the present invention, description of communication timing when reading the device ID>
FIG. 8 shows an explanatory diagram of an embodiment of the read timing when the device ID stored in the controlled device is read, and the data contents transmitted from the control device and the controlled device.
The read timing of the device ID shown in FIG. 8 is substantially the same as the read timing shown in FIG. 5, but the output command and the data structure of a part of the device ID are fixedly set.

図8でも、2クロックサイクルの間に、制御装置(マスター)から、ビット数が8ビットのデバイスID読出コマンドが、4ビットずつ2回に分けて出力される。
すなわち、デバイスID読出コマンドは、先に出力される上位4ビットのデータCOM1と、
後に出力される下位4ビットのデータCOM2とから構成される。
また、図8(a)に示すように、デバイスID読出コマンドの下位4ビットのデータCOM2は、「0000」に固定的に設定する。
この固定的に設定されたデータCOM2「0000」が、衝突防止データに相当する。
Also in FIG. 8, the device ID read command having an 8-bit number is output from the control device (master) in two steps of 4 bits each during the 2 clock cycles.
That is, the device ID read command is executed with the upper 4-bit data COM1 output first.
It is composed of the lower 4-bit data COM2 that is output later.
Further, as shown in FIG. 8A, the data COM2 of the lower 4 bits of the device ID read command is fixedly set to "0000".
This fixedly set data COM2 "0000" corresponds to the collision prevention data.

一方、被制御装置(スレーブ)では、デバイスID読出コマンドを受信すると、4クロックサイクルの間に、被制御装置(スレーブ)から、ビット数が16ビットのデバイスIDが、4ビットずつ4回に分けて出力される。
すなわち、デバイスIDは、それぞれ4ビット構成の4つのデータ(DT1、DT2、DT3、DT4)から構成される。
また、図8(a)に示すように、スレーブから最初に出力されるデバイスIDの上位4ビットのデータDT1は、「0000」に固定的に設定する。
この固定的に設定されたデータDT1「0000」も、衝突防止データに相当する。
On the other hand, when the controlled device (slave) receives the device ID read command, the device ID having 16 bits is divided into 4 times by 4 bits from the controlled device (slave) during 4 clock cycles. Is output.
That is, the device ID is composed of four data (DT1, DT2, DT3, DT4) each having a 4-bit configuration.
Further, as shown in FIG. 8A, the data DT1 of the upper 4 bits of the device ID first output from the slave is fixedly set to "0000".
This fixedly set data DT1 "0000" also corresponds to the collision prevention data.

ここでは、データ線DQ[3:0]で衝突する可能性のあるデバイスID読出コマンドの下位4ビットのデータCOM2と、デバイスIDの上位4ビットのデータDT1とが、同じ電圧レベルの信号値「0000」である。
データの転送方向の切替時において、データ線DQ[3:0]で衝突が発生したとしても、
同じ電圧レベルの信号値「0000」同士の衝突なので、データ送信用回路が破壊されることを防止できる。
Here, the data COM2 of the lower 4 bits of the device ID read command and the data DT1 of the upper 4 bits of the device ID, which may collide with each other on the data line DQ [3: 0], have the same voltage level signal value " It is "0000".
Even if a collision occurs on the data line DQ [3: 0] when switching the data transfer direction.
Since the signal values "0000" of the same voltage level collide with each other, it is possible to prevent the data transmission circuit from being destroyed.

あるいは、マスターから最後に出力されるデバイスID読出コマンドの下位4ビットのデータCOM2と、スレーブから最初に出力されるデバイスIDの上位4ビットのデータDT1は、同じ電圧レベルの信号値であれば、データ送信用回路が破壊されることはない。
したがって、図8(b)に示すように、デバイスID読出コマンドの下位4ビットのデータCOM2と、デバイスIDの上位4ビットのデータDT1とを、「1111」に固定的に設定してもよい。
Alternatively, if the data COM2 of the lower 4 bits of the device ID read command output last from the master and the data DT1 of the upper 4 bits of the device ID first output from the slave have the same voltage level signal value, The data transmission circuit is not destroyed.
Therefore, as shown in FIG. 8B, the data COM2 of the lower 4 bits of the device ID read command and the data DT1 of the upper 4 bits of the device ID may be fixedly set to "1111".

(デバイスIDを読み出す場合に、衝突が発生するが、過電流は流れない通信タイミングの説明)
図9に、この発明において、衝突が発生するが、過電流は流れない通信タイミングと通信シーケンスの一実施例の概略説明図を示す。
図8に示したように、デバイスIDの読み出しタイミングにおいて、デバイスID読出コマンドの下位4ビットのデータCOM2と、デバイスIDの上位4ビットのデータDT1とが衝突する可能性があるが、衝突する可能性があるデータCOM2とデータDT1は、どちらも、たとえば同じ電圧レベルの信号値「0000」である。
(Explanation of communication timing where collision occurs when reading device ID, but overcurrent does not flow)
FIG. 9 shows a schematic explanatory view of an embodiment of a communication timing and a communication sequence in which a collision occurs but an overcurrent does not flow in the present invention.
As shown in FIG. 8, at the device ID read timing, the lower 4 bit data COM2 of the device ID read command and the upper 4 bit data DT1 of the device ID may collide, but they may collide. Both the data COM2 and the data DT1 that have the potential have, for example, a signal value of the same voltage level "0000".

図9(a)では、図7(a)と同様に、クロックの立ち下がりタイミングT2と、QuadSPIバスの4つのデータ線DQ[3:0]の信号状態(電圧レベル)の変化を示している。
ただし、図9(a)では、制御装置(マスター)側のデータ線DQ[3:0]では、立ち下がりタイミングT2からわずかに遅れたタイミングで、信号値「0」のデータを送信していた状態から、ハイインピーダンス(Hi-Z)の受信状態に変化したとする。
このとき、データ線DQ[3:0]の電圧レベルが、「0」の送信状態から、Hi-Zの受信状態に変化するまでに、さらに、わずかの遅延時間がある。
FIG. 9A shows changes in the signal state (voltage level) of the clock fall timing T2 and the four data lines DQ [3: 0] of the QuadSPI bus, as in FIG. 7A. ..
However, in FIG. 9A, the data line DQ [3: 0] on the control device (master) side transmits data having a signal value of “0” at a timing slightly delayed from the fall timing T2. It is assumed that the state has changed to a high impedance (Hi-Z) reception state.
At this time, there is a slight delay time until the voltage level of the data line DQ [3: 0] changes from the transmission state of "0" to the reception state of Hi-Z.

また、Hi-Zの受信状態にあった被制御装置(スレーブ)側のデータ線DQ[3:0]において、Hi-Zの受信状態から、信号値「0」のデータを送信する状態に変化するタイミングが、図9(a)に示すように、クロックの立ち下がりタイミングT2とほぼ同じタイミングであり、上記の制御装置(マスター)においてHi-Zの受信状態に変化したタイミングよりも早かったとする。 In addition, the data line DQ [3: 0] on the controlled device (slave) side that was in the Hi-Z reception state changes from the Hi-Z reception state to the state in which the data with the signal value "0" is transmitted. As shown in FIG. 9A, it is assumed that the timing is almost the same as the clock fall timing T2, which is earlier than the timing when the control device (master) changes to the Hi-Z reception state. ..

この場合、データ線DQ[3:0]において、マスターとスレーブの両者が、どちらも同時に、ハイインピーダンス(Hi-Z)となるタイミングが生じず、マスターから信号値「0」のデータを出力するタイミングと、スレーブから信号値「0」のデータを出力するタイミングが、重複するタイミングが生じる。
すなわち、データ線DQ[3:0]において、信号値「0」のデータCOM2と、信号値「0」のデータDT1の衝突が発生する。
In this case, in the data line DQ [3: 0], both the master and the slave do not have the timing of becoming high impedance (Hi-Z) at the same time, and the data of the signal value "0" is output from the master. The timing and the timing of outputting the data of the signal value "0" from the slave overlap each other.
That is, in the data line DQ [3: 0], a collision occurs between the data COM2 having the signal value “0” and the data DT1 having the signal value “0”.

図9(b)では、図9(a)に示すように衝突が発生する場合の通信シーケンスの概略説明図を示す。
図9(b)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にある場合に、マスターから信号値「0」の下位4ビットのコマンドCOM2が送信されると、スレーブにおいて、この信号値「0」のコマンドCOM2が受信される。
マスターでは、信号値「0」のコマンドCOM2を送信した後、しばらくその送信状態にあり、その後、データの転送方向を切り替え、受信状態(Hi-Z)になったとする。
一方、スレーブでは、信号値「0」のコマンドCOM2を受信した後、データの転送方向を切り替え、送信状態にし、ただちに信号値「0」の返信データを送信したとする。
すなわち、デバイスIDの最初の上位4ビットの返信データDT1を送信したとする。
このとき、スレーブが、送信状態になり信号値「0」の返信データDT1を送信したタイミングが、マスターが送信状態にあるタイミングと重複していたとする。
FIG. 9B shows a schematic explanatory diagram of a communication sequence when a collision occurs as shown in FIG. 9A.
In FIG. 9B, when the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z), the command of the lower 4 bits of the signal value “0” is sent from the master. When COM2 is transmitted, the slave receives the command COM2 with this signal value "0".
It is assumed that the master transmits the command COM2 with the signal value "0" and then stays in the transmission state for a while, then switches the data transfer direction and enters the reception state (Hi-Z).
On the other hand, it is assumed that the slave receives the command COM2 with the signal value "0", switches the data transfer direction, puts it in the transmission state, and immediately transmits the reply data with the signal value "0".
That is, it is assumed that the reply data DT1 of the first upper 4 bits of the device ID is transmitted.
At this time, it is assumed that the timing at which the slave enters the transmission state and transmits the reply data DT1 having the signal value “0” overlaps with the timing at which the master is in the transmission state.

このように、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも遅く、マスターからの信号値「0」のコマンドCOM2の送信状態と、スレーブからの信号値「0」のデータDT1の送信状態とが重複した場合、衝突が発生する。
信号値「0」のコマンドCOM2の出力と信号値「0」のデータDT1の出力とが衝突した場合、両者の出力値は、同じ電圧レベルであるので、データの衝突が発生しても、規格値以上の過電流がデータ送信用回路に流れ込むことはなく、データ送信用回路が破壊されることもない。
In this way, the timing of the reception state (Hi-Z) in the master is later than the timing of the transmission state in the slave, and the transmission state of the command COM2 with the signal value "0" from the master and the signal value from the slave. When the transmission state of the data DT1 of "0" overlaps, a collision occurs.
When the output of the command COM2 with the signal value "0" and the output of the data DT1 with the signal value "0" collide, the output values of both are the same voltage level, so even if a data collision occurs, the standard An overcurrent exceeding the value does not flow into the data transmission circuit, and the data transmission circuit is not destroyed.

(デバイスIDを読み出す場合に、衝突が発生する通信タイミングの説明)
図10に、この発明において、被制御装置に記憶されたデバイスIDを読み出すコマンドと、デバイスIDデータと、衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図を示す。
図10(a)に、デバイスID読み出しコマンドIDCMDの一実施例のデータ構成を示す。
このコマンドIDCMDは、8ビット(C0〜C7)のデータであるが、上位4ビット(C4〜C7)が、デバイスIDの読み出し要求を意味する情報「0111」であり、下位4ビット(C0〜C3)が、「0000」に固定された衝突防止データである。
(Explanation of communication timing when collision occurs when reading device ID)
FIG. 10 shows a schematic explanatory diagram of an embodiment of a communication sequence in which a collision occurs but an overcurrent does not flow with a command for reading a device ID stored in a controlled device and device ID data in the present invention.
FIG. 10A shows a data structure of an embodiment of the device ID read command IDCMD.
This command IDCMD is 8-bit (C0 to C7) data, and the upper 4 bits (C4 to C7) are information "0111" meaning a request to read the device ID, and the lower 4 bits (C0 to C3). ) Is the collision prevention data fixed at "0000".

図10(b)に、デバイスIDデータIDDTの一実施例のデータ構成を示す。
このデバイスIDデータIDDTは、16ビット(D0〜D15)のデータであるが、上位4ビットDT1の部分(D12〜D15)が、「0000」に固定された衝突防止データであり、下位の12ビット(DT2、DT3、DT4)の部分(D0〜D11)が、デバイスIDの情報である。
なお、コマンドIDCMDの下位4ビット(C0〜C3)と、デバイスIDデータIDDTの上位4ビットDT1の部分(D12〜D15)を、「1111」に固定された衝突防止データとしてもよい。
FIG. 10B shows a data structure of an embodiment of device ID data IDDT.
This device ID data IDDT is 16-bit (D0 to D15) data, but the upper 4-bit DT1 part (D12 to D15) is collision prevention data fixed to "0000", and the lower 12 bits. The part (D0 to D11) of (DT2, DT3, DT4) is the device ID information.
The lower 4 bits (C0 to C3) of the command IDCMD and the upper 4 bits DT1 (D12 to D15) of the device ID data IDDT may be used as collision prevention data fixed to "1111".

図10(c)に、データ「0」で衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図をを示す。
図10(c)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にあったとする。
この状態で、最初の1クロックサイクルで、マスターから信号値「0111」のデバイスID読み出しコマンドの上位4ビットCOM1が送信されると、スレーブにおいて、このコマンドの上位4ビットCOM1「0111」が受信される。
FIG. 10 (c) shows a schematic explanatory diagram of an embodiment of a communication sequence in which a collision occurs at the data “0” but an overcurrent does not flow.
In FIG. 10 (c), it is assumed that the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z).
In this state, when the upper 4-bit COM1 of the device ID read command with the signal value "0111" is transmitted from the master in the first clock cycle, the slave receives the upper 4-bit COM1 "0111" of this command. To.

また、次の1クロックサイクルで、マスターから信号値「0000」のデバイスID読み出しコマンドの下位4ビットCOM2が送信されると、スレーブにおいて、このコマンドの下位4ビットCOM2「0000」が受信される。
マスターでは、信号値「0000」のコマンドの下位4ビットCOM2を送信した後、しばらくその送信状態にあり、その後、データの転送方向を切り替え、受信状態(Hi-Z)になったとする。
Further, in the next one clock cycle, when the lower 4-bit COM2 of the device ID read command with the signal value “0000” is transmitted from the master, the lower 4-bit COM2 “0000” of this command is received by the slave.
It is assumed that the master transmits the lower 4-bit COM2 of the command with the signal value "0000", and then stays in the transmission state for a while, then switches the data transfer direction and enters the reception state (Hi-Z).

一方、スレーブでは、信号値「0000」の下位4ビットCOM2を受信した後、データの転送方向を切り替え、送信状態にし、ただちに信号値「0000」のデバイスIDの上位4ビットDT1を送信したとする。
このとき、スレーブが、送信状態になり信号値「0000」のデータDT1を送信したタイミングが、マスターが送信状態にあるタイミングと重複していたとする。
On the other hand, it is assumed that the slave receives the lower 4-bit COM2 of the signal value "0000", switches the data transfer direction, puts it in the transmission state, and immediately transmits the upper 4-bit DT1 of the device ID of the signal value "0000". ..
At this time, it is assumed that the timing at which the slave enters the transmission state and transmits the data DT1 having the signal value "0000" overlaps with the timing at which the master is in the transmission state.

このように、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも遅く、マスターからの信号値「0000」のコマンドCOM2の送信状態と、スレーブからの信号値「0000」のデータDT1の送信状態とが重複した場合、データの信号値「0000」で、衝突が発生する。
信号値「0000」のコマンドCOM2の出力と信号値「0000」のデータDT1の出力とが衝突した場合、両者の出力値は、同じ電圧レベルであるので、データの衝突が発生しても、規格値以上の過電流がデータ送信用回路に流れ込むことはなく、データ送信用回路が破壊されることもない。
In this way, the timing of the reception state (Hi-Z) in the master is later than the timing of the transmission state in the slave, and the transmission state of the command COM2 with the signal value "0000" from the master and the signal value from the slave. When the transmission state of the data DT1 of "0000" overlaps, a collision occurs at the data signal value "0000".
When the output of the command COM2 with the signal value "0000" and the output of the data DT1 with the signal value "0000" collide, the output values of both are the same voltage level, so even if a data collision occurs, the standard An overcurrent exceeding the value does not flow into the data transmission circuit, and the data transmission circuit is not destroyed.

その後、マスターが受信状態(Hi-Z)に切り替わった場合、送信状態にあるスレーブから、デバイスIDのそれ以降のデータ(DT2からDT4)が送信されれば、マスターにおいて、それ以降のデータ(DT2からDT4)が受信される。
最初の信号値「0000」のデータDT1は、マスターとスレーブの出力が衝突するタイミングが存在するが、同じ電圧レベルであるため、マスターは正しく受信することができる。
After that, when the master switches to the reception state (Hi-Z), if the subsequent data (DT2 to DT4) of the device ID is transmitted from the slave in the transmission state, the subsequent data (DT2) is transmitted in the master. DT4) is received from.
The data DT1 with the first signal value "0000" has a timing at which the outputs of the master and the slave collide, but since the voltage levels are the same, the master can correctly receive the data DT1.

図15に、この発明において、被制御装置に記憶されたデバイスIDを送信するデータ出力用回路の一実施例の説明図を示す。
このデータ出力用回路は、上記した16ビットのデバイスID(D0からD15)を、4ビットずつ出力するシフトレジスタで構成されている。
たとえば、シフトレジスタは、16個のDフリップフロップからなり、図15に示すように接続して、16ビットのデバイスID(D0からD15)を、4ビットごとに分けて、Dフリップフロップに入力し、その後、クロックCLKの立ち下がりエッジに同期して、順次、4ビットごとのデータが、QuadSPIバスの4つのデータ線DQ[3:0]に出力され、マスターに送信される。
図15では、IDDataの[12]から[15]までの4ビットに対応する信号値が、0として出力され、データDT1に相当する。
FIG. 15 shows an explanatory diagram of an embodiment of a data output circuit that transmits a device ID stored in a controlled device in the present invention.
This data output circuit is composed of a shift register that outputs the above-mentioned 16-bit device IDs (D0 to D15) by 4 bits at a time.
For example, the shift register consists of 16 D flip-flops, which are connected as shown in FIG. 15, and the 16-bit device IDs (D0 to D15) are divided into 4 bits and input to the D flip-flops. After that, in synchronization with the falling edge of the clock CLK, data for every 4 bits is sequentially output to the 4 data lines DQ [3: 0] of the QuadSPI bus and transmitted to the master.
In FIG. 15, the signal values corresponding to the 4 bits of IDData [12] to [15] are output as 0 and correspond to the data DT1.

(デバイスIDを読み出す場合に、衝突が発生しない通信タイミングの説明)
図11に、この発明において、衝突が発生しない場合の通信タイミングと通信シーケンスの一実施例の概略説明図を示す。
(Explanation of communication timing that does not cause a collision when reading the device ID)
FIG. 11 shows a schematic explanatory view of an embodiment of the communication timing and the communication sequence when no collision occurs in the present invention.

図11(a)では、図9(a)と同様に、クロックの立ち下がりタイミングT2と、QuadSPIバスの4つのデータ線DQ[3:0]の信号状態(電圧レベル)の変化を示している。
ただし、図11(a)では、制御装置(マスター)側のデータ線DQ[3:0]では、立ち下がりタイミングT2で、信号値「0」のデータを送信していた状態から、ハイインピーダンス(Hi-Z)の受信状態に変化したとする。
このとき、データ線DQ[3:0]の電圧レベルが、「0」の送信状態から、Hi-Zの受信状態に変化するまでに、わずかの遅延時間がある。
FIG. 11 (a) shows changes in the signal state (voltage level) of the clock fall timing T2 and the four data lines DQ [3: 0] of the Quad SPI bus, as in FIG. 9 (a). ..
However, in FIG. 11A, the data line DQ [3: 0] on the control device (master) side has high impedance (from the state where the data of the signal value “0” is transmitted at the fall timing T2. It is assumed that the reception status of Hi-Z) has changed.
At this time, there is a slight delay time until the voltage level of the data line DQ [3: 0] changes from the transmission state of "0" to the reception state of Hi-Z.

また、Hi-Zの受信状態にあった被制御装置(スレーブ)側のデータ線DQ[3:0]において、Hi-Zの受信状態から、信号値「0」のデータを送信する状態に変化するタイミングが、図11(a)に示すように、クロックの立ち下がりタイミングT2からわずかに遅れたタイミングで、上記の制御装置(マスター)においてHi-Zの受信状態に変化したタイミングよりも遅かったとする。 In addition, the data line DQ [3: 0] on the controlled device (slave) side that was in the Hi-Z reception state changes from the Hi-Z reception state to the state in which the data with the signal value "0" is transmitted. As shown in FIG. 11A, the timing of the clock is slightly delayed from the clock fall timing T2, which is later than the timing when the above control device (master) changes to the Hi-Z reception state. To do.

この場合、データ線DQ[3:0]において、マスターとスレーブの両者が、どちらも同時に、ハイインピーダンス(Hi-Z)となるタイミングが生じる。また、マスターから信号値「0」のデータを出力するタイミングと、スレーブから信号値「0」のデータを出力するタイミングは、重複しない。
すなわち、データ線DQ[3:0]において、信号値「0」のデータCOM2と、信号値「0」のデータDT1の衝突は発生しない。
In this case, in the data line DQ [3: 0], the timing at which both the master and the slave become high impedance (Hi-Z) occurs at the same time. Further, the timing of outputting the data of the signal value "0" from the master and the timing of outputting the data of the signal value "0" from the slave do not overlap.
That is, in the data line DQ [3: 0], the collision between the data COM2 having the signal value “0” and the data DT1 having the signal value “0” does not occur.

図11(b)では、図11(a)に示すように衝突が発生しない場合の通信シーケンスの概略説明図を示す。
図11(b)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にある場合に、マスターから信号値「0」の下位4ビットのコマンドCOM2が送信されると、スレーブにおいて、この信号値「0」のコマンドCOM2が受信される。
マスターでは、信号値「0」のコマンドCOM2を送信した後、すぐに、データの転送方向を切り替え、受信状態(Hi-Z)になったとする。
FIG. 11B shows a schematic explanatory diagram of a communication sequence when a collision does not occur as shown in FIG. 11A.
In FIG. 11B, when the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z), a command of the lower 4 bits of the signal value “0” is sent from the master. When COM2 is transmitted, the slave receives the command COM2 with this signal value "0".
It is assumed that the master immediately switches the data transfer direction after transmitting the command COM2 with the signal value "0" and enters the reception state (Hi-Z).

一方、スレーブでは、信号値「0」のコマンドCOM2を受信した後、データの転送方向を切り替え、送信状態にし、信号値「0」のデータを送信したとする。すなわち、デバイスIDの最初の上位4ビットのデータDT1を送信したとする。
このとき、スレーブが送信状態になり信号値「0」のデータDT1を送信したタイミングが、マスターが受信状態(Hi-Z)になった後であったとする。
On the other hand, it is assumed that the slave receives the command COM2 with the signal value "0", then switches the data transfer direction, puts it in the transmission state, and transmits the data with the signal value "0". That is, it is assumed that the data DT1 of the first upper 4 bits of the device ID is transmitted.
At this time, it is assumed that the timing at which the slave enters the transmission state and transmits the data DT1 having the signal value “0” is after the master enters the reception state (Hi-Z).

このように、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも早く、マスターとスレーブが、どちらも同時に、ハイインピーダンス(Hi-Z)となるタイミングが生じ、マスターからの信号値「0」のコマンドCOM2の送信状態と、スレーブからの信号値「0」のデータDT1の送信状態とが重複しない場合、衝突が発生しない。
衝突が発生しない場合は、マスターからの信号値「0」のコマンドCOM2と、スレーブからの信号値「0」のデータDT1とは、正常に受信される。
In this way, the timing of the reception state (Hi-Z) at the master is earlier than the timing of the transmission state at the slave, and the timing at which both the master and the slave become high impedance (Hi-Z) occurs at the same time. If the transmission state of the command COM2 with the signal value "0" from the master and the transmission state of the data DT1 with the signal value "0" from the slave do not overlap, no collision occurs.
If no collision occurs, the command COM2 with the signal value "0" from the master and the data DT1 with the signal value "0" from the slave are normally received.

<実施例2:この発明において、ステータスレジスタを読み出す場合の通信タイミングの説明>
図12に、この発明において、被制御装置に記憶されたステータスレジスタを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図を示す。
図12の読み出しタイミングは、マスターからステータスレジスタ読出コマンドが出力され、このコマンドを受信したスレーブから、ステータスレジスタの内容が出力されるものである。
<Example 2: In the present invention, description of communication timing when reading the status register>
FIG. 12 shows an explanatory diagram of an embodiment of the read timing when reading the status register stored in the controlled device and the data contents transmitted from the controlled device and the controlled device in the present invention.
As for the read timing in FIG. 12, a status register read command is output from the master, and the contents of the status register are output from the slave that receives this command.

図12では、2クロックサイクルの間に、制御装置(マスター)から、ビット数が8ビットのステータスレジスタ読出コマンドが、4ビットずつ2回に分けて出力される。
すなわち、ステータスレジスタ読出コマンドは、先に出力される上位4ビットのデータCOM1と、後に出力される下位4ビットのデータCOM2とから構成される。
また、図12(a)に示すように、ステータスレジスタ読出コマンドの下位4ビットのデータCOM2は、「0000」に固定的に設定する。
この固定的に設定されたデータCOM2「0000」が、衝突防止データに相当する。
In FIG. 12, a status register read command having an 8-bit number is output from the control device (master) in two steps of 4 bits each during 2 clock cycles.
That is, the status register read command is composed of the upper 4-bit data COM1 output first and the lower 4-bit data COM2 output later.
Further, as shown in FIG. 12A, the data COM2 of the lower 4 bits of the status register read command is fixedly set to "0000".
This fixedly set data COM2 "0000" corresponds to the collision prevention data.

一方、被制御装置(スレーブ)では、ステータスレジスタ読出コマンドを受信すると、2クロックサイクルの間に、被制御装置(スレーブ)から、ビット数が8ビットのステータスレジスタ情報が、4ビットずつ2回に分けて出力される。
すなわち、ステータスレジスタ情報は、それぞれ4ビット構成の2つのデータ(ST1、ST2)から構成される。
また、図12(a)に示すように、スレーブから最初に出力されるステータスレジスタ情報の上位4ビットのデータST1は、「0000」に固定的に設定する。
この固定的に設定されたデータST1「0000」も、衝突防止データに相当する。
On the other hand, when the controlled device (slave) receives the status register read command, the status register information having 8 bits from the controlled device (slave) is transmitted twice by 4 bits in 2 clock cycles. It is output separately.
That is, the status register information is composed of two data (ST1 and ST2) each having a 4-bit configuration.
Further, as shown in FIG. 12A, the data ST1 of the upper 4 bits of the status register information first output from the slave is fixedly set to "0000".
This fixedly set data ST1 "0000" also corresponds to the collision prevention data.

ここでは、データ線DQ[3:0]で衝突する可能性のあるステータスレジスタ読出コマンドの下位4ビットのデータCOM2と、ステータスレジスタ情報の上位4ビットのデータST1とが、同じ電圧レベルの信号値「0000」である。
データの転送方向の切替時において、データ線DQ[3:0]で衝突が発生したとしても、
同じ電圧レベルの信号値「0000」同士の衝突なので、データ送信用回路が破壊されることを防止できる。
Here, the lower 4 bits of data COM2 of the status register read command and the upper 4 bits of data ST1 of the status register information, which may collide with each other on the data line DQ [3: 0], have the same voltage level signal value. It is "0000".
Even if a collision occurs on the data line DQ [3: 0] when switching the data transfer direction.
Since the signal values "0000" of the same voltage level collide with each other, it is possible to prevent the data transmission circuit from being destroyed.

あるいは、マスターから最後に出力されるステータスレジスタ読出コマンドの下位4ビットのデータCOM2と、スレーブから最初に出力されるステータスレジスタ情報の上位4ビットのデータST1は、同じ電圧レベルの信号値であれば、データ送信用回路が破壊されることはない。
したがって、図12(b)に示すように、ステータスレジスタ読出コマンドの下位4ビットのデータCOM2と、ステータスレジスタ情報の上位4ビットのデータST1とを、「1111」に固定的に設定してもよい。
Alternatively, if the lower 4 bits of data COM2 of the status register read command output last from the master and the upper 4 bits of data ST1 of the status register information first output from the slave are signal values of the same voltage level. , The data transmission circuit is not destroyed.
Therefore, as shown in FIG. 12B, the lower 4 bits of data COM2 of the status register read command and the upper 4 bits of data ST1 of the status register information may be fixedly set to "1111". ..

(ステータスレジスタを読み出す場合に、衝突が発生する通信タイミングの説明)
図13に、この発明において、被制御装置に記憶されたステータスレジスタを読み出すコマンドと、ステータスレジスタデータと、衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図を示す。
図13(a)に、ステータスレジスタ読み出しコマンドSTCMDの一実施例のデータ構成を示す。
このコマンドSTCMDは、8ビット(C0〜C7)のデータであるが、上位4ビット(C4〜C7)が、ステータスレジスタの読み出し要求を意味する情報「0100」であり、下位4ビット(C0〜C3)が、「0000」に固定された衝突防止データである。
(Explanation of communication timing when a collision occurs when reading the status register)
FIG. 13 shows a schematic explanatory diagram of an embodiment of a communication sequence in which a command for reading a status register stored in a controlled device, status register data, and a collision occurs but an overcurrent does not flow in the present invention.
FIG. 13A shows a data structure of an embodiment of the status register read command STCMD.
This command STCMD is 8-bit (C0 to C7) data, but the upper 4 bits (C4 to C7) are information "0100" meaning a status register read request, and the lower 4 bits (C0 to C3). ) Is the collision prevention data fixed at "0000".

図13(b)に、ステータスレジスタデータSTDTの一実施例のデータ構成を示す。
このステータスレジスタデータSTDTは、8ビット(S0〜S7)のデータであるが、上位4ビットST1の部分(S4〜S7)が、「0000」に固定された衝突防止データであり、下位の4ビットST2の部分「1001」(S0〜S3)が、ステータスレジスタ情報である。
なお、コマンドSTCMDの下位4ビット(C0〜C3)と、ステータスレジスタデータSTDTの上位4ビットST1の部分(S4〜S7)を、「1111」に固定された衝突防止データとしてもよい。
FIG. 13B shows a data structure of an embodiment of the status register data STDT.
This status register data STDT is 8-bit (S0 to S7) data, but the upper 4-bit ST1 part (S4 to S7) is collision prevention data fixed to "0000", and the lower 4 bits. The ST2 part "1001" (S0 to S3) is the status register information.
The lower 4 bits (C0 to C3) of the command STCMD and the upper 4 bits ST1 (S4 to S7) of the status register data STDT may be used as collision prevention data fixed to "1111".

図13(c)に、データ「0」で衝突が発生するが過電流は流れない通信シーケンスの一実施例の概略説明図をを示す。
図13(c)において、制御装置(マスター)が送信状態にあり、被制御装置(スレーブ)が受信状態(Hi-Z)にあったとする。
この状態で、最初の1クロックサイクルで、マスターから信号値「0100」のステータスレジスタ読み出しコマンドの上位4ビットCOM1が送信されると、スレーブにおいて、このコマンドの上位4ビットCOM1「0100」が受信される。
FIG. 13 (c) shows a schematic explanatory diagram of an embodiment of a communication sequence in which a collision occurs at the data “0” but an overcurrent does not flow.
In FIG. 13 (c), it is assumed that the control device (master) is in the transmission state and the controlled device (slave) is in the reception state (Hi-Z).
In this state, when the upper 4-bit COM1 of the status register read command with the signal value "0100" is transmitted from the master in the first clock cycle, the slave receives the upper 4-bit COM1 "0100" of this command. To.

また、次の1クロックサイクルで、マスターから信号値「0000」のステータスレジスタ読み出しコマンドの下位4ビットCOM2が送信されると、スレーブにおいて、このコマンドの下位4ビットCOM2「0000」が受信される。
マスターでは、信号値「0000」のコマンドの下位4ビットCOM2を送信した後、しばらくその送信状態にあり、その後、データの転送方向を切り替え、受信状態(Hi-Z)になったとする。
Further, in the next one clock cycle, when the lower 4-bit COM2 of the status register read command of the signal value "0000" is transmitted from the master, the lower 4-bit COM2 "0000" of this command is received by the slave.
It is assumed that the master transmits the lower 4-bit COM2 of the command with the signal value "0000", and then stays in the transmission state for a while, then switches the data transfer direction and enters the reception state (Hi-Z).

一方、スレーブでは、信号値「0000」の下位4ビットCOM2を受信した後、データの転送方向を切り替え、送信状態にし、ただちに信号値「0000」のステータスレジスタの上位4ビットST1を送信したとする。
このとき、スレーブが送信状態になり信号値「0000」のデータST1を送信したタイミングが、マスターが送信状態にあるタイミングと重複していたとする。
On the other hand, it is assumed that the slave receives the lower 4-bit COM2 of the signal value "0000", switches the data transfer direction, puts it in the transmission state, and immediately transmits the upper 4-bit ST1 of the status register of the signal value "0000". ..
At this time, it is assumed that the timing at which the slave is in the transmission state and the data ST1 having the signal value “0000” is transmitted overlaps with the timing at which the master is in the transmission state.

このように、マスターにおける受信状態(Hi-Z)になるタイミングが、スレーブにおける送信状態になるタイミングよりも遅く、マスターからの信号値「0000」のコマンドCOM2の送信状態と、スレーブからの信号値「0000」のデータST1の送信状態とが重複した場合、データの信号値「0000」で、衝突が発生する。
信号値「0000」のコマンドCOM2の出力と信号値「0000」のデータST1の出力とが衝突した場合、両者の出力値は、同じ電圧レベルであるので、データの衝突が発生しても、規格値以上の過電流がデータ送信用回路に流れ込むことはなく、データ送信用回路が破壊されることもない。
In this way, the timing of the reception state (Hi-Z) in the master is later than the timing of the transmission state in the slave, and the transmission state of the command COM2 with the signal value "0000" from the master and the signal value from the slave. When the transmission state of the data ST1 of "0000" overlaps, a collision occurs at the signal value "0000" of the data.
When the output of the command COM2 with the signal value "0000" and the output of the data ST1 with the signal value "0000" collide, the output values of both are the same voltage level, so even if a data collision occurs, the standard An overcurrent exceeding the value does not flow into the data transmission circuit, and the data transmission circuit is not destroyed.

その後、マスターが受信状態(Hi-Z)に切り替わった場合、送信状態にあるスレーブから、ステータスレジスタの後半のデータSDT2「1001」が送信されれば、マスターにおいて、データST2が受信される。
最初の信号値「0000」のデータDT1は、マスターとスレーブの出力が衝突するタイミングが存在するが、同じ電圧レベルであるため、マスターは正しく受信することができる。
After that, when the master is switched to the reception state (Hi-Z), if the data SDT2 "1001" in the latter half of the status register is transmitted from the slave in the transmission state, the data ST2 is received in the master.
The data DT1 with the first signal value "0000" has a timing at which the outputs of the master and the slave collide, but since the voltage levels are the same, the master can correctly receive the data DT1.

図16に、この発明において、被制御装置に記憶されたステータスレジスタ情報を送信するデータ出力用回路の一実施例の説明図を示す。
このデータ出力用回路は、上記した8ビットのステータスレジスタ(S0からS7)を、4ビットずつ出力するシフトレジスタで構成されている。
たとえば、シフトレジスタは、図16に示す16個のDフリップフロップからなるが、8ビットのステータスレジスタ(S0からS7)を、4ビットごとに分けて、8個のDフリップフロップに入力し、その後、クロックCLKの立ち下がりエッジに同期して、順次、4ビットごとのデータが、QuadSPIバスの4つのデータ線DQ[3:0]に出力され、マスターに送信される。
FIG. 16 shows an explanatory diagram of an embodiment of a data output circuit that transmits status register information stored in the controlled device in the present invention.
This data output circuit is composed of a shift register that outputs the above-mentioned 8-bit status registers (S0 to S7) by 4 bits at a time.
For example, the shift register consists of 16 D flip-flops shown in FIG. 16, but an 8-bit status register (S0 to S7) is divided into 4 bits and input to the 8 D flip-flops, and then , In synchronization with the falling edge of the clock CLK, data for every 4 bits is sequentially output to the four data lines DQ [3: 0] of the QuadSPI bus and transmitted to the master.

図16では、ステータスレジスタの下位4ビットST2(S0からS3)が、Status Dataの[0]から[3]までの4ビットに対応する信号値であり、4個のDフリップフロップに入力され、ステータスレジスタの上位4ビットST1(S4からS7)は、固定された0として別の4個のDフリップフロップに入力される。 In FIG. 16, the lower 4 bits ST2 (S0 to S3) of the status register are signal values corresponding to the 4 bits from [0] to [3] of the Status Data, and are input to the four D flip-flops. The upper 4-bit ST1 (S4 to S7) of the status register is input to another four D flip-flops as a fixed 0.

<実施例3:この発明において、設定レジスタを読み出す場合の通信タイミングの説明>
図14に、この発明において、被制御装置に記憶された設定レジスタを読み出す場合の読み出しタイミングと、制御装置および被制御装置から送信されるデータ内容の一実施例の説明図を示す。
設定レジスタには、たとえば、被制御装置の内部バスを介した読み出し処理の待ち時間などが設定されている。
図14の読み出しタイミングは、マスターから設定レジスタ読出コマンドが出力され、このコマンドを受信したスレーブから、設定レジスタの内容が出力されるものである。
<Example 3: Description of communication timing when reading the setting register in the present invention>
FIG. 14 shows an explanatory diagram of an embodiment of the read timing when reading the setting register stored in the controlled device and the data contents transmitted from the controlled device and the controlled device in the present invention.
In the setting register, for example, the waiting time of the read process via the internal bus of the controlled device is set.
As for the read timing of FIG. 14, a setting register read command is output from the master, and the contents of the setting register are output from the slave that receives this command.

図14では、2クロックサイクルの間に、制御装置(マスター)から、ビット数が8ビットの設定レジスタ読出コマンドが、4ビットずつ2回に分けて出力される。
すなわち、設定レジスタ読出コマンドは、先に出力される上位4ビットのデータCOM1と、後に出力される下位4ビットのデータCOM2とから構成される。
また、図14(a)に示すように、設定レジスタ読出コマンドの下位4ビットのデータCOM2は、「0000」に固定的に設定する。
この固定的に設定されたデータCOM2「0000」が、衝突防止データに相当する。
In FIG. 14, a setting register read command having an 8-bit number is output from the control device (master) in two steps of 4 bits each during 2 clock cycles.
That is, the setting register read command is composed of the upper 4-bit data COM1 output first and the lower 4-bit data COM2 output later.
Further, as shown in FIG. 14A, the data COM2 of the lower 4 bits of the setting register read command is fixedly set to "0000".
This fixedly set data COM2 "0000" corresponds to the collision prevention data.

一方、被制御装置(スレーブ)では、設定レジスタ読出コマンドを受信すると、4クロックサイクルの間に、被制御装置(スレーブ)から、ビット数が16ビットの設定レジスタ情報が、4ビットずつ4回に分けて出力される。
すなわち、設定レジスタ情報は、それぞれ4ビット構成の4つのデータ(SR1、SR2、SR3、SR4)から構成される。
また、図14(a)に示すように、スレーブから最初に出力される設定レジスタ情報の上位4ビットのデータSR1は、「0000」に固定的に設定する。
この固定的に設定されたデータSR1「0000」も、衝突防止データに相当する。
On the other hand, when the controlled device (slave) receives the setting register read command, the set register information having 16 bits from the controlled device (slave) is changed to 4 times by 4 bits in 4 clock cycles. It is output separately.
That is, the setting register information is composed of four data (SR1, SR2, SR3, SR4) each having a 4-bit configuration.
Further, as shown in FIG. 14A, the data SR1 of the upper 4 bits of the setting register information first output from the slave is fixedly set to "0000".
This fixedly set data SR1 "0000" also corresponds to the collision prevention data.

ここでは、データ線DQ[3:0]で衝突する可能性のある設定レジスタ読出コマンドの下位4ビットのデータCOM2と、設定レジスタ情報の上位4ビットのデータSR1とが、同じ電圧レベルの信号値「0000」である。
データの転送方向の切替時において、データ線DQ[3:0]で衝突が発生したとしても、
同じ電圧レベルの信号値「0000」同士の衝突なので、データ送信用回路が破壊されることを防止できる。
Here, the data COM2 of the lower 4 bits of the setting register read command and the data SR1 of the upper 4 bits of the setting register information, which may collide with each other on the data line DQ [3: 0], have the same voltage level signal value. It is "0000".
Even if a collision occurs on the data line DQ [3: 0] when switching the data transfer direction.
Since the signal values "0000" of the same voltage level collide with each other, it is possible to prevent the data transmission circuit from being destroyed.

あるいは、マスターから最後に出力される設定レジスタ読出コマンドの下位4ビットのデータCOM2と、スレーブから最初に出力される設定レジスタ情報の上位4ビットのデータSR1は、同じ電圧レベルの信号値であれば、データ送信用回路が破壊されることはない。
したがって、図14(b)に示すように、設定レジスタ読出コマンドの下位4ビットのデータCOM2と、設定レジスタ情報の上位4ビットのデータSR1とを、「1111」に固定的に設定してもよい。
Alternatively, if the data COM2 of the lower 4 bits of the setting register read command output last from the master and the data SR1 of the upper 4 bits of the setting register information first output from the slave are signal values of the same voltage level. , The data transmission circuit is not destroyed.
Therefore, as shown in FIG. 14B, the lower 4 bits of the data COM2 of the setting register read command and the upper 4 bits of the data SR1 of the setting register information may be fixedly set to "1111". ..

被制御装置に記憶された設定レジスタを読み出すコマンドと、設定レジスタデータとを送受信し、衝突が発生するが過電流は流れない通信シーケンスは、図10や図13に示した通信シーケンスと同様なので、説明を省略する。 The communication sequence in which the command to read the setting register stored in the controlled device and the setting register data are transmitted and received, and a collision occurs but an overcurrent does not flow is the same as the communication sequence shown in FIGS. 10 and 13. The explanation is omitted.

図17に、この発明において、被制御装置に記憶された設定レジスタ情報を送信するデータ出力用回路の一実施例の説明図を示す。
このデータ出力用回路は、上記した16ビットの設定レジスタ(SR1、SR2、SR3、SR4)を、4ビットずつ出力するシフトレジスタで構成されている。
たとえば、シフトレジスタは、図17に示す16個のDフリップフロップからなるが、設定レジスタの上位4ビット(SR1)としては、「0000」が、SR1に対応するDフリップフロップに入力され、残りの12ビットの設定レジスタ(SR2、SR3、SR4)を、4ビットごとに分けて、12個のDフリップフロップに入力し、その後、クロックCLKの立ち下がりエッジに同期して、順次、4ビットごとのデータが、QuadSPIバスの4つのデータ線DQ[3:0]に出力され、マスターに送信される。
FIG. 17 shows an explanatory diagram of an embodiment of a data output circuit that transmits setting register information stored in a controlled device in the present invention.
This data output circuit is composed of a shift register that outputs the above-mentioned 16-bit setting registers (SR1, SR2, SR3, SR4) by 4 bits at a time.
For example, the shift register consists of 16 D flip-flops shown in FIG. 17, but "0000" is input to the D flip-flop corresponding to SR1 as the upper 4 bits (SR1) of the setting register, and the rest. The 12-bit setting registers (SR2, SR3, SR4) are divided into 4 bits and input to 12 D flip-flops, and then synchronized with the falling edge of the clock CLK, sequentially every 4 bits. The data is output to the four data lines DQ [3: 0] of the QuadSPI bus and transmitted to the master.

図17では、設定レジスタの下位12ビット(SR2、SR3、SR4)が、それぞれ、RegAの[0]から[3]まで、RegBの[0]から[3]まで、RegCの[0]から[3]までの4ビットに対応する信号値であり、異なる4個のDフリップフロップに入力され、設定レジスタの上位4ビットSR1は、固定された0として別の4個のDフリップフロップに入力される。 In FIG. 17, the lower 12 bits (SR2, SR3, SR4) of the setting register are RegA [0] to [3], RegB [0] to [3], and RegC [0] to [3], respectively. It is a signal value corresponding to 4 bits up to 3] and is input to 4 different D flip-flops, and the upper 4 bits SR1 of the setting register is input to another 4 D flip-flops as a fixed 0. To.

1 制御装置(マスター)、
2 被制御装置(スレーブ)、
11 制御部、
12 マスター通信部、
13 内部バス、
14 接続部(接続端子)、
15 データ送信部、
16 データ受信部、
17 衝突防止データ生成部、
21 スレーブ通信部、
22 被制御部、
23 内部バス、
24 接続部(接続端子)、
25 データ送信部、
26 データ受信部、
27 衝突防止データ生成部、
31 制御線、
32 データ線、
50 記憶部、
51 デバイスID、
52 ステータスレジスタ情報、
53 設定レジスタ情報、
70 記憶部、
71 デバイスID、
72 ステータスレジスタ情報、
73 設定レジスタ情報
1 Control device (master),
2 Controlled device (slave),
11 Control unit,
12 Master Communication Department,
13 Internal bus,
14 Connection part (connection terminal),
15 Data transmitter,
16 Data receiver,
17 Collision prevention data generator,
21 Slave communication unit,
22 Controlled unit,
23 Internal bus,
24 Connection part (connection terminal),
25 Data transmitter,
26 Data receiver,
27 Collision prevention data generator,
31 control line,
32 data lines,
50 storage,
51 device ID,
52 Status register information,
53 Setting register information,
70 storage,
71 device ID,
72 Status register information,
73 Setting register information

Claims (10)

主従関係にある制御装置と被制御装置とをバスで接続し、バスの転送方向を切り替えて、制御装置と被制御装置との間の双方向通信を行う通信制御システムであって、
前記制御装置から、n個(n>1)のビット数からなる所定の要求コマンドを、前記バスを介して前記被制御装置に送信した後、バスの転送方向を切り替えて、前記被制御装置から、m個(m>1)のビット数からなる前記要求コマンドに対応した返信データを、前記バスを介して前記制御装置に送信する場合、
前記要求コマンドのうち、最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、前記返信データのうち、最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とが同一の内容であることを特徴とする通信制御システム。
A communication control system that connects a control device and a controlled device in a master-slave relationship by a bus, switches the transfer direction of the bus, and performs bidirectional communication between the control device and the controlled device.
After transmitting a predetermined request command consisting of n (n> 1) bits from the control device to the controlled device via the bus, the transfer direction of the bus is switched from the controlled device. , When the reply data corresponding to the request command consisting of m (m> 1) bits is transmitted to the control device via the bus,
Of the request commands, the content of the first binary data consisting of a (n>a> 1) bits to be transmitted last, and b (m>) of the reply data to be transmitted first. A communication control system characterized in that the contents of the second binary data having the number of bits of b> 1) are the same.
前記第1のバイナリデータの内容と、前記第2のバイナリデータの内容とが、同一電圧レベルの信号として、前記バスに出力されることを特徴とする請求項1に記載の通信制御システム。 The communication control system according to claim 1, wherein the content of the first binary data and the content of the second binary data are output to the bus as a signal having the same voltage level. 前記第1のバイナリデータの内容と、前記第2のバイナリデータの内容とが、どちらも、複数のビット数からなる0に相当するバイナリデータであるか、あるいは、
複数のビット数からなる1に相当するバイナリデータであることを特徴とする請求項1に記載の通信制御システム。
The contents of the first binary data and the contents of the second binary data are both binary data corresponding to 0 consisting of a plurality of bits, or
The communication control system according to claim 1, wherein the binary data corresponds to 1 composed of a plurality of bits.
前記バスが、4本のデータ線を含むQuad SPI(Serial Peripheral Interface)バスであり、
前記要求コマンドと、前記返信データは、4本のデータ線を介して、異なるタイミングで送信されることを特徴とする請求項1に記載の通信制御システム。
The bus is a Quad SPI (Serial Peripheral Interface) bus containing four data lines.
The communication control system according to claim 1, wherein the request command and the reply data are transmitted at different timings via four data lines.
前記4本のデータ線を介して送信される要求コマンドのうち、最後に送信される少なくとも4ビット以上からなる前記第1のバイナリデータと、前記4本のデータ線を介して送信される前記返信データのうち、最初に送信される少なくとも4ビット以上からなる前記第2のバイナリデータとが、
複数のビット数からなる0に相当するバイナリデータであるか、あるいは、複数のビット数からなる1に相当するバイナリデータであることを特徴とする請求項4に記載の通信制御システム。
Of the request commands transmitted via the four data lines, the first binary data consisting of at least 4 bits or more transmitted last, and the reply transmitted via the four data lines. Of the data, the second binary data consisting of at least 4 bits or more that is transmitted first is
The communication control system according to claim 4, wherein the binary data corresponds to 0 having a plurality of bits, or the binary data corresponds to 1 consisting of a plurality of bits.
前記被制御装置が、被制御装置を識別するためのデバイスIDを予め記憶し、
前記制御装置から、前記デバイスIDを送信することを要求する情報を含む要求コマンドが被制御装置に送信された場合、
前記被制御装置から、被制御装置のデバイスIDを含む返信データが制御装置に送信されることを特徴とする請求項1に記載の通信制御システム。
The controlled device stores a device ID for identifying the controlled device in advance, and stores the device ID.
When a request command including information requesting that the device ID is transmitted is transmitted from the control device to the controlled device.
The communication control system according to claim 1, wherein reply data including a device ID of the controlled device is transmitted from the controlled device to the control device.
前記被制御装置が、被制御装置の動作状態を示す情報を記憶したステータスレジスタを備え、
前記制御装置から、前記ステータスレジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置に送信された場合、
前記被制御装置から、被制御装置のステータスレジスタに記憶されている情報を含む返信データが制御装置に送信されることを特徴とする請求項1に記載の通信制御システム。
The controlled device includes a status register that stores information indicating the operating state of the controlled device.
When a request command requesting transmission of information stored in the status register is transmitted from the control device to the controlled device,
The communication control system according to claim 1, wherein reply data including information stored in a status register of the controlled device is transmitted from the controlled device to the control device.
前記被制御装置が、被制御装置の設定内容を示す情報を記憶した設定レジスタを備え、
前記制御装置から、前記設定レジスタに記憶されている情報を送信することを要求する要求コマンドが被制御装置に送信された場合、
前記被制御装置から、被制御装置の設定レジスタに記憶されている情報を含む返信データが制御装置に送信されることを特徴とする請求項1に記載の通信制御システム。
The controlled device includes a setting register that stores information indicating the setting contents of the controlled device.
When a request command requesting transmission of information stored in the setting register is transmitted from the control device to the controlled device,
The communication control system according to claim 1, wherein reply data including information stored in a setting register of the controlled device is transmitted from the controlled device to the control device.
前記請求項1から請求項8のいずれかに記載した通信制御システムを備えた情報処理装置。 An information processing device including the communication control system according to any one of claims 1 to 8. 制御装置と被制御装置とをバスで接続し、バスの転送方向を切り替えて、制御装置と被制御装置との間の双方向通信を行う通信制御システムの通信制御方法であって、
前記制御装置が前記バスに所定のデータを送信可能な送信状態であり、前記被制御装置が前記バスから所定のデータを受信可能な受信状態である場合に、
前記制御装置から、n個(n>1)のビット数からなる所定の要求コマンドを、前記バスを介して前記被制御装置に送信し、
前記バスの転送方向を切り替えて、前記制御装置が受信状態となり、前記被制御装置が送信状態となった後、
前記被制御装置から、m個(m>1)のビット数からなる前記要求コマンドに対応した返信データを、前記バスを介して前記制御装置に送信し、
前記要求コマンドのうち、最後に送信されるa個(n>a>1)のビット数からなる第1のバイナリデータの内容と、前記返信データのうち、最初に送信されるb個(m>b>1)のビット数からなる第2のバイナリデータの内容とが同一の内容であることを特徴とする通信制御システムの通信制御方法。
A communication control method for a communication control system in which a control device and a controlled device are connected by a bus, the transfer direction of the bus is switched, and bidirectional communication is performed between the controlled device and the controlled device.
When the control device is in a transmission state capable of transmitting predetermined data to the bus and the controlled device is in a reception state capable of receiving predetermined data from the bus.
A predetermined request command consisting of n (n> 1) bits is transmitted from the control device to the controlled device via the bus.
After switching the transfer direction of the bus, the control device is in the receiving state, and the controlled device is in the transmitting state.
Reply data corresponding to the request command consisting of m (m> 1) bits is transmitted from the controlled device to the control device via the bus.
Of the request commands, the content of the first binary data consisting of a (n>a> 1) bits to be transmitted last, and b (m>) of the reply data to be transmitted first. A communication control method of a communication control system, characterized in that the contents of the second binary data having the number of bits of b> 1) are the same.
JP2019136847A 2019-07-25 2019-07-25 Communication control system and information processing equipment Active JP7265953B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019136847A JP7265953B2 (en) 2019-07-25 2019-07-25 Communication control system and information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019136847A JP7265953B2 (en) 2019-07-25 2019-07-25 Communication control system and information processing equipment

Publications (2)

Publication Number Publication Date
JP2021022040A true JP2021022040A (en) 2021-02-18
JP7265953B2 JP7265953B2 (en) 2023-04-27

Family

ID=74575151

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019136847A Active JP7265953B2 (en) 2019-07-25 2019-07-25 Communication control system and information processing equipment

Country Status (1)

Country Link
JP (1) JP7265953B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000047766A (en) * 1998-05-29 2000-02-18 Omron Corp Method and device for parallel data transmission, and method and device for collision prevention in parallel bus system
JP2000315128A (en) * 1999-04-30 2000-11-14 Mitsubishi Electric Corp Bus control system
WO2003010939A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Interface apparatus
JP2009181444A (en) * 2008-01-31 2009-08-13 Panasonic Corp Data transfer device, data transfer system, and data transfer method
JP2011113335A (en) * 2009-11-27 2011-06-09 Seiko Epson Corp System equipped with a plurality of devices, and data transfer method for the same
JP2018504714A (en) * 2015-02-04 2018-02-15 クアルコム,インコーポレイテッド Voltage mode and current mode device enumeration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000047766A (en) * 1998-05-29 2000-02-18 Omron Corp Method and device for parallel data transmission, and method and device for collision prevention in parallel bus system
JP2000315128A (en) * 1999-04-30 2000-11-14 Mitsubishi Electric Corp Bus control system
WO2003010939A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Interface apparatus
JP2009181444A (en) * 2008-01-31 2009-08-13 Panasonic Corp Data transfer device, data transfer system, and data transfer method
JP2011113335A (en) * 2009-11-27 2011-06-09 Seiko Epson Corp System equipped with a plurality of devices, and data transfer method for the same
JP2018504714A (en) * 2015-02-04 2018-02-15 クアルコム,インコーポレイテッド Voltage mode and current mode device enumeration

Also Published As

Publication number Publication date
JP7265953B2 (en) 2023-04-27

Similar Documents

Publication Publication Date Title
JP4773742B2 (en) 2-wire interface between chips
US4554659A (en) Data communication network
JP2002530744A (en) Communication system and method with multi-level connection identification
JP2015520459A (en) Ring topology status indication
US6357015B1 (en) Data interface and high-speed communication system using the same
US7484028B2 (en) Burst-capable bus bridges for coupling devices to interface buses
US7019866B1 (en) Common communication bus and protocol for multiple injet printheads in a printing system
US7334061B2 (en) Burst-capable interface buses for device-to-device communications
US4603383A (en) Apparatus for direct data transfer among central processing units
JPS621057A (en) Transfer controller
JP7265953B2 (en) Communication control system and information processing equipment
JPH0337221B2 (en)
JPWO2007105376A1 (en) Integrated circuit and integrated circuit system
JP2009123141A (en) I/o device, host controller, and computer system
EP0983554B1 (en) Interfacing peripheral devices via a slave group interface device to a bus
US7519848B2 (en) Data transfer apparatus
KR100812710B1 (en) Method and apparatus for communication using control bus
WO1982001607A1 (en) Data communication bus structure
US9015392B2 (en) Multi-chip package and operating method thereof
JP4411138B2 (en) Data flow control system, circuit thereof, and method thereof
KR100807459B1 (en) Multiple data rate bus using return clock
JP3586603B2 (en) Data transfer device and data transfer method
JP2007265108A (en) Bus bridge
JP3947223B2 (en) Method and apparatus for reducing waiting time on an interface by overlapping transmission packets
JP2002055937A (en) Usb device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220323

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230417

R150 Certificate of patent or registration of utility model

Ref document number: 7265953

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150