JP5300098B2 - Information processing apparatus, information processing method, and information processing program - Google Patents

Information processing apparatus, information processing method, and information processing program Download PDF

Info

Publication number
JP5300098B2
JP5300098B2 JP2011056242A JP2011056242A JP5300098B2 JP 5300098 B2 JP5300098 B2 JP 5300098B2 JP 2011056242 A JP2011056242 A JP 2011056242A JP 2011056242 A JP2011056242 A JP 2011056242A JP 5300098 B2 JP5300098 B2 JP 5300098B2
Authority
JP
Japan
Prior art keywords
control unit
communication
communication destination
information processing
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011056242A
Other languages
Japanese (ja)
Other versions
JP2012195639A (en
Inventor
勝城 長島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Platforms Ltd
Original Assignee
NEC AccessTechnica Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC AccessTechnica Ltd filed Critical NEC AccessTechnica Ltd
Priority to JP2011056242A priority Critical patent/JP5300098B2/en
Publication of JP2012195639A publication Critical patent/JP2012195639A/en
Application granted granted Critical
Publication of JP5300098B2 publication Critical patent/JP5300098B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理装置、情報処理方法及び情報処理プログラムに関し、特にデータ線に予期せぬ波形変動が発生してもデバイスが誤動作する可能性を抑制できる情報処理装置、情報処理方法及び情報処理プログラムに関する。   The present invention relates to an information processing apparatus, an information processing method, and an information processing program. Regarding the program.

情報処理装置に実装されている2つの電子回路(デバイス)間の通信方式として、少なくとも1本のデータ線を通信路とする半二重通信方式が多く利用されている。デバイス間通信は、例えば、マイクロプロセッサ等のコントローラが周辺デバイスを制御する際に利用される。例えば、I2Cは、Philips Semiconductorsにより発明された、シリアルクロック線SCL及びシリアルデータ線SDAからなる2線インタフェースによる半二重双方向通信方式である。I2Cにおいては、SCL及びSDAにより接続されたマスタデバイス及び1以上のスレーブデバイスが、SDAに対し交互にデータを出力することによって半二重双方向通信を実現している。すなわち、マスタデバイスがSDA上にデータを出力しているときはスレーブデバイスがその信号を入力として取込み、スレーブデバイスがSDA上にデータを出力しているときはマスタデバイスがその信号を入力として取込む。I2Cでは、常にマスタデバイスがデータ伝送を開始する。マスタデバイスは、スレーブデバイスに対し、SCL及びSDAを介して、I2Cのデータ伝送開始通知信号であるスタートコンディションを送出する。スレーブデバイスは、SCL及びSDAを介してスタートコンディションを受信すると、それに続いてマスタデバイスから送信される命令を受信し、その命令に応じた動作を行う。このように、IC2におけるスレーブデバイスは、動作を行う際にまずスタートコンディションを受信する必要がある。そこで、スレーブデバイスは、データ伝送を行っていない待機状態にあるときは、SCL及びSDAにより伝送されるスタートコンディションを受信できるよう、SCL及びSDAに流れる電気信号を常に内部に取込み監視している。   As a communication method between two electronic circuits (devices) mounted on an information processing apparatus, a half-duplex communication method using at least one data line as a communication path is often used. The inter-device communication is used, for example, when a controller such as a microprocessor controls peripheral devices. For example, I2C is a half-duplex bidirectional communication system invented by Philips Semiconductors, using a two-wire interface comprising a serial clock line SCL and a serial data line SDA. In I2C, a master device and one or more slave devices connected by SCL and SDA alternately output data to SDA, thereby realizing half-duplex bidirectional communication. That is, when the master device outputs data on the SDA, the slave device takes the signal as an input, and when the slave device outputs data on the SDA, the master device takes the signal as an input. . In I2C, the master device always starts data transmission. The master device sends a start condition, which is an I2C data transmission start notification signal, to the slave device via SCL and SDA. When the slave device receives the start condition via the SCL and SDA, the slave device subsequently receives a command transmitted from the master device and performs an operation according to the command. Thus, the slave device in the IC 2 needs to receive the start condition first when performing the operation. Therefore, when the slave device is in a standby state in which data transmission is not being performed, the electrical signal flowing through the SCL and SDA is constantly taken in and monitored so that the start condition transmitted by the SCL and SDA can be received.

本件の発明者は、以下に述べるように、SCL及びSDAを伝搬する信号に対する予期せぬ波形変動が発生した場合の誤動作の防止について検討を行った。予期せぬ波形変動とは、例えば外来ノイズや部分的な電気故障によるSCL及びSDAを伝搬する信号に対する電気的変動である。また、波形変動は、装置電源において瞬間的な停電(瞬停)を含む停電が発生し内部のデバイス電源電圧が低下した場合の過渡現象によるマスタデバイスの挙動、及び電源変動によっても生じ得る。   As described below, the inventor of the present case has studied the prevention of malfunction when an unexpected waveform fluctuation occurs with respect to signals propagated through SCL and SDA. Unexpected waveform fluctuations are electrical fluctuations with respect to signals propagating through SCL and SDA due to, for example, external noise or partial electrical failure. The waveform fluctuation can also be caused by the behavior of the master device due to a transient phenomenon when a power failure including an instantaneous power failure (instantaneous power failure) occurs in the apparatus power supply and the internal device power supply voltage decreases, and the power supply fluctuation.

例えば、瞬停を含む停電などによりシステムの電源電圧が低下し、電源電圧がマスタデバイスの正常動作が保証される範囲を下回るレベルに至ると、マスタデバイスは予測不能な挙動を示すことがある。このような状況下では、マスタデバイスがSCL及びSDAに予期せぬ波形変動を生じさせる可能性がある。具体例として、マイクロコンピュータをマスタデバイスとするシステムのシステム電源が停止した場合を想定する。電源電圧は時間と共に低下してゆき、やがてマスタデバイスの動作が保証される電源電圧レベルの下限Aに到達する。その後さらに電源電圧が低下しつづけ、電圧レベルBまで達すると、マスタデバイスの機能は完全に失われる。この電圧レベルAと電圧レベルBの間において、マスタデバイスは予測不能な挙動をとり得る。そのとき、マスタデバイスは、SCL及びSDAの電気信号に何らかの変動を発生させてしまう可能性がある。   For example, when the power supply voltage of the system decreases due to a power failure including a momentary power failure and the power supply voltage falls below a range in which the normal operation of the master device is guaranteed, the master device may behave unpredictably. Under such circumstances, the master device may cause unexpected waveform fluctuations in SCL and SDA. As a specific example, it is assumed that the system power supply of a system using a microcomputer as a master device is stopped. The power supply voltage decreases with time, and eventually reaches the lower limit A of the power supply voltage level at which the operation of the master device is guaranteed. Thereafter, when the power supply voltage continues to decrease and reaches the voltage level B, the function of the master device is completely lost. Between this voltage level A and voltage level B, the master device can behave unpredictably. At that time, the master device may cause some variation in the electrical signals of SCL and SDA.

一方、スレーブデバイスは、一般に高い汎用性が求められるため、マスタデバイスに比べて低い電源電圧でも動作するよう設計されているものが多い。そのため、上述のようにマスタデバイスが予測不能な挙動を示し得る電源電圧の範囲であっても、スレーブデバイスは正常に動作しつづけることが多い。スレーブデバイスは、通常、SCL及びSDAの電気的状態を常に内部へ取込み、これを監視している。そのため、SCL及びSDAに発生した波形変動が偶然にも、例えば上述のスタートコンディションのような、I2Cの制御信号のパターンと合致してしまった場合は、スレーブデバイスが誤動作する可能性がある。特に、スレーブデバイスがライト(書込み)を意味する制御信号を誤検出した場合には、そのスレーブデバイスはSDAの波形変動をデータとして内部回路に取込み、その誤ったデータを内部に書込むため、システム上、深刻な問題が発生する可能性がある。一例として、スレーブデバイスとしてのRTCが制御信号を誤検出する場面を示す。RTCとは、内部にカレンダ情報をもつスレーブデバイスである。典型的には、RTCは、マスタデバイスとしてのマイクロコンピュータがカレンダ情報の書込み及び読出しを行うために用いられる。RTCは一般に、幅広い電源電圧で動作できる。また、RTCは、専用のバックアップ電源を備えていれば、システム電源の停止後もカレンダ情報を保持したまま長時間稼働することができる。よって、たとえシステム電源電圧が低下しても、RTCは正常に動作し、SCL及びSDAを監視しつづけることが多い。このようなRTCと上述のマイクロコンピュータとを含むシステムにおいて、システム電源電圧が低下した場合、マイクロコンピュータが上述のようにSCL及びSDA上に何らかの波形変動を発生させる可能性があり、RTCはその波形の入力信号をI2Cの制御信号と誤解釈し、RTCが誤動作する恐れがある。   On the other hand, since slave devices generally require high versatility, many slave devices are designed to operate with a lower power supply voltage than the master device. For this reason, the slave device often continues to operate normally even in the range of the power supply voltage in which the master device can exhibit unpredictable behavior as described above. The slave device normally takes in the electrical state of SCL and SDA and constantly monitors it. For this reason, if the waveform fluctuations generated in SCL and SDA accidentally coincide with the I2C control signal pattern such as the above-mentioned start condition, the slave device may malfunction. In particular, when a slave device erroneously detects a control signal indicating writing (writing), the slave device captures the SDA waveform fluctuation as internal data into the internal circuit, and writes the erroneous data internally. In addition, serious problems may occur. As an example, a scene in which an RTC as a slave device erroneously detects a control signal is shown. The RTC is a slave device having calendar information inside. Typically, the RTC is used by a microcomputer as a master device to write and read calendar information. RTCs can generally operate over a wide range of power supply voltages. In addition, if the RTC has a dedicated backup power supply, it can operate for a long time while retaining calendar information even after the system power supply is stopped. Therefore, even if the system power supply voltage drops, the RTC operates normally and often continues to monitor SCL and SDA. In a system including such an RTC and the above-described microcomputer, when the system power supply voltage decreases, the microcomputer may cause some waveform fluctuation on the SCL and SDA as described above. May be misinterpreted as an I2C control signal, causing the RTC to malfunction.

SCL及びSDAに予期せぬ波形変動が発生する別の原因として、外部からのノイズがある。スレーブデバイスは、データ伝送を行わない状態すなわち待機状態では、SCL及びSDAからの信号が入力されている状態にある。このとき、デバイスのSCL、SDAピンは電気的には高インピーダンス状態にある。(一般に、デバイス外部回路において数キロΩの抵抗を介してシステム電源へ接続することにより、高電圧状態を保っている)。この状態においては、スレーブデバイスはSCL及びSDAの外部からの微小な電流印加に影響を受けやすい。すなわち、I2Cインタフェースはノイズ耐力の低いデータ伝送インタフェースといえる。したがって、このシステムを含む装置の内部の電気部品から発生するノイズや、電源から装置内部へ伝播するノイズ、及び静電気や雷など外部からの高電気エネルギーの入力によるノイズなど、さまざまなノイズにより、SCL及びSDAの波形変動は容易に発生し得る。このようなノイズによるランダムな波形変動が、I2Cの制御信号に合致してしまう可能性がある。   Another cause of unexpected waveform fluctuations in SCL and SDA is external noise. The slave device is in a state where signals from SCL and SDA are input in a state where data transmission is not performed, that is, in a standby state. At this time, the SCL and SDA pins of the device are electrically in a high impedance state. (In general, a high voltage state is maintained by connecting to the system power supply via a resistance of several kilo ohms in the external circuit of the device). In this state, the slave device is susceptible to a minute current application from outside the SCL and SDA. That is, the I2C interface can be said to be a data transmission interface with low noise tolerance. Therefore, SCL is caused by various noises such as noise generated from the electrical components inside the device including this system, noise propagated from the power source to the inside of the device, and noise caused by external high electric energy input such as static electricity and lightning. And SDA waveform fluctuations can easily occur. There is a possibility that random waveform fluctuations due to such noise coincide with the I2C control signal.

かかる問題に対して、特開2004−258879号公報では、ライトイプロテクト信号及びチップセレクト信号などの制御信号をデータ伝送インタフェースに追加することにより、誤書込みを保護する方法が提案されている。例えば、データ伝送インタフェース上はライトシーケンスを検出したとしても、チップセレクト信号や、ライトプロテクト信号がデータ書込み条件に合致する信号レベルでなければ、データ伝送インタフェースのライトシーケンスは誤検出とみなし、データ書き込みは行わないといった方法である。しかし、チップセレクト信号やライトプロテクト信号などのデバイス選択のための制御信号を追加すると、デバイスのピン数が増加し、デバイス形状及びそのデバイスを使用する装置の小型化を阻害する。またデバイス自体のコストもあがってしまう。さらに、このような方法を採用するには、マスタデバイス及びスレーブデバイスの双方に同様の機能を実装する必要がある。   In order to solve this problem, Japanese Patent Application Laid-Open No. 2004-258879 proposes a method for protecting erroneous writing by adding a control signal such as a write protect signal and a chip select signal to the data transmission interface. For example, even if a write sequence is detected on the data transmission interface, if the chip select signal or the write protect signal is not at a signal level that matches the data writing condition, the data transmission interface write sequence is regarded as a false detection and data writing is performed. Is a method that does not. However, if a control signal for device selection such as a chip select signal or a write protect signal is added, the number of pins of the device increases, which hinders the device shape and downsizing of the apparatus using the device. In addition, the cost of the device itself increases. Furthermore, in order to employ such a method, it is necessary to implement a similar function in both the master device and the slave device.

また、特開2003−308257号公報では、停電や瞬停を検出すると、マスタデバイスがスレーブデバイスに対してSTOPコンディションを送出することで、スレーブデバイスを確実に待機状態とし、電源異常復旧時にスレーブデバイスを安定動作できるようにした構成が提案されている。しかしながら、この場合もスレーブデバイスは待機状態であるため、この間にI2CのSCL及びSDAに波形変動が発生した場合、スレーブデバイスはその波形変動をSCL及びSDAの信号変化と解釈してしまう。したがって、波形変動がI2C制御信号に合致してしまった場合には、それに応じた誤動作を起こしてしまう可能性がある。例えば、I2Cのライトシーケンスを誤検出したならば、SCL及びSDAの状態がスレーブデバイスの内部へデータとして取込まれてしまい、誤書込みが発生する。   Also, in Japanese Patent Application Laid-Open No. 2003-308257, when a power failure or a momentary power failure is detected, the master device sends a STOP condition to the slave device to ensure that the slave device is in a standby state, and when the power supply is recovered, the slave device A configuration has been proposed that enables stable operation. However, since the slave device is in a standby state in this case as well, if waveform fluctuations occur in the I2C SCL and SDA during this period, the slave device interprets the waveform fluctuations as SCL and SDA signal changes. Therefore, when the waveform fluctuation matches the I2C control signal, there is a possibility that a malfunction is caused accordingly. For example, if an I2C write sequence is erroneously detected, the states of SCL and SDA are taken as data into the slave device, and erroneous writing occurs.

特開2004−258879号公報JP 2004-258879 A 特開2003−308257号公報JP 2003-308257 A

上述のように、背景技術にかかる、マスタデバイス及びスレーブデバイスが半二重通信を用いる方法においては、これらデバイスを接続するデータ線に予期せぬ波形変動が発生した場合、デバイスが誤動作する可能性があるという問題点があった。   As described above, in the method of using the half-duplex communication between the master device and the slave device according to the background art, when an unexpected waveform fluctuation occurs in the data line connecting these devices, the device may malfunction. There was a problem that there was.

本発明は、このような問題点を解決するためになされたものであり、少なくとも1つのデータ線を用いて互いに半二重通信を行う2つのデバイスを含む情報処理装置において、当該データ線に予期せぬ波形変動が発生したとしても、デバイス選択のための制御信号線の追加を必要とすることなくデバイスが誤動作する可能性を抑制できる情報処理装置、情報処理方法及び情報処理プログラムを提供することを目的とする。   The present invention has been made to solve such a problem. In an information processing apparatus including two devices that perform half-duplex communication with each other using at least one data line, the data line is expected. To provide an information processing apparatus, an information processing method, and an information processing program capable of suppressing the possibility that a device malfunctions without requiring addition of a control signal line for device selection even if unexpected waveform fluctuations occur With the goal.

本発明にかかる情報処理装置は、第1の制御部と、前記第1の制御部との間で、少なくとも1つのデータ線を用いて半二重通信を行う第2の制御部とを有し、前記第2の制御部は、前記通信が中断される場合に、前記第1の制御部からの制御に応答して、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するものである。   An information processing apparatus according to the present invention includes a first control unit and a second control unit that performs half-duplex communication using at least one data line between the first control unit and the first control unit. In the output mode in which the second control unit transmits data to the data line but does not receive data in response to control from the first control unit when the communication is interrupted. It will stop.

本発明にかかる情報処理方法は、通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御するものである。   In the information processing method according to the present invention, when half-duplex communication performed using at least one data line with the communication destination control unit is interrupted, data is transmitted to the data line but received. The communication destination control unit is controlled to stop in an output mode in which no communication is performed.

また、本発明にかかる情報処理プログラムは、所定の動作をコンピュータに実行させるためのプログラムであって、通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御する処理をコンピュータに実行させるものである。   An information processing program according to the present invention is a program for causing a computer to execute a predetermined operation, and interrupts half-duplex communication performed using at least one data line with a communication destination control unit. In this case, the computer is caused to execute processing for controlling the communication destination control unit so as to stop in the output mode in which data is transmitted to the data line but not received.

本発明により、少なくとも1つのデータ線を用いて互いに半二重通信を行う2つのデバイスを含む情報処理装置において、当該データ線に予期せぬ波形変動が発生したとしても、デバイス選択のための制御信号線の追加を必要とすることなくデバイスが誤動作する可能性を抑制できる情報処理装置、情報処理方法及び情報処理プログラムを提供することができる。   According to the present invention, in an information processing apparatus including two devices that perform half-duplex communication with each other using at least one data line, even if an unexpected waveform variation occurs in the data line, control for device selection is performed. It is possible to provide an information processing apparatus, an information processing method, and an information processing program that can suppress the possibility that a device malfunctions without requiring addition of a signal line.

本発明の実施の形態1にかかる情報処理装置の構成を示す図である。It is a figure which shows the structure of the information processing apparatus concerning Embodiment 1 of this invention. 本発明の実施の形態2にかかる情報処理装置の構成を示す図である。It is a figure which shows the structure of the information processing apparatus concerning Embodiment 2 of this invention. 本発明の実施の形態2にかかる情報処理装置の動作を示す図である。It is a figure which shows operation | movement of the information processing apparatus concerning Embodiment 2 of this invention. 本発明の実施の形態2にかかる情報処理装置の動作を示す図である。It is a figure which shows operation | movement of the information processing apparatus concerning Embodiment 2 of this invention. 本発明の実施の形態2にかかる情報処理装置の処理フローを示す図である。It is a figure which shows the processing flow of the information processing apparatus concerning Embodiment 2 of this invention. 本発明の実施の形態2にかかる情報処理装置の処理フローを示す図である。It is a figure which shows the processing flow of the information processing apparatus concerning Embodiment 2 of this invention. 本発明の実施の形態3にかかる情報処理装置の処理フローを示す図である。It is a figure which shows the processing flow of the information processing apparatus concerning Embodiment 3 of this invention. 本発明の実施の形態3にかかる情報処理装置の処理フローを示す図である。It is a figure which shows the processing flow of the information processing apparatus concerning Embodiment 3 of this invention.

以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。   Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings.

実施の形態1
まず、図1を用いて、本発明の実施の形態1にかかる情報処理装置1000の基本的構成について説明する。
Embodiment 1
First, the basic configuration of the information processing apparatus 1000 according to the first embodiment of the present invention will be described with reference to FIG.

第1の制御部101及び第2の制御部201は、データ線300を介して相互に接続されている。第1の制御部101及び第2の制御部201は、データ線300を用いて半二重通信を行う。第1の制御部101は、データ線300を用いた半二重通信を中断する場合に、第2の制御部201を制御する。第2の制御部201は、データ線300を用いた半二重通信が第1の制御部101によって中断される場合に、第1の制御部101からの制御に応答して、データ線301へのデータの送信を行うが受信を行わない出力モードで停止する。データ線301へのデータの送信を行うが受信を行わない出力モードは、つまり、半二重通信における送信を行う動作モードである。   The first control unit 101 and the second control unit 201 are connected to each other via the data line 300. The first control unit 101 and the second control unit 201 perform half-duplex communication using the data line 300. The first control unit 101 controls the second control unit 201 when interrupting half-duplex communication using the data line 300. The second control unit 201 responds to the control from the first control unit 101 when the half-duplex communication using the data line 300 is interrupted by the first control unit 101, and transfers to the data line 301. It stops in the output mode that sends data but does not receive data. The output mode in which data is transmitted to the data line 301 but not received is an operation mode in which transmission is performed in half-duplex communication.

上述したように、本実施の形態は、第1の制御部101及び第2の制御部201の間の半二重通信が中断する場合に、第2の制御部201が出力モード(半二重通信における送信を行う動作モード)に維持される。これにより、半二重通信が中断されているときに、システム設計上意図しないデータ線300の波形変動が生じた場合にも、第2の制御部201は送信モードであるから、第2の制御部201がデータ線300から誤ってデータを取込むことがない。   As described above, in the present embodiment, when the half-duplex communication between the first control unit 101 and the second control unit 201 is interrupted, the second control unit 201 operates in the output mode (half-duplex). Operation mode for transmission in communication). As a result, when the half-duplex communication is interrupted and the waveform fluctuation of the data line 300 unintended in system design occurs, the second control unit 201 is in the transmission mode. The unit 201 does not erroneously fetch data from the data line 300.

