JP3742367B2 - USB device and control method thereof - Google Patents

USB device and control method thereof Download PDF

Info

Publication number
JP3742367B2
JP3742367B2 JP2002244058A JP2002244058A JP3742367B2 JP 3742367 B2 JP3742367 B2 JP 3742367B2 JP 2002244058 A JP2002244058 A JP 2002244058A JP 2002244058 A JP2002244058 A JP 2002244058A JP 3742367 B2 JP3742367 B2 JP 3742367B2
Authority
JP
Japan
Prior art keywords
usb
current value
usb device
configuration data
usb host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002244058A
Other languages
Japanese (ja)
Other versions
JP2004086359A (en
Inventor
真史 森本
弘 山本
正則 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Radio Co Ltd
Original Assignee
Japan Radio Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Radio Co Ltd filed Critical Japan Radio Co Ltd
Priority to JP2002244058A priority Critical patent/JP3742367B2/en
Publication of JP2004086359A publication Critical patent/JP2004086359A/en
Application granted granted Critical
Publication of JP3742367B2 publication Critical patent/JP3742367B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、USB(Universal Serial Bus)デバイス及びその制御方法に関し、特に、USBデバイスをUSBホストに接続した直後に実行されるネゴシエーション手順の改良に関する。なお、本願では、アップストリーム側にあるパーソナルコンピュータ(PC)等の装置を「USBホスト」、USBホストから見てダウンストリーム側にあるPHS端末等の装置を「USBデバイス」と総称する。本発明の適用対象はPC対PHS端末間のUSB接続に限定されない。
【0002】
【従来の技術】
USBは、PCに外部機器を接続するためのインタフェース手段として、広く普及している。USBデバイスにおける駆動電力取得形態には、セルフパワーとバスパワーとがある。セルフパワーとは、内蔵電池や外部電源(例えば商用電源)から取得した駆動電力又はそれによる駆動のことであり、バスパワーとは、USBケーブルを介しUSBホストから取得した駆動電力又はそれによる駆動のことである。例えば、PHS端末、携帯電話等のように電池を内蔵する携帯型の装置にてUSBを採用したならば、内蔵電池によるセルフパワーを利用することもバスパワーを利用することも可能である。外部電源端子を有する装置においては、更に、ACアダプタ等を介して外部電源から得られるセルフパワーも、利用可能である。セルフパワーやバスパワーをどのように有効併用するかについては、従来からも様々な提案がなされている。該当又は関連する提案としては、下記特許文献1〜4に記載のものがある。
【特許文献1】
特開平11−305880号公報
【特許文献2】
特開2000−29544号公報
【特許文献3】
特開2001−184146号公報
【特許文献4】
特開2002−7003号公報
【0003】
【発明が解決しようとする課題】
ところで、USBデバイスをUSBケーブルによりUSBホストに接続した直後には、USBホストとUSBデバイスとの間でネゴシエーションが実行される。このネゴシエーションでは、USBデバイスのコンフィギュレーション(機能構成)に関する情報即ちコンフィギュレーションデータを、USBデバイスからUSBホストへと送信し、そのデータにより特定されるコンフィギュレーションでのUSB接続を許可するか否かを、USBホスト側で判断し、その結果に応じて接続許可/接続拒否のいずれかとする。コンフィギュレーションデータには、USBデバイスにて必要とする電流値を示す所要電流値情報(MaxPower)フィールドが含まれている。MaxPowerは、原則として、そのUSBデバイスにおける消費電流を賄えるよう、設定する。
【0004】
また、USBデバイスからコンフィギュレーションデータを受信したUSBホストは、MaxPowerにより特定される値の電流をバスパワーとして供給し得ない場合は、そのコンフィギュレーションによる接続を拒否する。例えば、PC等のUSBホストとUSBデバイスとがUSBハブを介さず1本のUSBケーブルで接続されている場合や、USBホストとUSBデバイスとがセルフパワーハブ(即ちACアダプタ等を介して外部電源から駆動電力を取得しているUSBハブ)を介して接続されている場合には、MaxPower=500mAのコンフィギュレーションでも接続が許可される。これに対して、USBホストとUSBデバイスとがバスパワーハブ(即ちバスパワーを以てその駆動電力として取得しているUSBハブ)を介して接続されている場合には、接続が許可されるのは、最大でも、MaxPower=100mAのコンフィギュレーションである。
【0005】
従って、ネゴシエーション時に例えばMaxPower=500mAのコンフィギュレーションデータを送信するUSBデバイスを、バスパワーハブを介してUSBホストに接続しても、USB接続は許可されない。これを忌避し、とにかく接続許可が常に得られるようにするという発想で、実際の消費電力とは無関係にMaxPowerを100mA以下に設定することも考えられる。しかしながら、そのようなコンフィギュレーションによる接続許可を受けた場合、MaxPower相当値即ちUSBホスト側から供給されるバスパワーに対して、USBデバイスにおける実際の消費電力の超過分は、セルフパワーによって賄われる。その結果として、内蔵電池の放電が進み、或いは外部電源電力が消費される。内蔵電池も外部電源接続端子も備えていないUSBデバイスであれば、電源不足によって正常動作し得なくなる。
【0006】
ハブ種別により接続成否が分かれるというこの問題点に対しては、従来、ハブ使用時には正常動作しないことがある等の注意文付きでUSBデバイスを流通させる、といった流通面での対策しかなされておらず、これを防ぐための有効な技術的対策はとられていなかった。また、電圧や電力の検出値に応じ内蔵電池の放電抑制又は充電を行うことによって内蔵電池をできるだけ良好な充電状態に保つという技術(特許文献1,2参照)、電圧や電力の検出値に応じてセルフパワー/バスパワー切換を行うという技術(特許文献3,4参照)等は、実際の消費電力相当値より小さなMaxPower値での接続時に生じる不具合を抑え問題を緩和する上で役立つものの、いずれも、根本的な解決にならないだけでなく、電圧や電力等の検出又は予測機能なしでは実現できない。また、特許文献1,2に記載されているものは、USBデバイスに電池が内蔵されていることを前提とするものであるから、内蔵電池を有していないUSBデバイスには適用できない。
【0007】
本発明の目的の一つは、USBホストとUSBデバイスとの間に存在する装置群の種類、例えばハブ種別により接続成否が分かれるという問題点を、制御手順の工夫によって解消することにある。
【0008】
【課題を解決するための手段】
この様な目的を達成するために、本発明に係る制御方法は、(1)USBデバイスが、USBホストに接続された直後に当該USBホストに対し、MaxPower値が互いに異なる複数通りのコンフィギュレーションデータを送信し、(2)上記USBホストが、上記USBデバイスから受信したコンフィギュレーションデータについて、上記USBデバイスに対し上記MaxPower値に相当する駆動電流を供給できるか否かを含め、そのコンフィギュレーションデータにより特定されるコンフィギュレーションによるUSB接続を許可できるか否かを判断し、(3)上記USBデバイスが、上記USBホストが許可したUSB接続に係るコンフィギュレーションデータ中のMaxPower値に基づき、当該MaxPower値により特定される取得可能電流値に相当する電力をその消費電力が上回ることとならないよう、当該USBデバイスの動作形態を設定し、(4)しかる後、上記USBホストが、上記取得可能電流値を限度として、上記USBデバイスに駆動電流を供給することを特徴とする。また、本発明に係るUSBデバイスは、(1)USBホストに接続された直後に当該USBホストに対し、MaxPower値が互いに異なる複数通りのコンフィギュレーションデータを送信する手段と、(2)上記USBホストが許可したコンフィギュレーションデータ中のMaxPower値に基づき、当該MaxPower値により特定される取得可能電流値に相当する電力をその消費電力が上回ることとならないよう、その動作形態を設定する手段と、を備え、(3)上記USBホストが許可したコンフィギュレーションデータ中のMaxPower値に相当する駆動電流値である取得可能電流値を限度として上記USBホストから供給される駆動電流により、動作することを特徴とする。
【0009】
本発明の特徴の一つは、ネゴシエーションに際し、そのMaxPower値が互いに異なる複数通りのコンフィギュレーションデータを、USBデバイスから送信していることにある。例えば、最大のバスパワーを要求するMaxPower=500mAのコンフィギュレーションデータと、バスパワーハブ介在時の最大バスパワーを要求するMaxPower=100mAのコンフィギュレーションデータとを、送信する。このようにMaxPower値が互いに異なる複数通りのコンフィギュレーションデータを送信してネゴシエーションを行うようにすれば、USBデバイスが接続許可を受ける確率が高くなる。特に、上記複数通りのコンフィギュレーションデータのうち少なくとも1個におけるMaxPower値を、バスパワーハブ介在時にUSBホストから取得できるであろう駆動電流(即ち100mA以下の値)としておくことにより、ハブの有無やハブの種別によらず接続許可を受けることができる。
【0010】
なお、接続が拒否されたら別のコンフィギュレーションデータによりネゴシエーションを行う、USBホストから許可が得られたら未送信のコンフィギュレーションデータの送信は省略する、という論理で本発明を実施することとすれば、USBホスト側の処理手順に何ら改変を施さずに即ちUSBデバイス側の手順改変のみで本発明を実施できる。その際、そのMaxPower値が大きなコンフィギュレーションデータから順にネゴシエーションに供するようにすれば、USBデバイスは現在の接続環境下で最大のMaxPower即ち最善のコンフィギュレーションによる許可を受けることができる。
【0011】
また、本発明の他の特徴の一つは、USBホストが許可したコンフィギュレーションにおけるMaxPower値に対応した取得可能電流値に相当する電力をUSBデバイスの消費電力が上回ることとならないよう、USBデバイスの動作形態を設定していることにある。ここでいう動作形態の例としては、通信速度やクロック速度がある。例えば、その通信速度を可変設定可能な通信用のUSBデバイスに本発明を適用する場合は、MaxPower値が大きいコンフィギュレーションに許可が与えられたら高速で通信を行い、MaxPower値が小さなコンフィギュレーションにしか許可が与えられなかったら低速で通信を行う、というように、通信速度を切り換えることによって、取得できるバスパワーに対してUSBデバイスの動作負荷ひいては消費電力を適合させる。また例えば、MaxPower値が大きいコンフィギュレーションに許可が与えられたら高速クロックで、MaxPower値が小さなコンフィギュレーションにしか許可が与えられなかったら低速クロックで、USBデバイスを動作させるという形態で、本発明を実施することも可能である。
【0012】
従って、本発明によれば、USBホストにより接続が許可される可能性が高まるため、ハブ種別によって接続成否が分かれるという問題点を、緩和・解消できる。特に、バスパワーハブ介在時における取得可能電流値をMaxPower値に設定したコンフィギュレーションデータによるネゴシエーションを実行するようにすれば、そのUSBデバイスがバスパワーハブを介してUSBホストに接続されているときでも、接続許可を受けることができる。USBデバイスのユーザからすれば、USBデバイスの使用形態が拡張されることとなる。また、本発明においては、許可されたコンフィギュレーションデータ中のMaxPower値に応じてUSBの動作形態例えば通信速度が設定されるため、USBデバイスにおける消費電力に対するバスパワーの不足が概ね生ずることがなく、従って、内蔵電池からの持ち出しを含めセルフパワーの消費が概ね生じない。更に、この動作に際して、電力や電圧の検出等は必要でない。内蔵電池を有していないUSBデバイスにも、本発明を適用できる。
【0013】
【発明の実施の形態】
以下、本発明の好適な実施形態に関し図面に基づき説明する。なお、以下の説明では、一部の部材又はモジュールについて、ソフトウエアかハードウエアかを明示していない。これは、それらをソフトウエア的に実現すべきかハードウエア的に実現すべきかについては、いわゆる当業者であれば本願による開示に基づき適宜決定しうるため、記載を簡略化したものである。また、以下の説明でソフトウエア(ハードウエア)のいずれかによる実現が示唆されているものであっても、ハードウエア(ソフトウエア)的実現が可能なものがある。実現形態の変更・変形についても、いわゆる当業者であれば本願による開示に基づき適宜行いうるであろう。
【0014】
図1に、本発明の一実施形態におけるUSBホスト10及びUSBデバイス20の関係及び要部構成を示す。本実施形態におけるUSBホスト10はダウンストリームのUSBポートを備えるPC、USBデバイス20はアップストリームのUSBポートを備えるPHS端末、USBケーブル30はUSBホスト10とUSBデバイス20とを接続するためのケーブルであり、USBケーブル30のアップストリーム側端子をUSBホスト10のUSBポートに、ダウンストリーム側端子をUSBデバイス20のUSBポートに、それぞれ接続することによって、図1に示した接続状態となる。
【0015】
USBホスト10には、通信アプリケーション11やUSBドライバ12等のソフトウエア類がインストールされており、またハードウエアとして上掲のUSBポートを含むUSBハードウエア13等が実装されている。また、USBデバイス20には、USBホスト10に対して相補的に、USBハードウエア21及びUSBドライバ22が実装又はインストールされているほか、PHSにおける32k/64k/128kbpsでの通信を制御する通信制御モジュール23、通信モジュール23の制御下に無線送受信を実行する回路である無線部24、初期化シーケンスの実行結果に基づき通信制御モジュール23やCPU管理モジュール26の動作を制御するUSB制御モジュール25、通信制御モジュール23に含まれるCPUを始めとする各種の部材を管理するCPU管理モジュール26等が、実装又はインストールされている。このほか、図示していないが、USBデバイス20には、電池や外部電源接続端子を設けることができる。
【0016】
一般に広く知られているように、無線回線を利用してPCによる通信を行うには、無線通信機能を備えた無線通信デバイスをPCに接続して使用するか、或いは同等の機能を備えた無線通信カード或いはボードをPCに実装して使用すればよい。この場合、データ送信は、PC上の通信アプリケーションからPC及び無線通信デバイス(上掲のカード、ボードを含む。以下同様)のハードウエア及びそれに対応したドライバを介し無線通信デバイス上の通信制御モジュールにデータを渡し、その無線通信デバイスの無線通信用の回路によりそのデータを無線回線に送出する、という流れによる。無線受信はこれとは逆の流れである。本実施形態においても、この流れにより通信を行う構成が採用されている。即ち、USBデバイス20がUSBケーブル30によりUSBホスト10に接続され、後述の初期化シーケンスが成功裡に終了してUSB接続が確立された状態では、USBホスト10上の通信アプリケーション11が、USBドライバ12と連携しかつUSBハードウエア13及び21を通じて、USBデバイス20のUSBドライバ22ひいては通信制御モジュール23にデータを渡し、通信制御モジュール23が所定の手順に従い無線部24を通じてそのデータをPHS無線回線に送出する、という流れで、データ送信が行われる。データ受信はこれとは逆の流れとなる(図中の「通信データ」なる両矢印線を参照)。
【0017】
また、図中、USBドライバ12とUSBドライバ22とを結ぶ両矢印線で示されている初期化シーケンスは、USBデバイス20をUSBホスト10に接続した直後に実行される手順であり、USBホスト10に対するUSBデバイス20のネゴシエーションを含んでいる。ネゴシエーションに当たっては、デバイス側のUSBドライバ22からホスト側のUSBドライバ12にコンフィギュレーションデータが渡される。このコンフィギュレーションデータは、USBデバイス20のコンフィギュレーションを示す情報であり、所要電流値情報がセットされるMaxPowerフィールドを含んでいる。所要電流値情報は、USBデバイス20がバスパワーによって正常に且つ過不足なく動作するのに必要なバスパワー電流値を示す情報である。ホスト側のUSBドライバ12は、MaxPowerフィールドを含むコンフィギュレーションデータに基づき、そのコンフィギュレーションデータにより概ね特定されるコンフィギュレーションを有するUSBデバイス20に対しUSB接続を許してよいかどうか、判断する。「許可」との判断が下された場合は、所定の処理(ここでは説明を省略)を経てUSB接続が確立され、前掲の手順による通信が可能となる。逆に、「拒否」との判断が下された場合は、そのコンフィギュレーションではUSB接続が確立されない。例えば、コンフィギュレーションデータ中のMaxPower値が、認容できる上限値を上回っている場合は、「拒否」と判断される。
【0018】
前掲の従来技術に対する本実施形態の特徴的差異は、第1に、USBホスト10に対するUSBデバイス20のネゴシエーションが、MaxPower値が互いに異なる複数通りのコンフィギュレーションデータの逐次送信によって、行われることにある。第2に、許可されたコンフィギュレーションに係るMaxPower値として与えられる取得可能電流値に基づき、USBデバイス20における消費電力がその取得可能電流値相当の電力値以下にとどまるよう、USB制御モジュール25が通信制御モジュール23に対し通信速度を、CPU管理モジュール26に対しクロック速度を、それぞれ指令することによって、USB接続確立後におけるUSBデバイス10の動作形態を決定或いは制限していることにある。
【0019】
具体的には、本実施形態では、最大のバスパワーを要求するMaxPower=500mAのコンフィギュレーションデータと、バスパワーハブ介在時の最大バスパワーを要求するMaxPower=100mAのコンフィギュレーションデータとを、準備する。初期化シーケンスにおいては、USBドライバ22は、まずMaxPower=500mAのコンフィギュレーションデータによりネゴシエーションを行う。その結果「許可」となった場合は、USB制御モジュール25は、バスパワーからの取得可能電流値=500mAであると判断し、通信制御部23に対しては64kbps或いは128kbpsで通信を行うよう指令し(或いは当該速度での通信を許可し)、CPU管理モジュール26に対しては通常速度のクロックによりUSBデバイス20の各部を動作させよと指令する。MaxPower=100mAのコンフィギュレーションデータによるネゴシエーションは省略される。
【0020】
MaxPower=500mAのコンフィギュレーションデータによるネゴシエーションの結果「拒否」となった場合は、USBドライバ22は自らの判断で又はUSB制御モジュール25からの指示に応じて、擬似的にプラグアウトし、再接続後、MaxPower=100mAのコンフィギュレーションデータによりネゴシエーションを行う。その結果「許可」となった場合は、USB制御モジュール25は、バスパワーからの取得可能電流値=100mAであると判断し、通信制御モジュール23に対しては32kbpsで通信を行うよう指令し、CPU管理モジュール26に対しては通常速度よりも低速のクロックによりUSBデバイス20の各部を動作させよと指令する。
【0021】
従って、MaxPower=500mAで「許可」を得た場合とMaxPower=100mAで「許可」を得た場合とを比べると、低速通信・低速クロックである後者の方が、消費電力が小さく、かかる動作状態であればUSBデバイス20における消費電力はバスパワー換算で大抵100mA以下に収まる。言い換えると、前者においては高速通信が可能であり、後者においては低速通信ながら通信が行える。仮にバスパワーハブが介在している場合でも、MaxPower=100mAで「許可」が得られるであろうから、少なくとも後者による低速通信は保証される。また、前者、後者のいずれにおいても、USBデバイス20における消費電力が「許可」されたMaxPower値相当の電力値以下であるため、駆動電力不足による不正常動作や、内蔵電池からの"持ち出し"等は、生じない。更に、MaxPower=500mAのコンフィギュレーションデータによるネゴシエーションの方がMaxPower=100mAのコンフィギュレーションデータによるネゴシエーションより先に実行されているため、即ちMaxPower値が大きい方から順に実行されているため、USBデバイス20は、現在の接続環境下で最大のMaxPower即ち最善のコンフィギュレーションによる許可を受けることができる。かかる動作・利点は、USBホスト10側に特に手を加えずに、USBデバイス20側のUSBドライバ22或いはUSB制御モジュール25によって実施・達成できる。
【0022】
このように、本実施形態によれば、USBホスト10により接続が許可される可能性が高まるため、ハブ種別を含め接続形態によって接続成否が分かれるという問題点を、緩和・解消できる。即ち、従来であれば接続が拒否されたケースでもUSB接続が確立され、低速ながらPHS通信が可能になる。USBデバイス20のユーザにとっては、接続先のハブがセルフパワーかバスパワーかに留意する必要がなくなり、ユーザの心理的負担が軽減される。また、許可されたコンフィギュレーションデータ中のMaxPower値に応じて通信速度やクロック速度が設定されるため、バスパワー不足が概ね生ずることがなく、従って、内蔵電池からの持ち出しを含めセルフパワーの消費が概ね生じない。USBデバイス20を長時間にわたってバスパワーで動作させ通信を行うような場合でも、内蔵電池切れ等は生じない。更に、この動作に際して、電力や電圧の検出等は必要でない。内蔵電池を有していないUSBデバイスでも、本実施形態を採用できる。
【0023】
また、ここではUSBデバイス20としてPHS端末を想定していることから、初期化シーケンス実行結果に応じた設定の対象となる動作形態として、通信速度やクロック速度が例示されている。USBデバイス20の種類によって、当該動作形態は他の種類のものになる。例えば、USB接続型のディジタルカメラに本発明を適用した場合、解像度、液晶のバックライト、通信速度、クロック速度等が設定対象となりうる。
【図面の簡単な説明】
【図1】 本発明の一実施形態におけるUSBホスト及びUSBデバイスを示すブロック図である。
【符号の説明】
10 USBホスト(PC)、11 通信アプリケーション、12,22 USBドライバ、13,21 USBハードウエア、20 USBデバイス(PHS端末)、23 通信制御モジュール、24 無線部、25 USB制御モジュール、26 CPU管理モジュール、30 USBケーブル。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a USB (Universal Serial Bus) device and a control method thereof, and more particularly to an improvement in a negotiation procedure executed immediately after a USB device is connected to a USB host. In the present application, a device such as a personal computer (PC) on the upstream side is collectively referred to as a “USB host”, and a device such as a PHS terminal on the downstream side as viewed from the USB host is collectively referred to as a “USB device”. The application target of the present invention is not limited to the USB connection between the PC and the PHS terminal.
[0002]
[Prior art]
USB is widely used as an interface means for connecting an external device to a PC. There are self-power and bus power in the drive power acquisition mode in the USB device. Self-power is drive power acquired from an internal battery or an external power supply (for example, commercial power supply) or drive by it. Bus power is drive power acquired from a USB host via a USB cable or drive by it. That is. For example, if a USB is adopted in a portable device having a built-in battery such as a PHS terminal, a mobile phone, etc., it is possible to use the self-power by the built-in battery or the bus power. In a device having an external power supply terminal, self-power obtained from an external power supply via an AC adapter or the like can also be used. Various proposals have been made on how to effectively use self-power and bus power. Applicable or related proposals include those described in Patent Documents 1 to 4 below.
[Patent Document 1]
Japanese Patent Laid-Open No. 11-305880 [Patent Document 2]
JP 2000-29544 A [Patent Document 3]
JP 2001-184146 A [Patent Document 4]
Japanese Patent Laid-Open No. 2002-7003
[Problems to be solved by the invention]
By the way, immediately after the USB device is connected to the USB host via the USB cable, the negotiation is executed between the USB host and the USB device. In this negotiation, information regarding the configuration (functional configuration) of the USB device, that is, configuration data is transmitted from the USB device to the USB host, and whether or not the USB connection with the configuration specified by the data is permitted. The determination is made on the USB host side, and the connection is permitted / denied depending on the result. The configuration data includes a required current value information (MaxPower) field indicating a current value required by the USB device. In principle, MaxPower is set so as to cover the current consumption of the USB device.
[0004]
In addition, when the USB host that has received the configuration data from the USB device cannot supply the current of the value specified by MaxPower as the bus power, the USB host rejects the connection based on the configuration. For example, when a USB host such as a PC and a USB device are connected via a single USB cable without going through a USB hub, the USB host and the USB device are connected to a self-powered hub (ie, an external power source via an AC adapter etc.) If the connection is made via a USB hub that has acquired drive power from the device, the connection is permitted even with a configuration of MaxPower = 500 mA. On the other hand, when a USB host and a USB device are connected via a bus power hub (that is, a USB hub obtained as the driving power with the bus power), the connection is permitted. The maximum configuration is MaxPower = 100 mA.
[0005]
Therefore, even if a USB device that transmits configuration data of MaxPower = 500 mA at the time of negotiation is connected to the USB host via the bus power hub, the USB connection is not permitted. The idea of avoiding this and allowing connection permission to be always obtained is to set MaxPower to 100 mA or less regardless of actual power consumption. However, when a connection permission is received according to such a configuration, an excess of the actual power consumption in the USB device is covered by self power with respect to the MaxPower equivalent value, that is, the bus power supplied from the USB host. As a result, the internal battery discharges or external power is consumed. If the USB device has neither a built-in battery nor an external power supply connection terminal, it cannot operate normally due to insufficient power.
[0006]
For this problem of connection success / failure depending on the type of hub, there have been only distribution measures such as distributing USB devices with a cautionary statement that may not work properly when using a hub. No effective technical measures have been taken to prevent this. In addition, a technique (refer to Patent Documents 1 and 2) that keeps the internal battery in the best possible state of charge by suppressing or charging the internal battery according to the detection value of the voltage and power (see Patent Documents 1 and 2). The technology of switching the self power / bus power (see Patent Documents 3 and 4), etc., helps to alleviate the problem by suppressing problems caused when connecting with a MaxPower value smaller than the actual power consumption equivalent value. However, this is not only a fundamental solution, but it cannot be realized without a function of detecting or predicting voltage or power. In addition, since those described in Patent Documents 1 and 2 are based on the premise that a battery is built in the USB device, they cannot be applied to a USB device that does not have a built-in battery.
[0007]
One of the objects of the present invention is to eliminate the problem of connection success / failure depending on the type of device group existing between the USB host and the USB device, for example, the hub type, by devising the control procedure.
[0008]
[Means for Solving the Problems]
In order to achieve such an object, the control method according to the present invention includes: (1) Immediately after a USB device is connected to the USB host, a plurality of configuration data having different MaxPower values from the USB host. (2) The configuration data received from the USB device by the USB host includes whether or not the drive current corresponding to the MaxPower value can be supplied to the USB device. It is determined whether or not the USB connection with the specified configuration can be permitted. (3) Based on the MaxPower value in the configuration data related to the USB connection permitted by the USB host, the USB device uses the MaxPower value. The power corresponding to the specified obtainable current value The operation mode of the USB device is set so that the power consumption of the USB device does not exceed, and (4) after that, the USB host supplies drive current to the USB device with the obtainable current value as a limit. It is characterized by. The USB device according to the present invention includes (1) means for transmitting a plurality of types of configuration data having different MaxPower values to the USB host immediately after being connected to the USB host, and (2) the USB host. Means for setting the operation mode based on the MaxPower value in the permitted configuration data so that the power consumption does not exceed the power corresponding to the obtainable current value specified by the MaxPower value. (3) The operation is performed by the drive current supplied from the USB host up to the obtainable current value which is the drive current value corresponding to the MaxPower value in the configuration data permitted by the USB host. .
[0009]
One of the features of the present invention is that a plurality of types of configuration data having different MaxPower values are transmitted from the USB device during the negotiation. For example, MaxPower = 500 mA configuration data for requesting the maximum bus power and MaxPower = 100 mA configuration data for requesting the maximum bus power when the bus power hub is interposed are transmitted. In this way, if a plurality of types of configuration data having different MaxPower values are transmitted and negotiated, the probability that the USB device is permitted to connect increases. In particular, by setting the MaxPower value in at least one of the plurality of configuration data as a drive current (that is, a value of 100 mA or less) that can be acquired from the USB host when a bus power hub is interposed, Connection permission can be received regardless of the type of hub.
[0010]
If the present invention is implemented with the logic that negotiation is performed with another configuration data when the connection is rejected, and transmission of untransmitted configuration data is omitted when permission is obtained from the USB host, The present invention can be implemented without any modification to the processing procedure on the USB host side, that is, only the procedure modification on the USB device side. At this time, if the negotiation is performed in order from the configuration data having the largest MaxPower value, the USB device can be permitted by the maximum MaxPower, that is, the best configuration under the current connection environment.
[0011]
Another feature of the present invention is that the power consumption of the USB device does not exceed the power corresponding to the obtainable current value corresponding to the MaxPower value in the configuration permitted by the USB host. The operation mode is set. Examples of the operation form here include a communication speed and a clock speed. For example, when the present invention is applied to a USB device for communication whose communication speed can be variably set, if a configuration having a large MaxPower value is permitted, communication is performed at a high speed, and only a configuration having a small MaxPower value is used. By switching the communication speed such that communication is performed at a low speed if permission is not given, the operation load of the USB device and the power consumption are adapted to the bus power that can be acquired. Also, for example, the present invention is implemented in such a manner that a USB device is operated with a high-speed clock when a configuration with a large MaxPower value is granted, and with a low-speed clock when a configuration with a small MaxPower value is granted. It is also possible to do.
[0012]
Therefore, according to the present invention, since the possibility that the connection is permitted by the USB host is increased, the problem that the success or failure of the connection depends on the hub type can be alleviated / resolved. In particular, if negotiation is performed with configuration data in which the obtainable current value when the bus power hub is interposed is set to the MaxPower value, even when the USB device is connected to the USB host via the bus power hub, , Can receive connection permission. From the viewpoint of the user of the USB device, the usage form of the USB device will be expanded. In the present invention, since the USB operation mode, for example, the communication speed is set according to the MaxPower value in the permitted configuration data, there is almost no shortage of bus power with respect to power consumption in the USB device. Therefore, consumption of self-power, including taking out from the built-in battery, generally does not occur. Further, no power or voltage detection is required for this operation. The present invention can also be applied to a USB device that does not have a built-in battery.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings. In the following description, software or hardware is not clearly shown for some members or modules. This is simplified because a so-called person skilled in the art can appropriately determine whether they should be realized in software or hardware based on the disclosure of the present application. Even if the following description suggests realization by any of the software (hardware), there are some that can be realized by hardware (software). A so-called person skilled in the art will be able to make appropriate changes and modifications to the realization based on the disclosure of the present application.
[0014]
FIG. 1 shows the relationship between the USB host 10 and the USB device 20 in one embodiment of the present invention and the main configuration. In this embodiment, the USB host 10 is a PC having a downstream USB port, the USB device 20 is a PHS terminal having an upstream USB port, and the USB cable 30 is a cable for connecting the USB host 10 and the USB device 20. Yes, by connecting the upstream side terminal of the USB cable 30 to the USB port of the USB host 10 and the downstream side terminal to the USB port of the USB device 20, the connection state shown in FIG.
[0015]
Software such as a communication application 11 and a USB driver 12 is installed in the USB host 10, and USB hardware 13 including the above USB port is installed as hardware. In addition, the USB device 20 has a USB hardware 21 and a USB driver 22 mounted or installed in a complementary manner to the USB host 10, and communication control for controlling communication at 32 k / 64 k / 128 kbps in the PHS. Module 23, wireless unit 24 which is a circuit for performing wireless transmission / reception under the control of communication module 23, USB control module 25 for controlling the operation of communication control module 23 and CPU management module 26 based on the execution result of the initialization sequence, communication A CPU management module 26 that manages various members including the CPU included in the control module 23 is mounted or installed. In addition, although not shown, the USB device 20 can be provided with a battery and an external power connection terminal.
[0016]
As is generally known, in order to perform communication by a PC using a wireless line, a wireless communication device having a wireless communication function is connected to the PC for use, or a wireless device having an equivalent function is used. A communication card or board may be mounted on a PC for use. In this case, the data transmission is performed from the communication application on the PC to the communication control module on the wireless communication device via the hardware of the PC and the wireless communication device (including the above-described cards and boards, the same applies hereinafter) and the corresponding driver. The data is transferred, and the data is transmitted to the wireless line by the wireless communication circuit of the wireless communication device. Radio reception is the reverse flow. Also in the present embodiment, a configuration for performing communication according to this flow is adopted. That is, in a state where the USB device 20 is connected to the USB host 10 via the USB cable 30 and the initialization sequence described later is successfully completed and the USB connection is established, the communication application 11 on the USB host 10 is connected to the USB driver. The data is transferred to the USB driver 22 of the USB device 20 and thus to the communication control module 23 through the USB hardware 13 and 21, and the communication control module 23 transmits the data to the PHS wireless line through the wireless unit 24 according to a predetermined procedure. Data transmission is performed in the flow of sending. Data reception is the reverse of this (refer to the double arrow line “communication data” in the figure).
[0017]
In the drawing, the initialization sequence indicated by the double arrow line connecting the USB driver 12 and the USB driver 22 is a procedure executed immediately after the USB device 20 is connected to the USB host 10. Including the negotiation of the USB device 20. In the negotiation, configuration data is transferred from the USB driver 22 on the device side to the USB driver 12 on the host side. This configuration data is information indicating the configuration of the USB device 20, and includes a MaxPower field in which required current value information is set. The required current value information is information indicating a bus power current value necessary for the USB device 20 to operate normally and properly with bus power. Based on the configuration data including the MaxPower field, the host-side USB driver 12 determines whether or not USB connection may be permitted for the USB device 20 having a configuration generally specified by the configuration data. If the determination is “permitted”, the USB connection is established through a predetermined process (not described here), and communication according to the above-described procedure is possible. On the other hand, if a determination of “reject” is made, the USB connection is not established in the configuration. For example, if the MaxPower value in the configuration data exceeds the acceptable upper limit, it is determined as “rejected”.
[0018]
A characteristic difference of the present embodiment with respect to the above-described conventional technology is that, firstly, negotiation of the USB device 20 with respect to the USB host 10 is performed by sequentially transmitting a plurality of types of configuration data having different MaxPower values. . Second, the USB control module 25 communicates so that the power consumption in the USB device 20 remains below the power value corresponding to the acquirable current value based on the acquirable current value given as the MaxPower value related to the permitted configuration. By instructing the communication speed to the control module 23 and the clock speed to the CPU management module 26, the operation mode of the USB device 10 after the USB connection is established is determined or restricted.
[0019]
Specifically, in the present embodiment, configuration data for MaxPower = 500 mA for requesting the maximum bus power and configuration data for MaxPower = 100 mA for requesting the maximum bus power when the bus power hub is interposed are prepared. . In the initialization sequence, the USB driver 22 first negotiates with configuration data of MaxPower = 500 mA. If the result is “permitted”, the USB control module 25 determines that the obtainable current value from the bus power is 500 mA, and instructs the communication control unit 23 to perform communication at 64 kbps or 128 kbps. However, the CPU management module 26 is instructed to operate each part of the USB device 20 with a normal speed clock. Negotiation with configuration data of MaxPower = 100 mA is omitted.
[0020]
If the result of the negotiation based on the configuration data of MaxPower = 500 mA is “rejected”, the USB driver 22 plugs in in a pseudo manner according to its own judgment or according to an instruction from the USB control module 25, and after reconnection Negotiation is performed using configuration data of MaxPower = 100 mA. If the result is “permitted”, the USB control module 25 determines that the current value obtainable from the bus power is 100 mA, instructs the communication control module 23 to perform communication at 32 kbps, The CPU management module 26 is instructed to operate each part of the USB device 20 with a clock slower than the normal speed.
[0021]
Therefore, compared with the case where “permission” is obtained at MaxPower = 500 mA and the case where “permission” is obtained at MaxPower = 100 mA, the latter, which is a low-speed communication / low-speed clock, consumes less power, and this operating state. If so, the power consumption of the USB device 20 is usually less than 100 mA in terms of bus power. In other words, the former allows high-speed communication, and the latter allows low-speed communication. Even if there is a bus power hub, since “permission” will be obtained at MaxPower = 100 mA, at least the low-speed communication by the latter is guaranteed. In both the former and the latter, the power consumption in the USB device 20 is equal to or less than the power value corresponding to the “permitted” MaxPower value. Does not occur. Further, since the negotiation with the configuration data of MaxPower = 500 mA is executed before the negotiation with the configuration data of MaxPower = 100 mA, that is, the USB device 20 is executed in order from the one with the largest MaxPower value. Under the current connection environment, maximum MaxPower, that is, permission with the best configuration can be obtained. Such operations / advantages can be implemented / achieved by the USB driver 22 or the USB control module 25 on the USB device 20 side without particularly modifying the USB host 10 side.
[0022]
As described above, according to the present embodiment, the possibility that the connection is permitted by the USB host 10 is increased, so that the problem that connection success / failure is determined depending on the connection form including the hub type can be alleviated / resolved. That is, even if the connection is rejected in the conventional case, the USB connection is established and PHS communication is possible at a low speed. For the user of the USB device 20, it is not necessary to pay attention to whether the connected hub is self-powered or bus-powered, and the psychological burden on the user is reduced. In addition, since the communication speed and clock speed are set according to the MaxPower value in the permitted configuration data, there is almost no bus power shortage. Therefore, self-power consumption including taking out from the built-in battery is reduced. Mostly not. Even when the USB device 20 is operated with bus power for a long time for communication, the built-in battery does not run out. Further, no power or voltage detection is required for this operation. The present embodiment can also be adopted for a USB device that does not have a built-in battery.
[0023]
Further, since a PHS terminal is assumed here as the USB device 20, the communication speed and the clock speed are exemplified as the operation forms to be set according to the initialization sequence execution result. Depending on the type of the USB device 20, the operation form becomes another type. For example, when the present invention is applied to a USB connection type digital camera, resolution, liquid crystal backlight, communication speed, clock speed, and the like can be set.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a USB host and a USB device according to an embodiment of the present invention.
[Explanation of symbols]
10 USB host (PC), 11 communication application, 12, 22 USB driver, 13, 21 USB hardware, 20 USB device (PHS terminal), 23 communication control module, 24 wireless unit, 25 USB control module, 26 CPU management module 30 USB cable.

Claims (6)

USBデバイスが、USBホストに接続された直後に当該USBホストに対し、所要電流値情報が互いに異なる複数通りのコンフィギュレーションデータを送信し、
上記USBホストが、上記USBデバイスから受信したコンフィギュレーションデータについて、上記USBデバイスに対し上記所要電流値情報に相当する駆動電流を供給できるか否かを含め、そのコンフィギュレーションデータにより特定されるコンフィギュレーションによるUSB接続を許可できるか否かを判断し、
上記USBデバイスが、上記USBホストが許可したUSB接続に係るコンフィギュレーションデータ中の所要電流値情報に基づき、当該所要電流値情報により特定される取得可能電流値に相当する電力をその消費電力が上回ることとならないよう、当該USBデバイスの動作形態を設定し、
しかる後、上記USBホストが、上記取得可能電流値を限度として、上記USBデバイスに駆動電流を供給することを特徴とする制御方法。
Immediately after the USB device is connected to the USB host, a plurality of types of configuration data having different required current value information are transmitted to the USB host.
The configuration specified by the configuration data received from the USB device, including whether the USB host can supply a drive current corresponding to the required current value information to the USB device. Determine whether or not to allow USB connection by
Based on the required current value information in the configuration data related to the USB connection permitted by the USB host, the power consumption of the USB device exceeds the power corresponding to the obtainable current value specified by the required current value information. Set the operation mode of the USB device
Thereafter, the USB host supplies a drive current to the USB device with the obtainable current value as a limit.
請求項1記載の制御方法において、
上記USBデバイスが、
上記複数通りのコンフィギュレーションデータを、その所要電流値情報がより大きい電流値を示しているものから順に、上記USBデバイスに送信し、
上記USBホストから許可が得られときに未送信のコンフィギュレーションデータが残っていた場合は、そのコンフィギュレーションデータの送信を省略することを特徴とする制御方法。
The control method according to claim 1,
The USB device is
The plurality of types of configuration data are transmitted to the USB device in order from the current value information indicating a larger current value,
A control method characterized by omitting transmission of configuration data when untransmitted configuration data remains when permission is obtained from the USB host.
請求項1又は2記載の制御方法であって、その通信速度を可変設定可能な通信用のUSBデバイスに関して実行される制御方法において、
上記動作形態が、上記USBデバイスにおける通信速度であることを特徴とする制御方法。
The control method according to claim 1 or 2, wherein the communication speed is set for a communication USB device capable of variably setting the communication speed.
A control method, wherein the operation mode is a communication speed in the USB device.
請求項1又は2記載の制御方法において、
上記動作形態が、上記USBデバイスにて使用しているクロックの速度であることを特徴とする制御方法。
The control method according to claim 1 or 2,
A control method, wherein the operation mode is a clock speed used in the USB device.
請求項1乃至4のいずれか一項記載の制御方法において、
上記複数通りのコンフィギュレーションデータのうち少なくとも1個が、バスパワーハブ介在時に上記USBホストから取得できるであろう駆動電流をその所要電流値情報としたコンフィギュレーションデータであることを特徴とする制御方法。
The control method according to any one of claims 1 to 4,
A control method characterized in that at least one of the plurality of types of configuration data is configuration data using a drive current that can be obtained from the USB host when a bus power hub is interposed as its required current value information. .
USBホストに接続された直後に当該USBホストに対し、互いに所要電流値情報が異なる複数通りのコンフィギュレーションデータを送信する手段と、
上記USBホストが許可したコンフィギュレーションデータ中の所要電流値情報に基づき、当該所要電流値情報により特定される取得可能電流値に相当する電力をその消費電力が上回ることとならないよう、その動作形態を設定する手段と、
を備え、
上記USBホストが許可したコンフィギュレーションデータ中の所要電流値情報に相当する駆動電流値である取得可能電流値を限度として上記USBホストから供給される駆動電流により、動作することを特徴とするUSBデバイス。
Means for transmitting a plurality of types of configuration data having different required current value information to the USB host immediately after being connected to the USB host;
Based on the required current value information in the configuration data permitted by the USB host, the operation mode is set so that the power consumption does not exceed the power corresponding to the obtainable current value specified by the required current value information. Means for setting;
With
A USB device that operates according to a drive current supplied from the USB host with a limit of an acquirable current value that is a drive current value corresponding to required current value information in configuration data permitted by the USB host. .
JP2002244058A 2002-08-23 2002-08-23 USB device and control method thereof Expired - Fee Related JP3742367B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002244058A JP3742367B2 (en) 2002-08-23 2002-08-23 USB device and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002244058A JP3742367B2 (en) 2002-08-23 2002-08-23 USB device and control method thereof

Publications (2)

Publication Number Publication Date
JP2004086359A JP2004086359A (en) 2004-03-18
JP3742367B2 true JP3742367B2 (en) 2006-02-01

Family

ID=32052660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002244058A Expired - Fee Related JP3742367B2 (en) 2002-08-23 2002-08-23 USB device and control method thereof

Country Status (1)

Country Link
JP (1) JP3742367B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8571478B2 (en) 2008-07-08 2013-10-29 Ricoh Company, Limited Wireless USB device and wireless USB communication system

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003261799A1 (en) * 2003-08-28 2005-03-29 Fujitsu Limited Host apparatus, device, and communication system control method
JP4488987B2 (en) 2005-09-08 2010-06-23 シャープ株式会社 Control system, electronic device, and image forming apparatus
KR100742342B1 (en) 2005-11-14 2007-07-25 삼성전자주식회사 Received apparatus for decreasing data error of transmitted apparatus
JP2008146419A (en) 2006-12-12 2008-06-26 Renesas Technology Corp Usb device and peripheral device for computer
GB2466663A (en) 2009-01-05 2010-07-07 Nec Corp Altering Maximum Power Supply to Smart Card
JP2011070547A (en) 2009-09-28 2011-04-07 Sony Corp Access controller of data storage device
JP6024288B2 (en) * 2012-08-27 2016-11-16 株式会社バッファロー Information processing system and external device
WO2019151198A1 (en) * 2018-02-01 2019-08-08 ソニー株式会社 Cable, method for transmitting control information through cable, connection apparatus, electronic device, and method for controlling output data of electronic device
JP7081294B2 (en) 2018-05-11 2022-06-07 トヨタ自動車株式会社 Electronic unit
CN108829621A (en) * 2018-07-17 2018-11-16 天津瑞发科半导体技术有限公司 A kind of usb expansion function device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8571478B2 (en) 2008-07-08 2013-10-29 Ricoh Company, Limited Wireless USB device and wireless USB communication system

Also Published As

Publication number Publication date
JP2004086359A (en) 2004-03-18

Similar Documents

Publication Publication Date Title
CN100592242C (en) Display device with USB interface
CN102640130B (en) For the apparatus and method that the USB in multiprocessor machine connects
US6055641A (en) Computer interface architecture having a power saving function
CN100359435C (en) Information processing apparatus and control method for the same
DE112013001661B4 (en) APPARATUS, METHOD AND SYSTEM FOR PROVIDING A CONSOLIDATED SIDEBAND COMMUNICATION CHANNEL BETWEEN DEVICES
US7489974B2 (en) Information processing apparatus and method for controlling power supply of the apparatus
US7206603B2 (en) Cellular radio telephone set
JP3742367B2 (en) USB device and control method thereof
CN102778943B (en) Condition control method, device and portable terminal device
US11463955B2 (en) Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN101520745B (en) Data processing equipment and status switching method thereof
KR20010109460A (en) Core computer with clock down feature
US5713028A (en) Micro-processor unit having universal asynchronous receiver/transmitter
US10162402B2 (en) Serial communication method
CN106851041B (en) Information processing unit and its control method with battery saving mode
US20140136829A1 (en) Method, Network Card, and Hard Disk Card for Accessing Shut-Down Hard Disk
US7197578B1 (en) Power management system for bridge circuit
US20140189406A1 (en) Computer device and method of power management of the same
CN112134337A (en) Power adapter, terminal device, electronic device and charging control method thereof
WO2003046725A1 (en) Microcomputer logic developing apparatus
US8307221B2 (en) Mobile communication device and controlling method thereof
US7802119B2 (en) Method and system for saving power of central processing unit
US7930582B2 (en) Image processing apparatus and method of transmitting reference clock
CN104169896A (en) Power management for data ports
US20170177050A1 (en) Electronic system, terminal device, and function expansion device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051101

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051110

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3742367

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091118

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091118

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101118

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121118

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131118

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees