Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4337945B2 - USB controller - Google Patents
[go: Go Back, main page]

JP4337945B2 - USB controller - Google Patents

USB controller Download PDF

Info

Publication number
JP4337945B2
JP4337945B2 JP2008227970A JP2008227970A JP4337945B2 JP 4337945 B2 JP4337945 B2 JP 4337945B2 JP 2008227970 A JP2008227970 A JP 2008227970A JP 2008227970 A JP2008227970 A JP 2008227970A JP 4337945 B2 JP4337945 B2 JP 4337945B2
Authority
JP
Japan
Prior art keywords
usb controller
host
function
initialization
power
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 - Lifetime
Application number
JP2008227970A
Other languages
Japanese (ja)
Other versions
JP2009003959A (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.)
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 JP2008227970A priority Critical patent/JP4337945B2/en
Publication of JP2009003959A publication Critical patent/JP2009003959A/en
Application granted granted Critical
Publication of JP4337945B2 publication Critical patent/JP4337945B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)
  • Information Transfer Systems (AREA)

Description

本発明は、ホストと周辺のデバイスとの間の通信インタフェースの一つであるUSB(Universal Serial Bus:ユニバーサルシリアルバス)インタフェースを提供するUSBコントローラに関する。   The present invention relates to a USB controller that provides a USB (Universal Serial Bus) interface, which is one of communication interfaces between a host and peripheral devices.

デバイスに搭載されるUSBインタフェースは、ホストと双方向通信を行うための2本の信号線を有している。この信号線の一方はデバイス側おいてデバイスの電源ラインにプルアップ抵抗を介して接続されており、ケーブルで接続された状態で電源投入されると、デバイスの電源投入と同時にプルアップされる。これによりホスト側はデバイスの電源投入を知る。デバイスの電源投入の後、ホスト又はUSBハブは通信に先立ってバスリセット信号を発行する。デバイスのUSBインタフェースは、バスリセット信号を受けると、以後通信が正常に行えるようデフォルト状態になる必要がある。その際、USBインタフェースを提供するUSBコントローラは、USBインタフェースの動作を安定に行うために初期化を行う必要がある。そこで、従来のUSBインタフェースは、バスリセット信号が入ってからそれが解除されるまでの期間(バスリセット期間)に初期化を行っている。バスリセット期間は10msec程度である。   The USB interface mounted on the device has two signal lines for bidirectional communication with the host. One of the signal lines is connected to the power supply line of the device on the device side via a pull-up resistor. When the power is turned on while connected by a cable, the signal line is pulled up simultaneously with the power-on of the device. As a result, the host side knows that the device is powered on. After powering on the device, the host or USB hub issues a bus reset signal prior to communication. When receiving the bus reset signal, the USB interface of the device needs to be in a default state so that communication can be normally performed thereafter. At that time, the USB controller that provides the USB interface needs to be initialized in order to stably operate the USB interface. Therefore, the conventional USB interface is initialized in a period (bus reset period) from when a bus reset signal is input until it is canceled. The bus reset period is about 10 msec.

特開平7−219692号公報Japanese Patent Laid-Open No. 7-219692

デバイスが正常に通信を行えるようになるためには、上述したUSBコントローラの初期化だけでなく、それ以前にデバイス自体のCPUやレジスタやメモリ等の初期化なども完了させておく必要があり、それにはバスリセット期間以上の相当の時間がかかる。ところが、ホスト側からは、デバイスの電源投入を知ると直ちにバスリセット信号を発行し、それに間髪を入れずに通信データを送り出してくる可能性がある。このような場合、デバイスでは、バスリセット期間だけでは全ての初期化が完了できず、よって、通信データが正常に受信できないという不具合が生じる。   In order for the device to communicate normally, it is necessary to complete not only the initialization of the USB controller described above, but also the initialization of the CPU, registers, memory, etc. of the device itself before that. This takes a considerable amount of time longer than the bus reset period. However, the host side may issue a bus reset signal as soon as it knows that the device is turned on, and may send out communication data without any delay. In such a case, in the device, all initialization cannot be completed only by the bus reset period, and therefore, there is a problem that communication data cannot be received normally.

従って、本発明の目的は、デバイスの電源投入を知って直ちにホストがバスリセット信号を発行した場合でも、バスリセット解除直後から確実に通信ができる、デバイスのUSBインタフェースを提供することにある。   Accordingly, an object of the present invention is to provide a USB interface of a device that can communicate reliably immediately after canceling the bus reset even when the host issues a bus reset signal immediately after knowing that the device is powered on.

