User`s guide
CY7C65113C
Document #: 38-08002 Rev. *G Page 27 of 48
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.
Figure 22. Hub Ports Connect Status
.
Bit [0..3]: Port x Connect Status (where x = 1..4).
When set to 1, Port x is connected; When set to 0, Port x
is disconnected.
Bit [4..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 bits [4..7] should
always read as ‘0’ to indicate no connection.
Figure 23. Hub Ports Speed
Bit [0..3]: Port x Speed (where x = 1..4).
Set to 1 if the device plugged in to Port x is Low Speed; Set
to 0 if the device plugged in to Port x is Full Speed.
Bit [4..7]: Reserved.
Set to 0.
The Hub Ports Speed register is cleared to zero by reset or bus
reset. This must be set by the firmware on issuing a port reset.
The Reserved bits [4..7] should always read as ‘0.’
Enabling/Disabling a USB Device
After a USB device connection has been detected, firmware
must update status change bits in the hub status change data
structure that is polled periodically by the USB host. The host
responds by sending a packet that instructs the hub to reset and
enable the downstream port. Firmware then sets the bit in the
Hub Ports Enable register (Figure 24), for the downstream port.
The hub repeater hardware responds to an enable bit in the Hub
Ports Enable register (Figure 24) by enabling the downstream
port, so that USB traffic can flow to and from that port.
If a port is marked enabled and is not suspended, it receives all
USB traffic from the upstream port, and USB traffic from the
downstream port is passed to the upstream port (unless babble
is detected). Low-speed ports do not receive full-speed traffic
from the upstream port.
When firmware writes to the Hub Ports Enable register
(Figure 24) to enable a port, the port is not enabled until the end
of any packet currently being transmitted. If there is no USB
traffic, the port is enabled immediately.
When a USB device disconnection has been detected, firmware
must update status bits in the hub change status data structure
that is polled periodically by the USB host. In suspended mode,
a connect or disconnect event generates an interrupt (if the hub
interrupt is enabled) even if the port is disabled.
Figure 24. Hub Ports Enable Register
Hub Ports Connect Status Address 0x48
Bit # 76543210
Bit Name Reserved Reserved Reserved Reserved 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 00000000
Hub Ports Speed Address 0x4A
Bit # 76543210
Bit Name Reserved Reserved Reserved Reserved 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 00000000
Hub Ports Enable Register Address 0x49
Bit # 76543210
Bit Name Reserved Reserved Reserved Reserved Port 4 Enable Port 3 Enable Port 2 Enable Port 1 Enable
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Reset 00000000