DocID018909 Rev 11
RM0090
USB on-the-go full-speed (OTG_FS)
1368
The suspended state can be optionally exited on the remote device’s initiative (remote
wakeup). In this case the remote wakeup interrupt (WKUPINT bit in OTG_FS_GINTSTS) is
generated upon detection of a remote wakeup signaling, the port resume bit in the host port
control and status register (PRES bit in OTG_FS_HPRT) self-sets, and resume signaling is
automatically driven over the USB. The application must time the resume window and then
clear the port resume bit to exit the suspended state and restart the SOF.
If the suspended state is exited on the host initiative, the application must set the port
resume bit to start resume signaling on the host port, time the resume window and finally
clear the port resume bit.
34.6.3 Host
channels
The OTG_FS core instantiates 8 host channels. Each host channel supports an USB host
transfer (USB pipe). The host is not able to support more than 8 transfer requests at the
same time. If more than 8 transfer requests are pending from the application, the host
controller driver (HCD) must re-allocate channels when they become available from
previous duty, that is, after receiving the transfer completed and channel halted interrupts.
Each host channel can be configured to support in/out and any type of periodic/nonperiodic
transaction. Each host channel makes us of proper control (HCCHAR
x
), transfer
configuration (HCTSIZ
x
) and status/interrupt (HCINT
x
) registers with associated mask
(HCINTMSK
x
) registers.
Host channel control
•
The following host channel controls are available to the application through the host
channel-
x
characteristics register (HCCHAR
x
):
–
Channel enable/disable
–
Program the FS/LS speed of target USB peripheral
–
Program the address of target USB peripheral
–
Program the endpoint number of target USB peripheral
–
Program the transfer IN/OUT direction
–
Program the USB transfer type (control, bulk, interrupt, isochronous)
–
Program the maximum packet size (MPS)
–
Program the periodic transfer to be executed during odd/even frames
Host channel transfer
The host channel transfer size registers (HCTSIZ
x
) allow the application to program the
transfer size parameters, and read the transfer status. Programming must be done before
setting the channel enable bit in the host channel characteristics register. Once the endpoint
is enabled the packet count field is read-only as the OTG FS core updates it according to
the current transfer status.
•
The following transfer parameters can be programmed:
–
transfer size in bytes
–
number of packets making up the overall transfer size
–
initial data PID