
CY7C65013
CY7C65113
Document #: 38-08002 Rev. *B
Page 31 of 51
16.0
USB Hub
A USB hub is required to support:
• Connectivity behavior: service connect/disconnect detection
• Bus fault detection and recovery
• Full-/Low-speed device support
These features are mapped onto a hub repeater and a hub controller. The hub controller is supported by the processor integrated
into the CY7C65x13 microcontrollers. The hardware in the hub repeater detects whether a USB device is connected to a
downstream port. The connection to a downstream port is through a differential signal pair (D+ and D–). Each downstream port
provided by the hub requires external RUDN resistors from each signal line to ground, so that when a downstream port has no
device connected, the hub reads a LOW (zero) on both D+ and D–. This condition is used to identify the “no connect” state.
The hub must have a resistor RUUP connected between its upstream D+ line and VREG to indicate it is a full speed USB device.
The hub generates an EOP at EOF1, in accordance with the USB 1.1 Specification (section 11.2.2, page 234) as well as USB
2.0 specification (section 11.2.5, page 304).
16.1
Connecting/Disconnecting a USB Device
A low-speed (1.5 Mbps) USB device has a pull-up resistor on the D– pin. At connect time, the bias resistors set the signal levels
on the D+ and D– lines. When a low-speed device is connected to a hub port, the hub sees a LOW on D+ and a HIGH on D–.
This causes the hub repeater to set a connect bit in the Hub Ports Connect Status register for the downstream port (see
Figure 16-1). Then the hub repeater generates a Hub Interrupt to notify the microcontroller that there has been a change in the
Hub downstream status. The firmware sets the speed of this port in the Hub Ports Speed Register (see Figure 16-2).
A full-speed (12 Mbps) USB device has a pull-up resistor from the D+ pin, so the hub sees a HIGH on D+ and a LOW on D–. In
this case, the hub repeater sets a connect bit in the Hub Ports Connect Status register and generates a Hub Interrupt to notify
the microcontroller of the change in Hub status. The firmware sets the speed of this port in the Hub Ports Speed Register (see
Figure 16-2)
Connects are recorded by the time a non-SE0 state lasts for more than 2.5
µs on a downstream port.
When a USB device is disconnected from the Hub, the downstream signal pair eventually floats to a single-ended zero state. The
hub repeater recognizes a disconnect once the SE0 state on a downstream port lasts from 2.0 to 2.5
µs. On a disconnect, the
corresponding bit in the Hub Ports Connect Status register is cleared, and the Hub Interrupt is generated
.
Bit [0..6] : Port x Connect Status (where x = 1..7).
When set to 1, Port x is connected; When set to 0, Port x is disconnected.
Bit 7 : Reserved.
Set to 0.
The Hub Ports Connect Status register is cleared to zero by reset or USB bus reset, then set to match the hardware configuration
by the hub repeater hardware. The Reserved bit [7] should always read as ‘0’ to indicate no connection
.
Hub Ports Connect Status
Address 0x48
Bit #
7
6543
210
Bit Name
Reserved
Port 7
Connect
Status
Port 6
Connect
Status
Port 5
Connect
Status
Port 4
Connect
Status
Port 3
Connect
Status
Port 2
Connect
Status
Port 1
Connect
Status
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0000
000
Figure 16-1. Hub Ports Connect Status
Hub Ports Speed
Address 0x4A
Bit #
7654
3210
Bit Name
Reserved
Port 7
Speed
Port 6
Speed
Port 5
Speed
Port 4
Speed
Port 3
Speed
Port 2
Speed
Port 1
Speed
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0000
0000
Figure 16-2. Hub Ports Speed