本発明のUSBコントローラは、ホストに電源オン、オフを知らせる信号線を制御して、デバイスの電源投入からUSBコントローラの初期化が完了するまでの初期化期間中、ホストに対する擬似的な電源オフ状態を作り、初期化期間後に信号線を電源オン状態に移行させる。典型的には、前述のようにデバイスの電源で信号線がプルアップされると電源投入をホストに知らせることになるので、電源が投入されても初期化が終わるまで信号線をプルアップせず、初期化後にプルアップするようにする。このような制御を実現するため、後述する実施形態では、デバイスの電源ラインと信号線とを、トランジスタなどのスイッチング素子で接続し、初期化期間中はスイッチング素子をオフ状態に維持し、初期化後にスイッチング素子をターンオンして信号線をプルアップする。或いは、デバイスの電源ラインと信号線との間に初期化期間相当の遅延時間をもった遅延回路を介在させることにより、プルアップの開始を初期化完了時点後または完了時点近くまで遅延させるようにしてもよい。   The USB controller of the present invention controls a signal line that informs the host of power on / off, and during the initialization period from the power-on of the device to the completion of initialization of the USB controller, a pseudo power-off state for the host After the initialization period, the signal line is shifted to the power-on state. Typically, as described above, when the signal line is pulled up by the power supply of the device, the host will be notified of power-on, so the signal line is not pulled up until initialization is completed even if the power is turned on. Pull up after initialization. In order to realize such control, in the embodiments described later, the device power line and the signal line are connected by a switching element such as a transistor, and the switching element is maintained in the OFF state during the initialization period. Later, the switching element is turned on to pull up the signal line. Alternatively, by interposing a delay circuit having a delay time corresponding to the initialization period between the power supply line and signal line of the device, the start of pull-up can be delayed after the completion of initialization or close to the completion time. May be.

本発明によれば、デバイスの電源投入後USBコントローラの初期化が終了してから、ホスト側がデバイスの電源投入を知るので、ホスト側が電源投入を知って直ちにバスリセット信号を発行して通信を開始しても、USBコントローラは確実にその通信を行うことができる。   According to the present invention, after the initialization of the USB controller is completed after the device is turned on, the host side knows that the device is turned on, so the host side knows the power is turned on and immediately issues a bus reset signal to start communication. Even so, the USB controller can reliably perform the communication.

以下、図面に基づいて本発明の実施の形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の一実施形態にかかるデバイスの全体ブロック図である。   FIG. 1 is an overall block diagram of a device according to an embodiment of the present invention.

図1に示すように、デバイスは、外部のホスト(図示せず)に対してUSBインタフェースを提供するUSBコントローラ1と、このデバイスのファンクションを実現する装置、典型的にはCPU3を有している。USBコントローラ1とCPU3とはバスで接続され、アドレス信号、データ、割り込み信号などのやり取りが行える。デバイスの電源投入時には、デバイスで発生するシステムリセット信号がCPU3及びUSBコントローラ1に入る。   As shown in FIG. 1, the device includes a USB controller 1 that provides a USB interface to an external host (not shown), and an apparatus that implements the functions of the device, typically a CPU 3. . The USB controller 1 and the CPU 3 are connected by a bus and can exchange address signals, data, interrupt signals, and the like. When the device is powered on, a system reset signal generated by the device enters the CPU 3 and the USB controller 1.

USBコントローラ1は前記ホストと双方向通信を行うための2本の信号線D+、D−を有しており、これら信号線D+、D−は抵抗R1、R3をそれぞれ通して、ホスト又はUSBハブなどからのUSBケーブル(何れも図示せず)と結合するためのコネクタ5に接続されている。2本の信号線D+、D−は、通信データの伝送路としての役割だけでなく、デバイスの種類や電源状態をホスト側に知らせる役割ももっている。すなわち、信号線D+は、デバイス側でその電位がハイレベルにプルアップされると、デバイスは高速デバイスであって、そのデバイスの電源が投入されていることをホスト側へ通知することになる。もう一方の信号線D−は、これがデバイス側でハイレベルにプルアップされると、そのデバイスは低速デバイスであり、その電源が投入されていることをホスト側へ知らせることになる。   The USB controller 1 has two signal lines D + and D− for bidirectional communication with the host, and these signal lines D + and D− pass through resistors R1 and R3, respectively, to the host or USB hub. Are connected to a connector 5 for coupling with a USB cable (not shown). The two signal lines D + and D− have not only a role as a transmission path for communication data but also a role of notifying the host side of the device type and the power state. That is, when the potential of the signal line D + is pulled up to a high level on the device side, the device is a high-speed device and notifies the host side that the device is powered on. When the other signal line D- is pulled up to a high level on the device side, the device is a low-speed device and informs the host side that the power is turned on.

