Abstract:
A USB (Universal Serial Bus) hub includes an upstream USB port connecting to an upstream device via an upstream USB line; a downstream USB port connecting to a downstream device via a downstream USB line; a clock generation circuit supplying a clock; a clock pin that supplies the clock received from the clock generation circuit for operating the downstream device to the downstream device; and a hub controller that automatically stops clock supply to the downstream device via the clock generation circuit and the clock pin, both when a connection between the upstream USB port and the upstream device is disconnected and when the hub controller receives a power save mode request to the downstream USB port from the upstream device, wherein the hub controller stops the clock supply whenever a stop of the data communication between the upstream device and the downstream device is detected by the hub controller.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application is a Continuation Application of U.S. patent application Ser. No. 13/533,861, filed on Jun. 26, 2012, which is based on Japanese Patent Application No. 2011-186918 filed on Aug. 30, 2011, the entire contents of which are hereby incorporated by reference. 
     
    
     BACKGROUND 
       [0002]    The present invention relates to a USB hub and a control method of USB hub, in particular to a USB hub and a control method of USB hub for connecting an upstream device and a downstream device by USB. 
         [0003]    In recent years, USB (Universal Serial Bus) is widely used as an interface that connects between electronic devices. USB can connect a host device and various peripheral devices (devices). USB is used for plug-and-play and bus power which supplies electrical power through a USB cable. Further, the transfer speed of USB is improved. Therefore, USB is used in many devices. USB is used not only between electronic devices, but also inside an electronic device. For example, an USB interface is implemented in a semiconductor integrated circuit to connect between semiconductor chips and to connect between functional blocks inside a semiconductor chip. 
         [0004]    A USB hub, which connects between a host device and a plurality of peripheral devices in order to enable USB connecting between a host device and many peripheral devices, is known. The USB hub has a plurality of USB ports to connect to a plurality of peripheral devices, so that even when the host device has only a small number of USB ports, the host device can connect to much more peripheral devices. The USB hub includes a USB controller for controlling the USB connectings. 
         [0005]    For example, Non-Patent Documents 1 and 2 are known as USB controllers of related art. In particular, Non-Patent Document 1 describes a hub controller that controls a USB hub. “Ethernet” is a registered trademark. 
       [Non-Patent Document 1] 
       [0000]    
       
         SMSC, “USB 2.0 Hub and 10/100 Ethernet Controller (LAN9512/LAN9512i)”, the Internet &lt;URL:http://www.smsc.com/media/Downloads_Public/Data_Sheets/9512.pdf&gt; 
       
     
       [Non-Patent Document 2] 
       [0000]    
       
         Intel, “Intel 5 Series Chipset and Intel 3400 Series Chipset”, the Internet &lt;URL:http://www.intel.com/Assets/PDF/datasheet/322169.pdf&gt; 
       
     
       SUMMARY 
       [0008]    Non-Patent Document 1 describes that a USB hub including a hub controller of the related art has a clock output terminal for supplying a clock to a peripheral device. However, a specific method of supplying a clock is not described. 
         [0009]    Here, when a clock is supplied to a peripheral device, power is consumed by the supplied clock in the peripheral device. For example, in an analog circuit into which a clock is inputted, when a signal is repeatedly inverted, dynamic power consumption occurs. In other words, there is a strong correlation between a clock supplied from the USB hub and power consumption in a peripheral device to which the clock is supplied. 
         [0010]    Therefore, the inventors of the present invention found that power consumption of a USB system including a peripheral device can be reduce by controlling the clock supplied to the USB hub. For example, if the USB hub supplies a clock to a peripheral device at all times without considering the states of the host device and the peripheral device, even when the clock is not required, the clock is uselessly supplied, so that the power consumption cannot be reduced. 
         [0011]    Therefore, a USB hub of the related art has a problem that when the USB hub supplies a clock to a peripheral device at all times, power is uselessly consumed in the peripheral device, so that it is difficult to reduce the power consumption in the USB system. 
         [0012]    A USB hub according to the present invention includes an upstream USB port connecting to an upstream device via an upstream USB line, a downstream USB port connecting to a downstream device via a downstream USB line, a clock pin that supplies a clock for operating the downstream device to the downstream device, and a hub controller that stops clock supply to the downstream device via the clock pin when a connecting between the upstream USB port and the upstream device is disconnected or when the hub controller receives a power save mode request to the downstream USB port from the upstream device. 
         [0013]    A control method of USB hub according to the present invention is a control method of a USB hub connected between an upstream device and a downstream device. The control method includes the steps of supplying a clock for operating the downstream device to the downstream device, and stopping clock supply to the downstream device when a connecting between the USB hub and the upstream device is disconnected or when a power save mode request to a downstream USB port of the USB hub is received from the upstream device. 
         [0014]    In the present invention, when stop of the data communication between the upstream device and the downstream device is detected, the clock supply to the downstream device is stopped, so that it is possible to suppress power consumption while the data communication is not performed and also reduce power consumption of the USB system. 
         [0015]    According to the present invention, it is possible to provide a USB hub and a control method of USB hub which can reduce power consumption in a USB system. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0016]      FIG. 1  is a configuration diagram for explaining a configuration of a USB connecting system according to a first embodiment of the present invention; 
           [0017]      FIG. 2  is a configuration diagram for explaining a configuration of a USB hub according to the first embodiment of the present invention; 
           [0018]      FIG. 3  is a flowchart for explaining an operation of the USB hub according to the first embodiment of the present invention; 
           [0019]      FIG. 4  is a diagram for explaining the operation of the USB hub according to the first embodiment of the present invention; 
           [0020]      FIG. 5  is a timing chart for explaining the operation of the USB hub according to the first embodiment of the present invention; 
           [0021]      FIG. 6  is a flowchart for explaining an operation of the USB hub according to the first embodiment of the present invention; 
           [0022]      FIG. 7  is a diagram for explaining the operation of the USB hub according to the first embodiment of the present invention; 
           [0023]      FIG. 8  is a timing chart for explaining the operation of the USB hub according to the first embodiment of the present invention; 
           [0024]      FIG. 9  is a flowchart for explaining an operation of a USB hub according to a second embodiment of the present invention; 
           [0025]      FIG. 10  is a diagram for explaining the operation of the USB hub according to the second embodiment of the present invention; 
           [0026]      FIG. 11  is a timing chart for explaining the operation of the USB hub according to the second embodiment of the present invention; 
           [0027]      FIG. 12  is a flowchart for explaining an operation of the USB hub according to the second embodiment of the present invention; 
           [0028]      FIG. 13  is a diagram for explaining the operation of the USB hub according to the second embodiment of the present invention; 
           [0029]      FIG. 14  is a timing chart for explaining the operation of the USB hub according to the second embodiment of the present invention; and 
           [0030]      FIG. 15  is a configuration diagram for explaining a configuration of a USB hub according to a third embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
     First Embodiment 
       [0031]    Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. 
         [0032]      FIG. 1  shows a configuration of a USB connecting system according to the first embodiment of the present invention. As shown in  FIG. 1 , the USB connecting system  100  includes a USB host  20 , a USB hub  10 , and USB peripheral devices  30 - 1 ,  30 - 2 , . . . , and  30 -N (any one of the USB peripheral devices may be referred to as a peripheral device  30 ). In the USB connecting system  100 , the USB host  20  side of the USB hub  10  is referred to as upstream and the USB peripheral device  30  side of the USB hub  10  is referred to as downstream. 
         [0033]    The USB host (upstream device)  20  is a device that accesses any USB peripheral device  30  via a USB line according to USB protocol and performs data communication with the peripheral device. The USB host  20  is, for example, an information processing device such as a personal computer. When a peripheral device is connected to the USB host  20  via a USB line, the USB host  20  performs an enumeration process according to USB protocol, so that the USB host  20  recognizes the connected USB device and provides a peripheral device specific number for identifying the peripheral device. Data communication with an end point of the peripheral device is performed by using the peripheral device specific number. 
         [0034]    In the present embodiment, the USB hub  10  and the USB peripheral device  30  are disposed over a circuit board  40 . In other words, in this example, the USB hub  10  and the USB peripheral device  30  are fixed and connected to each other at all times and they are non-removable. Further, the USB host  20  may also be disposed over the circuit board  20  and the USB host  20 , the USB hub  10 , and the USB peripheral device  30  may be set to non-removable. 
         [0035]    The USB hub  10  and the USB peripheral device  30  may be connected by a cable to be removable. In this case, if a clock line is disconnected while the USB peripheral device  30  is operating, the operation of the USB peripheral device  30  is not guaranteed. Therefore, it is preferred that the clock line is disconnected while the clock supply is stopped. 
         [0036]    The USB peripheral device (downstream device)  30  receives an access from the USB host  20  via the USB line according to USB protocol and performs data communication with the USB host. The USB peripheral device  30  is, for example, a data storage device such as a flash memory. The USB peripheral device  30  operates by a clock supplied from the USB hub  10 . For example, the USB peripheral device  30  is a semiconductor device disposed over the circuit board  40 . The clock is supplied to a USB controller (IC) for the peripheral device and the data communication by USB is enabled. When the USB peripheral device  30  is provided with a power source, the USB peripheral device  30  operates by self power. On the other hand, when the USB peripheral device  30  has no power source, the USB peripheral device  30  operates by bus power supplied from the USB line. 
         [0037]    The USB hub  10  is a relay device that relays the data communication between the USB host  20  and the USB peripheral devices via USB lines according to USB protocol. The USB hub  10  includes an upstream USB port  11 , downstream USB ports  12 - 1 ,  12 - 2 , . . . ,  12 -N (any one of the downstream USB ports may be referred to as a downstream USB port  12 ), and clock pins  13 - 1 ,  13 - 2 , . . . ,  13 -N (any one of the clock pins may be referred to as a clock pin  13 ). 
         [0038]    The upstream USB port  11  is a terminal for connecting to a USB line. The upstream USB port  11  is connected to the USB host  20  via an upstream USB line  1  to enable data communication with the USB host  20  by USB protocol. In this example, the upstream USB line  1  is a normal USB cable and removable from the USB port  11 . 
         [0039]    The upstream USB line  1  is a bus line including a plurality of signal lines according to USB protocol and includes a signal line that supplies VBUS power and a data signal line that inputs/outputs data. 
         [0040]    The downstream USB ports  12 - 1 ,  12 - 2 , . . . ,  12 -N are terminals for connecting to USB lines and are respectively connected to the USB peripheral devices  30 - 1 ,  30 - 2 , . . . , and  30 -N via downstream USB lines  2 - 1 ,  2 - 2 , . . . ,  2 -N to enable data communication with the USB peripheral devices  30 - 1 ,  30 - 2 , . . . , and  30 -N by USB protocol. In this example, the downstream USB line  2  is a line over the circuit board and is not removable. The downstream USB line  2  includes a signal line of VBUS power and a data signal line in the same manner as the upstream USB line  1 . 
         [0041]    The clock pins  13 - 1 ,  13 - 2 , . . . ,  13 -N are terminals for connecting to clock lines and are respectively connected to the USB peripheral devices  30 - 1 ,  30 - 2 , . . . , and  30 -N via clock lines  3 - 1 ,  3 - 2 , . . . ,  3 -N to supply a clock to the USB peripheral devices  30 - 1 ,  30 - 2 , . . . , and  30 -N. In this example, the clock line  3  is a line over the circuit board and is not removable. The clock pin  13  is provided for each downstream USB port  12  and for each USB peripheral device  30 . The clock may be supplied from one clock pin  13  to a plurality of USB peripheral devices  30 . 
         [0042]      FIG. 2  shows a configuration of the USB hub according to the first embodiment of the present invention. The USB hub  10  includes the upstream USB port  11 , the downstream USB ports  12 , and the clock pins  13  as described above, and further includes an upstream USB transceiver  14 , downstream USB transceivers  15 - 1 ,  15 - 2 , . . . ,  15 -N (any one of the downstream USB transceivers may be referred to as a downstream USB transceiver  15 ), a hub controller  17 , and a clock generation circuit  18 . 
         [0043]    The USB hub  10  is a semiconductor device disposed over the circuit board  40 . For example, the entire configuration of the USB hub  10  may be formed into one chip, the hub controller  17 , the upstream USB transceiver  14 , and the downstream USB transceivers  15  may be formed into one chip, or the hub controller  17  may be formed into one chip. 
         [0044]    The upstream USB transceiver  14  is a transmission/reception circuit that transmits and receives data to and from the upstream USB line  1  via the upstream USB port  11 . The downstream USB transceiver  15  is a transmission/reception circuit that transmits and receives data to and from the downstream USB line  2  via the downstream USB port  12 . 
         [0045]    The hub controller  17  is a control circuit that controls data communication between the USB host  20  and the USB peripheral devices  30 . For example, the hub controller  17  controls enumeration with the USB host  20 , recognition of the USB peripheral devices  30 , and clock supply to the USB peripheral devices  30 . 
         [0046]    The enumeration is a process of data transmission and reception to establish a communication path when a USB line is connected. It is possible to recognize information of a peripheral device connected through a USB line by the enumeration. 
         [0047]    The clock generation circuit  18  generates a clock having a desired frequency. The clock generation circuit  18  supplies a clock to the USB peripheral device  30  via the clock pin  13  according to the control from the hub controller  17 . The hub controller  17  instructs each port to start or stop the clock supply. All the USB peripheral devices  30  can be operated by the clock of the clock generation circuit  18 , so that it is not necessary to provide a clock generation circuit in each of the USB peripheral devices  30 . 
         [0048]    Next, an operation of the USB hub  10  when the USB hub  10  is connected to the USB host  20  will be described with reference to  FIGS. 3 to 5 .  FIG. 3  shows a flow of the operation of the USB hub  10  in this case. 
         [0049]    First, the USB hub  10  is connected to the USB host  20  (S 101 ). When the USB hub  10  is not physically connected to the USB host  20  via the upstream USB line  1 , the upstream USB line  1  is inserted into the USB port of the USB host  20  and the upstream USB port  11  of the USB hub  10  to physically couple the USB hub  10  to the USB host  20 . If the USB host  20  is turned off, the USB host  20  is turned on, so that the USB host  20  and the USB hub  10  are electrically connected to each other. 
         [0050]    In other words, connecting the USB devices to each other includes physically connecting between the USB devices by a USB line and electrically connecting between the USB devices which are physically connected. When the upstream USB line  1  is connected or the USB host  20  is turned on, the VBUS power of the upstream USB line  1  is turned on and the USB hub  10  detects a connecting with the USB host  20 . 
         [0051]    Next, the USB host  20  recognizes the USB hub  10  (S 102 ). The USB host  20  and the USB hub  10  are connected, so that the USB host  20  performs enumeration with the USB hub  10 , acquires device information of the USB hub  10 , provides specific information, and recognizes the USB hub  10 . Thereby, the USB hub  10  also recognizes the USB host  20 . 
         [0052]    Next, the USB hub  10  receives a port power enable request from the USB host  20  (S 103 ). The USB host  20  recognizes the USB hub  10 , so that the USB host  20  further transmits a port power enable request of the downstream USB ports  12  of the USB hub  10 . 
         [0053]    Next, the USB hub  10  turns on the downstream USB ports  12  (S 104 ). The USB hub  10  receives the port power enable request from the USB host  20 , so that the USB hub  10  turns on the VBUS power of all the downstream USB ports  12 . 
         [0054]    Next, the USB hub  10  starts clock supply to the USB peripheral devices  30  (S 105 ). As described later, in the present embodiment, the USB hub  10  stops clock supply to the USB peripheral devices  30  before the USB hub  10  is connected to the USB host  20 . Therefore, the USB hub  10  turns on the VBUS power of the downstream USB lines  2  and starts clock supply from all the clock pins  13  to operate the USB peripheral devices  30 . 
         [0055]    Next, the USB host  20  recognizes the USB peripheral devices  30  via the USB hub  10  (S 106 ). The VBUS power of the USB lines  3  is turned on and the clock is supplied, so that the USB peripheral devices  30  start operation and can communicate with the USB host  20  via the USB hub  10 . The USB host  20  and the USB peripheral devices  30  are connected, so that the USB host  20  performs enumeration with the USB peripheral devices  30 , acquires device information of the USB peripheral devices  30 , provides specific information, and recognizes the USB peripheral devices  30 . 
         [0056]      FIG. 4  shows a detailed operation of the USB hub  10  when the USB hub  10  is connected to the USB host  20 . 
         [0057]    First, the USB hub  10  is connected to the USB host  20  ( FIG. 4  ( 1 )). When the upstream USB line  1  is connected between the USB host  20  and the USB hub  10 , the upstream USB transceiver  14  detects that the VBUS power of the upstream USB line  1  is turned on and notifies the hub controller  17  of this detection result. At this time, the hub controller  17  becomes in a state of waiting for completion of the enumeration with the USB host  20 . 
         [0058]    Then the enumeration is performed by the USB host  20  and the hub controller  17  and the USB host  20  recognizes the USB hub  10 . At this time, the hub controller  17  becomes in a state in which the enumeration with the USB host  20  is completed. 
         [0059]    Next, the USB hub  10  receives the port power enable request from the USB host  20  ( FIG. 4  ( 2 )). The USB host  20  transmits the port power enable request whose destination is the USB hub  10 . The hub controller  17  analyzes the destination and the content of the request received via the upstream USB transceiver  14  and performs a process corresponding to the port power enable request transmitted to the USB hub  10 . 
         [0060]    Next, the USB hub  10  turns on the downstream USB port  12  of the USB hub  10  ( FIG. 4  ( 3 )). The hub controller  17  instructs that the downstream USB ports  12  be turned on according to the received port power enable request and turns on the VBUS power of the downstream USB ports  12 . 
         [0061]    Next, the USB hub  10  starts clock supply to the USB peripheral devices  30  ( FIG. 4  ( 4 )). After turning on the downstream USB ports  12 , the hub controller  17  instructs the clock generation circuit  18  to supply a clock. The clock generation circuit  18  starts clock supply to the USB peripheral devices  30  from all the clock pins  13 . 
         [0062]    Thereby the operations of the USB peripheral devices are started and when the enumeration is performed between the USB host  20  and the USB peripheral devices  30 , the USB host  20  recognizes the USB peripheral devices  30  connected to the USB host  20 . 
         [0063]      FIG. 5  shows operation timing of each signal line when the USB hub  10  is connected to the USB host  20 . 
         [0064]    When the upstream USB line  1  is connected to the USB hub  10 , the VBUS power of the upstream USB line  1  rises to high at t 1 . 
         [0065]    The VBUS power of the upstream USB line  1  rises to high, so that the USB host  20  recognizes the USB hub  10  by the enumeration at t 2  and the port power enable request is outputted from the USB host  20  to the USB hub  10  on the data signal line. 
         [0066]    When the USB hub  10  receives the port power enable request from the data signal line of the upstream USB line  1 , the USB hub  10  raises the VBUS power of the downstream USB lines  2  to high at t 3 . 
         [0067]    After raising the VBUS power of the downstream USB lines  2 , the USB hub  10  starts clock supply to the clock lines  3  at t 4 . 
         [0068]    Here, although the timing of raising the VBUS power and the timing of starting the clock supply may be the same, it is preferable that the clock supply is started after the VBUS power is raised. For example, if the clock is supplied before the VBUS power is raised, there is a risk that a clock buffer to which the clock is inputted is broken depending on the specification of the peripheral device, so that the clock may be supplied after the VBUS power is raised. 
         [0069]    When the clock supply is started, the USB peripheral devices  30  start operation at t 5  and the USB host  20  recognizes the USB peripheral devices  30  by the enumeration. 
         [0070]    Next, an operation of the USB hub  10  when the USB hub  10  is disconnected from the USB host  20  will be described with reference to  FIGS. 6 to 8 .  FIG. 6  shows a flow of the operation of the USB hub  10  in this case. 
         [0071]    First, the USB hub  10  is disconnected from the USB host  20  (S 111 ). For example, the upstream USB line  1  is pulled out from the USB port of the USB host  20  or the upstream USB port  11  of the USB hub  10  to physically disconnect the USB hub  10 . Or, the USB host  20  is turned off, so that the USB host  20  and the USB hub  10  are electrically disconnected from each other. 
         [0072]    In other words, disconnecting the USB devices from each other includes physically disconnecting the USB devices from each other by a USB line and electrically disconnecting the USB devices from each other, which are physically connected. When the upstream USB line  1  is disconnected or the USB host  20  is turned off, the VBUS power of the upstream USB line  1  is turned off and the USB hub  10  detects a disconnecting from the USB host  20 . Thereby the communication between the USB host  20  and the USB hub  10  is disabled. Also, the communication between the USB host  20  and the USB peripheral devices  30  and the communication between the USB hub  10  and the USB peripheral devices  30  are disabled. In other words, the data communication between the USB host  20  and the USB peripheral devices  30  is stopped. 
         [0073]    Next, the USB hub  10  turns off the downstream USB ports  12  (S 112 ). The upstream USB line  1  between the USB host  20  and the USB hub  10  is disconnected and the data communication between the USB host  20  and the USB peripheral devices  30  is stopped, so that the USB hub  10  turns off the VBUS power of all the downstream USB ports  12 . 
         [0074]    Next, the USB hub  10  stops the clock supply to the USB peripheral devices  30  (S 113 ). The USB hub  10  turns off the VBUS power of the downstream USB lines  2  and stops the clock supply from all the clock pins  13  to stop the operations of the USB peripheral devices  30 . 
         [0075]      FIG. 7  shows a detailed operation of the USB hub  10  when the USB hub  10  is disconnected from the USB host  20 . 
         [0076]    First, the USB hub  10  is disconnected from the USB host  20  ( FIG. 7  ( 1 )). When the upstream USB line  1  between the USB host  20  and the USB hub  10  is disconnected, the upstream USB transceiver  14  detects that the VBUS power of the upstream USB line  1  is turned off and notifies the hub controller  17  of this detection result. At this time, the hub controller  17  determines that the data communication between the USB host  20  and the USB hub  10  is stopped and the data communication between the USB host  20  and the USB peripheral devices  30  is also stopped. 
         [0077]    Next, the USB hub  10  turns off the downstream USB ports  12  ( FIG. 7  ( 2 )). Since the data communication between the USB host  20  and the USB peripheral devices  30  is stopped, the hub controller  17  instructs that the downstream USB ports  12  be turned off and turns off the VBUS power of the downstream USB ports  12 . When the VBUS power is turned off, the USB peripheral device  30  detects that the downstream USB line  2  is disconnected 
         [0078]    Next, the USB hub  10  stops the clock supply to the USB peripheral devices  30  ( FIG. 7  ( 3 )). Since the data communication between the USB host  20  and the USB peripheral devices  30  is stopped, after turning off the downstream USB ports  12 , the hub controller  17  instructs the clock generation circuit  18  to stop the clock supply and the clock generation circuit  18  stops the clock supply from all the clock pins  13  to the USB peripheral devices  30 . 
         [0079]      FIG. 8  shows operation timing of each signal line when the USB hub  10  is disconnected from the USB host  20 . 
         [0080]    When the upstream USB line  1  is disconnected, the VBUS power of the upstream USB line  1  drops to low at t 11 . 
         [0081]    Since the VBUS power of the upstream USB line  1  drops to low, the USB hub  10  drops the VBUS power of the downstream USB lines  2  to low at t 12 . 
         [0082]    After dropping the VBUS power of the downstream USB lines  2 , the USB hub  10  stops the clock supply to the clock lines  3  at t 13 . 
         [0083]    Here, the timing of dropping the VBUS power and the timing of stopping the clock supply may be the same. When the clock supply is stopped, the operations of the USB peripheral devices  30  are stopped, so that the power consumption while the operations are stopped is suppressed. 
         [0084]    As described above, in the present embodiment, the USB hub controls the clock supply to the USB peripheral devices according to the state of connecting to the USB host. In USB, the USB peripheral devices do not communicate with each other and the USB host and the USB peripheral devices are connected and communicate with each other, so that it is possible to determine whether or not there is communication of the USB peripheral devices from the state of connecting to the USB host. 
         [0085]    Specifically, when the USB hub is connected to the USB host, the USB hub starts clock supply to the USB peripheral devices to start communication operation with the USB peripheral devices, and when the connecting to the USB host is disconnected, the USB hub stops the clock supply to the USB peripheral devices to stop the communication operation with the USB peripheral devices. Thereby, while the communication of the USB peripheral devices is stopped by disconnecting the USB line, by stopping the clock supply, it is possible to reduce the power consumption of the USB peripheral devices and save the power consumption of the entire USB system. 
       Second Embodiment 
       [0086]    Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. Although, in the first embodiment, the clock supply to the peripheral devices is controlled according to the state of connecting between the USB host and the USB hub, in the present embodiment, the clock supply to the peripheral devices is also controlled when a downstream USB port is set to a suspend state (a sleep state) by a port suspend (port sleep) request from the USB host. The configuration of the USB connecting system and the configuration of the USB hub are the same as those shown in  FIGS. 1 and 2 . 
         [0087]    An operation of the USB hub  10  when the downstream USB port  12  is suspended will be described with reference to  FIGS. 9 to 11 .  FIG. 9  shows a flow of the operation of the USB hub  10  in this case. 
         [0088]    First, the USB hub  10  receives a port suspend request from the USB host  20  (S 201 ). In order to suspend the downstream USB port  12  of the USB hub  10 , the USB host  20  transmits the port suspend request that specifies the downstream USB port  12  to be suspended. 
         [0089]    Next, the USB hub  10  suspends the requested downstream USB port  12  (S 202 ). The USB hub  10  receives the port suspend request from the USB host  20 , so that the USB hub  10  performs a suspend process on the downstream USB port  12  specified by the port suspend request. The USB hub  10  performs a predetermined suspend process between the downstream USB port  12  and the USB peripheral device  30  connected to the downstream USB port  12  and sets the downstream USB port  12  to a suspend state. 
         [0090]    Suspending the USB port means setting the USB port to a suspend mode (a sleep mode) from a normal state which is a normal operation mode. The USB hub  10  exchanges information necessary to suspend the USB port with the USB peripheral device, so that the USB port and the USB peripheral device are set to the suspend state. The suspend state is a power saving state. In the suspend state, the power consumption is reduced by temporarily halting the communication operation and stopping power supply to a predetermined circuit. 
         [0091]    When the downstream USB port  12  is suspended, the communication between the USB hub  10  and the USB peripheral device  30  is temporarily halted and also the communication between the USB host  20  and the USB peripheral device  30  is halted. In other words, the data communication between the USB host  20  and the USB peripheral devices  30  is stopped. 
         [0092]    Next, the USB hub  10  stops the clock supply to the USB peripheral devices  30  (S 203 ). In order to stop the operation of the USB peripheral device  30 , the USB hub  10  stops clock supply from a clock pin  13  corresponding to the suspended downstream USB port  12 . 
         [0093]      FIG. 10  shows a detailed operation of the USB hub  10  when the USB hub  10  suspends the downstream USB port  12 . 
         [0094]    First, the USB hub  10  receives the port suspend request from the USB host  20  ( FIG. 10  ( 1 )). The USB host  20  transmits the port suspend request whose destination is the USB hub  10  and which specifies the downstream USB port  12 . The hub controller  17  analyzes the destination and the content of the request received via the upstream USB transceiver  14  and performs a process corresponding to the port suspend request transmitted to the USB hub  10 . 
         [0095]    Next, the USB hub  10  suspends the requested downstream USB port  12  ( FIG. 10  ( 2 )). The hub controller  17  instructs a USB transceiver  15  corresponding to the specified downstream USB port  12  to perform a suspend process according to the received port suspend request. The USB transceiver  15  performs the suspend process between the downstream USB port  12  and the USB peripheral device  30  and sets the downstream USB port  12  to a suspend state. 
         [0096]    Next, the USB hub  10  stops the clock supply to the USB peripheral devices  30  ( FIG. 10  ( 3 )). The hub controller  17  instructs the clock generation circuit  18  to stop the clock supply. The clock generation circuit  18  stops the clock supply to the USB peripheral device  30  from a clock pin corresponding to the suspended downstream USB port  12 . 
         [0097]      FIG. 11  shows operation timing of each signal line when the downstream USB port  12  is suspended. 
         [0098]    The USB hub  10  receives the port suspend request that specifies downstream USB port  12  on the data signal line of the upstream USB line  1  at t 21 . 
         [0099]    The USB hub  10  performs the suspend process on the data signal line of the downstream USB line  2  at t 22  according to the received port suspend request, so that the downstream USB port  12  is suspended. 
         [0100]    When the port is suspended, the USB hub  10  stops the clock supply to a clock line  3  corresponding to the suspended downstream USB port  12  at t 23 . 
         [0101]    When the clock supply is stopped, the operation of the USB peripheral device  30  is stopped, so that the power consumption while the operation is stopped is suppressed. 
         [0102]    Next, an operation of the USB hub  10  when the downstream USB port  12  is resumed will be described with reference to  FIGS. 12 to 14 .  FIG. 12  shows a flow of the operation of the USB hub  10  in this case. 
         [0103]    First, the USB hub  10  receives a port resume request from the USB host  20  (S 211 ). In order to resume the downstream USB port  12  of the USB hub  10 , the USB host  20  transmits the port resume request that specifies the downstream USB port  12  that will be resumed. 
         [0104]    Next, the USB hub  10  restarts the clock supply to the USB peripheral device  30  connected to the requested downstream USB port  12  (S 212 ). In order to operate the USB peripheral device  30 , the USB hub  10  starts clock supply from a clock pin  13  corresponding to the downstream USB port  12  that will be resumed. 
         [0105]    Next, the USB hub  10  resumes the requested downstream USB port  12  (S 213 ). The USB hub  10  receives the port resume request from the USB host  20  and the clock supply is restarted, so that the USB hub  10  performs a resume process on the downstream USB port  12  specified by the port resume request. The USB hub  10  performs a predetermined resume process between the downstream USB port  12  and the USB peripheral device  30  connected to the downstream USB port  12  and sets the downstream USB port  12  to a normal communication state. 
         [0106]    Resuming the USB port means setting the USB port to a normal state, which is a normal operation mode, from the suspend mode. The USB hub  10  exchanges information necessary to resume with the USB peripheral device, so that the USB port and the USB peripheral device are set to the normal state. When they are resumed, the halt of the communication operation is cancelled and the data communication is enabled. 
         [0107]    When the downstream USB port  12  is resumed, the data communication between the USB hub  10  and the USB peripheral device  30  is restarted and also the communication between the USB host  20  and the USB peripheral device  30  is restarted. In other words, the stop of the data communication between the USB host  20  and the USB peripheral devices  30  is terminated. 
         [0108]      FIG. 13  shows a detailed operation of the USB hub  10  when the USB hub  10  resumes the downstream USB port  12 . 
         [0109]    First, the USB hub  10  receives the port resume request from the USB host  20  ( FIG. 13  ( 1 )). The USB host  20  transmits the port resume request whose destination is the USB hub  10  and which specifies the downstream USB port  12 . The hub controller  17  analyzes the destination and the content of the request received via the upstream USB transceiver  14  and performs a process corresponding to the port resume request transmitted to the USB hub  10 . 
         [0110]    Next, the USB hub  10  restarts the clock supply to the USB peripheral device  30  connected to the requested downstream USB port  12  ( FIG. 13  ( 2 )). The hub controller  17  instructs the clock generation circuit  18  to start the clock supply. The clock generation circuit  18  starts the clock supply to the USB peripheral device  30  from a clock pin corresponding to the downstream USB port  12  that will be resumed. 
         [0111]    Next, the USB hub  10  resumes the requested downstream USB port  12  ( FIG. 13  ( 3 )). The hub controller  17  instructs a USB transceiver  15  corresponding to the specified downstream USB port  12  to perform a resume process according to the received port resume request. The USB transceiver  15  performs the resume process between the downstream USB port  12  and the USB peripheral device  30  and sets the downstream USB port  12  to the normal state. 
         [0112]      FIG. 14  shows operation timing of each signal line when the downstream USB port  12  is resumed. 
         [0113]    The USB hub  10  receives the port resume request that specifies downstream USB port  12  on the data signal line of the upstream USB line  1  at t 31 . 
         [0114]    According to the received port resume request, at t 32 , the USB hub  10  starts the clock supply to a clock line  3  corresponding to the downstream USB port  12  that will be resumed. 
         [0115]    The resume process is performed on the data signal line of the downstream USB line  2  at t 33 , so that the downstream USB port  12  is resumed and the downstream USB port  12  is set to a normal data communication state. 
         [0116]    As described above, in the present embodiment, the USB hub controls the clock supply to the USB peripheral device according to the suspend state of the USB port. Specifically, when the USB hub receives a suspend request to the USB port from the USB host, the USB hub stops the clock supply to the USB peripheral device, and when the USB hub receives a resume request to the USB port from the USB host, the USB hub starts the clock supply to the USB peripheral device. Thereby, while the communication of the USB peripheral device is stopped by the suspend of the USB port, by stopping the clock supply, it is possible to reduce the power consumption of the USB peripheral device and save the power consumption of the entire USB system. 
       Third Embodiment 
       [0117]    Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. In the third embodiment, in addition to the first and the second embodiments, the frequency of the clock supplied to the peripheral device from the USB hub can be set. 
         [0118]      FIG. 15  shows a configuration of the USB hub according to the third embodiment of the present invention. The USB hub  10  includes setting terminals C 1 , C 2 , and C 3  for setting the clock frequency in addition to the configuration shown in  FIG. 2 . 
         [0119]    The hub controller  17  determines the frequency of the clock according to an input value (input voltage) of the setting terminals C 1  to C 3 . The hub controller  17  notifies the clock generation circuit  18  of the determined frequency and the clock generation circuit  18  supplies a clock of the notified frequency to the USB peripherals  30 . Clocks CLK 1  to CLKN are outputted from the clock pins  13 - 1  to  13 -N. 
         [0120]    The frequency of the clock may be different for each clock pin (for each USB port). For example, the setting terminals, the number of which is the same as that of the downstream USB ports, are provided, the frequency of the clock CLK 1  is determined by the setting terminal C 1 , the frequency of the clock CLK 2  is determined by the setting terminal C 2 , and the frequency of the clock CLKN is determined by the setting terminal CN. In this case, for example, when the input of the setting terminal C 1  is high, the frequency may be set to 12 MHz, when the input of the setting terminal C 1  is low, the frequency may be set to 24 MHz, when the input of the setting terminal C 2  is high, the frequency may be set to 12 MHz, and when the input of the setting terminal C 2  is low, the frequency may be set to 30 MHz. The clock frequency is set for each USB port, so that the clock frequency can be more finely set according to the USB peripheral device to be connected. 
         [0121]    The frequency of the clock may be the same for all the clock pins  13 . For example, the clock frequency of all the clock pins is collectively determined by using the setting terminals C 1  and C 2 . The frequency is determined by a combination of a plurality of setting terminals, so that the frequency can be set by a small number of terminals. An example of the relationship between a combination of input levels of the setting terminals C 1  and C 2  and the frequency is as follows: When (setting terminal C 2 , setting terminal C 1 ) is (low, low), the frequency is 12 MHz, when (setting terminal C 2 , setting terminal C 1 ) is (low, high), the frequency is 24 MHz, when (setting terminal C 2 , setting terminal C 1 ) is (high, low), the frequency is 30 MHz, and when (setting terminal C 2 , setting terminal C 1 ) is (high, high), the frequency is 48 MHz. 
         [0122]    Other than the above, as a method for setting the clock frequency, the clock frequency may be set by a storage device such as a register, or may be set by a command such as the port power enable request from the USB host. 
         [0123]    As described above, in the present embodiment, in the same manner as in the first and the second embodiments, the USB hub controls the clock supplied to the USB peripheral device, so that the power consumption can be reduced and the frequency of the clock to be supplied can be set. Thereby it is possible to flexibly select a clock according to the specification of the peripheral device. 
         [0124]    The present invention is not limited to the above embodiments, but can be appropriately modified without departing from the scope of the invention. For example, although, in the above examples, the USB host and the USB peripherals are connected by one USB hub, a plurality of USB hubs may be cascaded. In this case, an upstream device and a downstream device can be a USB hub. 
         [0125]    The clock supply may be stopped according to the USB peripheral device. For example, the clock supply is not stopped in the case of a device which may be subject to malfunction or difficult to be restarted once the clock supply is stopped, and the clock supply may be stopped only in the case of a device which can operate normally even if the clock supply is stopped.