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 full-speed (OTG_FS) <strong>RM0090</strong><br />

number and the time remaining until the next SOF are tracked in the host frame number<br />

register (HFNUM).<br />

An SOF pulse signal, generated at any SOF starting token and with a width of 12 system<br />

clock cycles, can be made available externally on the SOF pin using the SOFOUTEN bit in<br />

the global control and configuration register. The SOF pulse is also internally connected to<br />

the input trigger of timer 2 (TIM2), so that the input capture feature, the output compare<br />

feature and the timer can be triggered by the SOF pulse. The TIM2 connection is enabled<br />

through the ITR1_RMP bits of TIM2_OR register.<br />

30.7.2 Peripheral SOFs<br />

In device mode, the start of frame interrupt is generated each time an SOF token is received<br />

on the USB (SOF bit in OTH_FS_GINTSTS). The corresponding frame number can be read<br />

from the device status register (FNSOF bit in OTG_FS_DSTS). An SOF pulse signal with a<br />

width of 12 system clock cycles is also generated and can be made available externally on<br />

the SOF pin by using the SOF output enable bit in the global control and configuration<br />

register (SOFOUTEN bit in OTG_FS_GCCFG). The SOF pulse signal is also internally<br />

connected to the TIM2 input trigger, so that the input capture feature, the output compare<br />

feature and the timer can be triggered by the SOF pulse. The TIM2 connection is enabled<br />

through the ITR1_RMP bits the TIM2 option register (TIM2_OR).<br />

The end of periodic frame interrupt (GINTSTS/EOPF) is used to notify the application when<br />

80%, 85%, 90% or 95% of the time frame interval elapsed depending on the periodic frame<br />

interval field in the device configuration register (PFIVL bit in OTG_FS_DCFG). This feature<br />

can be used to determine if all of the isochronous traffic for that frame is complete.<br />

30.8 Power options<br />

The power consumption of the OTG PHY is controlled by three bits in the general core<br />

configuration register:<br />

● PHY power down (GCCFG/PWRDWN)<br />

It switches on/off the full-speed transceiver module of the PHY. It must be preliminarily<br />

set to allow any USB operation.<br />

● A-VBUS sensing enable (GCCFG/VBUSASEN)<br />

It switches on/off the VBUS comparators associated with A-device operations. It must be<br />

set when in A-device (USB host) mode and during HNP.<br />

● B-VBUS sensing enable (GCCFG/VBUSASEN)<br />

It switches on/off the VBUS comparators associated with B-device operations. It must be<br />

set when in B-device (USB peripheral) mode and during HNP.<br />

Power reduction techniques are available while in the USB suspended state, when the USB<br />

session is not yet valid or the device is disconnected.<br />

● Stop PHY clock (STPPCLK bit in OTG_FS_PCGCCTL)<br />

When setting the stop PHY clock bit in the clock gating control register, most of the<br />

48 MHz clock domain internal to the OTG full-speed core is switched off by clock<br />

1033/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!