JP2004094914A - Data transfer controller, electronic apparatus, and power switching method - Google Patents

Data transfer controller, electronic apparatus, and power switching method Download PDF

Info

Publication number
JP2004094914A
JP2004094914A JP2003085980A JP2003085980A JP2004094914A JP 2004094914 A JP2004094914 A JP 2004094914A JP 2003085980 A JP2003085980 A JP 2003085980A JP 2003085980 A JP2003085980 A JP 2003085980A JP 2004094914 A JP2004094914 A JP 2004094914A
Authority
JP
Japan
Prior art keywords
power supply
data transfer
line
circuit
state
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.)
Withdrawn
Application number
JP2003085980A
Other languages
Japanese (ja)
Inventor
▲斎▼藤 伸之
Nobuyuki Saito
Takashi Oshita
大下 俊
Kaneaki Nagao
長尾 謙陽
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003085980A priority Critical patent/JP2004094914A/en
Publication of JP2004094914A publication Critical patent/JP2004094914A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data transfer controller which reduces unnecessary power consumption in the case of data transfer between peripheral devices of an OTG standard, for example, and to provide an electronic apparatus, and a power switching method. <P>SOLUTION: A state controller 112 of a data transfer processing circuit 110 switches the operation of a device A or a device B to make it operate as a host or a peripheral device in accordance with state transition. A power feed switch circuit 130 connects a power circuit 120 to a VBUS line on the basis of the transition of the state controller 112. A power switching circuit 142 of a power control circuit 140 connects the VBUS line or the power circuit 120 to the data transfer processing circuit 110 by a switching signal PWRSEL. The switching signal PWRSEL is generated on the basis of an output signal of a changeover switch circuit 144 or a control signal from the state controller 112. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、データ転送制御装置、電子機器及び電源切替方法に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
近年、パーソナルコンピュータと周辺機器(広義には電子機器)とを接続するためのインタフェース規格として、USB(Universal Serial Bus)規格が注目を集めている。ところが、USB規格では必ずホストが必要であり、これまで周辺機器間でUSB規格のデータ転送を行うことができなかった。そこでUSB2.0規格の追加規格として、「USB On−The−Go(OTG)1.0」規格(以下では、OTG規格と略す。)が策定され、周辺機器間でもUSB規格のデータ転送を行うことができる。
【0003】
OTG規格では、USB規格におけるデバイスとして動作するペリフェラルに、ホストとして動作するために必要なホスト機能を持たせることができる。これによって、従来のUSB規格におけるデバイスだった周辺機器同士を相互に接続することができ、従来のUSB規格におけるホストを介することなく、データ転送を行うことができる。
【0004】
そのためOTG規格では、デュアルロールデバイス(Dual−role Device)とペリフェラルオンリーデバイス(Peripheral−only Device)とが規定される。デュアルロールデバイスとなる機器は、ホストとしてもペリフェラルとしても動作することができる。またペリフェラルオンリーデバイスとなる機器は、ペリフェラルとしてのみ動作することができる。
【0005】
ところでOTG規格では、消費電力を削減するため、例えばホストとして動作中のデバイスがバスを使用しないときは電源ラインの駆動を停止することができる。そこで、例えばペリフェラルとして動作中のデバイスが未使用中のバスを使用したいときは、ホストとして動作するデバイス側に対して使用を要求するSRP(Session Request Protocol)という手順により当該バスを使用することができる。SRPでは、データラインパルシング又はVBUS(電源バス)パルシングと呼ばれる手法で、ペリフェラルとして動作するデバイスが、ホストとして動作するデバイスに対しVBUSラインに電源を供給するように要求することになる。その結果として、OTG規格に準拠したデバイスでは、上述のSRPをイニシエート(initiate)するため、セルフパワー電源であることが必要とされる。
【0006】
ここで、OTG規格に準拠したデバイス(OTGデバイス)が、USB規格に準拠した標準ホスト(例えばパーソナルコンピュータ)に接続される場合を考える。規格上、標準ホストはVBUSラインに電源を供給する必要がある。ところがOTGデバイスはセルフパワー電源であるため、標準ホストからVBUSラインに対し常に電源が供給されているにも関わらず、OTGデバイスは自己の電源からの電力を消費して動作することになり、無駄な電力を消費していたという問題があった。特に、OTGデバイスが携帯型の情報機器である場合には、バッテリの寿命が短くなってしまう。
【0007】
本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、例えばOTG規格の周辺機器同士のデータ転送を行う場合に無駄な電力消費を削減するデータ転送制御装置、電子機器及び電源切替方法を提供することにある。
【0008】
【課題を解決するための手段】
上記課題を解決するために本発明は、デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置であって、電源回路と、前記第1のデバイスとしての動作時に前記電源ラインと前記電源回路とを接続する給電スイッチ回路と、前記データラインを介してデータ転送を行うデータ転送処理回路と、所与の切替信号に基づいて、前記電源ライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路とを含むデータ転送制御装置に関係する。
【0009】
本発明においては、第1のデバイスとして動作するときは給電スイッチ回路により電源ラインに電源を供給するデータ転送制御装置において、電源切替回路により電源回路から電源ラインに切り替えてデータ転送処理回路に対して電源を供給することができる。したがって、例えば第2のデバイスとして動作するときに、電源ラインからの電源供給でデータ処理回路を動作させることができるので、電源回路の電力消費を削減することができる。
【0010】
また本発明に係るデータ転送制御装置は、前記所与の切替信号をオン又はオフにする切替スイッチ回路を含み、前記所与の切替信号は、前記切替スイッチ回路の出力に基づいて生成されてもよい。
【0011】
本発明によれば、切替スイッチ回路により適宜電源供給元を切り替えることができるのでデータ転送制御装置の消費電力の最適化を図ることができる。
【0012】
また本発明は、USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置であって、電源回路と、Aデバイスとしての動作時にVBUSラインと前記電源回路とを接続する給電スイッチ回路と、データラインを介してデータ転送を行うデータ転送処理回路と、所与の切替信号に基づいて、前記VBUSライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路とを含み、前記電源切替回路は、Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給するデータ転送制御装置に関係する。
【0013】
OTG規格に準拠したデータ転送制御装置では、セルフパワー電源であることが必要とされる。したがって例えば標準ホストによりVBUSラインに電源が供給されている場合でも、当該データ転送制御装置では自己の電源回路の電力を消費することになってしまう。
【0014】
本発明によれば、電源切替回路により、データ処理回路に対し、電源ラインから電源を供給してバスパワー電源で動作させることができるので、セルフパワー電源として搭載される電源回路の無駄な電力消費を削減することができる。またステート遷移結果により電源切替回路を動作させることができるので、特に大規模な付加回路を設けることなく電源切替の最適化を図ることができる。
【0015】
また本発明は、デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置であって、電源回路と、前記第1のデバイスとしての動作時に前記電源ラインと前記電源回路とを接続する給電スイッチ回路と、前記データラインを介してデータ転送を行うデータ転送処理回路と、前記電源ラインの電圧が第2の閾値を超えたか否かを検出する電源ライン電圧検出回路と、所与の切替信号に基づいて、前記電源ライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路とを含み、前記電源切替回路は、前記第2のデバイスとして動作し、かつ前記電源ラインの電圧が前記第2の閾値より低い第1の閾値を超えていると判断された場合に、前記電源ラインから前記データ転送処理回路に対して電源を供給し、前記電源ラインの電圧が前記第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給するデータ転送制御装置に関係する。
【0016】
また本発明は、USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置であって、Aデバイスとしての動作時にVBUSラインと前記電源回路とを接続する給電スイッチ回路と、データラインを介してデータ転送を行うデータ転送処理回路と、前記VBUSラインの電圧が第2の閾値を超えたか否かを検出する電源ライン電圧検出回路と、所与の切替信号に基づいて、前記VBUSライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路とを含み、前記電源切替回路は、Bデバイスとして動作し、かつ前記VBUSラインの電圧が前記第2の閾値より低い第1の閾値を超えていると判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給し、前記VBUSラインの電圧が前記第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給するデータ転送制御装置に関係する。
【0017】
本発明によれば、上述したようにセルフパワー電源からバスパワー電源に切り替えた後に、バスパワー電源の供給元が何らかの原因で電源を供給することができなくなった場合でも、電源ライン(VBUSライン)を監視して電源切替回路により再びセルフパワー電源に切り替えることができるので、電源切替により低消費電力化を図ったデータ転送制御装置の信頼性を向上させることができる。またOTG規格に準拠したデータ転送制御装置の低消費化と信頼性向上とを両立させることができる。
【0018】
また本発明に係るデータ転送制御装置は、前記電源回路から前記VBUSラインへの前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのアイドル状態からペリフェラル状態に遷移した後に行われ、前記VBUSラインから前記電源回路への前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのペリフェラル状態からアイドル状態に切り替わる前に行われてもよい。
【0019】
本発明によれば、Bデバイスのアイドル状態ではVBUSラインの電圧を監視するのみでよいため、ステート管理による制御の簡素化を図ることができる。
【0020】
また本発明に係るデータ転送制御装置は、前記第2の閾値は、Bデバイスのセッションバリッド閾値より高く、AデバイスのVBUSバリッド閾値より低くてもよい。
【0021】
本発明によれば、第2の閾値の設定のみで、Bデバイスのアイドル状態でVBUSの電圧を監視させることができるので、構成及び制御の簡素化を図ることができる。
【0022】
また本発明に係る電子機器は、上記いずれか記載のデータ転送制御装置と、前記データ転送処理装置及びバスを介して転送されるデータの出力処理又は取り込み処理又は記憶処理を行う装置とを含むことができる。
【0023】
本発明によれば、セルフパワー電源で動作するデータ転送制御装置を搭載する場合であっても、バスパワー電源に切り替えて無駄な電力消費を削減する電子機器を提供することができる。
【0024】
また本発明は、デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置の電源切替方法であって、前記データラインを介してデータ転送を行うデータ転送処理回路に対し、前記第1のデバイスとしての動作時に前記電源ラインに接続される電源回路から電源を供給した状態で、前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が第1の閾値を超えたか否かを判断し、前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が前記第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記電源ラインから電源を供給する電源切替方法に関係する。
【0025】
また本発明は、USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置の電源切替方法であって、前記データラインを介してデータ転送を行うデータ転送処理回路に対し、Aデバイスとしての動作時にVBUSラインに接続される前記電源回路から電源を供給した状態で、Bデバイスとして動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたか否かを判断し、Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が前記第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給する電源切替方法に関係する。
【0026】
また本発明は、デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置の電源切替方法であって、前記データラインを介してデータ転送を行うデータ転送処理回路に対し、前記第1のデバイスとしての動作時に前記電源ラインに接続される電源回路から電源を供給した状態で、前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記電源ラインから電源を供給し、前記データ転送処理回路に対し前記電源ラインから電源を供給した状態で、前記電源ラインの電圧が第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給する電源切替方法に関係する。
【0027】
また本発明は、USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置の電源切替方法であって、データラインを介してデータ転送を行うデータ転送処理回路に対し、Aデバイスとしての動作時にVBUSラインに接続される電源回路から電源を供給した状態で、Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給し、前記データ転送処理回路に対し前記VBUSラインから電源を供給した状態で、前記VBUSラインの電圧が第2の閾値を超えないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給する電源切替方法に関係する。
【0028】
また本発明に係る電源切替方法は、前記電源回路から前記VBUSラインへの前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのアイドル状態からペリフェラル状態に遷移した後に行われ、前記VBUSラインから前記電源回路への前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのペリフェラル状態からアイドル状態に切り替わる前に行われてもよい。
【0029】
また本発明に係る電源切替方法は、前記第1の閾値は、前記第2の閾値よりも低く設定されていてもよい。
【0030】
また本発明に係る電源切替方法は、前記第2の閾値は、Bデバイスのセッションバリッド閾値より高く、AデバイスのVBUSバリッド閾値より低くてもよい。
【0031】
【発明の実施の形態】
以下、本発明の好適な実施の形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成の全てが本発明の必須構成要件であるとは限らない。
【0032】
1. OTG(On−The−Go)規格
1.1 AデバイスとBデバイス
まず、OTG規格について簡単に説明する。
【0033】
USB(Universal Serial Bus)規格は、ホスト(host)(例えばパーソナルコンピュータ)と1又は複数のペリフェラル(peripheral)(例えば周辺機器)との間のデータ転送を行うための規格であり、ホスト側でデータ転送制御が行われる。その一方で、USB規格においてペリフェラルであった携帯機器等において処理するデータ量が増大し、ホストを介在させることなく、低消費電力でUSB規格のデータ転送する要求が高まっている。
【0034】
このような背景の下、OTG規格はUSB2.0規格の追加規格として策定された。OTG規格では、コネクタの小型化や、ホストとして動作するために必要なホスト機能をペリフェラルに持たせるデュアルロールデバイス等についての規格が新たに盛り込まれている。
【0035】
OTG規格によるデータ転送を行う場合、例えば図1(A)に示すように、その両端にMini−Aプラグ(plug)及びMini−Bプラグが設けられたUSBケーブルにより、ホストとペリフェラルとが接続される。Mini−Aプラグは、Mini−Aレセプタクル(receptacle)及びMini−ABレセプタクルに挿入可能な構造を有している。Mini−Bプラグは、Mini−Bレセプタクル及びMini−ABレセプタクルに挿入可能な構造を有している。デュアルロールデバイスの場合、Mini−ABレセプタクルを備えておく必要がある。
【0036】
ところで、USB規格では、VBUS(電源バス)ライン、GND(グラウンド)及び2本のデータ信号線(D+、D−)のみでホストとペリフェラルとを接続することができる。VBUSラインには、ホスト側から電源(電力。より具体的には電源電流)が供給される。データ信号線(データライン)D+、D−は、差動で用いられる。
【0037】
OTG規格では、図1(B)に示すようにMini−Aプラグが接続されたデュアルロールデバイスは、Aデバイス(A−Device)(広義には第1のデバイス)となる。Aデバイスは、セッション開始時においてホストとして動作し、所与の条件の下で、Bデバイスに対してホスト機能を譲ることができる。一方、Mini−Bプラグが接続されたデュアルロールデバイスは、Bデバイス(B−Device)(広義には第2のデバイス)となる。Bデバイスは、セッション開始時においてペリフェラルとして動作し、Aデバイスからホストとして動作することが許可される。なおVBUSラインには、Aデバイスにより電源が供給される。Aデバイスは、デフォルト状態としてセルフパワー電源によりデータ転送制御を行う。Bデバイスは、デフォルト状態としてバスパワー電源によりデータ転送制御を行う。
【0038】
デュアルロールデバイスにおいて、Mini−ABレセプタクルに挿入されたプラグの種類を判別するため、図1(C)に示すように、これまでのコネクタの端子(VBUS、D−、D+、GND)の他に、ID端子が定義されている。Mini−AプラグではID端子がGNDに接続され、Mini−BプラグではID端子がオープン状態である。
【0039】
図2に、USBケーブルが接続されたデュアルロールデバイスの例を模式的に示す。
【0040】
Mini−Aプラグが接続されたデュアルロールデバイス10と、Mini−Bプラグが接続されたデュアルロールデバイス20とは、USBケーブルを介して接続されている。デュアルロールデバイス10、20は、ID検出回路12、22を含む。ID検出回路12、22は、それぞれID端子と電気的に接続される信号線をプルアップし、該信号線の電圧に応じて、ID端子が接地されているか否かを検出する。図2におけるID検出回路12は、ID端子に接続される信号線が接地されるため、Mini−Aプラグであることを検出することができる。一方、ID検出回路22は、ID端子に接続される信号線がプルアップされるため、Mini−Bプラグであることを検出する。
【0041】
デュアルロールデバイス10では、ホスト及びペリフェラルとして動作するため、データ信号線D+をプルアップするためのプルアップ抵抗R1と、データ信号線D+をプルダウンするためのプルダウン抵抗R2とを有している。プルアップ抵抗R1は、プルアップのオン/オフを切り替えるために、スイッチ回路SW1を介して電源電圧線に接続される。プルダウン抵抗R2は、プルダウンのオン/オフを切り替えるために、スイッチ回路SW2を介して接地線に接続される。スイッチ回路SW1、SW2については、いずれか一方がオンのとき、他方がオフとなるように排他的に制御される。
【0042】
デュアルロールデバイス20も同様に、データ信号線D+をプルアップするためのプルアップ抵抗R3と、データ信号線D+をプルダウンするためのプルダウン抵抗R4とを有している。プルアップ抵抗R3は、プルアップのオン/オフを切り替えるために、スイッチ回路SW3を介して電源電圧線に接続される。プルダウン抵抗R4は、プルダウンのオン/オフを切り替えるために、スイッチ回路SW4を介して接地線に接続される。スイッチ回路SW3、SW4については、いずれか一方がオンのとき、他方がオフとなるように排他的に制御される。
【0043】
デュアルロールデバイス10、20では、データ信号線D−はプルダウンされている。
【0044】
またデュアルロールデバイス10、20は、ともにAデバイスになり得るため、VBUSラインに電流を供給する電源制御回路VBA、VBBを含む。図2では、デュアルロールデバイス10が、電源制御回路VBAによりVBUSラインに電流を供給する。
【0045】
1.2 SRP(Session Request Protocol)
OTG規格では、バス上でやり取りがないとき、AデバイスがVBUSラインへの電流供給を停止することができる。したがって、バッテリで動作する携帯機器等がホストとして動作した場合でも無駄な電力消費を削減し、低消費電力化を図ることができるようになっている。この状態でBデバイスがセッションを開始してデータ転送を行う場合、SRPと呼ばれる手順にしたがってAデバイスに対しVBUSラインへの電流供給を要求することができる。ここで、セッションとはVBUSラインの電圧が所与の閾値電圧を越えている期間をいう。
【0046】
図3に、図2に示したデュアルロールデバイスの構成を参照しながら、FSモードにおけるSRPの実行手順を説明するための図を示す。
【0047】
FSモードでは、ホスト側のデータ信号線D+はプルダウンされ(スイッチ回路SW1がオフ、スイッチ回路SW2がオン)、ペリフェラル側のデータ信号線D+はプルアップされている(スイッチ回路SW3がオン、スイッチ回路SW4がオフ)。
【0048】
バス上のやり取りがなくAデバイスがVBUSラインへの電流供給を停止すると(S10)、VBUSの電圧が下がり「Vb_sess_vld」レベル(B−Device Session Valid未満)となる(S11)。Bデバイスは、これを検出すると、スイッチ回路SW3によりデータ信号線D+のプルアップ抵抗を無効にする(S12)。これにより、データ信号線のラインステートは「SE0」状態(FSモードでは、データ信号線D+が「L」レベル、データ信号線D−が「L」レベルの状態)となる(S13)。
【0049】
VBUSの電圧が「Vb_sess_end」(B−Device Session End)より小さく、かつラインステートの「SE0」状態が2ms以上継続すると、BデバイスがSRPを開始(initiate)することができる。SRPは、データラインパルシング(Data−line Pulsing)又はVBUSパルシング(VBUS Pulsing)により行うことができる。データラインパルシングは、ラインステートを「SE0」状態、「J」状態(FSモードでは、データ信号線D+が「H」レベル、データ信号線D−が「L」レベルの状態)、「SE0」状態に遷移させる方法である。VBUSパルシングは、BデバイスからVBUSラインに電流を供給し、VBUSラインの電圧を「L」レベル(Vb_sess_end未満)、「H」レベル(Va_sess_vldより大)、「L」レベルの状態に遷移させる方法である(S14、S15)。
【0050】
Aデバイスは、データ信号線又はVBUSラインの電圧を監視して、いずれかの方法によりSRPが行われたことを検出すると、AデバイスがVBUSラインへの電流供給を開始する(S16)。これにより、VBUSラインの電圧が「Vb_sess_vld」以上となる(S17)。
【0051】
Bデバイスは、VBUSラインの電圧が「Vb_sess_end」以上になったことを検出すると、スイッチ回路SW3によりデータ信号線D+のプルアップ抵抗を有効にして(S18)、ラインステートを「J」状態に遷移させ(S19)、ペリフェラルとして動作開始する。
【0052】
Aデバイスは、ラインステートが「J」状態になったことを検出すると、ホストとして動作開始する(S20)。
【0053】
1.3 HNP(Host Negotiation Protocol)
OTG規格では、接続されたプラグによりAデバイスかBデバイスかが決まるが、そのプラグを差し替えることなく、ホスト機能とペリフェラル機能とを交換することができる。HNPは、このホスト機能とペリフェラル機能とを交換するための手順である。
【0054】
図4に、図2に示したデュアルロールデバイスの構成を参照しながら、FSモードにおけるHNPの実行手順を説明するための図を示す。
【0055】
Aデバイスがホストとして動作し、Bデバイスがペリフェラルとして動作し、HNPがイネーブルの状態であるものとする。
【0056】
Aデバイスがバスの使用を終了すると(S30)、ラインステートをアイドル状態(FSモードでは、「J」状態)にする(S31)。
【0057】
Bデバイスは、3ms以上「J」状態であることを検出すると、スイッチ回路SW3によりデータ信号線D+のプルアップ抵抗を無効にして(S32)、ラインステートを「SE0」状態にする(S33)。Aデバイスは、ラインステートが「SE0」状態であることを検出すると、スイッチ回路SW1によりデータ信号線D+のプルアップ抵抗を有効(プルダウン抵抗を無効)にする(S34)。これにより、ラインステートが「J」状態となるので(S35)、Aデバイスはペリフェラルとして動作を開始し、Bデバイスはラインステートが「J」状態であることを検出してホストとして動作を開始することができる(S36)。
【0058】
Bデバイスが、ホストとしてバスの使用を終了すると(S37)、スイッチ回路SW3、SW4によりラインステートをアイドル状態にする(S38)。Aデバイスは、これを検出するとデータ信号線D+のプルアップ抵抗を無効にして(S39)、ラインステートを「SE0」状態に遷移させる(S40)。Bデバイスは、ラインステートが「SE0」状態であることを検出すると、スイッチ回路SW3によりデータ信号線D+のプルアップ抵抗を有効(プルダウン抵抗を無効)にする(S41)。これにより、ラインステートが「J」状態となるので(S42)、Bデバイスはペリフェラルとして動作を開始し、Aデバイスはラインステートが「J」状態であることを検出してホストとして動作を開始することができる(S43)。
【0059】
このようなプロトコルによるデータ転送制御は、それぞれの状態を規定したステート間を遷移条件にしたがって遷移させることで、実現することができる。
【0060】
以下では、Aデバイス及びBデバイスのステート遷移について説明する。
【0061】
1.4 Aデバイスのステート遷移
図5に、Aデバイスのステート遷移を説明するための図を示す。
【0062】
Aデバイスは、a_idleステートが開始ステートである(ST1)。
【0063】
デュアルロールデバイスのMini−ABレセプタクルに、USBケーブルのMini−Aプラグが挿入されていないとき、プルアップされたID端子は「H」レベル(id)となるため、b_idleステートに遷移する(ST2)。すなわち、デュアルロールデバイスでは、デフォルトでBデバイスとなる。一方、Mini−Aプラグが挿入されると、ID端子が「L」レベル(id/)となるためa_idleステートとなる(ST1)。
【0064】
a_idleステートでは、VBUSへの電流供給が停止される。またデータ信号線D+のプルアップが無効化(オフ)される(プルダウンが有効化される。より具体的には、スイッチ回路SW1がオフ、スイッチ回路SW2がオン)。したがって、ラインステートは「SE0」状態となる。上位アプリケーションからVBUSラインの電圧を落とす要求がないとき(a_bus_drop/)であって、USB転送を行いたいとき(a_bus_req)又はBデバイスからのSRPを検出したとき(a_srp_det)、a_wait_vriseステートに遷移する(ST3)。
【0065】
a_wait_vriseステートでは、VBUSラインへの電流供給が開始され、VBUSラインの電圧が上がる。Mini−Aプラグが抜かれたとき(id)、上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、VBUSラインの電圧が所与の閾値電圧を越えたとき(a_vbus_vld)、又は当該ステートに規定時間以上経過したとき(a_wait_vrise_tmout)、a_wait_bconステートに遷移する(ST4)。
【0066】
a_wait_bconステートでは、Aデバイス側のデータ信号線D+のプルアップがオフとなる。このときBデバイスによりデータ信号線D+のプルアップが有効化(オン)(Bデバイスのスイッチ回路SW3がオン、スイッチ回路SW4がオフ)され、データ信号線D+が「H」レベルになったとき(ラインステートが「J」状態)(b_conn)、a_hostステートに遷移する(ST5)。なお、Mini−Aプラグが抜かれたとき(id)、上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、又は当該ステートで規定時間以上経過したとき(a_wait_bcon_tmout)、a_wait_vfallステートに遷移する(ST6)。また、何らかの原因で、VBUSラインの電圧が所与の閾値電圧を下回ったとき(a_vbus_vld/)、a_vbus_errステートに遷移する(ST7)。
【0067】
すなわちデュアルロールデバイスは、デフォルト状態ではBデバイスであるため、Aデバイスについては、a_wait_bconステートまで、データ信号線D+はプルダウンされた状態のままである。a_wait_vriseステートにおいてVBUSラインへの電流供給が開始されると、Bデバイスのプルアップがオンとなる。これにより、データ信号線D+がプルダウンされた状態であるAデバイスはホストとして動作し、データ信号線D+がプルアップされた状態であるBデバイスはペリフェラルとして動作する。
【0068】
a_hostステートでは、AデバイスがUSB規格のホストとして動作する。より具体的には、ホストとしてペリフェラルをエニュメレート(enumerate)するため、バスリセットするためのリセット信号として、「SE0」状態にデータ信号線を駆動する。そして、所与の規定時間だけその状態を継続させることにより、ペリフェラルではリセット処理が行われる。その後、ホストは、コントロール転送を用いて、コンフィギュレーション情報の転送やアドレスの割り当てなどを行い、USB転送を開始する。当該ステートにおいて、ホストになったがバスを使わなくなったとき(a_bus_req/)、又はサスペンド状態への遷移要求があるとき(a_suspend_req)、a_suspendステートに遷移する(ST8)。また、Mini−Aプラグが抜かれたとき(id)、ラインステートが「J」状態から「SE0」の状態になったとき(b_conn/)、又は上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、a_wait_bconステートに遷移する(ST9)。また、何らかの原因で、VBUSラインの電圧が所与の閾値電圧を下回ったとき(a_vbus_vld/)、a_vbus_errステートに遷移する(ST10)。
【0069】
a_suspendステートでは、SOF(Start Of Frame)パケットの送出が停止される。このとき、Bデバイスはペリフェラルとして動作しており、Bデバイスではb_peripheralステートのままである。このとき、AデバイスがBデバイスに対して上述のHNPを許可し(a_set_b_hnp_en)、Bデバイスにおいてプルアップがオフされてラインステートが「SE0」状態になると(b_conn/)、a_peripheralステートに遷移する(ST11)。また、Aデバイスがバスを使用したいとき(a_bus_req)、又はBデバイスがラインステートを「K」状態にしたとき(b_bus_resume)、a_hostステートに遷移する(ST12)。更にまたAデバイスがBデバイスに対して上述のHNPを許可せず(a_set_b_hnp_en/)、Bデバイスにおいてプルアップがオフされてラインステートが「SE0」状態になると(b_conn/)、a_wait_bconステートに遷移する(ST13)。更にまたMini−Aプラグが抜かれたとき(id)、上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、又はa_suspendステートで規定時間以上経過したとき(a_aidl_bdis_tmout)、a_wait_vfallステートに遷移する(ST14)。また、何らかの原因で、VBUSラインの電圧が所与の閾値電圧を下回ったとき(a_vbus_vld/)、a_vbus_errステートに遷移する(ST15)。
【0070】
a_peripheralステートでは、Aデバイスではプルアップをオンにし、Bデバイスでは後述するようにAデバイスからHNPのイネーブルによりBデバイス側のプルアップがオフされるため、Aデバイスがペリフェラルとなり、Bデバイスがホストになる。ホストとなったBデバイスがデータ転送を終えた場合のようにBデバイスがバスを使わないとき(b_bus_suspend)、a_wait_bconステートに遷移する(ST16)。a_wait_bconステートでは、上述したようにAデバイスのプルアップがオフされる。また、a_peripheralステートにおいて、Mini−Aプラグが抜かれたとき(id)、又は上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、a_wait_vfallステートに遷移する(ST17)。また、何らかの原因で、VBUSラインの電圧が所与の閾値電圧を下回ったとき(a_vbus_vld/)、a_vbus_errステートに遷移する(ST18)。
【0071】
a_bus_errステートでは、過電流状態となるため、例えばファームウェアによりVBUSラインの電圧を落とすように要求される。このようなステートにおいては、Mini−Aプラグが抜かれたとき(id)、又は上位アプリケーションからVBUSラインの電圧を落とす要求があったとき(a_bus_drop)、a_wait_vfallステートに遷移する(ST19)。
【0072】
a_wait_vfallステートでは、VBUSラインへの電流供給が停止される。Mini−Aプラグが抜かれたとき(id)、バスを使いたいとき(a_bus_req)、又はVBUSラインの電圧が所与の閾値電圧を下回った状態で(a_sess_vld/)Bデバイスにおいてプルアップがオフされてラインステートが「SE0」状態になると(b_conn/)、a_idleステートに遷移する(ST20)。
【0073】
1.5 Bデバイスのステート遷移
図6に、Bデバイスのステート遷移を説明するための図を示す。
【0074】
Bデバイスは、b_idleステートが開始ステートである(ST30)。
【0075】
b_idleステートでは、VBUSラインへの電流供給は停止される。したがって、VBUSラインの電圧は、所与の閾値電圧を下回る。またデータ信号線D+のプルアップがオフされる。このとき、Mini−Aプラグが挿入されると、ID端子が「L」レベル(id/)となるためa_idleステートとなる(ST31)。またVBUSラインの電圧が所与の閾値電圧を越えると(b_sess_vld)、b_peripheralステートに遷移する(ST32)。
【0076】
b_peripheralステートでは、データ信号線D+のプルアップがオンとなるため、Aデバイスのa_wait_bconステートにおいてb_connの検出を行うことができる。b_periheralステートでは、Aデバイスからの要求に応答して、ペリフェラルとして動作する。Bデバイスがホストになるときは、Aデバイスがa_suspendになったことを検出し(a_bus_suspend)、Bデバイスの上位アプリケーションからのホスト動作要求(b_bus_req)があって、かつAデバイスからHNPをイネーブルに設定されているとき(b_hnp_en)、b_wait_aconステートに遷移する(ST33)。またb_peripheralステートにおいて、Mini−Aプラグが挿入されたとき(id/)、又はVBUSラインの電圧が所与の閾値電圧を下回ったとき(b_sess_vld/)、b_idleステートに遷移する(ST34)。この結果、b_idleステートにおいてプルアップがオフされ、例えばAデバイスはa_wait_vfallステートからa_idleステートに遷移することができる。
【0077】
b_wait_aconステートでは、Bデバイスのデータ信号線D+のプルアップがオフされ、Aデバイス側でデータ信号線D+がプルアップされるのを待つ。そして、Aデバイス側でデータ信号線D+のプルアップがオンされると(a_conn)、b_hostステートに遷移する(ST35)。またb_wait_aconステートにおいて、Aデバイスがラインステートを「K」状態にしたことを検出したとき(a_bus_resume)、又はb_wait_aconステートで規定時間以上経過すると(b_ase0_brst_tmout)、b_peripheralステートに遷移する(ST36)。また、Mini−Aプラグが挿入されたとき(id/)、又はVBUSラインの電圧が所与の閾値電圧を下回るとき(b_sess_vld/)、b_idleステートに遷移する(ST37)。
【0078】
b_hostステートでは、ホスト処理が行われる。すなわち、バスリセットを行って、SOFパケットの生成を開始する。Aデバイスは、ホストとして動作するBデバイスからの要求に応答することになる。Bデバイスが、ホストとして転送するデータがなくなりバスを使用しないとき(b_bus_req/)、又はAデバイスにおいてプルアップがオフされたことが検出されたとき(a_conn/)、b_peripheralに遷移する(ST38)。このとき、Aデバイスは、Bデバイスのb_bus_suspendとして検出することができ、Aデバイスではa_peripheralステートからa_wait_bconステートに遷移する。この結果、Aデバイスのプルアップがオフされる。b_peripheralステートでは、Bデバイスはプルアップがオンされる。また、b_hostステートにおいて、Mini−Aプラグが挿入されたとき(id/)、又はVBUSラインの電圧が所与の閾値電圧を下回るとき(b_sess_vld/)、b_idleステートに遷移する(ST39)。
【0079】
Bデバイスは、Aデバイスがサスペンド状態のときSRPによりセッション開始を要求することができる。すなわち、b_idleステートにおいて、Bデバイスの上位アプリケーションからのバス使用要求があり(b_bus_req)、VBUSラインの電圧がBデバイスのセッション終了閾値電圧を下回った状態で(b_sess_end)、かつラインステートが「SE0」の状態で規定時間以上経過したとき(b_se0_srp)、b_srp_initステートに遷移する(ST40)。
【0080】
b_srp_initステートでは、SRPによりセッション開始をAデバイスに対して要求する。BデバイスがSRPを終了したとき(b_srp_done)、又はMini−Aプラグが挿入されたとき(id/)、b_idleステートに遷移する(ST41)。
【0081】
2. データ転送制御装置
OTG規格に準拠したデバイスは、上述したSRPをイニシエートする必要性からセルフパワーで動作することが必要となってくる。したがって、当該デバイスが例えばUSB(USB1.1又はUSB2.0)準拠の標準ホストと接続される場合には、標準ホストからVBUSラインに電流が供給されているにも関わらず、自デバイス内の電源を消費するという無駄が生じる。
【0082】
そこで、以下に述べる実施形態におけるOTG規格に準拠したデバイスとしてのデータ転送制御装置は、上述のステート遷移により、デュアルロールデバイスとしての動作を実現する一方、電源切替回路を設け、該電源切替回路により無駄な電力消費を削減することができるようになっている。
【0083】
2.1 第1の実施形態
第1の実施形態におけるデータ転送制御装置は、電源切替回路により、セルフパワー電源からバスパワー電源に切り替えることができる。
【0084】
図7に、第1の実施形態におけるデータ転送制御装置の構成の概要を示す。
【0085】
データ転送制御装置100は、OTGコントローラとしてOTG規格に従ったデータ転送を制御することができる。
【0086】
このようなデータ転送制御装置100は、データ転送処理回路110と、電源回路120と、給電スイッチ回路130と、電源制御回路140と、ID検出回路150と、VBUSコンパレータ160とを含む。
【0087】
データ転送処理回路110は、ステートコントローラ112を含む。ステートコントローラ112は、図5及び図6に示すステート遷移により、Aデバイス(第1のデバイス)のホスト又はペリフェラルとしての動作、Bデバイス(第2のデバイス)のペリフェラル又はホストとしての動作の切り替えを行うことができる。データ転送処理回路110は、ステートコントローラ112のステート遷移により、データ信号線(データライン。D+、D−)を介して、OTG規格に従ったデータ転送の処理を行う。
【0088】
電源回路120は、内部電源切替回路122を含む。内部電源切替回路122は、例えばコンセント等を介して接続される外部電源(AC電源)124、又はデータ転送制御装置100に内蔵する充電式蓄電池126のいずれかから、給電スイッチ回路130を介してVBUSライン、若しくは電源制御回路140を介してデータ転送処理回路110に対して、電源を供給することができるようになっている。
【0089】
給電スイッチ回路130は、ステートコントローラ112において遷移したステートに対応した制御信号VBUSONに基づいて、電源回路120とVBUSラインとを電気的に接続することができる。制御信号VBUSONは、図5に示すAデバイスのa_wait_vriseステート、a_wait_bconステート、a_hostステート、a_suspendステート及びa_peripheralステートのときアクティブになる。また制御信号VBUSONは、図6に示すBデバイスのb_srp_initステートでVBUSパルシングを実施中にアクティブになる。制御信号VBUSONがアクティブのとき、給電スイッチ回路130は電源回路120とVBUSラインとを電気的に接続する。
【0090】
電源制御回路140は、電源切替回路142を含む。電源切替回路142は、切替信号PWRSELにより、VBUSライン又は電源回路120のいずれかと、データ転送処理回路110とを電気的に接続する。すなわち、切替信号PWRSELにより、データ転送処理回路110に対し、VBUSライン又は電源回路120のいずれかから電源が供給される。
【0091】
切替信号PWRSELは、切替スイッチ回路144の出力信号、又はステートコントローラ112からの制御信号に基づいて生成される。ここで切替スイッチ回路144は、例えば機械的にオン・オフを設定可能なスイッチ回路であって、データ転送制御装置100の操作者による手動で切替可能に構成されているものであってもよい。また、ソフトウェア的にオン・オフを設定可能なスイッチ回路であってもよい。また切替信号PWRSELは、切替スイッチ回路144の出力信号とステートコントローラ112からの制御信号とに基づいて生成されるものであってもよい。
【0092】
ID検出回路150は、図2に示すID検出回路12、22と同様にID端子に接続される信号線の電圧を検出し、USBケーブルのプラグの種類を判別するためのものである。
【0093】
VBUSコンパレータ160は、VBUSラインの電圧を監視する。より具体的には、VBUSコンパレータ160は、Aデバイスとして動作時にはVBUSの電圧がAデバイスのセッションバリッド閾値(Session Valid threshold)(Va_sess_vld)やVBUSバリッド閾値(VBUS Valid threshold)(Va_VBUS_vld)を超えたか否かを検出する。またVBUSコンパレータ160は、Bデバイスとして動作時にはVBUSの電圧がBデバイスのセッションバリッド閾値(Vb_sess_vld)を超えたか否かを検出する。ID検出回路150の出力であるID検出信号IDDETECTは、ステートコントローラ112に入力される。VBUSコンパレータ160の出力であるVBUS検出信号VCOMPは、ステートコントローラ112に入力される。
【0094】
図8に、第1の実施形態におけるデータ転送制御装置の電源切替フローの一例を示す。
【0095】
ここでは切替信号が、ステートコントローラ112の出力に基づいて生成される場合を説明する。
【0096】
まず電源が投入されると、データ転送制御装置100は初期化される。そして、ステートコントローラ112では、図5及び図6に示したようにb_idleステートに遷移した状態となる(ステップS200)。これにより、セルフパワー電源、すなわち図7の外部電源124又は充電式蓄電池126からの電源供給により、データ転送制御やその他の回路ブロックが動作する。
【0097】
ここでユーザによってUSBケーブルが接続されると、ID端子に接続される信号線の電圧を検出する(ステップS201)。ID検出回路150により、接続されたUSBケーブルのプラグがMini−Aプラグであることが検出されたとき以外、すなわちID検出信号IDDETECTが「H」のとき(ステップS201:Y)、ステートコントローラ112の出力を判別する(ステップS202)。
【0098】
より具体的には、ステートコントローラ112の出力より、b_idleステート(広義には、Bデバイスのアイドル状態)であり、かつVBUSラインの電圧が「Vb_sess_vld」(第1の閾値)を超えた(b_sess_vldが真)か否かを判別する。これは、データの転送先又は転送元が、USB規格の標準ホスト、或いはOTG規格のAデバイスであって常にVBUSラインに電源を供給するデバイスであるか判別するものである。
【0099】
そして、b_idleステートであり、かつb_sess_vldが真のとき(ステップS202:Y)、バスパワー電源に切り替える(ステップS203)。すなわち電源制御回路140の電源切替回路142により、データ転送処理回路110に対して、VBUSラインから電源を供給するように切り替える。これにより、Bデバイスで動作時においても、データ転送処理回路110はバスパワー電源で動作することになる。
【0100】
その後、電源回路120をディセーブルにして、無駄な電力消費を削減する(ステップS204)。より具体的には、内部電源切替回路122において、外部電源124又は充電式蓄電池126と他の内部回路とを電気的に切断する。
【0101】
なおステップS201でID検出回路150により、接続されたUSBケーブルのプラグがMini−Aプラグであることが検出されたとき(ステップS201:Y)、又はステップS202でb_idleステートかつb_sess_vldが真ではないと判別されたとき(ステップS202:N)、少なくともデータ転送処理回路110はセルフパワー電源により動作することに変化はない。ステップS202で「N」の場合、セルフパワー電源により接続相手に対してSRPをイニシエートすることができる。
【0102】
このように、データ転送制御装置100がセルフパワー電源で動作することが必要とされる場合に、接続相手からVBUSラインに電源が供給されていることが確認されたときに、セルフパワー電源からバスパワー電源に切り替えることができる(内部の電源の供給元を電源回路120からVBUSラインに切り替えることができる)。したがって、接続相手から供給される電源を用いて内部回路を動作させることができるので、内部の電源回路において無駄な電力消費を削減することができる。
【0103】
なお図8ではステートコントローラ112の出力に基づいて切替信号PWRSELを生成するものとして説明したが、切替スイッチ回路144やソフトウェアを用いて切替信号PWRSELを生成するようにしてもよい。
【0104】
2.2 第2の実施形態
第1の実施形態では、電源制御回路140の電源切替回路142によりセルフパワー電源からバスパワー電源に切り替えることができるデータ転送制御装置を提供する。ところが、バスパワー電源に切り替え後、VBUSラインに電源を供給する接続相手が何らかの原因で電源を供給できなくなった場合には、データ転送制御装置は、異常状態としてデータ転送制御を停止せざるを得ない。
【0105】
そこで第2の実施形態では、バスパワー電源に切り替え後にVBUSラインに電源を供給する接続相手が何らかの原因で電源を供給できなくなった場合であっても、バックアップ電源に切り替えて内部回路を正常に動作させ続けることができるようになっている。
【0106】
図9に、第2の実施形態におけるデータ転送制御装置の構成の概要を示す。
【0107】
ここでは第2の実施形態におけるデータ転送制御装置同士が、USBケーブルを介して接続されている状態を示している。すなわち、一方がAデバイスとしてホスト側の電子機器Pに搭載され、他方がBデバイスとしてペリフェラル側の電子機器Qに搭載される。
【0108】
また図7に示した第1の実施形態におけるデータ転送制御装置と同一部分には同一符号を付して適宜説明を省略する。ただし、各符号には、ホスト側のブロックであることを示す「h」、又はペリフェラル側のブロックであることを示す「p」を添えて付している。
【0109】
電子機器P、Qに搭載されるデータ転送制御装置300、400は、同一構成である。図9に示すように、データ転送制御装置300にはMini−Aプラグが接続されているため、データ転送制御装置300はAデバイスとして動作する。データ転送制御装置400にはMini−Bプラグが接続されているため、データ転送制御装置400はBデバイスとして動作する。
【0110】
データ転送制御装置300、400が、第1の実施形態におけるデータ転送制御装置100と異なる点は、電源制御回路340h、340pの構成と、新たに付加されたVBUS電圧検出回路(電源ライン電圧検出回路)350h、350pである。
【0111】
電源制御回路340h、340pは、電源切替回路142h、142pを含む。電源切替回路142hに入力される切替信号PWRSELは、ID検出回路150hと、VBUS電圧検出回路350hの出力信号COMPOUTとの論理積演算結果である。電源切替回路142pに入力される切替信号PWRSELは、ID検出回路150pと、VBUS電圧検出回路350pの出力信号COMPOUTとの論理積演算結果である。
【0112】
VBUS電圧検出回路350h、350pは、VBUSラインの電圧が所与の閾値(第2の閾値)を超えたか否かを検出し、その検出結果を出力信号COMPOUTとして出力する。VBUS電圧検出回路350hにおける閾値(第2の閾値)は、VBUSコンパレータ160hにおける閾値(第1の閾値)より高い。VBUS電圧検出回路350pにおける閾値(第2の閾値)は、VBUSコンパレータ160pにおける閾値(第1の閾値)より高い。
【0113】
図10に、第2の実施形態におけるデータ転送制御装置の電源切替フローの一例を示す。
【0114】
まず電源が投入されると、データ転送制御装置は初期化される。そして、ステートコントローラでは、図5及び図6に示したようにb_idleステートに遷移した状態となる(ステップS450)。これにより、セルフパワー電源、すなわち図10の外部電源124h(124p)又は充電式蓄電池126h(126p)からの電源供給により、データ転送制御やその他の回路ブロックが動作する。
【0115】
ここでユーザによってUSBケーブルが接続されると、ID端子に接続される信号線の電圧を検出する(ステップS451)。ID検出回路150h(150p)により、接続されたUSBケーブルのプラグがMini−Aプラグであることが検出されたとき以外、すなわちID検出信号IDDETECTが「H」のとき(ステップS451:N)、ステートコントローラ112h(112p)の出力を判別する(ステップS452)。
【0116】
より具体的には、ステートコントローラ112h(112p)の出力より、b_idleステート(広義には、Bデバイスのアイドル状態)であり、かつVBUSの電圧が「Vb_sess_vld」(第1の閾値)を超えた(b_sess_vldが真)か否かを判別する。そして、b_idleステートであり、かつb_sess_vldが真のとき(ステップS452:Y)、バスパワー電源に切り替える(ステップS453)。すなわち電源制御回路340h(340p)の電源切替回路142h(142p)により、データ転送処理回路110h(110p)に対して、VBUSラインから電源を供給するように切り替える。
【0117】
その後、電源回路120h(120p)をディセーブルにして、無駄な電力消費を削減する(ステップS454)。より具体的には、内部電源切替回路122h(122p)において、外部電源124h(124p)又は充電式蓄電池126h(126p)と他の内部回路とを電気的に切断する。
【0118】
続いて、状態変数b_backupが偽か否かを判別する(ステップS455)。状態変数b_backupは、VBUSラインの電圧がバックアップ用閾値VB_BACKUP(第2の閾値)を超えたときに真となる。バックアップ用閾値VB_BACKUPは、任意に設定可能な閾値であって、後述するようにBデバイスのセッションバリッド電圧「Vb_sess_vld」(第1の閾値)より高く、AデバイスのVBUSバリッド電圧「Va_VBUS_vld」より低く設定される。状態変数b_backupは、VBUS電圧検出回路350h(350p)の出力信号COMPOUTである。
【0119】
そして、状態変数b_backupが偽になったとき(ステップS455:N)、すなわちVBUSラインの電圧がバックアップ用閾値VB_BACKUP(第2の閾値)を下回ったとき、電源回路120をイネーブルにし(ステップS456)、セルフパワー電源に切り替える(ステップS457)。
【0120】
なおステップS451でID検出回路150h(150p)により、接続されたUSBケーブルのプラグがMini−Aプラグであることが検出されたとき(ステップS451:N)、又はステップS452でb_idleステートかつb_sess_vldが真ではないと判別されたとき(ステップS452:N)、少なくともデータ転送処理回路110はセルフパワー電源により動作することに変化はない。ステップS452で「N」の場合、セルフパワー電源により接続相手に対してSRPをイニシエートすることができる。
【0121】
このように、OTG規格に準拠したデータ転送制御装置において、セルフパワー電源からバスパワー電源に切り替わった後、何らかの原因でVBUSラインに電源が供給されなくなった場合であっても、VBUSラインの電圧降下を検出してセルフパワー電源に切り替えるようにした。これにより、Bデバイスでバスパワー電源に切り替えられた後に、何らかの原因でVBUSラインに電源が供給されなくなっても、セルフパワー電源に切り替えることができるので、内部回路に対し充電式蓄電池等のバックアップ用電源から電源を供給し続けることができる。
【0122】
次に、第2の実施形態におけるデータ転送制御装置の具体的な動作について説明する。
【0123】
図11に、図9に示す第2の実施形態におけるデータ転送制御装置同士が接続された場合の電源切替のタイミングチャートの一例を示す。
【0124】
電源投入後、データ転送制御装置300、400は初期化され、いずれもBデバイスのアイドル状態(b_idleステート)に遷移する。データ転送制御装置300、400は、ともにOTG規格に準拠したデータ転送制御を行うため、デフォルト状態ではセルフパワー電源で動作する。
【0125】
時刻t1において、USBケーブルが接続されるものとする。データ転送制御装置300にMini−Aプラグが接続され、データ転送制御装置400にMini−Bプラグが接続されたものとして考える。
【0126】
データ転送制御装置300のID検出回路150hでは、ID端子に接続された信号線が接地されるため、ID検出信号IDDETECTが「L」となる。したがって、データ転送制御装置300は、USBケーブルの接続が変更されない限り、時刻t1以降ではAデバイスとして動作することになり、a_idleステートに遷移する。すなわち、データ転送制御に関する限り、デフォルト状態ではセルフパワー電源で行われる。一方、データ転送制御装置400のID検出回路150pでは、ID端子がプルアップされたままであるため、ID検出信号IDDETECTが「H」となる。したがって、データ転送制御装置400は、USBケーブルの接続が変更されない限り、時刻t1以降ではBデバイスとして動作することになり、b_idleステートのままとなる。すなわち、データ転送制御に関する限り、デフォルト状態ではバスパワー電源で行われる。
【0127】
そして、データ転送制御装置400において、上位アプリケーションからのバス使用要求等によりSRPをイニシエートするため、時刻t2においてb_srp_initステートに遷移する。このステートでは、データ転送制御装置400は、データ転送制御装置300に対し、SRPをイニシエートする。その結果、データ転送制御装置300がデータ転送制御装置400からのSRPを検出し、時刻t3において、a_wait_vriseステートに遷移する。一方、データ転送制御装置400は、b_srp_done(SRP完了)により、b_idleステートに戻る。
【0128】
データ転送制御装置300では、a_wait_vriseステートにおいて制御信号VBUSONがアクティブになり、給電スイッチ回路130hを介して電源回路120hとVBUSラインとが電気的に接続される。これにより、VBUSラインへの電流供給(電源供給)が開始され、VBUSラインの電圧が上がる。
【0129】
データ転送制御装置400では、VBUSコンパレータ160pにより、VBUSの電圧が監視されている。そして、VBUSコンパレータ160pにより、VBUSの電圧がBデバイスのセッションバリッド閾値(Vb_sess_vld)(第1の閾値)を超えたと判断された時刻t4において、ステートコントローラ112pにおいて、b_peripheralステートに遷移する。データ転送制御装置400は、b_peripheralステートでは、Aデバイスであるデータ転送制御装置300からの要求に応答して、ペリフェラルとして動作する。
【0130】
続く時刻t5では、データ転送制御装置300、400のVBUS電圧検出回路350h、350pにより、VBUSラインの電圧が、Bデバイスのセッションバリッド閾値より高く設定されるバックアップ用閾値VB_BACKUP(第2の閾値)を超えたことが検出される。このとき、VBUS電圧検出回路350h、350pの出力信号COMPOUTが「H」となる。したがって、データ転送制御装置300の電源切替回路142hでは、切替信号PWRSELが「L」のままであるため、電源回路120hとデータ転送処理回路110hとを接続した状態でセルフパワー電源のまま動作する。一方、データ転送制御装置400の電源切替回路142pでは、切替信号PWRSELが「H」に変化するため、データ転送処理回路110pに対し、VBUSラインから電源が供給されるように切り替えられ、バスパワー電源で動作することになる。
【0131】
時刻t6では、Aデバイスとして動作するデータ転送制御装置300において、VBUSコンパレータ160hにより、VBUSラインのAデバイスのVBUSバリッド閾値を超えたことが検出されたとき、a_wait_bconステートに遷移する。
【0132】
データ転送制御装置300は、a_wait_bconステートにおいてデータ転送制御装置400においてデータラインD+がプルアップされたことを時刻t7で確認すると、a_hostステートに遷移する。a_hostステートでは、データ転送制御装置300は、USB規格のホストとして動作する。
【0133】
a_hostステートで、データ転送制御装置300がバスを使用しなくなったとき、又は上位アプリケーションからサスペンド状態への遷移要求があるとき、時刻t8にa_suspendステートに遷移する。
【0134】
ここで、上位アプリケーションからVBUSラインの電圧を落とす要求があったとき、時刻t9において、データ転送制御装置300は、a_wait_vfallステートに遷移する。a_wait_vfallステートでは、VBUSラインへの電流供給が停止され、VBUSラインの電圧が降下する。
【0135】
そして時刻t10において、データ転送制御装置300、400のVBUS電圧検出回路350h、350pにより、VBUSラインの電圧が、バックアップ用閾値VB_BACKUP(第2の閾値)を下回ったことが検出される。このとき、VBUS電圧検出回路350h、350pの出力信号COMPOUTが「L」となる。したがって、データ転送制御装置300の電源切替回路142hでは、切替信号PWRSELが「L」のままであるため、電源回路120hとデータ転送処理回路110hとを接続した状態でセルフパワー電源のまま動作する。一方、データ転送制御装置400の電源切替回路142pでは、切替信号PWRSELが「L」に変化するため、データ転送処理回路110pに対し、電源回路120pから電源が供給されるように切り替えられ、セルフパワー電源で動作することになる。
【0136】
そして、時刻t11において、データ転送制御装置400では、VBUSコンパレータ160pにより、VBUSラインの電圧がBデバイスのセッションバリッド閾値(Vb_sess_vld)(第1の閾値)を下回ったと判断されると、ステートコントローラ112pにおいて、b_idleステートに遷移する。
【0137】
続く時刻t12では、VBUSラインの電圧がBデバイスのセッションバリッド閾値(Vb_sess_vld)(第1の閾値)を下回るため、データ転送制御装置400においてプルアップがオフされてラインステートが「SE0」状態になると、データ転送制御装置300ではa_idleステートに遷移する。
【0138】
このように、Aデバイスとして動作するデータ転送制御装置300はセルフパワー電源のまま動作する。また、Bデバイスとして動作するデータ転送制御装置400は、データ転送制御に関する限りデフォルト状態としてセルフパワー電源として動作するが、VBUSラインを介して電源が供給された状態でペリフェラル動作を行うときにはバスパワー電源で動作することができる。そして、再びVBUSラインを介して電源が供給されなくなったことを検出すると、セルフパワー電源に切り替えて次のデータ転送処理に備える。
【0139】
ところで、Bデバイスに設定されたデータ転送制御装置では、b_idleステートで、VBUSラインの電圧を検出することが望ましい。そのため、セルフパワー電源からバスパワー電源に切り替えるときには、b_idleステートからb_peripheralステートに遷移してから切り替え動作を行うことが望ましい。また、バスパワー電源からセルフパワー電源に切り替えるときには、b_idleステートに遷移する前にセルフパワー電源に切り替えておくことが望ましい。
【0140】
図12に、セルフパワー電源とバスパワー電源の切替時のタイミング図を示す。
【0141】
ここでは、図11に示すタイミング図の該当部分を拡大したものである。第2の実施形態では、バックアップ用閾値VB_BACKUP(第2の閾値)を、Bデバイスのセッションバリッド閾値(Vb_sess_vld。例えば4.0V。)(第1の閾値)より高く、かつAデバイスのVBUSバリッド閾値(Va_VBUS_vld。例えば4.4V)より低い電圧(例えば4.2V)に設定している。
【0142】
こうすることで、Bデバイスでは、VBUSラインの電圧がBデバイスのセッションバリッド閾値(第1の閾値)を超えたことを条件にb_idleステートからb_periheralステートに遷移するため、セルフパワー電源からバスパワー電源への切替をb_peripheralステートで行うことができる。
【0143】
また、Bデバイスでは、VBUSラインの電圧がBデバイスのセッションバリッド閾値(第1の閾値)を下回ったことを条件にb_periheralステートからb_idleステートに遷移するため、バスパワー電源からセルフパワー電源への切替をb_peripheralステートで行うことができる。
【0144】
なおAデバイスでは、VBUSラインの電圧を少なくともAデバイスのVBUSバリッド閾値Va_VBUS_vldまで上げる必要があるため、バックアップ用閾値VB_BACKUPはAデバイスのVBUSバリッド閾値Va_VBUS_vldより低く設定される必要がある。
【0145】
3. 電子機器
次に第1又は第2の実施形態のデータ転送制御装置を含む電子機器の例について説明する。例えば図13(A)に電子機器の1つであるプリンタの内部ブロック図を示し、図14(A)にその外観図を示す。CPU(マイクロコンピュータ)510はシステム全体の制御などを行う。操作部511はプリンタをユーザが操作するためのものである。ROM516には、制御プログラム、フォントなどが格納され、RAM517はCPU510のワーク領域として機能する。DMAC518は、CPU510を介さずにデータ転送を行うためのDMAコントローラである。表示パネル519はプリンタの動作状態をユーザに知らせるためのものである。
【0146】
USBを介してパーソナルコンピュータなどの他のデバイスから送られてきたシリアルの印字データは、データ転送制御装置500によりパラレルの印字データに変換される。そして、変換後のパラレル印字データは、CPU510又はDMAC518により、印字処理部(プリンタエンジン)512に送られる。そして、印字処理部512においてパラレル印字データに対して所与の処理が施され、プリントヘッダなどからなる印字部(データの出力処理を行う装置)514により紙に印字されて出力される。
【0147】
図13(B)に電子機器の1つであるデジタルカメラの内部ブロック図を示し、図14(B)にその外観図を示す。CPU520はシステム全体の制御などを行う。操作部521はデジタルカメラをユーザが操作するためのものである。ROM526には制御プログラムなどが格納され、RAM527はCPU520のワーク領域として機能する。DMAC528はDMAコントローラである。
【0148】
CCDなどからなる撮像部522により撮影対象の画像が読み取られ、読み取られた画像のデータは画像処理部524により処理される。そして、処理後の画像データは、CPU520又はDMAC528によりデータ転送制御装置500に送られる。データ転送制御装置500は、このパラレルの画像データをシリアルデータに変換し、USBを介してパーソナルコンピュータなどの他のデバイスに送信する。
【0149】
図13(C)に電子機器の1つであるCD−RWドライブの内部ブロック図を示し、図14(C)にその外観図を示す。CPU530はシステム全体の制御などを行う。操作部531はCD−RWをユーザが操作するためのものである。ROM536には制御プログラムなどが格納され、RAM537はCPU530のワーク領域として機能する。DMAC538はDMAコントローラである。
【0150】
レーザ、モータ、光学系などからなる読み取り&書き込み部(データの取り込み処理を行う装置又はデータの記憶処理を行うための装置)533によりCD−RW532から読み取られたデータは、信号処理部534に入力され、エラー訂正処理などの所与の信号処理が施される。そして、信号処理が施されたデータが、CPU530又はDMAC538によりデータ転送制御装置500に送られる。データ転送制御装置500は、このパラレルのデータをシリアルデータに変換し、USBを介してパーソナルコンピュータなどの他のデバイスに送信する。
【0151】
一方、USBを介して他のデバイスから送られてきたシリアルのデータは、データ転送制御装置500によりパラレルのデータに変換される。そして、このパラレルデータは、CPU530又はDMAC538により信号処理部534に送られる。そして、信号処理部534においてこのパラレルデータに対して所与の信号処理が施され、読み取り&書き込み部533によりCD−RW532に記憶される。
【0152】
なお、図13(A)、(B)、(C)において、CPU510、520、530の他に、データ転送制御装置500でのデータ転送制御のためのCPUを別に設けるようにしてもよい。
【0153】
上述の実施形態のデータ転送制御装置を電子機器に用いれば、ホスト動作を行うパーソナルコンピュータと接続することなく、USB転送を行うことができる。特に携帯型の電子機器に用いることによって、ユーザはパーソナルコンピュータを持ち歩く必要がなくなり、手軽にUSB転送を行うことができる。例えば、パーソナルコンピュータを介することなく、プリンタや、CD−RWとの間でUSB転送を行うことができる。
【0154】
また上述の実施形態のデータ転送制御装置を電子機器に用いれば、CPU上で動作するファームウェアの処理負荷が軽減され、安価なCPUを用いることが可能になる。更に、データ転送制御装置の低コスト化、小規模化を図れるため、電子機器の低コスト化、小規模化も図れるようになる。
【0155】
なお上述の実施形態のデータ転送制御装置を適用できる電子機器としては、上記以外にも例えば、種々の光ディスクドライブ(CD−ROM、DVD)、光磁気ディスクドライブ(MO)、ハードディスクドライブ、TV、VTR、ビデオカメラ、オーディオ機器、電話機、プロジェクタ、パーソナルコンピュータ、電子手帳、ワードプロセッサなど種々のものを考えることができる。
【0156】
なお、本発明は第1又は第2の実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。
【0157】
また、本発明は、OTG規格でのデータ転送に適用されることが特に望ましいが、これに限定されるものではない。例えばOTG規格と同様の思想に基づく規格やOTG規格を発展させた規格におけるデータ転送にも本発明は適用できる。
【0158】
更に上述した実施形態において、転送に先立ってMini−Aプラグが挿入されたデバイスをAデバイス、Mini−Bプラグが挿入されたデバイスをBデバイスであるものとして説明したが、転送制御中に、Aデバイス及びBデバイスを入れ替え、例えばVBUSの供給源を切り替えるようにした場合でも、本発明は適用できる。
【図面の簡単な説明】
【図1】図1(A)は、Mini−Aプラグ及びMini−Bプラグを有するUSBケーブルの模式図。図1(B)は、Aデバイス及びBデバイスについての説明図。図1(C)は、端子表を示す図。
【図2】USBケーブルが接続されたデュアルロールデバイスの模式例。
【図3】SRPについての説明図。
【図4】HNPについての説明図。
【図5】Aデバイスのステート遷移を説明する図。
【図6】Bデバイスのステート遷移を説明する図。
【図7】第1の実施形態におけるデータ転送制御装置の構成ブロック図。
【図8】第1の実施形態におけるデータ転送制御装置の電源切替フローの一例を示すフロー図。
【図9】第2の実施形態におけるデータ転送制御装置の構成ブロック図。
【図10】第2の実施形態におけるデータ転送制御装置の電源切替フローの一例を示すフロー図。
【図11】図9に示す第2の実施形態におけるデータ転送制御装置同士が接続された場合の電源切替のタイミングチャートの一例のタイミング図。
【図12】セルフパワー電源とバスパワー電源の切替時のタイミング図。
【図13】図13(A)〜(C)は電子機器の内部ブロック図。
【図14】図14(A)〜(C)は電子機器の外観図。
【符号の説明】
100 データ転送制御装置、110 データ転送処理回路、112 ステートコントローラ、120 電源回路、122 内部電源切替回路、124 外部電源、126 充電式蓄電池、130 給電スイッチ回路、140 電源制御回路、142 電源切替回路、144 切替スイッチ回路、160 VBUSコンパレータ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data transfer control device, an electronic device, and a power switching method.
[0002]
BACKGROUND ART AND PROBLEMS TO BE SOLVED BY THE INVENTION
In recent years, the USB (Universal Serial Bus) standard has attracted attention as an interface standard for connecting a personal computer and a peripheral device (electronic device in a broad sense). However, the USB standard always requires a host, and it has not been possible to perform USB standard data transfer between peripheral devices. Therefore, the “USB On-The-Go (OTG) 1.0” standard (hereinafter abbreviated as OTG standard) is formulated as an additional standard of the USB 2.0 standard, and USB standard data transfer is performed between peripheral devices. be able to.
[0003]
According to the OTG standard, a peripheral that operates as a device in the USB standard can have a host function required to operate as a host. As a result, peripheral devices that have been devices based on the conventional USB standard can be connected to each other, and data can be transferred without passing through a host based on the conventional USB standard.
[0004]
For this reason, the OTG standard defines a dual-role device and a peripheral-only device. A device that is a dual-role device can operate as both a host and a peripheral. A device that becomes a peripheral only device can operate only as a peripheral.
[0005]
By the way, in the OTG standard, in order to reduce power consumption, for example, when a device operating as a host does not use a bus, driving of a power supply line can be stopped. Therefore, for example, when a device operating as a peripheral wants to use an unused bus, it is possible to use the bus by a procedure called SRP (Session Request Protocol) that requests the device operating as a host to use the bus. it can. In SRP, a device that operates as a peripheral requests a device that operates as a host to supply power to the VBUS line by a method called data line pulsing or VBUS (power bus) pulsing. As a result, a device that conforms to the OTG standard needs to be a self-powered power supply to initiate the above-described SRP.
[0006]
Here, a case is considered where a device (OTG device) compliant with the OTG standard is connected to a standard host (for example, a personal computer) compliant with the USB standard. According to the standard, the standard host needs to supply power to the VBUS line. However, since the OTG device is a self-powered power supply, the OTG device consumes power from its own power supply and operates even though power is always supplied from the standard host to the VBUS line. Power consumption. In particular, when the OTG device is a portable information device, the life of the battery is shortened.
[0007]
The present invention has been made in view of the above technical problems, and an object of the present invention is to provide a data transfer method for reducing unnecessary power consumption when performing data transfer between, for example, OTG standard peripheral devices. A control device, an electronic device, and a power supply switching method are provided.
[0008]
[Means for Solving the Problems]
In order to solve the above problems, the present invention provides a state transition of a first device that performs data transfer control by a self-powered power supply in a default state or a state transition of a second device that performs data transfer control by a bus power supply in a default state. A data transfer control device that controls switching of the state of a host and a peripheral to perform data transfer control via a data line and a power supply line, wherein the power supply circuit and the first device operate during operation. A power supply switch circuit that connects a power supply line to the power supply circuit, a data transfer processing circuit that performs data transfer via the data line, and any one of the power supply line and the power supply circuit based on a given switching signal. Power supply switching circuit for supplying power to the data transfer processing circuit from Relating to the data transfer control device comprising and.
[0009]
According to the present invention, in a data transfer control device that supplies power to a power supply line by a power supply switch circuit when operating as a first device, the power supply switching circuit switches from the power supply circuit to the power supply line to the data transfer processing circuit. Power can be supplied. Therefore, for example, when operating as the second device, the data processing circuit can be operated by power supply from the power supply line, so that power consumption of the power supply circuit can be reduced.
[0010]
Further, the data transfer control device according to the present invention includes a switch circuit for turning on or off the given switch signal, and the given switch signal may be generated based on an output of the switch circuit. Good.
[0011]
According to the present invention, since the power supply source can be appropriately switched by the changeover switch circuit, the power consumption of the data transfer control device can be optimized.
[0012]
The present invention also relates to a data transfer control device for controlling data transfer in accordance with an OTG (On-The-Go) standard of USB (Universal Serial Bus), comprising a power supply circuit, a VBUS line when operating as an A device, and the power supply. A power supply switch circuit for connecting a circuit, a data transfer processing circuit for performing data transfer via a data line, and the data transfer processing circuit from either the VBUS line or the power supply circuit based on a given switching signal. And a power supply switching circuit for supplying power to the VBUS line. When the power supply switching circuit determines that the voltage of the VBUS line has exceeded a first threshold value in an idle state during operation as a B device, A data transfer control device for supplying power to the data transfer processing circuit from the VBUS line. Related to.
[0013]
A data transfer control device conforming to the OTG standard requires a self-powered power supply. Therefore, for example, even when power is supplied to the VBUS line by the standard host, the data transfer control device consumes the power of its own power supply circuit.
[0014]
According to the present invention, the power supply switching circuit can supply power from the power supply line to the data processing circuit and operate it with the bus power supply, so that the power supply circuit mounted as a self-power supply consumes wasteful power. Can be reduced. Further, since the power supply switching circuit can be operated according to the state transition result, it is possible to optimize the power supply switching without particularly providing a large-scale additional circuit.
[0015]
Further, according to the present invention, a host and a peripheral can be controlled by a state transition of a first device that performs data transfer control using a self-powered power supply in a default state or a state transition of a second device that performs data transfer control using a bus power supply in a default state. What is claimed is: 1. A data transfer control device that controls state switching and controls data transfer via a data line and a power supply line, comprising: a power supply circuit; and the power supply line and the power supply circuit when operating as the first device. A power supply switch circuit that connects the power supply line, a data transfer processing circuit that performs data transfer via the data line, a power supply line voltage detection circuit that detects whether the voltage of the power supply line has exceeded a second threshold, Either the power supply line or the power supply circuit based on a given switching signal A power switching circuit for supplying power to the data transfer processing circuit, wherein the power switching circuit operates as the second device, and a voltage of the power line is lower than the second threshold value When it is determined that the voltage exceeds the first threshold, power is supplied from the power supply line to the data transfer processing circuit, and it is determined that the voltage of the power supply line does not exceed the second threshold. In this case, the present invention relates to a data transfer control device that supplies power to the data transfer processing circuit from the power supply circuit.
[0016]
Further, the present invention is a data transfer control device for controlling data transfer according to the OTG (On-The-Go) standard of USB (Universal Serial Bus), and connects a VBUS line to the power supply circuit when operating as an A device. A power supply switch circuit, a data transfer processing circuit for performing data transfer via a data line, a power supply line voltage detection circuit for detecting whether or not the voltage of the VBUS line has exceeded a second threshold value; A power supply switching circuit for supplying power to the data transfer processing circuit from either the VBUS line or the power supply circuit based on a signal, the power supply switching circuit operating as a B device, and When it is determined that the voltage of the VBUS line exceeds a first threshold lower than the second threshold, Power is supplied to the data transfer processing circuit from the VBUS line, and when it is determined that the voltage of the VBUS line does not exceed the second threshold, the power supply circuit is supplied to the data transfer processing circuit. Related to a data transfer control device that supplies power from the device.
[0017]
According to the present invention, even if the supply source of the bus power supply cannot supply the power for some reason after switching from the self-power supply to the bus power supply as described above, the power supply line (VBUS line) Can be switched to the self-powered power supply again by the power supply switching circuit, so that the reliability of the data transfer control device that achieves low power consumption by switching the power supply can be improved. Further, it is possible to achieve both low power consumption and improved reliability of the data transfer control device conforming to the OTG standard.
[0018]
In the data transfer control device according to the present invention, switching of a power supply source from the power supply circuit to the VBUS line to the data transfer processing circuit is performed after a transition from an idle state of the B device to a peripheral state. The switching of the power supply source for the data transfer processing circuit from the VBUS line to the power supply circuit may be performed before the device B switches from the peripheral state to the idle state.
[0019]
According to the present invention, it is only necessary to monitor the voltage of the VBUS line in the idle state of the B device, so that control by state management can be simplified.
[0020]
In the data transfer control device according to the present invention, the second threshold may be higher than the session valid threshold of the B device and lower than the VBUS valid threshold of the A device.
[0021]
According to the present invention, the voltage of VBUS can be monitored in the idle state of the B device only by setting the second threshold value, so that the configuration and control can be simplified.
[0022]
According to another aspect of the invention, an electronic apparatus includes the data transfer control device according to any one of the above, and a device that performs an output process, a capture process, or a storage process of the data transferred via the data transfer processing device and a bus. Can be.
[0023]
According to the present invention, it is possible to provide an electronic device that switches to a bus power supply and reduces wasteful power consumption even when a data transfer control device that operates by a self-power supply is mounted.
[0024]
Further, according to the present invention, a host and a peripheral can be controlled by a state transition of a first device that performs data transfer control using a self-powered power supply in a default state or a state transition of a second device that performs data transfer control using a bus power supply in a default state. A power supply switching method for a data transfer control device that performs state switching control and performs data transfer control via a data line and a power supply line, wherein the data transfer control circuit performs data transfer via the data line. A state in which power is supplied from a power supply circuit connected to the power supply line during operation as the first device, and a voltage of the power supply line becomes a first threshold in an idle state during operation as the second device. Is determined, and whether or not the device has been operated as the second device is determined. When the idle state voltage of the power line is determined to exceed the first threshold value, related to the power supply switching method for supplying power from the power supply line to the data transfer processing circuit.
[0025]
The present invention also relates to a power supply switching method for a data transfer control device that controls data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus), wherein the data is transferred via the data line. In a state where power is supplied to the transfer processing circuit from the power supply circuit connected to the VBUS line during operation as the A device, the voltage of the VBUS line exceeds the first threshold in an idle state during operation as the B device. If it is determined that the voltage of the VBUS line has exceeded the first threshold in the idle state during operation as a B device, power is supplied from the VBUS line to the data transfer processing circuit. And a power supply switching method for supplying power.
[0026]
Further, according to the present invention, a host and a peripheral can be controlled by a state transition of a first device that performs data transfer control using a self-powered power supply in a default state or a state transition of a second device that performs data transfer control using a bus power supply in a default state. A power supply switching method for a data transfer control device that performs state switching control and performs data transfer control via a data line and a power supply line, wherein the data transfer control circuit performs data transfer via the data line. A state in which power is supplied from a power supply circuit connected to the power supply line during operation as the first device, and a voltage of the power supply line becomes a first threshold in an idle state during operation as the second device. When it is determined that the data transfer processing circuit has exceeded When power is supplied from the power supply line, and it is determined that the voltage of the power supply line does not exceed the second threshold in a state where power is supplied to the data transfer processing circuit from the power supply line, the data The present invention relates to a power supply switching method for supplying power from the power supply circuit to the transfer processing circuit.
[0027]
The present invention also relates to a power transfer method for a data transfer control device that controls data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus), wherein the data transfer performs data transfer via a data line. When the voltage of the VBUS line exceeds a first threshold value in an idle state during operation as a B device in a state where power is supplied to a processing circuit from a power supply circuit connected to the VBUS line during operation as an A device. When it is determined that the power supply is supplied to the data transfer processing circuit from the VBUS line and the power supply is supplied to the data transfer processing circuit from the VBUS line, the voltage of the VBUS line is changed to the second voltage. When it is determined that the threshold value is not exceeded, the power supply is supplied to the data transfer processing circuit. It related to a power supply switching method for supplying power from the road.
[0028]
Further, in the power supply switching method according to the present invention, switching of a power supply source from the power supply circuit to the VBUS line to the data transfer processing circuit is performed after a transition from an idle state of the B device to a peripheral state, and the VBUS The switching of the power supply source from the line to the power supply circuit to the data transfer processing circuit may be performed before the B device switches from the peripheral state to the idle state.
[0029]
In the power supply switching method according to the present invention, the first threshold value may be set lower than the second threshold value.
[0030]
In the power supply switching method according to the present invention, the second threshold may be higher than the session valid threshold of the B device and lower than the VBUS valid threshold of the A device.
[0031]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the invention described in the claims. In addition, all of the configurations described below are not necessarily essential components of the invention.
[0032]
1. OTG (On-The-Go) Standard 1.1 A Device and B Device First, the OTG standard will be briefly described.
[0033]
The USB (Universal Serial Bus) standard is a standard for performing data transfer between a host (for example, a personal computer) and one or more peripherals (for example, peripheral devices). Transfer control is performed. On the other hand, the amount of data to be processed in a portable device or the like, which has been a peripheral device in the USB standard, has increased, and there has been a growing demand for USB-standard data transfer with low power consumption without a host.
[0034]
Against this background, the OTG standard was formulated as an additional standard to the USB 2.0 standard. The OTG standard newly includes standards for miniaturization of connectors and dual-role devices for providing peripherals with host functions necessary for operating as hosts.
[0035]
When performing data transfer according to the OTG standard, for example, as shown in FIG. 1A, a host and a peripheral are connected by a USB cable having a Mini-A plug (Plug) and a Mini-B plug provided at both ends thereof. You. The Mini-A plug has a structure that can be inserted into a Mini-A receptacle (receptacle) and a Mini-AB receptacle. The Mini-B plug has a structure that can be inserted into the Mini-B receptacle and the Mini-AB receptacle. In the case of a dual-role device, it is necessary to provide a Mini-AB receptacle.
[0036]
By the way, according to the USB standard, a host and a peripheral can be connected only by a VBUS (power bus) line, a GND (ground), and two data signal lines (D +, D-). Power (power, more specifically, power supply current) is supplied to the VBUS line from the host side. The data signal lines (data lines) D + and D- are used differentially.
[0037]
According to the OTG standard, a dual-role device to which a Mini-A plug is connected as shown in FIG. 1B is an A-device (A-Device) (first device in a broad sense). The A device operates as a host at the start of a session, and can give up the host function to the B device under given conditions. On the other hand, the dual-role device to which the Mini-B plug is connected is a B device (B-Device) (broadly, a second device). The B device operates as a peripheral at the start of a session, and is permitted to operate as a host from the A device. The VBUS line is supplied with power from the A device. The A-device performs data transfer control using a self-powered power supply as a default state. The B device performs data transfer control using a bus power supply as a default state.
[0038]
In the dual-role device, in order to determine the type of plug inserted into the Mini-AB receptacle, as shown in FIG. 1C, in addition to the conventional connector terminals (VBUS, D-, D +, GND), , ID terminals are defined. The ID terminal of the Mini-A plug is connected to GND, and the ID terminal of the Mini-B plug is open.
[0039]
FIG. 2 schematically shows an example of a dual-role device to which a USB cable is connected.
[0040]
The dual-role device 10 to which the Mini-A plug is connected and the dual-role device 20 to which the Mini-B plug is connected are connected via a USB cable. The dual role devices 10 and 20 include ID detection circuits 12 and 22. Each of the ID detection circuits 12 and 22 pulls up a signal line electrically connected to the ID terminal, and detects whether or not the ID terminal is grounded according to the voltage of the signal line. Since the signal line connected to the ID terminal is grounded, the ID detection circuit 12 in FIG. 2 can detect that it is a Mini-A plug. On the other hand, since the signal line connected to the ID terminal is pulled up, the ID detection circuit 22 detects that the plug is a Mini-B plug.
[0041]
The dual-role device 10 has a pull-up resistor R1 for pulling up the data signal line D + and a pull-down resistor R2 for pulling down the data signal line D + in order to operate as a host and a peripheral. The pull-up resistor R1 is connected to a power supply voltage line via a switch circuit SW1 to switch on / off of the pull-up. The pull-down resistor R2 is connected to a ground line via a switch circuit SW2 to switch on / off of the pull-down. The switch circuits SW1 and SW2 are exclusively controlled so that when one of them is on, the other is off.
[0042]
Similarly, the dual-role device 20 has a pull-up resistor R3 for pulling up the data signal line D + and a pull-down resistor R4 for pulling down the data signal line D +. The pull-up resistor R3 is connected to a power supply voltage line via a switch circuit SW3 to switch on / off of the pull-up. The pull-down resistor R4 is connected to a ground line via a switch circuit SW4 to switch on / off of the pull-down. The switch circuits SW3 and SW4 are exclusively controlled so that when one of them is on, the other is off.
[0043]
In the dual role devices 10 and 20, the data signal line D- is pulled down.
[0044]
Further, since both the dual-role devices 10 and 20 can be A devices, they include power supply control circuits VBA and VBB that supply current to the VBUS line. In FIG. 2, the dual-role device 10 supplies a current to the VBUS line by the power supply control circuit VBA.
[0045]
1.2 SRP (Session Request Protocol)
According to the OTG standard, the A device can stop supplying current to the VBUS line when there is no exchange on the bus. Therefore, even when a portable device or the like that operates on a battery operates as a host, useless power consumption can be reduced and power consumption can be reduced. When the B device starts a session and performs data transfer in this state, it can request the A device to supply current to the VBUS line according to a procedure called SRP. Here, the session refers to a period during which the voltage of the VBUS line exceeds a given threshold voltage.
[0046]
FIG. 3 is a diagram for explaining an SRP execution procedure in the FS mode with reference to the configuration of the dual role device shown in FIG.
[0047]
In the FS mode, the data signal line D + on the host side is pulled down (the switch circuit SW1 is off and the switch circuit SW2 is on), and the data signal line D + on the peripheral side is pulled up (the switch circuit SW3 is on and the switch circuit SW3 is on). SW4 is off).
[0048]
When the device A stops supplying current to the VBUS line due to no exchange on the bus (S10), the voltage of VBUS decreases and becomes the “Vb_sess_vld” level (less than B-Device Session Valid) (S11). When the B device detects this, the switch circuit SW3 invalidates the pull-up resistance of the data signal line D + (S12). As a result, the line state of the data signal line becomes the “SE0” state (in the FS mode, the data signal line D + is at the “L” level and the data signal line D− is at the “L” level) (S13).
[0049]
When the voltage of VBUS is smaller than “Vb_sess_end” (B-Device Session End) and the “SE0” state of the line state continues for 2 ms or more, the B device can initiate SRP. The SRP can be performed by data-line pulsing or VBUS pulsing. In the data line pulsing, the line state is set to “SE0” state, “J” state (in the FS mode, the data signal line D + is at “H” level and the data signal line D− is at “L” level), and “SE0”. This is a method of transitioning to a state. VBUS pulsing is a method in which a current is supplied from a B device to a VBUS line, and the voltage of the VBUS line is transited to an “L” level (less than Vb_sess_end), an “H” level (greater than Va_ses_vld), and an “L” level. (S14, S15).
[0050]
The A device monitors the voltage of the data signal line or the VBUS line, and when detecting that the SRP has been performed by any method, the A device starts supplying current to the VBUS line (S16). Thereby, the voltage of the VBUS line becomes equal to or higher than “Vb_sess_vld” (S17).
[0051]
When the B device detects that the voltage of the VBUS line has become equal to or higher than “Vb_sess_end”, the switch circuit SW3 enables the pull-up resistor of the data signal line D + (S18), and changes the line state to the “J” state. (S19), and starts operating as a peripheral.
[0052]
Upon detecting that the line state has been changed to the "J" state, the device A starts operating as a host (S20).
[0053]
1.3 HNP (Host Negotiation Protocol)
According to the OTG standard, a plug connected determines whether the device is an A device or a B device. However, the host function and the peripheral function can be exchanged without replacing the plug. HNP is a procedure for exchanging the host function and the peripheral function.
[0054]
FIG. 4 is a diagram for explaining an HNP execution procedure in the FS mode with reference to the configuration of the dual role device shown in FIG.
[0055]
Assume that device A operates as a host, device B operates as a peripheral, and HNP is enabled.
[0056]
When the device A finishes using the bus (S30), the line state is set to an idle state ("J" state in the FS mode) (S31).
[0057]
When detecting that the device B is in the "J" state for 3 ms or longer, the switch circuit SW3 disables the pull-up resistor of the data signal line D + (S32) and sets the line state to the "SE0" state (S33). When the device A detects that the line state is the “SE0” state, the switch circuit SW1 enables the pull-up resistor of the data signal line D + (disables the pull-down resistor) (S34). As a result, the line state changes to the “J” state (S35), so that the device A starts operating as a peripheral, and the device B detects that the line state is “J” and starts operating as a host. Can be performed (S36).
[0058]
When the B device finishes using the bus as a host (S37), the line state is set to an idle state by the switch circuits SW3 and SW4 (S38). When the A device detects this, it invalidates the pull-up resistor of the data signal line D + (S39), and changes the line state to the “SE0” state (S40). When the B device detects that the line state is the “SE0” state, the switch circuit SW3 enables the pull-up resistor of the data signal line D + (disables the pull-down resistor) (S41). This causes the line state to be in the "J" state (S42), so that the B device starts operating as a peripheral, and the A device detects that the line state is in the "J" state and starts operating as a host. Can be performed (S43).
[0059]
Data transfer control by such a protocol can be realized by making a transition between states that define each state in accordance with a transition condition.
[0060]
Hereinafter, the state transition of the A device and the B device will be described.
[0061]
1.4 State Transition of A Device FIG. 5 is a diagram for explaining the state transition of the A device.
[0062]
In the A device, the a_idle state is the start state (ST1).
[0063]
When the Mini-A plug of the USB cable is not inserted into the Mini-AB receptacle of the dual-role device, the pulled-up ID terminal goes to the “H” level (id), and thus transits to the b_idle state (ST2). . That is, in the dual-role device, the default is the B device. On the other hand, when the Mini-A plug is inserted, the ID terminal goes to the “L” level (id /), so that the state becomes the a_idle state (ST1).
[0064]
In the a_idle state, current supply to VBUS is stopped. In addition, the pull-up of the data signal line D + is invalidated (turned off) (pull-down is enabled. More specifically, the switch circuit SW1 is turned off and the switch circuit SW2 is turned on). Therefore, the line state is "SE0". When there is no request for lowering the voltage of the VBUS line from the host application (a_bus_drop /), and when it is desired to perform USB transfer (a_bus_req) or when an SRP from the B device is detected (a_srp_det), the state transits to the a_wait_vrise state ( ST3).
[0065]
In the a_wait_vrise state, current supply to the VBUS line is started, and the voltage of the VBUS line rises. When the Mini-A plug is unplugged (id), when a higher-level application requests to drop the voltage on the VBUS line (a_bus_drop), when the voltage on the VBUS line exceeds a given threshold voltage (a_vbus_vld), or When a specified time or more has elapsed in the state (a_wait_vrise_tmout), the state transits to the a_wait_bcon state (ST4).
[0066]
In the a_wait_bcon state, the pull-up of the data signal line D + on the A device side is turned off. At this time, when the pull-up of the data signal line D + is enabled (turned on) by the B device (the switch circuit SW3 of the B device is turned on and the switch circuit SW4 is turned off), and the data signal line D + becomes “H” level ( The line state transitions to the "J" state) (b_conn) and the a_host state (ST5). Note that when the Mini-A plug is unplugged (id), when a higher-level application requests to drop the voltage on the VBUS line (a_bus_drop), or when a specified time or more has elapsed in the state (a_wait_bcon_tmout), the state transits to the a_wait_vfall state. (ST6). When the voltage of the VBUS line falls below a given threshold voltage (a_vbus_vld /) for some reason, the state transits to the a_vbus_err state (ST7).
[0067]
That is, since the dual-role device is the B device in the default state, the data signal line D + of the A device remains in the pulled-down state until the a_wait_bcon state. When current supply to the VBUS line is started in the a_wait_vrise state, the pull-up of the B device is turned on. As a result, the A device in which the data signal line D + is pulled down operates as a host, and the B device in which the data signal line D + is pulled up operates as a peripheral.
[0068]
In the a_host state, the A device operates as a USB standard host. More specifically, in order to enumerate a peripheral as a host, the data signal line is driven to the “SE0” state as a reset signal for bus reset. Then, by continuing the state for a given specified time, the peripheral performs a reset process. After that, the host uses the control transfer to transfer configuration information and assign addresses, and starts USB transfer. In this state, when the host becomes the host but the bus is no longer used (a_bus_req /), or when there is a transition request to the suspend state (a_suspend_req), the state transits to the a_suspend state (ST8). Also, when the Mini-A plug is unplugged (id), when the line state changes from the "J" state to the "SE0" state (b_conn /), or a higher-level application requests that the voltage on the VBUS line be dropped. At this time (a_bus_drop), the state transits to the a_wait_bcon state (ST9). When the voltage of the VBUS line falls below a given threshold voltage (a_vbus_vld /) for some reason, the state transits to the a_vbus_err state (ST10).
[0069]
In the a_suspend state, transmission of SOF (Start Of Frame) packets is stopped. At this time, the B device operates as a peripheral, and the B device remains in the b_peripheral state. At this time, the A device permits the above-described HNP to the B device (a_set_b_hnp_en), and when the pull-up is turned off in the B device and the line state changes to the “SE0” state (b_conn /), the A device transits to the a_peripheral state ( ST11). When the device A wants to use the bus (a_bus_req), or when the device B changes the line state to the “K” state (b_bus_resume), the device transits to the a_host state (ST12). Furthermore, when the A device does not permit the HNP to the B device (a_set_b_hnp_en /) and the pull-up is turned off in the B device and the line state becomes the “SE0” state (b_conn /), the device transits to the a_wait_bcon state. (ST13). Furthermore, when the Mini-A plug is unplugged (id), when a higher-level application requests to drop the voltage on the VBUS line (a_bus_drop), or when a specified time or more has elapsed in the a_suspend state (a_aidl_bdis_tmout), the state transits to the a_wait_vfall state. (ST14). When the voltage of the VBUS line falls below a given threshold voltage (a_vbus_vld /) for some reason, the state transits to the a_vbus_err state (ST15).
[0070]
In the a_peripheral state, the A device turns on the pull-up, and the B device turns off the pull-up on the B device side by enabling the HNP from the A device as described later, so that the A device becomes a peripheral and the B device becomes the host. Become. When the B device does not use the bus (b_bus_suspend) as in the case where the B device serving as the host has completed the data transfer, the device transits to the a_wait_bcon state (ST16). In the a_wait_bcon state, the pull-up of the A device is turned off as described above. In addition, in the a_peripheral state, when the Mini-A plug is unplugged (id) or when a higher-level application requests to drop the voltage of the VBUS line (a_bus_drop), the state transits to the a_wait_vfall state (ST17). When the voltage of the VBUS line falls below a given threshold voltage (a_vbus_vld /) for some reason, the state transits to the a_vbus_err state (ST18).
[0071]
In the a_bus_err state, an overcurrent state occurs, and thus, for example, a request is made by the firmware to drop the voltage on the VBUS line. In such a state, the state transits to the a_wait_vfall state when the Mini-A plug is unplugged (id) or when there is a request to lower the voltage of the VBUS line from the host application (a_bus_drop) (ST19).
[0072]
In the a_wait_vfall state, current supply to the VBUS line is stopped. When the Mini-A plug is unplugged (id), when you want to use the bus (a_bus_req), or when the voltage on the VBUS line is below a given threshold voltage (a_sess_vld /), the pull-up is turned off in the B device When the line state changes to the “SE0” state (b_conn /), the state transits to the a_idle state (ST20).
[0073]
1.5 State Transition of B Device FIG. 6 is a diagram for explaining the state transition of the B device.
[0074]
In the B device, the b_idle state is the start state (ST30).
[0075]
In the b_idle state, current supply to the VBUS line is stopped. Thus, the voltage on the VBUS line is below a given threshold voltage. Further, the pull-up of the data signal line D + is turned off. At this time, when the Mini-A plug is inserted, the ID terminal goes to the “L” level (id /), so that the state becomes the a_idle state (ST31). When the voltage of the VBUS line exceeds a given threshold voltage (b_sess_vld), the state transits to the b_peripheral state (ST32).
[0076]
In the b_peripheral state, the pull-up of the data signal line D + is turned on, so that b_conn can be detected in the a_wait_bcon state of the A device. In the b_peripheral state, the device operates as a peripheral in response to a request from the A device. When the B device becomes the host, it detects that the A device has become a_suspend (a_bus_suspend), and there is a host operation request (b_bus_req) from a host application of the B device, and HNP is enabled from the A device. If it is performed (b_hnp_en), the state transits to the b_wait_acon state (ST33). In the b_peripheral state, when the Mini-A plug is inserted (id /), or when the voltage of the VBUS line falls below a given threshold voltage (b_sess_vld /), the state transits to the b_idle state (ST34). As a result, the pull-up is turned off in the b_idle state, and for example, the A device can transition from the a_wait_vfall state to the a_idle state.
[0077]
In the b_wait_acon state, the pull-up of the data signal line D + of the B device is turned off, and the A device waits for the pull-up of the data signal line D +. When the pull-up of the data signal line D + is turned on on the device A side (a_conn), the state transits to the b_host state (ST35). In the b_wait_acon state, when the A device detects that the line state has been changed to the “K” state (a_bus_resume), or when a predetermined time or more has passed in the b_wait_acon state (b_ase0_rst_tmout), the state transits to the b_peripheral state (ST36). When the Mini-A plug is inserted (id /), or when the voltage of the VBUS line falls below a given threshold voltage (b_sess_vld /), the state transits to the b_idle state (ST37).
[0078]
In the b_host state, host processing is performed. That is, a bus reset is performed, and generation of an SOF packet is started. The A device will respond to a request from the B device operating as a host. When the device B has no data to transfer as a host and does not use the bus (b_bus_req /), or when it is detected that the pull-up has been turned off in the device A (a_conn /), the state transits to b_peripheral (ST38). At this time, the A device can be detected as the b_bus_suspend of the B device, and the A device transitions from the a_peripheral state to the a_wait_bcon state. As a result, the pull-up of the A device is turned off. In the b_peripheral state, the pull-up of the B device is turned on. Also, in the b_host state, when the Mini-A plug is inserted (id /) or when the voltage of the VBUS line falls below a given threshold voltage (b_sess_vld /), the state transits to the b_idle state (ST39).
[0079]
The B device can request a session start by SRP when the A device is in the suspend state. That is, in the b_idle state, there is a bus use request from the upper application of the B device (b_bus_req), the voltage of the VBUS line is lower than the session end threshold voltage of the B device (b_ses_end), and the line state is “SE0”. If the specified time has elapsed in the state (b_se0_srp), the state transits to the b_srp_init state (ST40).
[0080]
In the b_srp_init state, the A device is requested to start a session by SRP. When the B device completes the SRP (b_srp_done) or when the Mini-A plug is inserted (id /), the state transits to the b_idle state (ST41).
[0081]
2. Devices that conform to the data transfer control device OTG standard need to operate with self-power because of the need to initiate the SRP described above. Therefore, when the device is connected to, for example, a USB (USB1.1 or USB2.0) compliant standard host, the power supply in the own device is supplied despite the current being supplied from the standard host to the VBUS line. Is wasted.
[0082]
Therefore, the data transfer control device as a device compliant with the OTG standard in the embodiment described below realizes an operation as a dual-role device by the above-described state transition, while providing a power supply switching circuit, and using the power supply switching circuit. Waste power consumption can be reduced.
[0083]
2.1 First Embodiment The data transfer control device according to the first embodiment can switch from a self-power supply to a bus power supply by a power supply switching circuit.
[0084]
FIG. 7 shows an outline of the configuration of the data transfer control device according to the first embodiment.
[0085]
The data transfer control device 100 can control data transfer according to the OTG standard as an OTG controller.
[0086]
Such a data transfer control device 100 includes a data transfer processing circuit 110, a power supply circuit 120, a power supply switch circuit 130, a power supply control circuit 140, an ID detection circuit 150, and a VBUS comparator 160.
[0087]
The data transfer processing circuit 110 includes a state controller 112. The state controller 112 switches the operation of the device A (first device) as a host or a peripheral and the operation of the device B (second device) as a peripheral or a host by the state transitions shown in FIGS. 5 and 6. It can be carried out. The data transfer processing circuit 110 performs a data transfer process in accordance with the OTG standard via a data signal line (data line; D +, D-) according to the state transition of the state controller 112.
[0088]
Power supply circuit 120 includes an internal power supply switching circuit 122. The internal power supply switching circuit 122 receives a VBUS signal from a power supply switch circuit 130 from either an external power supply (AC power supply) 124 connected via an outlet or the like or a rechargeable battery 126 built in the data transfer control device 100. Power can be supplied to the data transfer processing circuit 110 via a line or the power supply control circuit 140.
[0089]
The power supply switch circuit 130 can electrically connect the power supply circuit 120 and the VBUS line based on a control signal VBUSON corresponding to the state to which the state controller 112 has transitioned. The control signal VBUSON becomes active in the a_wait_vrise state, a_wait_bcon state, a_host state, a_suspend state, and a_peripheral state of the A device shown in FIG. The control signal VBUSON becomes active during execution of VBUS pulsing in the b_srp_init state of the B device shown in FIG. When the control signal VBUSON is active, the power supply switch circuit 130 electrically connects the power supply circuit 120 to the VBUS line.
[0090]
Power supply control circuit 140 includes a power supply switching circuit 142. The power supply switching circuit 142 electrically connects either the VBUS line or the power supply circuit 120 to the data transfer processing circuit 110 by the switching signal PWRSEL. That is, power is supplied to the data transfer processing circuit 110 from the VBUS line or the power supply circuit 120 by the switching signal PWRSEL.
[0091]
The switching signal PWRSEL is generated based on an output signal of the switching circuit 144 or a control signal from the state controller 112. Here, the changeover switch circuit 144 is, for example, a switch circuit that can be mechanically turned on and off, and may be configured to be manually switchable by an operator of the data transfer control device 100. Further, a switch circuit that can be set on / off by software may be used. The switching signal PWRSEL may be generated based on an output signal of the switching circuit 144 and a control signal from the state controller 112.
[0092]
The ID detection circuit 150 detects the voltage of the signal line connected to the ID terminal and determines the type of the USB cable plug, similarly to the ID detection circuits 12 and 22 shown in FIG.
[0093]
The VBUS comparator 160 monitors the voltage on the VBUS line. More specifically, when operating as an A device, the VBUS comparator 160 determines whether the voltage of VBUS exceeds the session valid threshold (Va_sess_vld) or the VBUS valid threshold (VBUS Valid threshold) (Va_VBUS_vld) of the A device. Detect. When operating as a B device, the VBUS comparator 160 detects whether the voltage of VBUS has exceeded a session valid threshold (Vb_sess_vld) of the B device. An ID detection signal IDDETECT which is an output of the ID detection circuit 150 is input to the state controller 112. The VBUS detection signal VCOMP output from the VBUS comparator 160 is input to the state controller 112.
[0094]
FIG. 8 shows an example of a power supply switching flow of the data transfer control device according to the first embodiment.
[0095]
Here, a case where the switching signal is generated based on the output of the state controller 112 will be described.
[0096]
First, when the power is turned on, the data transfer control device 100 is initialized. Then, the state controller 112 changes to the b_idle state as shown in FIGS. 5 and 6 (step S200). Thus, data transfer control and other circuit blocks operate by a self-powered power supply, that is, power supply from the external power supply 124 or the rechargeable storage battery 126 in FIG.
[0097]
Here, when the USB cable is connected by the user, the voltage of the signal line connected to the ID terminal is detected (step S201). Other than when the ID detection circuit 150 detects that the plug of the connected USB cable is a Mini-A plug, that is, when the ID detection signal IDDETECT is “H” (step S201: Y), the state controller 112 The output is determined (step S202).
[0098]
More specifically, from the output of the state controller 112, the b_idle state (in a broad sense, the idle state of the B device) and the voltage of the VBUS line exceed “Vb_sess_vld” (first threshold) (b_sess_vld becomes True) or not. This is to determine whether the transfer destination or transfer source of the data is a USB standard host or an OTG standard A device that always supplies power to the VBUS line.
[0099]
When the state is the b_idle state and b_sess_vld is true (step S202: Y), the power is switched to the bus power supply (step S203). That is, the power supply switching circuit 142 of the power supply control circuit 140 switches the data transfer processing circuit 110 to supply power from the VBUS line. Thus, even when operating with the B device, the data transfer processing circuit 110 operates with the bus power supply.
[0100]
Thereafter, the power supply circuit 120 is disabled to reduce unnecessary power consumption (step S204). More specifically, internal power supply switching circuit 122 electrically disconnects external power supply 124 or rechargeable storage battery 126 from other internal circuits.
[0101]
When the ID detection circuit 150 detects in step S201 that the plug of the connected USB cable is a Mini-A plug (step S201: Y), or in step S202, the b_idle state and b_ses_vld are not true. When it is determined (step S202: N), at least the data transfer processing circuit 110 does not change its operation with the self-powered power supply. If “N” in step S202, the SRP can be initiated with respect to the connection partner by the self-powered power supply.
[0102]
As described above, when the data transfer control device 100 is required to operate with the self-powered power supply, when it is confirmed that power is supplied to the VBUS line from the connection partner, the bus is switched from the self-powered power supply to the bus. It can be switched to a power supply (the source of the internal power supply can be switched from the power supply circuit 120 to the VBUS line). Therefore, since the internal circuit can be operated using the power supplied from the connection partner, unnecessary power consumption in the internal power supply circuit can be reduced.
[0103]
Although the switching signal PWRSEL is generated based on the output of the state controller 112 in FIG. 8, the switching signal PWRSEL may be generated by using the switch circuit 144 or software.
[0104]
2.2 Second Embodiment In the first embodiment, a data transfer control device capable of switching from a self-powered power supply to a bus-powered power supply by a power supply switching circuit 142 of a power supply control circuit 140 is provided. However, if, after switching to the bus power supply, the connection partner supplying the power to the VBUS line cannot supply the power for some reason, the data transfer control device must stop the data transfer control as an abnormal state. Absent.
[0105]
Therefore, in the second embodiment, even if the connection partner that supplies power to the VBUS line after switching to the bus power supply cannot supply power for some reason, the internal circuit operates normally by switching to the backup power supply. You can continue to let.
[0106]
FIG. 9 shows an outline of the configuration of a data transfer control device according to the second embodiment.
[0107]
Here, a state is shown in which the data transfer control devices in the second embodiment are connected via a USB cable. That is, one is mounted as an A device on the electronic device P on the host side, and the other is mounted as a B device on the electronic device Q on the peripheral side.
[0108]
In addition, the same parts as those of the data transfer control device according to the first embodiment shown in FIG. However, each code is appended with “h” indicating a host-side block or “p” indicating a peripheral-side block.
[0109]
The data transfer control devices 300 and 400 mounted on the electronic devices P and Q have the same configuration. As shown in FIG. 9, since the Mini-A plug is connected to the data transfer control device 300, the data transfer control device 300 operates as an A device. Since the Mini-B plug is connected to the data transfer control device 400, the data transfer control device 400 operates as a B device.
[0110]
The data transfer control devices 300 and 400 are different from the data transfer control device 100 according to the first embodiment in the configuration of the power supply control circuits 340h and 340p and the newly added VBUS voltage detection circuit (power supply line voltage detection circuit). ) 350h and 350p.
[0111]
Power supply control circuits 340h and 340p include power supply switching circuits 142h and 142p. The switching signal PWRSEL input to the power supply switching circuit 142h is a result of a logical product operation of the ID detection circuit 150h and the output signal COMPOUT of the VBUS voltage detection circuit 350h. The switching signal PWRSEL input to the power supply switching circuit 142p is a result of a logical product operation of the ID detection circuit 150p and the output signal COMPOUT of the VBUS voltage detection circuit 350p.
[0112]
The VBUS voltage detection circuits 350h and 350p detect whether or not the voltage on the VBUS line has exceeded a given threshold (second threshold), and outputs the detection result as an output signal COMPOUT. The threshold (second threshold) in the VBUS voltage detection circuit 350h is higher than the threshold (first threshold) in the VBUS comparator 160h. The threshold (second threshold) in the VBUS voltage detection circuit 350p is higher than the threshold (first threshold) in the VBUS comparator 160p.
[0113]
FIG. 10 illustrates an example of a power supply switching flow of the data transfer control device according to the second embodiment.
[0114]
First, when the power is turned on, the data transfer control device is initialized. Then, the state controller transitions to the b_idle state as shown in FIGS. 5 and 6 (step S450). Thereby, the data transfer control and other circuit blocks operate by the power supply from the self-powered power supply, that is, the external power supply 124h (124p) or the rechargeable storage battery 126h (126p) in FIG.
[0115]
Here, when the USB cable is connected by the user, the voltage of the signal line connected to the ID terminal is detected (step S451). Except when the ID detection circuit 150h (150p) detects that the plug of the connected USB cable is a Mini-A plug, that is, when the ID detection signal IDDETECT is “H” (step S451: N), the state is determined. The output of the controller 112h (112p) is determined (step S452).
[0116]
More specifically, from the output of the state controller 112h (112p), it is in the b_idle state (in a broad sense, the idle state of the B device) and the voltage of VBUS has exceeded “Vb_sess_vld” (first threshold) ( b_sess_vld is true). If the state is the b_idle state and b_sess_vld is true (step S452: Y), the power is switched to the bus power supply (step S453). That is, the power supply switching circuit 142h (142p) of the power supply control circuit 340h (340p) switches the data transfer processing circuit 110h (110p) to supply power from the VBUS line.
[0117]
Thereafter, the power supply circuit 120h (120p) is disabled to reduce unnecessary power consumption (step S454). More specifically, in the internal power supply switching circuit 122h (122p), the external power supply 124h (124p) or the rechargeable storage battery 126h (126p) is electrically disconnected from other internal circuits.
[0118]
Subsequently, it is determined whether or not the state variable b_backup is false (Step S455). The state variable b_backup becomes true when the voltage of the VBUS line exceeds the backup threshold VB_BACKUP (second threshold). The backup threshold VB_BACKUP is an arbitrarily settable threshold, and is higher than the session valid voltage “Vb_sess_vld” (first threshold) of the B device and lower than the VBUS valid voltage “Va_VBUS_vld” of the A device, as described later. Is set. The state variable b_backup is the output signal COMPOUT of the VBUS voltage detection circuit 350h (350p).
[0119]
Then, when the state variable b_backup becomes false (step S455: N), that is, when the voltage of the VBUS line falls below the backup threshold VB_BACKUP (second threshold), the power supply circuit 120 is enabled (step S456). Is switched to the self-powered power supply (step S457).
[0120]
When the ID detection circuit 150h (150p) detects in step S451 that the plug of the connected USB cable is a Mini-A plug (step S451: N), or in step S452, the b_idle state and the b_sess_vld are true. If it is determined that this is not the case (step S452: N), there is no change in operating at least the data transfer processing circuit 110 with the self-power supply. If “N” in step S452, the SRP can be initiated with respect to the connection partner by the self-powered power supply.
[0121]
As described above, in the data transfer control device conforming to the OTG standard, even if power is not supplied to the VBUS line for some reason after switching from the self-power supply to the bus power supply, the voltage drop of the VBUS line may occur. Was detected and switched to a self-powered power supply. Thus, even if power is not supplied to the VBUS line for some reason after switching to the bus power supply by the B device, it is possible to switch to the self-power supply. The power can be continuously supplied from the power supply.
[0122]
Next, a specific operation of the data transfer control device according to the second embodiment will be described.
[0123]
FIG. 11 shows an example of a timing chart of power supply switching when the data transfer control devices according to the second embodiment shown in FIG. 9 are connected to each other.
[0124]
After the power is turned on, the data transfer control devices 300 and 400 are initialized, and both transition to the idle state (b_idle state) of the B device. The data transfer control devices 300 and 400 both operate with a self-powered power supply in a default state in order to perform data transfer control conforming to the OTG standard.
[0125]
At time t1, the USB cable is connected. It is assumed that the Mini-A plug is connected to the data transfer control device 300 and the Mini-B plug is connected to the data transfer control device 400.
[0126]
In the ID detection circuit 150h of the data transfer control device 300, since the signal line connected to the ID terminal is grounded, the ID detection signal IDDETECT becomes “L”. Therefore, unless the connection of the USB cable is changed, the data transfer control device 300 operates as the A device after the time t1, and transits to the a_idle state. That is, as far as the data transfer control is concerned, in the default state, it is performed by the self-power supply. On the other hand, in the ID detection circuit 150p of the data transfer control device 400, since the ID terminal is kept pulled up, the ID detection signal IDDETECT becomes “H”. Therefore, unless the connection of the USB cable is changed, the data transfer control device 400 operates as the B device after the time t1, and remains in the b_idle state. That is, as far as the data transfer control is concerned, in the default state, it is performed by the bus power supply.
[0127]
Then, the data transfer control device 400 transitions to the b_srp_init state at time t2 in order to initiate the SRP in response to a bus use request or the like from a higher-level application. In this state, the data transfer control device 400 initiates an SRP with the data transfer control device 300. As a result, the data transfer control device 300 detects the SRP from the data transfer control device 400, and transitions to the a_wait_vrise state at time t3. On the other hand, the data transfer control device 400 returns to the b_idle state by b_srp_done (SRP completed).
[0128]
In the data transfer control device 300, the control signal VBUSON becomes active in the a_wait_vrise state, and the power supply circuit 120h and the VBUS line are electrically connected via the power supply switch circuit 130h. As a result, current supply (power supply) to the VBUS line is started, and the voltage of the VBUS line increases.
[0129]
In the data transfer control device 400, the VBUS voltage is monitored by the VBUS comparator 160p. Then, at time t4 when the VBUS comparator 160p determines that the voltage of VBUS has exceeded the session valid threshold (Vb_ses_vld) (first threshold) of the B device, the state controller 112p makes a transition to the b_peripheral state. In the b_peripheral state, the data transfer control device 400 operates as a peripheral in response to a request from the data transfer control device 300 as the A device.
[0130]
At the subsequent time t5, the VBUS voltage detection circuits 350h and 350p of the data transfer control devices 300 and 400 set the VBUS line voltage higher than the session valid threshold of the B device. The backup threshold VB_BACKUP (second threshold) Is exceeded. At this time, the output signals COMPOUT of the VBUS voltage detection circuits 350h and 350p become “H”. Therefore, in the power supply switching circuit 142h of the data transfer control device 300, the switching signal PWRSEL remains “L”, so that the power supply circuit 120h and the data transfer processing circuit 110h are connected to operate with a self-powered power supply. On the other hand, in the power supply switching circuit 142p of the data transfer control device 400, since the switching signal PWRSEL changes to “H”, the data transfer processing circuit 110p is switched so that power is supplied from the VBUS line, and the bus power supply Will work with.
[0131]
At time t6, in the data transfer control device 300 operating as the A device, when the VBUS comparator 160h detects that the VBUS valid threshold of the A device on the VBUS line is exceeded, the state transits to the a_wait_bcon state.
[0132]
When the data transfer control device 300 confirms at time t7 that the data line D + has been pulled up in the data transfer control device 400 in the a_wait_bcon state, the data transfer control device 300 transitions to the a_host state. In the a_host state, the data transfer control device 300 operates as a USB standard host.
[0133]
In the a_host state, when the data transfer control device 300 no longer uses the bus, or when there is a transition request from the upper application to the suspend state, the state transits to the a_suspend state at time t8.
[0134]
Here, when there is a request from the upper application to drop the voltage of the VBUS line, at time t9, the data transfer control device 300 transitions to the a_wait_vfall state. In the a_wait_vfall state, current supply to the VBUS line is stopped, and the voltage of the VBUS line drops.
[0135]
At time t10, the VBUS voltage detection circuits 350h and 350p of the data transfer control devices 300 and 400 detect that the voltage of the VBUS line has fallen below the backup threshold VB_BACKUP (second threshold). At this time, the output signals COMPOUT of the VBUS voltage detection circuits 350h and 350p become “L”. Therefore, in the power supply switching circuit 142h of the data transfer control device 300, the switching signal PWRSEL remains “L”, so that the power supply circuit 120h and the data transfer processing circuit 110h are connected to operate with a self-powered power supply. On the other hand, in the power supply switching circuit 142p of the data transfer control device 400, since the switching signal PWRSEL changes to “L”, the data transfer processing circuit 110p is switched so that power is supplied from the power supply circuit 120p, It will run on power.
[0136]
Then, at time t11, in the data transfer control device 400, when the VBUS comparator 160p determines that the voltage of the VBUS line has fallen below the session valid threshold (Vb_sess_vld) (first threshold) of the B device, the state controller 112p , B_idle state.
[0137]
At the subsequent time t12, since the voltage of the VBUS line is lower than the session valid threshold (Vb_sess_vld) (first threshold) of the B device, the pull-up is turned off in the data transfer control device 400 and the line state changes to the “SE0” state. , The data transfer control device 300 transits to the a_idle state.
[0138]
As described above, the data transfer control device 300 operating as the A device operates with the self-power supply. The data transfer control device 400 operating as a B device operates as a self-powered power supply as a default state as far as the data transfer control is concerned. However, when performing a peripheral operation in a state where power is supplied via a VBUS line, a bus power supply power supply is used. Can work with When it is detected that power is no longer supplied via the VBUS line, the power supply is switched to a self-powered power supply to prepare for the next data transfer process.
[0139]
Incidentally, in the data transfer control device set in the B device, it is desirable to detect the voltage of the VBUS line in the b_idle state. Therefore, when switching from the self-powered power supply to the bus-powered power supply, it is desirable to perform the switching operation after transitioning from the b_idle state to the b_peripheral state. When switching from the bus power supply to the self-power supply, it is desirable to switch to the self-power supply before transitioning to the b_idle state.
[0140]
FIG. 12 shows a timing chart when switching between the self-powered power supply and the bus-powered power supply.
[0141]
Here, the relevant portion of the timing chart shown in FIG. 11 is enlarged. In the second embodiment, the backup threshold V B_BACKUP (second threshold) is higher than the session valid threshold (Vb_sess_vld; for example, 4.0 V) of the B device (first threshold) and the VBUS valid of the A device. The voltage (for example, 4.2 V) is set lower than the threshold value (Va_VBUS_vld, for example, 4.4 V).
[0142]
By doing so, the B device transitions from the b_idle state to the b_peripheral state on condition that the voltage of the VBUS line exceeds the session valid threshold (first threshold) of the B device. Can be switched in the b_peripheral state.
[0143]
In addition, in the B device, since the transition from the b_peripheral state to the b_idle state is performed on condition that the voltage of the VBUS line falls below the session valid threshold (first threshold) of the B device, switching from the bus power supply to the self-power supply is performed. Can be performed in the b_peripheral state.
[0144]
In the A device, since the voltage of the VBUS line needs to be raised to at least the VBUS valid threshold value Va_VBUS_vld of the A device, the backup threshold value VB_BACKUP needs to be set lower than the VBUS valid threshold value Va_VBUS_vld of the A device.
[0145]
3. Electronic Apparatus Next, an example of an electronic apparatus including the data transfer control device according to the first or second embodiment will be described. For example, FIG. 13A shows an internal block diagram of a printer which is one of the electronic devices, and FIG. 14A shows an external view thereof. A CPU (microcomputer) 510 controls the entire system. The operation unit 511 is for the user to operate the printer. The ROM 516 stores control programs, fonts, and the like, and the RAM 517 functions as a work area for the CPU 510. The DMAC 518 is a DMA controller for performing data transfer without the intervention of the CPU 510. The display panel 519 is for notifying the user of the operation state of the printer.
[0146]
Serial print data sent from another device such as a personal computer via USB is converted into parallel print data by the data transfer control device 500. The converted parallel print data is sent to the print processing unit (printer engine) 512 by the CPU 510 or the DMAC 518. Then, a predetermined process is performed on the parallel print data in the print processing unit 512, and the parallel print data is printed on paper by a printing unit (device for performing a data output process) 514 including a print header and output.
[0147]
FIG. 13B shows an internal block diagram of a digital camera which is one of the electronic devices, and FIG. 14B shows an external view thereof. The CPU 520 controls the entire system. The operation unit 521 is for the user to operate the digital camera. The ROM 526 stores a control program and the like, and the RAM 527 functions as a work area of the CPU 520. DMAC 528 is a DMA controller.
[0148]
An image to be captured is read by an imaging unit 522 including a CCD or the like, and data of the read image is processed by an image processing unit 524. Then, the processed image data is sent to the data transfer control device 500 by the CPU 520 or the DMAC 528. The data transfer control device 500 converts the parallel image data into serial data, and transmits the serial data to another device such as a personal computer via USB.
[0149]
FIG. 13C shows an internal block diagram of a CD-RW drive which is one of the electronic devices, and FIG. 14C shows an external view thereof. The CPU 530 controls the entire system. The operation unit 531 is for the user to operate the CD-RW. The ROM 536 stores a control program and the like, and the RAM 537 functions as a work area of the CPU 530. DMAC 538 is a DMA controller.
[0150]
The data read from the CD-RW 532 by a reading and writing unit (device for performing a data fetching process or a device for performing a data storage process) 533 including a laser, a motor, an optical system, and the like is input to a signal processing unit 534. Then, given signal processing such as error correction processing is performed. Then, the data subjected to the signal processing is sent to the data transfer control device 500 by the CPU 530 or the DMAC 538. The data transfer control device 500 converts the parallel data into serial data, and transmits the serial data to another device such as a personal computer via USB.
[0151]
On the other hand, serial data sent from another device via USB is converted into parallel data by the data transfer control device 500. Then, the parallel data is sent to the signal processing unit 534 by the CPU 530 or the DMAC 538. Then, given signal processing is performed on the parallel data in the signal processing unit 534, and the parallel data is stored in the CD-RW 532 by the reading and writing unit 533.
[0152]
13A, 13B, and 13C, a CPU for controlling data transfer in the data transfer control device 500 may be separately provided in addition to the CPUs 510, 520, and 530.
[0153]
If the data transfer control device of the above embodiment is used for an electronic device, USB transfer can be performed without connecting to a personal computer that performs host operation. In particular, by using a portable electronic device, the user does not need to carry a personal computer, and can easily perform USB transfer. For example, USB transfer can be performed between a printer and a CD-RW without using a personal computer.
[0154]
Further, if the data transfer control device of the above-described embodiment is used for an electronic device, the processing load of firmware operating on the CPU can be reduced, and an inexpensive CPU can be used. Further, since the cost and the size of the data transfer control device can be reduced, the cost and the size of the electronic device can be reduced.
[0155]
Electronic devices to which the data transfer control device of the above-described embodiment can be applied include, for example, various types of optical disk drives (CD-ROM, DVD), magneto-optical disk drives (MO), hard disk drives, TVs, and VTRs. , A video camera, an audio device, a telephone, a projector, a personal computer, an electronic organizer, a word processor and the like.
[0156]
Note that the present invention is not limited to the first or second embodiment, and various modifications can be made within the scope of the present invention.
[0157]
The present invention is particularly preferably applied to data transfer according to the OTG standard, but is not limited thereto. For example, the present invention can be applied to data transfer in a standard based on the same concept as the OTG standard or a standard developed from the OTG standard.
[0158]
Further, in the above-described embodiment, the device in which the Mini-A plug is inserted prior to the transfer is described as the A device, and the device in which the Mini-B plug is inserted is the B device. The present invention can be applied even when the device and the B device are exchanged, for example, when the supply source of the VBUS is switched.
[Brief description of the drawings]
FIG. 1A is a schematic view of a USB cable having a Mini-A plug and a Mini-B plug. FIG. 1B is an explanatory diagram of an A device and a B device. FIG. 1C illustrates a terminal table.
FIG. 2 is a schematic example of a dual-role device to which a USB cable is connected.
FIG. 3 is an explanatory diagram of an SRP.
FIG. 4 is an explanatory diagram of HNP.
FIG. 5 is a diagram illustrating a state transition of an A device.
FIG. 6 is a diagram illustrating a state transition of a B device.
FIG. 7 is a configuration block diagram of a data transfer control device according to the first embodiment.
FIG. 8 is a flowchart showing an example of a power supply switching flow of the data transfer control device according to the first embodiment.
FIG. 9 is a configuration block diagram of a data transfer control device according to a second embodiment.
FIG. 10 is a flowchart showing an example of a power supply switching flow of the data transfer control device according to the second embodiment.
FIG. 11 is a timing chart illustrating an example of a power supply switching timing chart when the data transfer control devices according to the second embodiment illustrated in FIG. 9 are connected to each other;
FIG. 12 is a timing chart when switching between a self-powered power supply and a bus-powered power supply.
FIGS. 13A to 13C are internal block diagrams of an electronic device.
14A to 14C are external views of electronic devices.
[Explanation of symbols]
100 data transfer control device, 110 data transfer processing circuit, 112 state controller, 120 power supply circuit, 122 internal power supply switching circuit, 124 external power supply, 126 rechargeable battery, 130 power supply switch circuit, 140 power supply control circuit, 142 power supply switching circuit, 144 changeover switch circuit, 160 VBUS comparator

