Cypress CY7C65113C manual USB Hub, Connecting/Disconnecting a USB Device, Hub Ports Connect Status

Page 29

CY7C65113C

6.The host sends a request for the Device descriptor using the new USB address.

7.Firmware decodes the request and retrieves the Device descriptor from program memory tables.

8.The host performs a control read sequence and Firmware responds by sending its Device descriptor over the USB bus.

9.The host generates control reads from the device to request the Configuration and Report descriptors.

10.Once the device receives a Set Configuration request, its functions may now be used.

11.Following enumeration as a hub, Firmware can optionally indicate to the host that a compound device exists (for example, the keyboard in a keyboard/hub device).

12.The host carries out the enumeration process with this additional function as though it were attached downstream from the hub. 13.When the host assigns an address to this device, it is stored as the other USB address (for example, Address A).

16.0USB 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 CY7C65113C microcontroller. 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.1Connecting/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

.

 

 

 

 

 

 

 

 

Address 0x48

Hub Ports Connect Status

 

 

 

 

 

 

Bit #

7

 

6

5

4

3

2

1

 

0

Bit Name

Reserved

 

Reserved

Reserved

Reserved

Port 4

Port 3

Port 2

 

Port 1

 

 

 

 

 

 

Connect

Connect

Connect

 

Connect

 

 

 

 

 

 

Status

Status

Status

 

Status

Read/Write

R/W

 

R/W

R/W

R/W

R/W

R/W

R/W

 

R/W

Reset

0

 

0

0

0

0

0

0

 

0

Figure 16-1. 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.

Document #: 38-08002 Rev. *D

Page 29 of 49

[+] Feedback

Image 29
Contents Cypress Semiconductor Corporation USB Hub with MicrocontrollerCY7C65113C 17.0 16.018.0 19.0List of Tables Features Gpio Functional OverviewI2C USBLogic Block Diagram Product Summary Tables Pin ConfigurationsPin Assignments Top View CY7C65113C 28-pin SoicI/O Register Summary Instruction Set Summary Instruction Set SummaryMnemonic Operand Opcode Cycles14-bit Program Counter Programming ModelKB -32 Prom ends here CY7C65113C Program Memory begins here8-bit Program Stack Pointer PSP 8-bit Accumulator a8-bit Temporary Register MOV A, Dspinit 8-bit Data Stack Pointer DSPAddress Modes Clocking Power-on ResetXtalout XtalinWatchdog Reset Suspend ModePort 0 Data Address General-purpose I/O PortsPort 0,1 Low Isink Gpio Configuration Address Gpio Configuration PortPort 0 Interrupt Enable 10.0 12-bit Free-Running TimerGpio Interrupt Enable Ports Timer LSB Address 11.0 I2C Configuration RegisterTimer MSB Address 2C Configuration AddressI2C Data Address 12.0 I2C-compatible Controller2C Status and Control Address ACKContinue/Busy Write 1 to indicate ready for next transaction IRQ Processor Status and Control RegisterProcessor Status and Control Address 0xFF Interrupts Global Interrupt Enable Register AddressUSB Endpoint Interrupt Enable Address Interrupt Vectors Interrupt Controller Function DiagramInterrupt Latency USB Bus Reset InterruptTimer Interrupt USB Hub Interrupt USB Endpoint InterruptsGpio Interrupt 14.8 I2C InterruptUSB Serial Interface Engine SIE USB OverviewUSB Enumeration ACK/NAK/STALLHub Ports Connect Status Connecting/Disconnecting a USB DeviceUSB Hub Hub Ports Enable Register Hub Ports Enable Register AddressEnabling/Disabling a USB Device Hub Downstream Ports Status and ControlHub Ports SE0 Status Address 0x4F Hub Downstream Ports Control Register Address 0x4BHub Ports Force Low Hub Ports Data Downstream Port Suspend and ResumeHub Ports Data Register Hub Ports Suspend Address 0x4DUSB Status and Control Address 0x1F USB Upstream Port Status and ControlHub Ports Resume Address 0x4E USB Device Addresses USB Serial Interface Engine OperationUSB Device Endpoints USB Device Address Device A, B Addresses 0x10A and 0x40BSize Label Start Address USB Control Endpoint Mode RegistersUSB Device Endpoint Zero Mode A0, B0 USB Non-control Device Endpoint Mode USB Non-control Endpoint Mode RegistersUSB Endpoint Counter Registers StallUpdate Endpoint Mode/Count Registers Update and Locking MechanismSetup Data Update only if Fifo is WrittenSet Data SetSetup OUT USB Mode TablesDtog Dval Count Dtog Dval Count Endpoint Ports Register SummaryLOW Absolute Maximum Ratings Sample SchematicParameter Description Conditions Min Max Unit General Electrical CharacteristicsUSB Interface Upstream/Downstream PortUSB Full-speed Signaling10 Switching Characteristics fOSC = 6.0 MHzTimer Signals Parameter Description Min Max Unit Clock SourceOrdering Information Package DiagramOrdering Code Prom Size Package Type Operating Range CY7C65113C-SXCTREV ECN no Issue Date Orig. Description of ChangeDocument History