また、本実施の形態においては、デバイス選択のための制御信号線(e.g. ライトイプロテクト信号及びチップセレクト信号など)を第1の制御部101と第2の制御部201の間に追加することを必要としない。従って、本実施の形態は、第2の制御部201に対しては特別の改造や機能変更を必要としない。   In this embodiment, a control signal line for device selection (eg, write-in protect signal and chip select signal) is added between the first control unit 101 and the second control unit 201. do not need. Therefore, this embodiment does not require any special modification or function change for the second control unit 201.

実施の形態2
本実施の形態では、上述した実施の形態1をI2Cインタフェースによって半二重通信を行う情報処理装置に適用する場合について詳細に説明する。図2を用いて、本発明の実施の形態2にかかる情報処理装置の具体的な構成例について説明する。
Embodiment 2
In the present embodiment, the case where the above-described first embodiment is applied to an information processing apparatus that performs half-duplex communication using an I2C interface will be described in detail. A specific configuration example of the information processing apparatus according to the second exemplary embodiment of the present invention will be described with reference to FIG.

第1の制御部としてのマスタデバイス100及び第2の制御部としてのスレーブデバイス200は、いずれもI2Cインタフェースを備えた電子デバイスである。マスタデバイス100及びスレーブデバイス200は、データ線300により相互に接続されている。データ線300は、シリアルクロック線SCL301及びシリアルデータ線SDA302を含んでおり、I2Cによるデータ伝送を行うことができる。   The master device 100 as the first control unit and the slave device 200 as the second control unit are both electronic devices having an I2C interface. The master device 100 and the slave device 200 are connected to each other by a data line 300. The data line 300 includes a serial clock line SCL301 and a serial data line SDA302, and can perform data transmission by I2C.