Claims (15)

デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置であって、
電源回路と、
前記第1のデバイスとしての動作時に前記電源ラインと前記電源回路とを接続する給電スイッチ回路と、
前記データラインを介してデータ転送を行うデータ転送処理回路と、
所与の切替信号に基づいて、前記電源ライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路と、
を含むことを特徴とするデータ転送制御装置。
By the state transition of the first device that performs data transfer control by the self-power supply in the default state or the state transition of the second device that performs data transfer control by the bus power supply in the default state, the switching control of the host and peripheral states is performed. A data transfer control device for performing data transfer control via a data line and a power supply line,
Power supply circuit,
A power supply switch circuit that connects the power supply line and the power supply circuit during operation as the first device;
A data transfer processing circuit that performs data transfer via the data line;
A power supply switching circuit for supplying power to the data transfer processing circuit from either the power supply line or the power supply circuit based on a given switching signal;
A data transfer control device comprising:
請求項1において、
前記所与の切替信号をオン又はオフにする切替スイッチ回路を含み、
前記所与の切替信号は、
前記切替スイッチ回路の出力に基づいて生成されることを特徴とするデータ転送制御装置。
In claim 1,
A switch circuit for turning on or off the given switch signal,
The given switching signal is
A data transfer control device generated based on an output of the changeover switch circuit.
USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置であって、
電源回路と、
Aデバイスとしての動作時にVBUSラインと前記電源回路とを接続する給電スイッチ回路と、
データラインを介してデータ転送を行うデータ転送処理回路と、
所与の切替信号に基づいて、前記VBUSライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路と、
を含み、
前記電源切替回路は、
Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給することを特徴とするデータ転送制御装置。
A data transfer control device for controlling data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus),
Power supply circuit,
A power supply switch circuit for connecting a VBUS line and the power supply circuit during operation as an A device;
A data transfer processing circuit that performs data transfer via a data line;
A power supply switching circuit for supplying power to the data transfer processing circuit from either the VBUS line or the power supply circuit based on a given switching signal;
Including
The power switching circuit,
When it is determined that the voltage of the VBUS line has exceeded a first threshold value in an idle state during operation as a B device, power is supplied to the data transfer processing circuit from the VBUS line. Data transfer control device.
デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置であって、
電源回路と、
前記第1のデバイスとしての動作時に前記電源ラインと前記電源回路とを接続する給電スイッチ回路と、
前記データラインを介してデータ転送を行うデータ転送処理回路と、
前記電源ラインの電圧が第2の閾値を超えたか否かを検出する電源ライン電圧検出回路と、
所与の切替信号に基づいて、前記電源ライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路と、
を含み、
前記電源切替回路は、
前記第2のデバイスとして動作し、かつ前記電源ラインの電圧が前記第2の閾値より低い第1の閾値を超えていると判断された場合に、前記電源ラインから前記データ転送処理回路に対して電源を供給し、
前記電源ラインの電圧が前記第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給することを特徴とするデータ転送制御装置。
By the state transition of the first device that performs data transfer control by the self-power supply in the default state or the state transition of the second device that performs data transfer control by the bus power supply in the default state, the switching control of the host and peripheral states is performed. A data transfer control device for performing data transfer control via a data line and a power supply line,
Power supply circuit,
A power supply switch circuit that connects the power supply line and the power supply circuit during operation as the first device;
A data transfer processing circuit that performs data transfer via the data line;
A power line voltage detection circuit for detecting whether or not the voltage of the power line exceeds a second threshold;
A power supply switching circuit for supplying power to the data transfer processing circuit from either the power supply line or the power supply circuit based on a given switching signal;
Including
The power switching circuit,
Operating as the second device, and when it is determined that the voltage of the power supply line exceeds a first threshold lower than the second threshold, Supply power,
A data transfer control device, wherein when it is determined that the voltage of the power supply line does not exceed the second threshold, power is supplied from the power supply circuit to the data transfer processing circuit.
USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置であって、
Aデバイスとしての動作時にVBUSラインと前記電源回路とを接続する給電スイッチ回路と、
データラインを介してデータ転送を行うデータ転送処理回路と、
前記VBUSラインの電圧が第2の閾値を超えたか否かを検出する電源ライン電圧検出回路と、
所与の切替信号に基づいて、前記VBUSライン又は前記電源回路のいずれかから前記データ転送処理回路に対して電源を供給するための電源切替回路と、
を含み、
前記電源切替回路は、
Bデバイスとして動作し、かつ前記VBUSラインの電圧が前記第2の閾値より低い第1の閾値を超えていると判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給し、
前記VBUSラインの電圧が前記第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給することを特徴とするデータ転送制御装置。
A data transfer control device for controlling data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus),
A power supply switch circuit for connecting a VBUS line and the power supply circuit during operation as an A device;
A data transfer processing circuit that performs data transfer via a data line;
A power line voltage detection circuit for detecting whether or not the voltage of the VBUS line has exceeded a second threshold value;
A power supply switching circuit for supplying power to the data transfer processing circuit from either the VBUS line or the power supply circuit based on a given switching signal;
Including
The power switching circuit,
When operating as a B-device and determining that the voltage on the VBUS line exceeds a first threshold lower than the second threshold, supplying power to the data transfer processing circuit from the VBUS line And
A data transfer control device, wherein when it is determined that the voltage of the VBUS line does not exceed the second threshold, power is supplied from the power supply circuit to the data transfer processing circuit.
請求項5において、
前記電源回路から前記VBUSラインへの前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのアイドル状態からペリフェラル状態に遷移した後に行われ、
前記VBUSラインから前記電源回路への前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのペリフェラル状態からアイドル状態に切り替わる前に行われることを特徴とするデータ転送制御装置。
In claim 5,
Switching of a power supply source from the power supply circuit to the VBUS line to the data transfer processing circuit is performed after a transition from the idle state of the B device to the peripheral state,
A data transfer control device, wherein switching of a power supply source for the data transfer processing circuit from the VBUS line to the power supply circuit is performed before switching from a peripheral state of the B device to an idle state.
請求項5において、
前記第2の閾値は、
Bデバイスのセッションバリッド閾値より高く、AデバイスのVBUSバリッド閾値より低いことを特徴とするデータ転送制御装置。
In claim 5,
The second threshold is
A data transfer control device, which is higher than the session valid threshold of the B device and lower than the VBUS valid threshold of the A device.
請求項1乃至7のいずれか記載のデータ転送制御装置と、
前記データ転送処理装置及びバスを介して転送されるデータの出力処理又は取り込み処理又は記憶処理を行う装置と、
を含むことを特徴とする電子機器。
A data transfer control device according to any one of claims 1 to 7,
An apparatus that performs output processing or capture processing or storage processing of data transferred via the data transfer processing device and the bus;
An electronic device comprising:
デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置の電源切替方法であって、
前記データラインを介してデータ転送を行うデータ転送処理回路に対し、前記第1のデバイスとしての動作時に前記電源ラインに接続される電源回路から電源を供給した状態で、前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が第1の閾値を超えたか否かを判断し、
前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が前記第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記電源ラインから電源を供給することを特徴とする電源切替方法。
By the state transition of the first device that performs data transfer control by the self-power supply in the default state or the state transition of the second device that performs data transfer control by the bus power supply in the default state, the switching control of the host and peripheral states is performed. A power supply switching method of a data transfer control device for performing data transfer control via a data line and a power supply line.
In a state where power is supplied from a power supply circuit connected to the power supply line to the data transfer processing circuit that performs data transfer via the data line during the operation as the first device, the data transfer processing circuit operates as the second device. Determining whether the voltage of the power supply line has exceeded a first threshold in an idle state during operation;
Supplying power from the power supply line to the data transfer processing circuit when it is determined that the voltage of the power supply line has exceeded the first threshold value in an idle state during operation as the second device. A power supply switching method characterized by the above-mentioned.
USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置の電源切替方法であって、
前記データラインを介してデータ転送を行うデータ転送処理回路に対し、Aデバイスとしての動作時にVBUSラインに接続される前記電源回路から電源を供給した状態で、Bデバイスとして動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたか否かを判断し、
Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が前記第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給することを特徴とする電源切替方法。
A power switching method for a data transfer control device that controls data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus),
In a state where power is supplied from the power supply circuit connected to the VBUS line during operation as the A device, the data transfer processing circuit performing data transfer via the data line is in an idle state during operation as the B device. Determining whether the voltage on the VBUS line has exceeded a first threshold,
When it is determined that the voltage of the VBUS line has exceeded the first threshold value in an idle state during operation as a B device, power is supplied from the VBUS line to the data transfer processing circuit. Power supply switching method.
デフォルト状態においてセルフパワー電源によりデータ転送制御を行う第1のデバイスのステート遷移又はデフォルト状態においてバスパワー電源によりデータ転送制御を行う第2のデバイスのステート遷移により、ホスト及びペリフェラルのステートの切り替え制御を行って、データライン及び電源ラインを介してデータの転送制御を行うデータ転送制御装置の電源切替方法であって、
前記データラインを介してデータ転送を行うデータ転送処理回路に対し、前記第1のデバイスとしての動作時に前記電源ラインに接続される電源回路から電源を供給した状態で、前記第2のデバイスとしての動作時のアイドル状態において前記電源ラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記電源ラインから電源を供給し、
前記データ転送処理回路に対し前記電源ラインから電源を供給した状態で、前記電源ラインの電圧が第2の閾値を超えていないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給することを特徴とする電源切替方法。
By the state transition of the first device that performs data transfer control by the self-power supply in the default state or the state transition of the second device that performs data transfer control by the bus power supply in the default state, the switching control of the host and peripheral states is performed. A power supply switching method of a data transfer control device for performing data transfer control via a data line and a power supply line.
In a state where power is supplied from a power supply circuit connected to the power supply line to the data transfer processing circuit that performs data transfer via the data line during the operation as the first device, the data transfer processing circuit operates as the second device. When it is determined in the idle state during operation that the voltage of the power supply line has exceeded the first threshold, power is supplied from the power supply line to the data transfer processing circuit,
When it is determined that the voltage of the power supply line does not exceed a second threshold while power is supplied from the power supply line to the data transfer processing circuit, the power supply circuit is supplied to the data transfer processing circuit. A power supply switching method comprising supplying power from a power supply.
USB(Universal Serial Bus)のOTG(On−The−Go)規格に従ってデータ転送を制御するデータ転送制御装置の電源切替方法であって、
データラインを介してデータ転送を行うデータ転送処理回路に対し、Aデバイスとしての動作時にVBUSラインに接続される電源回路から電源を供給した状態で、Bデバイスとしての動作時のアイドル状態において前記VBUSラインの電圧が第1の閾値を超えたと判断された場合に、前記データ転送処理回路に対して前記VBUSラインから電源を供給し、
前記データ転送処理回路に対し前記VBUSラインから電源を供給した状態で、前記VBUSラインの電圧が第2の閾値を超えないと判断された場合に、前記データ転送処理回路に対して前記電源回路から電源を供給することを特徴とする電源切替方法。
A power switching method for a data transfer control device that controls data transfer according to an OTG (On-The-Go) standard of USB (Universal Serial Bus),
The power supply circuit connected to the VBUS line supplies power to the data transfer processing circuit that performs data transfer via the data line while the power supply circuit connected to the VBUS line supplies the data transfer processing circuit. When it is determined that the line voltage exceeds the first threshold, power is supplied to the data transfer processing circuit from the VBUS line,
When it is determined that the voltage of the VBUS line does not exceed a second threshold value while power is supplied to the data transfer processing circuit from the VBUS line, the power supply circuit supplies the data transfer processing circuit with the power supply circuit. A power supply switching method characterized by supplying power.
請求項12において、
前記電源回路から前記VBUSラインへの前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのアイドル状態からペリフェラル状態に遷移した後に行われ、
前記VBUSラインから前記電源回路への前記データ転送処理回路に対する電源の供給元の切り替えは、Bデバイスのペリフェラル状態からアイドル状態に切り替わる前に行われることを特徴とする電源切替方法
In claim 12,
Switching of a power supply source from the power supply circuit to the VBUS line to the data transfer processing circuit is performed after a transition from the idle state of the B device to the peripheral state,
A power supply switching method, wherein switching of a power supply source for the data transfer processing circuit from the VBUS line to the power supply circuit is performed before switching from a peripheral state of the B device to an idle state.
請求項11乃至13のいずれかにおいて、
前記第1の閾値は、前記第2の閾値よりも低く設定されていることを特徴とする電源切替方法。
In any one of claims 11 to 13,
The power supply switching method, wherein the first threshold is set lower than the second threshold.
請求項12において、
前記第2の閾値は、
Bデバイスのセッションバリッド閾値より高く、AデバイスのVBUSバリッド閾値より低いことを特徴とする電源切替方法。
In claim 12,
The second threshold is
A power switching method characterized by being higher than the session valid threshold of the B device and lower than the VBUS valid threshold of the A device.
JP2003085980A 2003-03-26 2003-03-26 Data transfer controller, electronic apparatus, and power switching method Withdrawn JP2004094914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003085980A JP2004094914A (en) 2003-03-26 2003-03-26 Data transfer controller, electronic apparatus, and power switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003085980A JP2004094914A (en) 2003-03-26 2003-03-26 Data transfer controller, electronic apparatus, and power switching method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2002253382A Division JP3654274B2 (en) 2002-08-30 2002-08-30 Data transfer control device, electronic device, and power supply switching method