本実施形態は、デバイスが高速デバイスである場合を例示しており、信号線D+がプルアップ抵抗R5及びスイッチング素子、例えばPNPトランジスタQ1のコレクタ−エミッタパス、を通じてデバイスの電源ライン(直流プラスライン)に接続されている。また、PNPトランジスタQ1のベースは、ベース抵抗R7を通してUSBコントローラ1の制御端子LEDOUTに接続されている。従って、デバイスの電源が投入されただけでは信号線D+はプルアップされず、その後USBコントローラ1が制御端子LEDOUTからPNPトランジスタQ1をターンオンして初めて、信号線D+がプルアップされホスト側にデバイスの電源投入が通知されるようになっている。なお、デバイスが低速デバイスである場合は、信号線D−に対して同様のプルアップ回路が結合される。両方の信号線D+、D−に同様にプルアップ回路を設け、いずれか一方がデバイスの種類に応じて選択できるようになっていてもよい。   This embodiment exemplifies a case where the device is a high-speed device, and the signal line D + is connected to the power supply line (DC plus line) of the device through the pull-up resistor R5 and the switching element, for example, the collector-emitter path of the PNP transistor Q1. It is connected to the. The base of the PNP transistor Q1 is connected to the control terminal LEDOUT of the USB controller 1 through the base resistor R7. Therefore, the signal line D + is not pulled up only by turning on the power of the device. After that, the signal line D + is pulled up only after the USB controller 1 turns on the PNP transistor Q1 from the control terminal LEDOUT. Power-on is notified. When the device is a low speed device, a similar pull-up circuit is coupled to the signal line D−. Both signal lines D + and D− may be similarly provided with a pull-up circuit, and either one may be selected according to the type of device.

以下、上記構成の下でのデバイス電源投入後の動作を図2のフローチャートに従って説明する。   The operation after the device power is turned on under the above configuration will be described below with reference to the flowchart of FIG.

デバイスの電源が投入されると、デバイスのシステムリセット信号がCPU3及びUSBコントローラ1に入力される。システムリセット信号が解除された時点(S1)から、まずCPU3が初期化(S2)を開始する。このシステムリセット解除時点では、USBコントローラ1においては、トランジスタQ1はOFF状態であり、割り込み機能はマスクされて割り込みディゼーブル状態であり、また、ハードウェア自動処理機能CPU3に処理を任せた場合、USBインタフェースとして時間的に間に合わない一部の処理を、USBコントローラ1内のハードウェアが自動的に処理する機能もこの時点ではディセーブル状態である。   When the power of the device is turned on, a system reset signal of the device is input to the CPU 3 and the USB controller 1. First, the CPU 3 starts initialization (S2) from the time (S1) when the system reset signal is released. At the time of releasing the system reset, in the USB controller 1, the transistor Q1 is in the OFF state, the interrupt function is masked and is in the interrupt disable state, and if the processing is left to the hardware automatic processing function CPU3, the USB interface At this time, the function in which the hardware in the USB controller 1 automatically processes some processes that are not in time is also disabled.

CPU3は、自身の初期化を終了すると、USBコントローラ1の初期化(S3)を開始する。このUSBコントローラ1の初期化では、CPU3は、USBコントローラ1内に記録されている割り込みのゴミを消して割り込み機能を初期化し、USBコントローラ1のモード設定を行ってハードウエア自動処理機能をイネーブルにする。   When the CPU 3 finishes its initialization, it starts the initialization (S3) of the USB controller 1. In the initialization of the USB controller 1, the CPU 3 erases the interrupt dust recorded in the USB controller 1, initializes the interrupt function, sets the mode of the USB controller 1, and enables the automatic hardware processing function. To do.

その後、CPU3は割り込み設定を行う(S4)。すなわち、CPU3の割り込み受信をイネーブルにし、USBコントローラ1の割り込み機能をイネーブルにする(S4)。以上でUSBコントローラ1の初期化が完了する。すると、USBコントローラ1は、制御端子LEDOUTを介してトランジスタQ1がターンオンして、ホストに対して電源投入を知らせる(S5)。   Thereafter, the CPU 3 performs interrupt setting (S4). That is, the interrupt reception of the CPU 3 is enabled and the interrupt function of the USB controller 1 is enabled (S4). This completes the initialization of the USB controller 1. Then, the USB controller 1 turns on the transistor Q1 via the control terminal LEDOUT and notifies the host of power-on (S5).