I2Cとは、シリアルクロック線SCL301及びシリアルデータ線SDA302を用いる半二重双方向通信方式である。SCL301はクロック信号を伝送するバスである。マスタデバイス100及びスレーブデバイス200は、このクロック信号が示すタイミングに従ってデータ通信を行う。SDA302はデータ信号及び制御信号を伝送するためのバスである。マスタデバイス100及びスレーブデバイス200は、SDA302に対し交互にデータを出力することによって半二重双方向通信を行う。   I2C is a half-duplex bidirectional communication method using a serial clock line SCL301 and a serial data line SDA302. The SCL 301 is a bus that transmits a clock signal. The master device 100 and the slave device 200 perform data communication according to the timing indicated by the clock signal. The SDA 302 is a bus for transmitting data signals and control signals. Master device 100 and slave device 200 perform half-duplex bidirectional communication by alternately outputting data to SDA 302.

マスタデバイス100は、I2C制御部101、メモリ部102及びCPU103を有している。典型的には、I2C制御部101、メモリ部102及びCPU103はいずれもハードウェアによって構成される。I2C制御部101は、SCL301及びSDA302を制御することでI2Cによるデータ伝送を行う装置である。CPU103は、制御プログラムに基づいて各種処理を実行する中央制御装置であり、I2C制御部101に対してI2C開始命令を送出することにより、I2C制御部101にI2Cによるデータ伝送を開始させることができる。メモリ部102は、I2Cによるデータ伝送で使用するデータを格納する記憶装置である。データ送信の際、I2C制御部101はメモリ部102より伝送データを取出しSDA302を用いて伝送する。データ受信の際は、I2C制御部101はスレーブデバイスからの伝送データをSDA302より受信しメモリ部103へ格納する。   The master device 100 includes an I2C control unit 101, a memory unit 102, and a CPU 103. Typically, the I2C control unit 101, the memory unit 102, and the CPU 103 are all configured by hardware. The I2C control unit 101 is a device that performs I2C data transmission by controlling the SCL 301 and the SDA 302. The CPU 103 is a central control device that executes various processes based on a control program. By sending an I2C start command to the I2C control unit 101, the I2C control unit 101 can start data transmission by I2C. . The memory unit 102 is a storage device that stores data used in I2C data transmission. At the time of data transmission, the I2C control unit 101 extracts transmission data from the memory unit 102 and transmits it using the SDA 302. When receiving data, the I2C control unit 101 receives transmission data from the slave device from the SDA 302 and stores it in the memory unit 103.

スレーブデバイス200は、I2C制御部201、メモリ部102及びデバイス機能部203を有している。I2C制御部201及びメモリ部102は、マスタデバイス100と同様のものである。デバイス機能部203はI2Cとは独立して動作し、デバイス特有の機能を実現することができる装置である。なお、スレーブデバイス200においては、I2C制御部201に対して命令を出す機能ブロック(マスタデバイス100のCPU103に相当)は存在しない。したがって、I2C制御部201が能動的にI2Cによるデータ伝送を開始することはない。I2C制御部201は、マスタデバイス100のI2C制御部101から、SCL301及びSDA302を介してI2Cデータ伝送を開始すべき旨の制御信号を受信したときに、データ伝送を開始する。   The slave device 200 includes an I2C control unit 201, a memory unit 102, and a device function unit 203. The I2C control unit 201 and the memory unit 102 are the same as the master device 100. The device function unit 203 is an apparatus that operates independently of the I2C and can realize device-specific functions. In the slave device 200, there is no functional block (corresponding to the CPU 103 of the master device 100) that issues a command to the I2C control unit 201. Therefore, the I2C control unit 201 does not actively start data transmission by I2C. The I2C control unit 201 starts data transmission when receiving a control signal indicating that I2C data transmission should be started via the SCL 301 and SDA 302 from the I2C control unit 101 of the master device 100.

ここで、I2C制御部101及び201間でデータ伝送を行う方法ついて説明する。
I2C制御部101及び201は、SDA302を用いて半二重方式によるデータ伝送を行う。半二重方式とは、同時に双方からデータを送信することはできず、送信側と受信側とが所定の方法で送信順序を決定し、交互にデータを送信することにより半二重双方向通信を行う方式である。I2C制御部101及び201は、SDA302へ交互にデータを出力することによって、半二重双方向通信を行う。SDA302へデータ出力を行わないとき、I2C制御部101及び201は、SDA302を監視して信号の入力に備える。一方、SDA302へデータ出力を行っているとき、I2C制御部101及び201は、SDA302の監視を行わない。すなわち、I2Cインタフェースを備えるデバイスは、データ出力中であれば、たとえSDA302に波形変動が生じたとしても、SDA302上の信号を内部へデータとして取込むことはない。
Here, a method for performing data transmission between the I2C control units 101 and 201 will be described.
The I2C control units 101 and 201 perform data transmission by the half duplex method using the SDA 302. The half-duplex method cannot transmit data from both sides at the same time, and the sending side and the receiving side determine the sending order by a predetermined method, and send data alternately to send half-duplex bidirectional communication. It is a method to perform. The I2C control units 101 and 201 perform half-duplex bidirectional communication by alternately outputting data to the SDA 302. When data is not output to the SDA 302, the I2C control units 101 and 201 monitor the SDA 302 and prepare for signal input. On the other hand, when outputting data to the SDA 302, the I2C control units 101 and 201 do not monitor the SDA 302. In other words, if the device having the I2C interface is outputting data, the signal on the SDA 302 is not taken in as data even if a waveform fluctuation occurs in the SDA 302.

また、I2C制御部101及び201は常に、SCL301上を流れるクロック信号が示すタイミングに従ってデータ伝送を行う。マスタデバイス100のI2C制御部101が、クロック信号を生成してSCL301に送出する。スレーブデバイス200のI2C制御部201は、クロック信号を生成することはなく、SCL301を介してマスタデバイス100のクロック信号を受信するのみである。もしI2C制御部101がクロック信号の送出を停止した場合、データ通信は中断することになる。すなわち、I2C制御部101及び102は、SDA302に対するデータの入出力制御を停止する。もしクロック信号が再開すれば、I2C制御部101及び102は、中断された個所からデータ伝送を再開する。一般に、I2Cにおいてデータ伝送が中断される事態は考えにくいが、本発明においては、CPU103がI2C制御部101に中断命令を出すことにより、I2C制御部101がデータ伝送を中断することを可能としている。   Further, the I2C control units 101 and 201 always perform data transmission according to the timing indicated by the clock signal flowing on the SCL 301. The I2C control unit 101 of the master device 100 generates a clock signal and sends it to the SCL 301. The I2C control unit 201 of the slave device 200 does not generate a clock signal, but only receives the clock signal of the master device 100 via the SCL 301. If the I2C control unit 101 stops sending the clock signal, the data communication is interrupted. That is, the I2C control units 101 and 102 stop data input / output control with respect to the SDA 302. If the clock signal is resumed, the I2C control units 101 and 102 resume data transmission from the interrupted location. In general, it is unlikely that data transmission is interrupted in I2C, but in the present invention, the CPU 103 issues an interruption command to the I2C control unit 101, thereby enabling the I2C control unit 101 to interrupt data transmission. .

つづいて、図3を用いて、I2C制御部101及び201が、I2Cの通信方式に従ってデータ伝送を行う手順について具体的に説明する。図3は、SCL301及びSDA302上の信号の状態を示したチャートである。   Next, the procedure in which the I2C control units 101 and 201 perform data transmission according to the I2C communication method will be described in detail with reference to FIG. FIG. 3 is a chart showing the state of signals on SCL 301 and SDA 302.

I2C制御部101又は201は、SCL301及びSDA302の電圧状態をHigh又はLowのいずれかの状態に変化させることにより、通信相手に1ビットの情報を伝送することができる。SCL301及びSDA302は、どのデバイスからも制御されていないときは、High状態に保たれる(待機状態)。   The I2C control unit 101 or 201 can transmit 1-bit information to the communication partner by changing the voltage state of the SCL 301 and the SDA 302 to either a high state or a low state. The SCL 301 and the SDA 302 are kept in a high state (standby state) when not controlled by any device.

マスタデバイス100のI2C制御部101は、データ伝送を開始する際、START CONDITION(STAT)信号をSDA302に送出する。具体的には、I2C制御部101は、SCL301にクロック信号が送出されている状態のもとで、SDA302の電圧をHighからLowへ変化させる(STAT)。続いて、I2C制御部101は、ADDRESS及びCOMMANDをSDA302に送出する。ここでADDRESSとは、通信相手となるスレーブデバイス200を識別するために使用されるビット列である。COMMANDとは、スレーブデバイス200のI2C制御部201に対し、この通信がリードアクセス(読込み)又はライトアクセス(書込み)のいずれを要求するものであるかを通知するためのビットである。具体的には、Highの場合はリード、Lowの場合はライトであることを示す。   The I2C control unit 101 of the master device 100 sends a START CONDITION (STAT) signal to the SDA 302 when starting data transmission. Specifically, the I2C control unit 101 changes the voltage of the SDA 302 from High to Low under the state where the clock signal is transmitted to the SCL 301 (STAT). Subsequently, the I2C control unit 101 sends ADDRESS and COMMAND to the SDA 302. Here, ADDRESS is a bit string used to identify the slave device 200 that is a communication partner. The COMMAND is a bit for notifying the I2C control unit 201 of the slave device 200 whether this communication requires read access (read) or write access (write). Specifically, it indicates that the read is high and the write is low.

スレーブデバイス200のI2C制御部201は、SCL301及びSDA302を監視し、STATを検出すると、マスタデバイス100のI2C制御部101がI2Cデータ伝送を開始したことを認識する。また、スレーブデバイス200は、STATに続けて伝送されてくるADDRESSが自身のアドレスと一致するか判定し、一致した場合は、それ以降に伝送されてくるCOMMANDに従って動作する。スレーブデバイス200のI2C制御部201は、COMMANDを受信したならば、所定のタイミングで、承認を示すACK信号をマスタデバイス100のI2C制御部101へ伝送する。具体的には、SDA302をLowへ制御する。この後、COMMANDがライトであった場合には、マスタデバイス100がスレーブデバイス200に対して書込みデータを伝送する。COMMANDがリードであった場合は、スレーブデバイス200がマスタデバイス100に対して読出しデータを伝送する。データの伝送が終了すると、データを取込む側のデバイス(ライトの場合はスレーブデバイス200、リードの場合はマスタデバイス100)が、データ受信確認を意味するACKをSDA302に送出する。   When the I2C control unit 201 of the slave device 200 monitors the SCL 301 and the SDA 302 and detects STAT, the I2C control unit 101 of the master device 100 recognizes that I2C data transmission has started. In addition, the slave device 200 determines whether the ADDRESS transmitted subsequent to the STAT matches the address of the slave device 200, and if the address matches, the slave device 200 operates according to the COMMAND transmitted thereafter. When receiving the COMMAND, the I2C control unit 201 of the slave device 200 transmits an ACK signal indicating approval to the I2C control unit 101 of the master device 100 at a predetermined timing. Specifically, the SDA 302 is controlled to Low. Thereafter, when COMMAND is a write, the master device 100 transmits write data to the slave device 200. If COMMAND is read, the slave device 200 transmits read data to the master device 100. When the data transmission is completed, the device that takes in the data (slave device 200 in the case of writing, master device 100 in the case of reading) sends ACK indicating data reception confirmation to SDA 302.

マスタデバイス100のI2C制御部101は、データの伝送が終了すると、STOP CONDITION(STOP)信号をSDA302に送出する。具体的には、I2C制御部101は、SCL301をHighに設定したうえで、SDA302をLowからHighへ変化させる(STOP)。   When the data transmission is completed, the I2C control unit 101 of the master device 100 sends a STOP CONDITION (STOP) signal to the SDA 302. Specifically, the I2C control unit 101 sets the SCL 301 to High and then changes the SDA 302 from Low to High (STOP).

スレーブデバイス200のI2C制御部201は、STOPを検出すると、待機状態となり、マスタデバイス100が次のI2Cデータ伝送を開始するのを待つ。   When detecting the STOP, the I2C control unit 201 of the slave device 200 enters a standby state and waits for the master device 100 to start the next I2C data transmission.

なお、図3においてスレーブデバイス出力期間Aとして示した期間は、スレーブデバイス200がSDA302にデータを出力している期間を示す。また、スレーブデバイス出力期間Bは、COMMANDがリードであった場合において、スレーブデバイス200がSDA302にデータを出力している期間を示す。スレーブデバイス出力期間A及びBで示した期間以外は、すべてスレーブデバイス200がSDA302のデータを内部に取込んでいる期間である。   Note that a period indicated as the slave device output period A in FIG. 3 indicates a period during which the slave device 200 outputs data to the SDA 302. The slave device output period B indicates a period during which the slave device 200 outputs data to the SDA 302 when COMMAND is read. The periods other than the periods indicated by the slave device output periods A and B are periods during which the slave device 200 takes in the data of the SDA 302 inside.

また、I2Cによるデータ伝送においては、マスタデバイス100が常にデータ伝送の開始及び終了を制御する。また、データ伝送は常にマスタデバイス100が制御するクロックバスSCL301が示すタイミングにより行われる。このように、スレーブデバイス200は、SCL301及びSDA302からの入力信号に依存して動作している。   In the data transmission by I2C, the master device 100 always controls the start and end of data transmission. Data transmission is always performed at the timing indicated by the clock bus SCL301 controlled by the master device 100. As described above, the slave device 200 operates depending on the input signals from the SCL 301 and the SDA 302.

このように、スレーブデバイス200は、SCL301及びSDA302からの入力信号により挙動が影響されやすいという性質を持つ。そこで、本実施の形態では、SCL301及びSDA302に予期しない波形変動が生じた場合であっても、それに影響されないスレーブデバイス200の制御方法を提案する。   Thus, the slave device 200 has a property that its behavior is easily influenced by the input signals from the SCL 301 and the SDA 302. Therefore, in the present embodiment, a method for controlling the slave device 200 that is not affected by unexpected waveform fluctuations in the SCL 301 and SDA 302 is proposed.

図4を用いて、本実施の形態にかかるスレーブデバイス200の制御方法を説明する。図4は、一般的なライトシーケンス及びリードシーケンスと、本実施の形態にかかるリードシーケンスとを模式化し、比較したものである。(1)は、マスタデバイス100がスレーブデバイス200にデータを書込む、一般的なライトシーケンスである。(2)は、マスタデバイス100がスレーブデバイス200からデータを読出す、一般的なリードシーケンスである。そして(3)は、本実施の形態にかかるリードシーケンスである。各シーケンスとも、スレーブデバイス200がSDA302にデータを出力している期間を、網掛けで示している。   A method for controlling the slave device 200 according to the present embodiment will be described with reference to FIG. FIG. 4 schematically shows a comparison between a general write sequence and read sequence and a read sequence according to the present embodiment. (1) is a general write sequence in which the master device 100 writes data to the slave device 200. (2) is a general read sequence in which the master device 100 reads data from the slave device 200. (3) is a read sequence according to the present embodiment. In each sequence, the period during which the slave device 200 outputs data to the SDA 302 is indicated by shading.

(1)のライトシーケンスでは、スレーブデバイス200は、ライトコマンド受付け後のACK応答期間及びライトデータ受付け後のACK応答期間に、SDA302にデータを出力する。   In the write sequence (1), the slave device 200 outputs data to the SDA 302 during the ACK response period after the write command is received and the ACK response period after the write data is received.

また、(2)のリードシーケンスにおいては、スレーブデバイス200は、リードコマンド受付け後のACK応答期間及びその後のリードデータ伝送期間に、SDA302にデータを出力する。   In the read sequence of (2), the slave device 200 outputs data to the SDA 302 in the ACK response period after receiving the read command and the subsequent read data transmission period.

一方、(3)の本実施の形態にかかるリードシーケンスにおいては、I2C制御部101は、I2C制御部201がリードコマンドを受付けた後、SCL301の制御を停止する。先に説明したように、I2Cでのデータ伝送は、すべてマスタデバイス100がSCL301を制御することにより進行している。よって、SCL301の制御が停止している期間、I2C制御部201によるリードデータ伝送は停止する。図中の破線部は、リードデータ伝送が進行せず停止状態であることを示している。このとき、I2C制御部201はリードデータ伝送中の状態、すなわち、SDA302に対するデータ出力中の状態に保たれている。この状態のもとでは、I2C制御部201はSDA302を監視しない。すなわち、I2C制御部201は、SDA302へデータ出力を行っている間は、たとえSDA302に波形変動が生じたとしても、SDA302上の信号を内部へデータとして取込むことはない。また、SCL301に波形変動が生じ、スレーブデバイス200がそれをクロックとして誤検出した場合であっても、スレーブデバイス200はそのクロックタイミングに合わせてSDA302上にデータを出力するだけであり、デバイス内部へ誤ってデータを取込むという事態は生じない。   On the other hand, in the read sequence according to the present embodiment (3), the I2C control unit 101 stops the control of the SCL 301 after the I2C control unit 201 receives a read command. As described above, all data transmission in I2C proceeds by the master device 100 controlling the SCL 301. Therefore, the read data transmission by the I2C control unit 201 is stopped while the control of the SCL 301 is stopped. A broken line portion in the figure indicates that read data transmission does not proceed and is in a stopped state. At this time, the I2C control unit 201 is kept in a state in which read data is being transmitted, that is, a state in which data is being output to the SDA 302. Under this state, the I2C control unit 201 does not monitor the SDA 302. That is, while the data is output to the SDA 302, the I2C control unit 201 does not capture the signal on the SDA 302 as data even if a waveform fluctuation occurs in the SDA 302. Even if a waveform variation occurs in the SCL 301 and the slave device 200 erroneously detects it as a clock, the slave device 200 only outputs data on the SDA 302 in accordance with the clock timing, and the device enters the device. There is no situation of accidentally taking in data.