Publications (1)

Publication Number Publication Date
JP2004094914A true JP2004094914A (en) 2004-03-25

Family

ID=32064424

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003085980A Withdrawn JP2004094914A (en) 2003-03-26 2003-03-26 Data transfer controller, electronic apparatus, and power switching method

Country Status (1)

Country Link
JP (1) JP2004094914A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006301952A (en) * 2005-04-20 2006-11-02 Denso Corp Vehicular usb system and onboard radio communication device
JP2010009208A (en) * 2008-06-25 2010-01-14 Sharp Corp Interface device and mobile terminal apparatus
JP2012502354A (en) * 2008-09-09 2012-01-26 フリースケール セミコンダクター インコーポレイテッド Adaptive feedback and power control in USB devices
JP5093109B2 (en) * 2006-08-04 2012-12-05 株式会社ニコン External storage device and camera
JP2014534543A (en) * 2012-05-22 2014-12-18 ▲華▼▲為▼▲終▼端有限公司 Electrical energy control module, apparatus and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006301952A (en) * 2005-04-20 2006-11-02 Denso Corp Vehicular usb system and onboard radio communication device
JP4572730B2 (en) * 2005-04-20 2010-11-04 株式会社デンソー Vehicle USB system and in-vehicle wireless communication device
JP5093109B2 (en) * 2006-08-04 2012-12-05 株式会社ニコン External storage device and camera
US8581989B2 (en) 2006-08-04 2013-11-12 Nikon Corporation External storage device and camera
JP2010009208A (en) * 2008-06-25 2010-01-14 Sharp Corp Interface device and mobile terminal apparatus
JP2012502354A (en) * 2008-09-09 2012-01-26 フリースケール セミコンダクター インコーポレイテッド Adaptive feedback and power control in USB devices
JP2014534543A (en) * 2012-05-22 2014-12-18 ▲華▼▲為▼▲終▼端有限公司 Electrical energy control module, apparatus and device