以上ように、デバイスの電源が投入されても、USBコントローラ1の初期化が完了するまでは、信号線D+、D−をローレベルに保持して、ホスト側に対して擬似的な電源オフ状態を作っておく。そして、USBコントローラ1の初期化が完了したときに初めて、ホスト側に電源投入を知らせる。電源投入を知って、ホストが直ちにバスリセット信号を発行し通信を開始しても、デバイス側は既に通信準備が整っているから正常に通信を行うことができる。   As described above, even if the power of the device is turned on, until the initialization of the USB controller 1 is completed, the signal lines D + and D− are held at a low level, and a pseudo power-off state with respect to the host side Make a. Only when the initialization of the USB controller 1 is completed, the host side is notified of power-on. Even if the host immediately issues a bus reset signal and starts communication after knowing that the power has been turned on, communication can be normally performed because the device side is already ready for communication.

以上説明した実施の形態は、あくまで本発明の説明のための例示であり、本発明の技術的範囲を上記実施形態にのみ限定する趣旨ではない。本発明はその趣旨を逸脱することなく、上述の具体的な構成以外の様々な形態でも実施することが出来る。例えば、信号線のプルアップ回路の具体構成は上記実施例のようである必要はなく、要するに初期化終了時点近くまでプルアップを遅延させ得るものであるならば、例えば初期化に要する時間分の遅延時間をもった遅延回路や、その他の構成であっても構わない。   The embodiment described above is merely an example for explaining the present invention, and the technical scope of the present invention is not limited to the above embodiment. The present invention can be implemented in various forms other than the above-described specific configuration without departing from the gist thereof. For example, the specific configuration of the pull-up circuit of the signal line does not need to be as in the above-described embodiment. In short, if the pull-up can be delayed to near the end of initialization, for example, the time required for initialization A delay circuit having a delay time or other configuration may be used.

本発明の一実施形態の全体構成を示すブロック図。The block diagram which shows the whole structure of one Embodiment of this invention. 本発明の一実施形態の電源投入後の動作を表すフローチャート。The flowchart showing the operation | movement after power activation of one Embodiment of this invention.

符号の説明Explanation of symbols

1…USBコントローラ、3…CPU、5…コネクタ、Q1…トランジスタ(スイッチング素子)、R1,R3,R5,R7…抵抗。   DESCRIPTION OF SYMBOLS 1 ... USB controller, 3 ... CPU, 5 ... Connector, Q1 ... Transistor (switching element), R1, R3, R5, R7 ... Resistance.

Claims (5)