ここで、本実施の形態にかかるリードシーケンス(3)が利用される場面について説明する。通常、データ伝送を行っていないマスタデバイス100のI2C制御部101及びスレーブデバイス200のI2C制御部201は、入力信号の待機状態にある。すなわち、I2C制御部201は、SCL301及びSDA302の電気信号を内部に取込み監視しつづける。しかしながら、この状態ではSCL301及びSDA302の予期しない波形変動に対応できないことは、上述したとおりである。そこで、本実施の形態においては、データ伝送を行わない待機状態に入る際に、マスタデバイス100のI2C制御部101が上述のリードシーケンス(3)を実行する。これにより、スレーブデバイス200のI2C制御部201は、データ出力中の状態のまま停止する。I2C制御部201は、データ出力中は、SDA302上の信号を内部へデータとして取込まない。したがって、たとえ待機中にSCL301及びSDA302に波形変動が生じたとしても、I2C制御部201は、誤ったデータを書込むなどの誤動作を行うことがない。   Here, a scene in which the read sequence (3) according to the present embodiment is used will be described. Normally, the I2C control unit 101 of the master device 100 that is not performing data transmission and the I2C control unit 201 of the slave device 200 are in a standby state for input signals. In other words, the I2C control unit 201 continuously captures and monitors the electrical signals of the SCL 301 and SDA 302. However, as described above, the SCL 301 and the SDA 302 cannot cope with unexpected waveform fluctuations in this state. Therefore, in this embodiment, when entering a standby state in which data transmission is not performed, the I2C control unit 101 of the master device 100 executes the above-described read sequence (3). As a result, the I2C control unit 201 of the slave device 200 stops while the data is being output. The I2C control unit 201 does not capture the signal on the SDA 302 as data during data output. Therefore, even if waveform fluctuations occur in the SCL 301 and SDA 302 during standby, the I2C control unit 201 does not perform a malfunction such as writing incorrect data.

加えて、本実施の形態にかかるリードシーケンス(3)の効果が得られる期間について説明する。図4(2)によれば、スレーブデバイス200はリードシーケンスにおいて、8bitのデータを出力した後に、マスタデバイス100からのACK応答の待機状態に遷移する。例えばリードシーケンスの中断中、SCL301に8bit分(クロック8サイクル分)の変動が生じると、この状態が発生し得る。このとき、スレーブデバイス200のI2C制御部201は、SDA302の信号を内部に取込み、入力信号を監視する。そのため、この時間において、スレーブデバイス200は誤書込み防止の効果を失うようにみえる。しかし、このような場合であっても、本発明による効果は失われない。マスタデバイス100が、ACK応答として、リード継続を示す1(SDA=High)を伝送した場合には、スレーブデバイス200は再度リードシーケンスを実行することになるからである。リードシーケンスを中断する際、マスタデバイスのSCL301及びSDA302は非制御状態となり、SCL301及びSDA302はHighに保たれる。そのため、たとえリードシーケンスの中断中にSCL301に波形変動が発生してリードシーケンスが進行し、ACK応答待ちの時間に至ったとしても、スレーブデバイス200には、SDA=Highが入力される。すなわち、スレーブデバイス200は、ACK応答としてSDA=Highが入力されたときと同じ状態となる。このため、スレーブデバイス200は、リードシーケンスの継続命令がなされたものと認識し、再びリードシーケンスを実行する。したがって、SCLに波形変動が生じたケースでも、本発明による効果は継続して得られることとなる。   In addition, a period during which the effect of the read sequence (3) according to the present embodiment is obtained will be described. According to FIG. 4 (2), the slave device 200 transitions to a standby state for an ACK response from the master device 100 after outputting 8-bit data in the read sequence. For example, this state may occur when the SCL 301 changes by 8 bits (eight clock cycles) during the interruption of the read sequence. At this time, the I2C control unit 201 of the slave device 200 takes in the signal of the SDA 302 and monitors the input signal. Therefore, at this time, the slave device 200 seems to lose the effect of preventing erroneous writing. However, even in such a case, the effect of the present invention is not lost. This is because when the master device 100 transmits 1 (SDA = High) indicating read continuation as an ACK response, the slave device 200 executes the read sequence again. When the read sequence is interrupted, the SCL 301 and SDA 302 of the master device are in an uncontrolled state, and the SCL 301 and SDA 302 are kept High. Therefore, even if the waveform variation occurs in the SCL 301 during the interruption of the read sequence and the read sequence proceeds and the ACK response wait time is reached, SDA = High is input to the slave device 200. That is, the slave device 200 is in the same state as when SDA = High is input as the ACK response. For this reason, the slave device 200 recognizes that the read sequence continuation instruction has been issued, and executes the read sequence again. Therefore, the effect of the present invention can be continuously obtained even in the case where the waveform fluctuation occurs in the SCL.

つづいて、図5のフローチャートを用い、本実施の形態にかかるリードシーケンスの動作についてさらに説明する。図5は、本実施の形態におけるマスタデバイス100の動作を示すフローチャートである。   Subsequently, the operation of the read sequence according to the present embodiment will be further described with reference to the flowchart of FIG. FIG. 5 is a flowchart showing the operation of the master device 100 in the present embodiment.

はじめに、マスタデバイス100は待機状態にあるものとする(ステップS101)。マスタデバイス100は、デバイス内部でI2C開始命令を生成し、I2Cデータ伝送を開始する(ステップS102)。具体的には、CPU103が、I2C制御部101に対しI2C開始命令を出力する。I2C開始命令を受けたI2C制御部101は、SCL301及びSDA302にSTART CONDITIONを出力する(ステップS103)。つづいて、I2C制御部101は、本発明の目的である誤書き込み防止を行いたい対象となるスレーブデバイス200を指定したADDRESSをSDA302に伝送する(ステップS104)。また、I2C制御部101は、COMMANDとしてリード(SDA=High)をSDA302に伝送する(ステップS105)。これにより、マスタデバイス100はスレーブデバイス200に対してリードシーケンスの実施を指示したこととなる。   First, it is assumed that the master device 100 is in a standby state (step S101). The master device 100 generates an I2C start command inside the device and starts I2C data transmission (step S102). Specifically, the CPU 103 outputs an I2C start command to the I2C control unit 101. Upon receiving the I2C start command, the I2C control unit 101 outputs START CONTION to the SCL 301 and SDA 302 (step S103). Subsequently, the I2C control unit 101 transmits the ADDRESS specifying the slave device 200 that is the target of the erroneous writing prevention, which is the object of the present invention, to the SDA 302 (step S104). Further, the I2C control unit 101 transmits a lead (SDA = High) as COMMAND to the SDA 302 (step S105). As a result, the master device 100 instructs the slave device 200 to perform a read sequence.

スレーブデバイス200のI2C制御部201は、リードコマンドを受付けた応答としてACK(SDA=Low)をSDA302に伝送する。マスタデバイス100のI2C制御部101は、ACK応答が正常に返送されたか否かを確認する(ステップS106)。スレーブデバイス200からのACK応答が確認できた場合には、マスタデバイス100は内部でI2C中断命令を生成する(ステップS108)。具体的には、CPU103が、I2C制御部101に対しI2C中断命令を出力する。I2C中断命令を受けたI2C制御部101は、SCL301及びSDA302の制御を停止する(ステップS109)。   The I2C control unit 201 of the slave device 200 transmits ACK (SDA = Low) to the SDA 302 as a response to accepting the read command. The I2C control unit 101 of the master device 100 confirms whether or not the ACK response has been returned normally (step S106). If the ACK response from the slave device 200 is confirmed, the master device 100 internally generates an I2C interruption command (step S108). Specifically, the CPU 103 outputs an I2C interruption command to the I2C control unit 101. Receiving the I2C interruption command, the I2C control unit 101 stops the control of the SCL 301 and the SDA 302 (step S109).

このとき、スレーブデバイス200はマスタデバイス100からのリードコマンドに応じデータ伝送を行っている最中であるから、スレーブデバイス200のI2C制御部201は出力状態で停止する。この状態においては、外部要因によってSCL301及びSDA302に波形変動が生じたとしても、スレーブデバイス200がそれを伝送データとして誤検出する可能性はない。例えば、SCL301に波形変動が生じ、スレーブデバイス200がそれをクロックとして誤検出した場合であっても、スレーブデバイス200はそのクロックタイミングに合わせてSDA302上にデータを出力するだけであり、デバイス内部へ誤ってデータを取込むことはない。またSDA302に変動が生じた場合であっても、この状態のもとではI2C制御部201はSDA302を監視しないので、スレーブデバイス200には影響がない。この結果、SCL301及びSDA302のいずれに意図しない波形変動が生じたケースであっても、スレーブデバイスに対する誤書込みを防止することができる。   At this time, since the slave device 200 is in the middle of data transmission in response to the read command from the master device 100, the I2C control unit 201 of the slave device 200 stops in the output state. In this state, even if a waveform variation occurs in the SCL 301 and SDA 302 due to an external factor, there is no possibility that the slave device 200 erroneously detects it as transmission data. For example, even when a waveform variation occurs in the SCL 301 and the slave device 200 erroneously detects it as a clock, the slave device 200 only outputs data on the SDA 302 in accordance with the clock timing, and enters the device. There is no accidental data capture. Even if the SDA 302 fluctuates, the slave device 200 is not affected because the I2C control unit 201 does not monitor the SDA 302 under this state. As a result, erroneous writing to the slave device can be prevented even in the case where unintended waveform fluctuations have occurred in either SCL301 or SDA302.

つぎに、図6のフローチャートを用いて、本実施の形態にかかるリードシーケンスの実施後に、再びスレーブデバイス200を通常の待機状態(SDA302を監視する状態)に戻す方法を説明する。図6は、マスタデバイス100の動作を示すフローチャートである。   Next, a method for returning the slave device 200 to the normal standby state (a state in which the SDA 302 is monitored) after the read sequence according to the present embodiment is performed will be described using the flowchart of FIG. FIG. 6 is a flowchart showing the operation of the master device 100.

