USB on-the-go full-speed (OTG_FS) RM0351
1510/1693 DocID024597 Rev 3
PTXQSAV bits in the OTG_HNPTXSTS register or NPTQXSAV bits in the
OTG_HNPTXSTS register.
43.8 SOF trigger
Figure 497. SOF connectivity (SOF trigger output to TIM and ITR1 connection)
The OTG_FS core provides means to monitor, track and configure SOF framing in the host
and peripheral, as well as an SOF pulse output connectivity feature.
Such utilities are especially useful for adaptive audio clock generation techniques, where
the audio peripheral needs to synchronize to the isochronous stream provided by the PC, or
the host needs to trim its framing rate according to the requirements of the audio peripheral.
43.8.1 Host SOFs
In host mode the number of PHY clocks occurring between the generation of two
consecutive SOF (FS) or Keep-alive (LS) tokens is programmable in the host frame interval
register (HFIR), thus providing application control over the SOF framing period. An interrupt
is generated at any start of frame (SOF bit in OTG_GINTSTS). The current frame number
and the time remaining until the next SOF are tracked in the host frame number register
(HFNUM).
An SOF pulse signal, generated at any SOF starting token and with a width of 12 system
clock cycles, can be made available externally on the SOF pin using the SOFOUTEN bit in
the global control and configuration register. The SOF pulse is also internally connected to
the input trigger of the timer.
43.8.2 Peripheral SOFs
In device mode, the start of frame interrupt is generated each time an SOF token is received
on the USB (SOF bit in OTG_GINTSTS). The corresponding frame number can be read
from the device status register (FNSOF bit in OTG_DSTS). An SOF pulse signal with a
width of 12 system clock cycles is also generated and can be made available externally on
the SOF pin by using the SOF output enable bit in the global control and configuration
register (SOFOUTEN bit in OTG_GCCFG). The SOF pulse signal is also internally
670
7,0 62)JHQ
62)SXOVH
86%PLFUR$%FRQQHFWRU
,75
62)SXOVHRXWSXWWR
H[WHUQDODXGLRFRQWURO
9
%86
9
66
'
'
,'
06Y9