ホストとの通信機能を提供するUSBコントローラと、該USBコントローラの割り込み機能をイネーブルにすることが可能なファンクション装置と、を備えたデバイスにおいて、
前記USBコントローラは、
前記ホストと通信を行うための2本のデータ信号線と、
前記2本のデータ信号線のうちの所定の一方のデータ信号線をプルアップさせる回路と、
を備え、
前記ファンクション装置は、前記デバイスの電源投入後に初期化され、
前記回路は、該初期化後に、前記所定の一方のデータ信号線をプルアップさせる、
デバイス。
In a device comprising a USB controller that provides a communication function with a host, and a function device capable of enabling an interrupt function of the USB controller,
The USB controller
Two data signal lines for communicating with the host;
A circuit for pulling up a predetermined one of the two data signal lines;
With
The function device is initialized after powering on the device,
The circuit pulls up the predetermined one data signal line after the initialization.
device.
前記ファンクション装置は、前記ファンクション装置の割り込み受信をイネーブルにすることが可能な請求項1記載のデバイス。   The device of claim 1, wherein the function device is capable of enabling interrupt reception of the function device. ホストとの通信機能を提供するUSBコントローラと、自身の割り込み受信をイネーブルにすることが可能なファンクション装置と、を備えたデバイスにおいて、
前記USBコントローラは、
前記ホストと通信を行うための2本のデータ信号線と、
前記2本のデータ信号線のうちの所定の一方のデータ信号線をプルアップさせる回路と、
を備え、
前記ファンクション装置は、前記デバイスの電源投入後に初期化され、
前記回路は、該初期化後に、前記所定の一方のデータ信号線をプルアップさせる、
デバイス。
In a device comprising a USB controller that provides a communication function with a host and a function device capable of enabling its own interrupt reception,
The USB controller
Two data signal lines for communicating with the host;
A circuit for pulling up a predetermined one of the two data signal lines;
With
The function device is initialized after powering on the device,
The circuit pulls up the predetermined one data signal line after the initialization.
device.
ホストとの通信機能を提供するUSBコントローラと、該USBコントローラの割り込み機能をイネーブルにすることが可能なファンクション装置と、を備えたデバイスにおいて、
前記ファンクション装置は、前記デバイスの電源投入後に初期化され、
前記USBコントローラは、該初期化後に、前記デバイスの電源投入をデータ信号線を介して前記ホストに知らせる、
デバイス。
In a device comprising a USB controller that provides a communication function with a host, and a function device capable of enabling an interrupt function of the USB controller,
The function device is initialized after powering on the device,
After the initialization, the USB controller informs the host that the device is powered on via a data signal line.
device.
ホストとの通信機能を提供するUSBコントローラと、自身の割り込み受信をイネーブルにすることが可能なファンクション装置と、を備えたデバイスにおいて、
前記ファンクション装置は、前記デバイスの電源投入後に初期化され、
前記USBコントローラは、該初期化後に、前記デバイスの電源投入をデータ信号線を介して前記ホストに知らせる、
デバイス。
In a device comprising a USB controller that provides a communication function with a host and a function device capable of enabling its own interrupt reception,
The function device is initialized after powering on the device,
After the initialization, the USB controller informs the host that the device is powered on via a data signal line.
device.
JP2008227970A 2008-09-05 2008-09-05 USB controller Expired - Lifetime JP4337945B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008227970A JP4337945B2 (en) 2008-09-05 2008-09-05 USB controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008227970A JP4337945B2 (en) 2008-09-05 2008-09-05 USB controller

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008008906A Division JP4254898B2 (en) 2008-01-18 2008-01-18 device

Publications (2)

Publication Number Publication Date
JP2009003959A JP2009003959A (en) 2009-01-08
JP4337945B2 true JP4337945B2 (en) 2009-09-30

Family

ID=40320202

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008227970A Expired - Lifetime JP4337945B2 (en) 2008-09-05 2008-09-05 USB controller

Country Status (1)

Country Link
JP (1) JP4337945B2 (en)

Also Published As

Publication number Publication date
JP2009003959A (en) 2009-01-08

Similar Documents

Publication Publication Date Title
US7085876B2 (en) USB controlling apparatus for data transfer between computers and method for the same
KR102044898B1 (en) Method for sensing connection of USB device and image forming apparatus performing the same
CN106776428B (en) Terminal device, read-write device, data transmission system and hardware initialization method
CN106681953B (en) Slave connected with host by using I2C bus and communication method thereof
CN107562668A (en) Bus deadlock recovery system and method
US9397752B2 (en) Optical transceiver modules, optical transmission devices, and optical transmission methods
TWI394346B (en) Mother board with rapid charging handheld multimedia device
TWI443497B (en) Host apparatus, usb port module usb and method for managing power thereof
US20150032909A1 (en) Using usb signaling to trigger a device to enter a mode of operation
JP4045009B2 (en) USB controller and device equipped with the same
WO2010115363A1 (en) An adaptive method of data transfer speed and peripheral device
CN202931279U (en) Circuit capable of realizing I2C hot plug and I2C device
JP2001067156A5 (en) Computer peripherals and their control methods, imaging devices and their control methods, and computer-readable storage media
US20090210603A1 (en) Flash memory circuit with combinational interface
JP4254898B2 (en) device
US9372528B2 (en) Universal serial bus (USB) 3.0 compatible host with lower operation power consumption and method for reducing operation power consumption of a USB 3.0 compatible host
JP4165472B2 (en) device
JP4337945B2 (en) USB controller
KR100695791B1 (en) Communication device and control method thereof
KR20060114270A (en) Master device, control method and electronic device having master device
JP5913211B2 (en) Interface device and information processing device
JP2003122458A (en) Computer device, controller, and method of controlling computer device
JPH11215031A (en) Electronics
US20150032908A1 (en) Using usb signaling to trigger a device to enter a mode of operation
US10318463B2 (en) Interface controller, external electronic device, and external electronic device control method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20090317

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090622

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120710

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120710

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130710

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term