はじめに、SCL301及びSDA302は停止した状態にあるとする(ステップS201)。ここで、マスタデバイス100のI2C制御部101は、SDA301をLowとし、かつSCL302において連続的にHigh、Lowを切替えるトグル制御を行う。この制御により、I2C制御部101は、SCL302に9回以上のクロックを供給する(ステップS202)。ここで、SCL302に9回以上のクロックを供給するのは、本実施の形態では、スレーブデバイス200が8bitのリードデータをSDA302に出力した後、マスタデバイス100が1bitのACK応答をSDA302に送出することにより、リードシーケンスが終了するからである(図4(2)参照)。マスタデバイス100は、少なくとも9回のクロックを生成すれば、このACK応答までリードシーケンスを進行させることができる。その後、マスタデバイス100がSCL301及びSDA302によりSTOP CONDITIONを伝送する(ステップS203)。これにより、スレーブデバイス200及びマスタデバイス100は共に待機状態へ戻る(ステップS204)。このように、マスタデバイス100がSCL301の制御を再開することにより、スレーブデバイス200のリードシーケンスを進行させ、スレーブデバイス200のデータ伝送を終了させることが可能となる。   First, it is assumed that the SCL 301 and the SDA 302 are in a stopped state (step S201). Here, the I2C control unit 101 of the master device 100 performs toggle control in which the SDA 301 is set to Low and the SCL 302 is continuously switched between High and Low. With this control, the I2C control unit 101 supplies the SCL 302 with nine or more clocks (step S202). In this embodiment, the slave device 200 outputs the 8-bit read data to the SDA 302, and then the master device 100 sends a 1-bit ACK response to the SDA 302. This is because the read sequence is completed (see FIG. 4B). If the master device 100 generates at least nine clocks, it can advance the read sequence until this ACK response. Thereafter, the master device 100 transmits a STOP CONDITION by the SCL 301 and the SDA 302 (step S203). Thereby, both the slave device 200 and the master device 100 return to the standby state (step S204). Thus, when the master device 100 resumes the control of the SCL 301, the read sequence of the slave device 200 can be advanced, and the data transmission of the slave device 200 can be terminated.

本実施の形態においては、マスタデバイス100とスレーブデバイス200の間の半二重通信が中断する場合に、スレーブデバイス200のI2C制御部201が出力状態で状態維持される。これにより、システム設計上意図しないSCL301及びSDA302の波形変動を、スレーブデバイス200が誤ってデータとして取込むこと、すなわち誤書き込みを防止できる。   In the present embodiment, when the half-duplex communication between the master device 100 and the slave device 200 is interrupted, the I2C control unit 201 of the slave device 200 is maintained in the output state. As a result, it is possible to prevent the slave device 200 from erroneously taking in waveform fluctuations of the SCL 301 and SDA 302 that are not intended in system design, that is, erroneous writing.

また、本実施の形態においては、デバイス選択のための制御信号線(e.g. ライトイプロテクト信号及びチップセレクト信号など)をマスタデバイス100とスレーブデバイス200の間に追加することを必要としない。従って、本実施の形態は、スレーブデバイス200に対しては特別の改造や機能変更を必要とせずに、既知のI2Cインタフェースを利用して、誤書込み防止という効果を与えることができる。   Further, in the present embodiment, it is not necessary to add a control signal line (e.g. a write-in protect signal and a chip select signal) for device selection between the master device 100 and the slave device 200. Therefore, this embodiment can provide an effect of preventing erroneous writing by using a known I2C interface without requiring special modification or function change for the slave device 200.

さらに、本実施の形態においては、データ出力状態で停止したスレーブデバイス200に対する、通常状態(データ入力待ち状態)への復旧手段を備えたことにより、必要な期間だけ誤書込みを防止し、スレーブデバイス200の他の機能への影響を最小限にすることができる。   Furthermore, in this embodiment, the slave device 200 stopped in the data output state is provided with a recovery means for returning to the normal state (data input waiting state), thereby preventing erroneous writing for a necessary period. The impact on other functions of the 200 can be minimized.

実施の形態3
本発明の実施の形態では、上述した発明の実施の形態2の変形3について説明する。具体的には、本発明の実施の形態では、上述したスレーブデバイス200がタイムアウト機能を有する場合に適応した改良について説明する。
Embodiment 3
In the embodiment of the present invention, modification 3 of the above-described second embodiment of the present invention will be described. Specifically, in the embodiment of the present invention, an improvement adapted to the case where the slave device 200 described above has a timeout function will be described.

実施の形態3の基本的構成は、実施の形態2と同様である。ただし、本実施の形態のスレーブデバイス200は、タイムアウト機能を具備している。タイムアウト機能とは、典型的には、スレーブデバイス200が、I2Cデータ伝送シーケンスが一定時間以上状態遷移がないことを検出し、自動的にI2C制御部を初期化し、待機状態へ戻る機能である。I2Cインタフェースを備えたスレーブデバイスには、このようなタイムアウト機能を備えるものが少なくない。   The basic configuration of the third embodiment is the same as that of the second embodiment. However, the slave device 200 of this embodiment has a timeout function. The time-out function is typically a function in which the slave device 200 detects that the I2C data transmission sequence has no state transition for a predetermined time or longer, automatically initializes the I2C control unit, and returns to the standby state. Many slave devices having an I2C interface have such a timeout function.

スレーブデバイス200がこのようなタイムアウト機能を有している場合、マスタデバイス100がリードシーケンスの途中でSCL301及びSDA302を停止し、スレーブデバイス200のI2C制御部201を出力状態で維持したとしても、スレーブデバイス200がタイムアウトを検出してしまい、I2C制御部201を自動的に入力待ち状態に戻してしまうことがあり得る。   When the slave device 200 has such a timeout function, even if the master device 100 stops the SCL 301 and SDA 302 in the middle of the read sequence and maintains the I2C control unit 201 of the slave device 200 in the output state, the slave device 200 There is a possibility that the device 200 detects a timeout and automatically returns the I2C control unit 201 to the input waiting state.

このような場合には、マスタデバイス100内に定周期タイマを備え、実施の形態2で説明したリードシーケンス(中断あり)(図5参照)を定周期的に実行することで、スレーブデバイス200においてタイムアウトが発生しても、その後再びI2C制御部201を出力状態に維持することが可能である。   In such a case, the master device 100 is provided with a fixed-cycle timer, and the slave device 200 performs the read sequence (with interruption) described in the second embodiment (see FIG. 5) periodically. Even if a timeout occurs, the I2C control unit 201 can be maintained in the output state again thereafter.

図7に、実施の形態3にかかるリードシーケンスを実行する場合のフローチャートを示す。図7は、マスタデバイス100の動作を示すフローチャートである。   FIG. 7 shows a flowchart for executing the read sequence according to the third embodiment. FIG. 7 is a flowchart showing the operation of the master device 100.

マスタデバイス100は定周期タイマを監視し、タイマ満了を検出すると、実施の形態2に示したリードシーケンスを開始する(ステップS110)。以降、マスタデバイス100は、図5に示した実施の形態2にかかるフローと同様の処理を行う。   The master device 100 monitors the fixed-cycle timer, and when the expiration of the timer is detected, the read sequence shown in the second embodiment is started (step S110). Thereafter, the master device 100 performs processing similar to the flow according to the second embodiment illustrated in FIG.

このとき、マスタデバイス内の定周期タイマの満了時間は、スレーブデバイス200のタイムアウト検出時間よりも長い時間で任意に決めてよい。ただし、スレーブデバイス200のタイムアウト検出時間よりもわずかに長い時間とすることで、I2C制御部201を出力状態に保つ時間をより長くする効果を得ることができる。図8に、マスタデバイス100の定周期タイマの満了時間と、スレーブデバイス200が出力状態に保たれる時間との関係を示す。図8において、(1)は定周期タイマの満了時間がスレーブデバイス200のタイムアウト時間よりも十分に長いケースを示している。この場合は、スレーブデバイス200がタイムアウトにより入力待ち状態へ遷移してから、再び本実施の形態にかかる方法により出力状態が保たれるようになるまでの時間が長い。すなわち、スレーブデバイス200が入力待ち状態にある時間が長くなる。一方、(2)は定周期タイマの満了時間とスレーブデバイス200のタイムアウト時間とがほぼ等しいケースである。この場合、スレーブデバイス200が出力状態に保たれる時間が長くなる。このため、本発明の目的である、外部からの波形変動による誤書込みの防止効果を、より効果的に享受することができる。   At this time, the expiration time of the fixed period timer in the master device may be arbitrarily determined as a time longer than the timeout detection time of the slave device 200. However, by setting the time slightly longer than the timeout detection time of the slave device 200, it is possible to obtain an effect of extending the time for maintaining the I2C control unit 201 in the output state. FIG. 8 shows the relationship between the expiration time of the fixed cycle timer of the master device 100 and the time that the slave device 200 is kept in the output state. In FIG. 8, (1) shows a case where the expiration time of the fixed period timer is sufficiently longer than the timeout time of the slave device 200. In this case, it takes a long time until the output state is maintained again by the method according to the present embodiment after the slave device 200 transits to the input waiting state due to timeout. That is, the time during which the slave device 200 is waiting for input becomes longer. On the other hand, (2) is a case where the expiration time of the fixed-cycle timer and the timeout time of the slave device 200 are substantially equal. In this case, the time during which the slave device 200 is kept in the output state becomes long. For this reason, the effect of preventing erroneous writing due to waveform fluctuations from the outside, which is an object of the present invention, can be more effectively enjoyed.

本実施の形態では、スレーブデバイス200を通常状態へ復旧させるために、実施の形態2で説明した方法(図6参照)を取る必要はない。マスタデバイス100が定周期タイマを停止し、本発明のリードシーケンス(中断あり)の実行を行わなければ、スレーブデバイス200は自動的に通常状態に復旧する。   In the present embodiment, it is not necessary to adopt the method described in the second embodiment (see FIG. 6) in order to restore the slave device 200 to the normal state. If the master device 100 stops the fixed-cycle timer and does not execute the read sequence (with interruption) of the present invention, the slave device 200 automatically recovers to the normal state.

なお、マスタデバイス100は、スレーブデバイス200のタイムアウトを待たずに、自らスレーブデバイス200のI2C制御部201を通常状態に復旧させた後、再度I2C制御部201を出力状態にして停止させることとしてもよい。具体的には、マスタデバイス100は、定周期的に、実施の形態2で説明したスレーブデバイス200を通常の待機状態(SDA302を監視する状態)に戻す手順(図6参照)を実行し、つづけて、実施の形態2で説明したリードシーケンス(中断あり)(図5参照)を実行する。このとき、マスタデバイス100は、定周期タイマの満了時間をスレーブデバイス200のタイムアウト検出時間よりも短い時間に設定し、タイマ満了を検出して上述の処理を実行することが望ましい。   Note that the master device 100 may restore the I2C control unit 201 of the slave device 200 to the normal state without waiting for the slave device 200 to time out, and then stop the I2C control unit 201 again in the output state. Good. Specifically, the master device 100 periodically executes a procedure (see FIG. 6) for returning the slave device 200 described in the second embodiment to a normal standby state (a state in which the SDA 302 is monitored). Then, the read sequence (with interruption) described in the second embodiment (see FIG. 5) is executed. At this time, it is desirable that the master device 100 sets the expiration time of the fixed-cycle timer to a time shorter than the timeout detection time of the slave device 200, detects the timer expiration, and executes the above-described processing.

