Cypress CY7C65113C manual Enabling/Disabling a USB Device, Hub Downstream Ports Status and Control

Page 30

CY7C65113C

Hub Ports Speed

 

 

 

 

 

 

Address 0x4A

Bit #

7

6

5

4

3

2

1

 

0

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

0

0

0

0

0

0

0

 

0

Figure 16-2. 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.’

16.2Enabling/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 16-3), for the downstream port. The hub repeater hardware responds to an enable bit in the Hub Ports Enable register (Figure 16-3) 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 16-3) 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.

Hub Ports Enable Register

 

 

 

 

 

 

Address 0x49

Bit #

7

 

6

5

4

3

2

1

 

0

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

0

 

0

0

0

0

0

0

 

0

 

 

 

 

Figure 16-3.

Hub Ports Enable Register

 

 

 

 

Bit [0..3] : Port x Enable (where x = 1..4)

Set to 1 if Port x is enabled; Set to 0 if Port x is disabled Bit [4..7] : Reserved.

Set to 0.

The Hub Ports Enable register is cleared to zero by reset or bus reset to disable all downstream ports as the default condition. A port is also disabled by internal hub hardware (enable bit cleared) if babble is detected on that downstream port. Babble is defined as:

Any non-idle downstream traffic on an enabled downstream port at EOF2.

Any downstream port with upstream connectivity established at EOF2 (i.e., no EOP received by EOF2).

16.3Hub Downstream Ports Status and Control

Data transfer on hub downstream ports is controlled according to the bit settings of the Hub Downstream Ports Control Register (Figure 16-4). Each downstream port is controlled by two bits, as defined in Table 16-1below. The Hub Downstream Ports Control Register is cleared upon reset or bus reset, and the reset state is the state for normal USB traffic. Any downstream port being forced must be marked as disabled (Figure 16-3) for proper operation of the hub repeater.

Firmware should use this register for driving bus reset and resume signaling to downstream ports. Controlling the port pins through this register uses standard USB edge rate control according to the speed of the port, set in the Hub Port Speed Register.

Document #: 38-08002 Rev. *D

Page 30 of 49

[+] Feedback

Image 30
Contents USB Hub with Microcontroller Cypress Semiconductor CorporationCY7C65113C 18.0 16.017.0 19.0List of Tables Features I2C Functional OverviewGpio USBLogic Block Diagram Pin Assignments Pin ConfigurationsProduct Summary Tables Top View CY7C65113C 28-pin SoicI/O Register Summary Mnemonic Instruction Set SummaryInstruction Set Summary Operand Opcode CyclesProgramming Model 14-bit Program CounterProgram Memory begins here KB -32 Prom ends here CY7C65113C8-bit Accumulator a 8-bit Temporary Register8-bit Program Stack Pointer PSP 8-bit Data Stack Pointer DSP Address ModesMOV A, Dspinit Xtalout Power-on ResetClocking XtalinSuspend Mode Watchdog ResetGeneral-purpose I/O Ports Port 0,1 Low IsinkPort 0 Data Address Gpio Configuration Port Gpio Configuration Address10.0 12-bit Free-Running Timer Gpio Interrupt Enable PortsPort 0 Interrupt Enable Timer MSB Address 11.0 I2C Configuration RegisterTimer LSB Address 2C Configuration Address2C Status and Control Address 12.0 I2C-compatible ControllerI2C Data Address ACKContinue/Busy Write 1 to indicate ready for next transaction Processor Status and Control Register Processor Status and Control Address 0xFFIRQ Global Interrupt Enable Register Address USB Endpoint Interrupt Enable AddressInterrupts Interrupt Controller Function Diagram Interrupt VectorsUSB Bus Reset Interrupt Timer InterruptInterrupt Latency Gpio Interrupt USB Endpoint InterruptsUSB Hub Interrupt 14.8 I2C InterruptUSB Enumeration USB OverviewUSB Serial Interface Engine SIE ACK/NAK/STALLConnecting/Disconnecting a USB Device USB HubHub Ports Connect Status Enabling/Disabling a USB Device Hub Ports Enable Register AddressHub Ports Enable Register Hub Downstream Ports Status and ControlHub Downstream Ports Control Register Address 0x4B Hub Ports Force LowHub Ports SE0 Status Address 0x4F Hub Ports Data Register Downstream Port Suspend and ResumeHub Ports Data Hub Ports Suspend Address 0x4DUSB Upstream Port Status and Control Hub Ports Resume Address 0x4EUSB Status and Control Address 0x1F USB Device Endpoints USB Serial Interface Engine OperationUSB Device Addresses USB Device Address Device A, B Addresses 0x10A and 0x40BUSB Control Endpoint Mode Registers USB Device Endpoint Zero Mode A0, B0Size Label Start Address USB Endpoint Counter Registers USB Non-control Endpoint Mode RegistersUSB Non-control Device Endpoint Mode StallEndpoint Mode/Count Registers Update and Locking Mechanism SetupUpdate Set Update only if Fifo is WrittenData Data SetUSB Mode Tables Setup OUTDtog Dval Count Dtog Dval Count Endpoint Register Summary PortsLOW Sample Schematic Absolute Maximum RatingsUSB Interface Electrical CharacteristicsParameter Description Conditions Min Max Unit General Upstream/Downstream PortTimer Signals Switching Characteristics fOSC = 6.0 MHzUSB Full-speed Signaling10 Parameter Description Min Max Unit Clock SourceOrdering Code Prom Size Package Type Operating Range Package DiagramOrdering Information CY7C65113C-SXCTIssue Date Orig. Description of Change Document HistoryREV ECN no