09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

USB on-the-go high-speed (OTG_HS) <strong>RM0090</strong><br />

In Powered state, the OTG_HS expects a reset from the host. No other USB operations are<br />

possible. When a reset is received, the reset detected interrupt (USBRST in<br />

OTG_HS_GINTSTS) is generated. When the reset is complete, the enumeration done<br />

interrupt (ENUMDNE bit in OTG_HS_GINTSTS) is generated and the OTG_HS enters the<br />

Default state.<br />

Soft disconnect<br />

The Powered state can be exited by software by using the soft disconnect feature. The DP<br />

pull-up resistor is removed by setting the Soft disconnect bit in the device control register<br />

(SDIS bit in OTG_HS_DCTL), thus generating a device disconnect detection interrupt on the<br />

host side even though the USB cable was not really unplugged from the host port.<br />

Default state<br />

In Default state the OTG_HS expects to receive a SET_ADDRESS command from the host.<br />

No other USB operations are possible. When a valid SET_ADDRESS command is decoded<br />

on the USB, the application writes the corresponding number into the device address field in<br />

the device configuration register (DAD bit in OTG_HS_DCFG). The OTG_HS then enters<br />

the address state and is ready to answer host transactions at the configured USB address.<br />

Suspended state<br />

The OTG_HS peripheral constantly monitors the USB activity. When the USB remains idle<br />

for 3 ms, the early suspend interrupt (ESUSP bit in OTG_HS_GINTSTS) is issued. It is<br />

confirmed 3 ms later, if appropriate, by generating a suspend interrupt (USBSUSP bit in<br />

OTG_HS_GINTSTS). The device suspend bit is then automatically set in the device status<br />

register (SUSPSTS bit in OTG_HS_DSTS) and the OTG_HS enters the Suspended state.<br />

The device can also exit from the Suspended state by itself. In this case the application sets<br />

the remote wakeup signaling bit in the device control register (RWUSIG bit in<br />

OTG_HS_DCTL) and clears it after 1 to 15 ms.<br />

When a resume signaling is detected from the host, the resume interrupt (WKUPINT bit in<br />

OTG_HS_GINTSTS) is generated and the device suspend bit is automatically cleared.<br />

31.5.3 Peripheral endpoints<br />

The OTG_HS core instantiates the following USB endpoints:<br />

● Control endpoint 0<br />

This endpoint is bidirectional and handles control messages only.<br />

It has a separate set of registers to handle IN and OUT transactions, as well as<br />

dedicated control (OTG_HS_DIEPCTL0/OTG_HS_DOEPCTL0), transfer configuration<br />

(OTG_HS_DIEPTSIZ0/OTG_HS_DIEPTSIZ0), and status-interrupt<br />

1161/1416 Doc ID 018909 Rev 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!