本実施の形態においては、定周期でのリードシーケンスを実施することで、スレーブデバイス200がタイムアウト機能を有しているケースにおいても、誤書込みの防止という効果が得ることができる。   In the present embodiment, an effect of preventing erroneous writing can be obtained even when the slave device 200 has a time-out function by performing a read sequence at a constant cycle.

なお、本発明は上述した実施の形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。   It should be noted that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention.

例えば、上述の実施の形態では、ハードウェアの構成として説明したが、これに限定されるものではなく、任意の処理を、CPU(Central Processing Unit)にコンピュータプログラムを実行させることにより実現することも可能である。この場合、コンピュータプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non−transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(random access memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。   For example, in the above-described embodiment, the hardware configuration has been described. However, the present invention is not limited to this, and any processing may be realized by causing a CPU (Central Processing Unit) to execute a computer program. Is possible. In this case, the computer program can be stored and provided to the computer using various types of non-transitory computer readable media. Non-transitory computer readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)). The program may also be supplied to the computer by various types of transitory computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.

また、本発明にかかる情報処理装置は、必ずしも1つの筐体に実装されたものである必要はない。例えば、第1の制御部と第2の制御部とは離隔した装置に実装され、データバスやネットワーク回線等のデータ線を介して相互に接続されたものであってよい。   In addition, the information processing apparatus according to the present invention does not necessarily have to be mounted on one housing. For example, the first control unit and the second control unit may be mounted on separate devices and connected to each other via a data line such as a data bus or a network line.

上記実施の形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。   A part or all of the above embodiment can be described as in the following supplementary notes, but is not limited thereto.

(付記1)
第1の制御部と、
前記第1の制御部との間で、少なくとも1つのデータ線を用いて半二重通信を行う第2の制御部とを有し、
前記第2の制御部は、前記通信が中断される場合に、前記第1の制御部からの制御に応答して、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止する
情報処理装置。
(Appendix 1)
A first control unit;
A second controller that performs half-duplex communication with the first controller using at least one data line;
When the communication is interrupted, the second control unit responds to the control from the first control unit and transmits data to the data line but stops in an output mode in which no reception is performed. Information processing device.

(付記2)
前記第1の制御部は、前記通信を中断する場合に、前記第2の制御部を前記出力モードとした後、前記第2の制御部に供給される動作クロックを停止することにより、前記第2の制御部を停止させる
付記1記載の情報処理装置。
(Appendix 2)
When the first control unit interrupts the communication, the first control unit sets the second control unit to the output mode, and then stops the operation clock supplied to the second control unit. The information processing apparatus according to appendix 1, wherein the control unit 2 is stopped.

(付記3)
前記第2の制御部は、前記通信が再開される場合に、前記第1の制御部からの制御に応答して、前記データの受信を行うが送信を行わない待機モードに遷移する
付記1乃至2いずれか1項記載の情報処理装置。
(Appendix 3)
When the communication is resumed, the second control unit makes a transition to a standby mode in which the data is received but not transmitted in response to the control from the first control unit. The information processing apparatus according to any one of 2 above.

(付記4)
前記第1の制御部は、前記通信を再開する場合に、前記第2の制御部への動作クロックの供給を再開すると共に、前記第2の制御部を前記待機モードに遷移させる
付記1乃至3いずれか1項記載の情報処理装置。
(Appendix 4)
When the first control unit resumes the communication, the first control unit resumes the operation clock supply to the second control unit, and causes the second control unit to transition to the standby mode. The information processing apparatus according to any one of claims.

(付記5)
前記第2の制御部は、前記データ線によるデータの送受信が所定の時間中断した場合、前記待機モードに遷移するタイムアウト機能を有し、
前記第1の制御部は、一定時間毎に、前記第2の制御部を前記出力モードで停止させる処理を行う
付記1乃至4いずれか一項記載の情報処理装置。
(Appendix 5)
The second control unit has a time-out function for transitioning to the standby mode when transmission / reception of data through the data line is interrupted for a predetermined time,
The information processing apparatus according to any one of claims 1 to 4, wherein the first control unit performs a process of stopping the second control unit in the output mode at regular intervals.

(付記6)
前記第1の制御部は、前記タイムアウトが発生する毎に、前記第2の制御部を前記出力モードで停止させる処理を行う
付記5記載の情報処理装置。
(Appendix 6)
The information processing apparatus according to claim 5, wherein the first control unit performs a process of stopping the second control unit in the output mode each time the timeout occurs.

(付記7)
前記第1の制御部は、前記タイムアウトが発生する前に、前記第2の制御部を前記待機モードに遷移させる処理と、前記第2の制御部を前記出力モードで停止させる処理とを行う
付記5記載の情報処理装置。
(Appendix 7)
The first control unit performs a process of causing the second control unit to transition to the standby mode and a process of stopping the second control unit in the output mode before the timeout occurs. 5. The information processing apparatus according to 5.

(付記8)
通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御する
情報処理方法。
(Appendix 8)
When half-duplex communication performed using at least one data line with the communication destination control unit is interrupted, the transmission is performed in the output mode in which data is transmitted to the data line but not received. An information processing method for controlling the communication destination control unit.

(付記9)
前記通信を中断する場合に、前記通信先制御部を前記出力モードとした後、前記通信先制御部に供給される動作クロックを停止することにより、前記通信先制御部を停止させる
付記8記載の情報処理方法。
(Appendix 9)
9. The communication destination control unit is stopped by stopping an operation clock supplied to the communication destination control unit after the communication destination control unit is set to the output mode when the communication is interrupted. Information processing method.

(付記10)
前記通信が再開される場合に、前記データの受信を行うが送信を行わない待機モードに遷移するよう前記通信先制御部を制御する
付記8乃至9いずれか1項記載の情報処理方法。
(Appendix 10)
The information processing method according to any one of claims 8 to 9, wherein when the communication is resumed, the communication destination control unit is controlled to shift to a standby mode in which the data is received but not transmitted.

(付記11)
前記通信を再開する場合に、前記通信先制御部への動作クロックの供給を再開すると共に、前記通信先制御部を前記待機モードに遷移させる
付記8乃至10いずれか1項記載の情報処理方法。
(Appendix 11)
The information processing method according to any one of claims 8 to 10, wherein when the communication is resumed, supply of an operation clock to the communication destination control unit is resumed and the communication destination control unit is changed to the standby mode.

(付記12)
前記通信先制御部が、前記データ線によるデータの送受信が所定の時間中断した場合、前記待機モードに遷移するタイムアウト機能を有する場合は、
前記前記通信先制御部を一定時間毎に前記出力モードで停止させる
付記8乃至11いずれか一項記載の情報処理方法。
(Appendix 12)
When the communication destination control unit has a time-out function to transition to the standby mode when data transmission / reception via the data line is interrupted for a predetermined time,
The information processing method according to any one of claims 8 to 11, wherein the communication destination control unit is stopped in the output mode at regular intervals.

(付記13)
前記タイムアウトが発生する毎に、前記通信先制御部を前記出力モードで停止させる
付記12記載の情報処理方法。
(Appendix 13)
The information processing method according to claim 12, wherein the communication destination control unit is stopped in the output mode every time the timeout occurs.

(付記14)
前記タイムアウトが発生する前に、前記通信先制御部を前記待機モードに遷移させ、前記通信先制御部を前記出力モードで停止させる
付記12記載の情報処理方法。
(Appendix 14)
The information processing method according to claim 12, wherein the communication destination control unit is shifted to the standby mode and the communication destination control unit is stopped in the output mode before the timeout occurs.

(付記15)
所定の動作をコンピュータに実行させるためのプログラムであって、
通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御する処理をコンピュータに実行させる
情報処理プログラム。
(Appendix 15)
A program for causing a computer to execute a predetermined operation,
When half-duplex communication performed using at least one data line with the communication destination control unit is interrupted, the transmission is performed in the output mode in which data is transmitted to the data line but not received. An information processing program for causing a computer to execute processing for controlling the communication destination control unit.

(付記16)
前記通信を中断する場合に、前記通信先制御部を前記出力モードとした後、前記通信先制御部に供給される動作クロックを停止することにより、前記通信先制御部を停止させる処理をコンピュータに実行させる
付記15記載の情報処理プログラム。
(Appendix 16)
In the case of interrupting the communication, after the communication destination control unit is set to the output mode, a process for stopping the communication destination control unit by stopping the operation clock supplied to the communication destination control unit is performed on the computer. The information processing program according to attachment 15 is executed.

(付記17)
前記通信が再開される場合に、前記データの受信を行うが送信を行わない待機モードに遷移するよう前記通信先制御部を制御する処理をコンピュータに実行させる
付記15乃至16いずれか1項記載の情報処理プログラム。
(Appendix 17)
17. The computer according to claim 15, wherein, when the communication is resumed, causes the computer to execute a process of controlling the communication destination control unit so as to shift to a standby mode in which the data is received but not transmitted. Information processing program.

(付記18)
前記通信を再開する場合に、前記通信先制御部への動作クロックの供給を再開すると共に、前記通信先制御部を前記待機モードに遷移させる処理をコンピュータに実行させる
付記15乃至17いずれか1項記載の情報処理プログラム。
(Appendix 18)
When restarting the communication, the supply of the operation clock to the communication destination control unit is restarted, and a process for causing the communication destination control unit to transition to the standby mode is executed by the computer. The information processing program described.

(付記19)
前記通信先制御部が、前記データ線によるデータの送受信が所定の時間中断した場合、前記待機モードに遷移するタイムアウト機能を有する場合は、
前記前記通信先制御部を一定時間毎に前記出力モードで停止させる処理をコンピュータに実行させる
付記15乃至18いずれか一項記載の情報処理プログラム。
(Appendix 19)
When the communication destination control unit has a time-out function to transition to the standby mode when data transmission / reception via the data line is interrupted for a predetermined time,
The information processing program according to any one of claims 15 to 18, which causes a computer to execute a process of stopping the communication destination control unit in the output mode at regular intervals.

(付記20)
前記タイムアウトが発生する毎に、前記通信先制御部を前記出力モードで停止させる処理をコンピュータに実行させる
付記19記載の情報処理プログラム。
(Appendix 20)
The information processing program according to claim 19, further causing the computer to execute a process of stopping the communication destination control unit in the output mode each time the timeout occurs.

(付記21)
前記タイムアウトが発生する前に、前記通信先制御部を前記待機モードに遷移させ、前記通信先制御部を前記出力モードで停止させる処理をコンピュータに実行させる
付記19記載の情報処理プログラム。
(Appendix 21)
The information processing program according to claim 19, further comprising: causing the computer to execute a process of causing the communication destination control unit to transition to the standby mode and stopping the communication destination control unit in the output mode before the timeout occurs.