Similar Documents

Publication Publication Date Title
JP3654274B2 (en) Data transfer control device, electronic device, and power supply switching method
JP3722217B2 (en) Data transfer control device, electronic device, and data transfer control method
JP3674855B2 (en) Power supply control device and power supply control method
JP3636157B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2004157604A (en) Usb peripheral control method and device
WO2018131353A1 (en) Information processing device, power receiving/supply control circuit and power receiving/supply control method
JP2004021613A (en) Data transfer controller, electronic apparatus, and data transfer control method
JP2004171558A (en) Method and device for communication hub
JP3685151B2 (en) Clock control circuit, data transfer control device, and electronic device
KR100909149B1 (en) Communication device
JP3685150B2 (en) Clock control circuit, data transfer control device, and electronic device
JP2001067156A (en) Peripheral equimenht of computer, control method therefor, image pickup device, and storage medium
JP2001067156A5 (en) Computer peripherals and their control methods, imaging devices and their control methods, and computer-readable storage media
JP2004094914A (en) Data transfer controller, electronic apparatus, and power switching method
JP3636160B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2003122458A (en) Computer device, controller, and method of controlling computer device
JP2006059088A (en) Data transfer control system, electronic equipment and program
EP3477426B1 (en) Computer system, client device and display device
JP2004118343A (en) Electronic apparatus
JP4497587B2 (en) Computer system, computer, message processing method, and computer-readable storage medium
JP2001344047A (en) Electronic equipment and power supply control method for electronic equipment
JP2013101520A (en) Peripheral device and its power supply control method
JP2006340047A (en) Electronic device
JPH11191931A (en) Portable type electronic equipment and battery control method therefor
JP4485113B2 (en) PC adapter for small cards

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051101