1000 情報処理装置
100 マスタデバイス
101 I2C制御部
102 メモリ部
103 CPU
200 スレーブデバイス
201 I2C制御部
202 メモリ部
203 デバイス機能部
300 データ線
301 SCL
302 SDA
1000 Information processing apparatus 100 Master device 101 I2C control unit 102 Memory unit 103 CPU
200 Slave Device 201 I2C Control Unit 202 Memory Unit 203 Device Function Unit 300 Data Line 301 SCL
302 SDA

Claims (10)

第2の制御部を制御して前記第2の制御部と通信する第1の制御部と、
前記第1の制御部の制御に従って前記第1の制御部との間で、少なくとも1つのデータ線を用いて半二重通信を行う第2の制御部とを有し、
前記第2の制御部は、前記通信が中断される場合に、前記第1の制御部からの制御に応答して、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止し、
前記第1の制御部は、前記通信を中断する場合に、前記第2の制御部を前記出力モードとした後、前記第2の制御部に供給される動作クロックを停止することにより、前記第2の制御部を停止させる、
情報処理装置。
A first control unit that controls a second control unit to communicate with the second control unit;
A second control unit that performs half-duplex communication with at least one data line with the first control unit according to the control of the first control unit;
When the communication is interrupted, the second control unit responds to the control from the first control unit and transmits data to the data line but stops in an output mode in which no reception is performed. And
When the first control unit interrupts the communication, the first control unit sets the second control unit to the output mode, and then stops the operation clock supplied to the second control unit. 2 control unit is stopped,
Information processing device.
前記第2の制御部は、前記通信が再開される場合に、前記第1の制御部からの制御に応答して、前記データの受信を行うが送信を行わない待機モードに遷移する
請求項1に記載の情報処理装置。
When the communication is resumed, the second control unit makes a transition to a standby mode in which the data is received but not transmitted in response to the control from the first control unit .
The information processing apparatus according to claim 1 .
前記第1の制御部は、前記通信を再開する場合に、前記第2の制御部への動作クロックの供給を再開すると共に、前記第2の制御部を前記待機モードに遷移させる
請求項2に記載の情報処理装置。
When the first control unit resumes the communication, the first control unit resumes supplying the operation clock to the second control unit and causes the second control unit to transition to the standby mode .
The information processing apparatus according to claim 2 .
前記第2の制御部は、前記データ線によるデータの送受信が所定の時間中断した場合、前記待機モードに遷移するタイムアウト機能を有し、
前記第1の制御部は、一定時間毎に、前記第2の制御部を前記出力モードで停止させる処理を行う
請求項2又は3いずれか1項に記載の情報処理装置。
The second control unit has a time-out function for transitioning to the standby mode when transmission / reception of data through the data line is interrupted for a predetermined time,
The first control unit performs a process of stopping the second control unit in the output mode at regular intervals .
The information processing apparatus according to claim 2 .
前記第1の制御部は、前記タイムアウトが発生する毎に、前記第2の制御部を前記出力モードで停止させる処理を行う
請求項4に記載の情報処理装置。
The first control unit performs a process of stopping the second control unit in the output mode each time the timeout occurs .
The information processing apparatus according to claim 4 .
前記第1の制御部は、前記タイムアウトが発生する前に、前記第2の制御部を前記待機モードに遷移させる処理と、前記第2の制御部を前記出力モードで停止させる処理とを行う
請求項4に記載の情報処理装置。
The first control unit performs a process of causing the second control unit to transition to the standby mode and a process of stopping the second control unit in the output mode before the timeout occurs .
The information processing apparatus according to claim 4 .
通信元制御部が通信先制御部を制御して前記通信先制御部と通信し、前記通信先制御部は前記通信元制御部の制御に従って前記通信先制御部との間で通信する場合において、
前記通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、
前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御し、
前記通信先制御部を前記出力モードとした後、前記通信先制御部に供給される動作クロックを停止することにより、前記通信先制御部を停止するよう前記通信先制御部を制御する、
情報処理方法。
When the communication source control unit controls the communication destination control unit to communicate with the communication destination control unit, and the communication destination control unit communicates with the communication destination control unit according to the control of the communication source control unit,
When half-duplex communication performed using at least one data line with the communication destination control unit is interrupted,
Controlling the communication destination control unit to stop in an output mode in which data is transmitted to the data line but not received ;
After the communication destination control unit is set to the output mode, the communication destination control unit is controlled to stop the communication destination control unit by stopping an operation clock supplied to the communication destination control unit.
Information processing method.
前記通信が再開される場合に、前記データの受信を行うが送信を行わない待機モードに遷移するよう前記通信先制御部を制御する、When the communication is resumed, the communication destination control unit is controlled to shift to a standby mode in which the data is received but not transmitted.
請求項7に記載の情報処理方法。  The information processing method according to claim 7.
前記通信を再開する場合に、前記通信先制御部への動作クロックの供給を再開すると共に、前記通信先制御部を前記待機モードに遷移させる、  When resuming the communication, the supply of the operation clock to the communication destination control unit is resumed and the communication destination control unit is changed to the standby mode.
請求項8に記載の情報処理方法。  The information processing method according to claim 8.
所定の動作をコンピュータに実行させるためのプログラムであって、
通信元制御部が通信先制御部を制御して前記通信先制御部と通信し、前記通信先制御部は前記通信元制御部の制御に従って前記通信先制御部との間で通信する場合において、
前記通信先制御部との間で少なくとも1つのデータ線を用いて行われる半二重通信が中断される場合に、前記データ線へのデータの送信を行うが受信を行わない出力モードで停止するよう前記通信先制御部を制御し、
前記通信先制御部を前記出力モードとした後、前記通信先制御部に供給される動作クロックを停止することにより、前記通信先制御部を停止するよう前記通信先制御部を制御する、
処理をコンピュータに実行させる情報処理プログラム。
A program for causing a computer to execute a predetermined operation,
When the communication source control unit controls the communication destination control unit to communicate with the communication destination control unit, and the communication destination control unit communicates with the communication destination control unit according to the control of the communication source control unit,
When half-duplex communication performed using at least one data line with the communication destination control unit is interrupted, the transmission is stopped in an output mode in which data is transmitted to the data line but not received. Control the communication destination control unit ,
After the communication destination control unit is set to the output mode, the communication destination control unit is controlled to stop the communication destination control unit by stopping an operation clock supplied to the communication destination control unit.
An information processing program that causes a computer to execute processing.
JP2011056242A 2011-03-15 2011-03-15 Information processing apparatus, information processing method, and information processing program Expired - Fee Related JP5300098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011056242A JP5300098B2 (en) 2011-03-15 2011-03-15 Information processing apparatus, information processing method, and information processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011056242A JP5300098B2 (en) 2011-03-15 2011-03-15 Information processing apparatus, information processing method, and information processing program

Publications (2)

Publication Number Publication Date
JP2012195639A JP2012195639A (en) 2012-10-11
JP5300098B2 true JP5300098B2 (en) 2013-09-25

Family

ID=47087179

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011056242A Expired - Fee Related JP5300098B2 (en) 2011-03-15 2011-03-15 Information processing apparatus, information processing method, and information processing program

Country Status (1)

Country Link
JP (1) JP5300098B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106793928B (en) 2014-12-25 2018-06-29 奥林巴斯株式会社 Communication system
JP6911282B2 (en) * 2016-05-18 2021-07-28 ソニーグループ株式会社 Communication devices, communication methods, programs, and communication systems
CN112440809B (en) * 2019-08-29 2022-06-28 北京新能源汽车股份有限公司 Information generation and transmission method, server and terminal equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103177A (en) * 1992-09-18 1994-04-15 Sony Corp Reception processing method/device and bus monitoring method
JPH07297790A (en) * 1994-04-28 1995-11-10 Alps Electric Co Ltd Serial communication circuit and communication system for half-duplex communication system
JP3626741B2 (en) * 2002-04-16 2005-03-09 オリオン電機株式会社 Data transfer system
JP2005084792A (en) * 2003-09-05 2005-03-31 Alpine Electronics Inc Data communication unit
JP2005338963A (en) * 2004-05-24 2005-12-08 Sharp Corp Electronic device
JP4680128B2 (en) * 2006-05-19 2011-05-11 シャープ株式会社 Half-duplex communication device, half-duplex communication system, electronic device, communication program, and recording medium recording the communication program
JP5160100B2 (en) * 2007-02-08 2013-03-13 シャープ株式会社 Data communication malfunction prevention device, electronic apparatus, data communication malfunction prevention device control method, data communication malfunction prevention device control program, and recording medium recording the program

Also Published As

Publication number Publication date
JP2012195639A (en) 2012-10-11

Similar Documents

Publication Publication Date Title
US20190109671A1 (en) Communication device, communication method, program, and communication system
US7668995B2 (en) IIC bus communication system capable of suppressing freeze of IIC bus communication and method for controlling IIC bus communication
US9253535B2 (en) Sink device receiving an image signal from a source device and power supply method for same
US7565473B2 (en) Semiconductor integrated circuit and electronic equipment
WO2009107400A1 (en) Interface device for host device, interface device for slave device, host device, slave device, communication system and interace voltage switching method
JP2015103256A (en) System and method for detecting universal serial bus device
JP4988671B2 (en) Serial bus system and hang-up slave reset method
US10942838B2 (en) Microcontroller system with in-circuit debugger
JP5300098B2 (en) Information processing apparatus, information processing method, and information processing program
US20150253842A1 (en) Semiconductor device, and power control method for usbotg
WO2014007272A1 (en) In-car power supply apparatus
TW201911813A (en) Network Switching System
US9043617B2 (en) Device incorporating data communication function
JP3626741B2 (en) Data transfer system
US8423809B2 (en) Power consumption measuring and power transmission monitoring for data transfer
US8924614B2 (en) Host controller apparatus, information processing apparatus, and event information output method
JP2013197789A (en) Electronic apparatus and power control method therefor
JP2008288926A (en) Electronic equipment
JP6008794B2 (en) Power supply device and video display device
JP7241957B2 (en) radio equipment
JP6421578B2 (en) Power supply unit, power supply circuit, and control method for power supply circuit
JP2006331270A (en) Control method for power-on clearing action in a plurality of microcomputer
JP2005338963A (en) Electronic device
US10162398B2 (en) Method and associated apparatus for performing power management in an electronic system
JP2005339436A (en) Electronic equipment and control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130425

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130614

R150 Certificate of patent or registration of utility model

Ref document number: 5300098

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees