User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 326
www.energymicro.com
Figure 15.33. SRP Initiation by the Core When Acting as a B-Device
1. Program USB_GINTMSK
(unm ask OTGINT)
2. Read USB_GOTGCTL
No
Yes ( This indicates that
VBUS is already being driven
and hence there is no need for
a SRP)
Device Initialization
Steps. For more
inform ation, see
Device Initialization
section of this
chapter.
Interrupt ?
No
Yes
Read
USB_GINTSTS
No
Yes
Read
USB_GOTGINT
USB_GOTGINT.
SESREQSUCS
TSCHNG = 1?
No
Yes
1. Read USB_GOTGCTL
2. Clear
USB_GOTGINT.SESREQSU
CSTSCHNG by writing
a 1
USB_GOTGCTL .
SESREQSCS
= 1?
Yes
Device Initialization
Steps. For more
inform ation, see
Device Initialization
section of this
chapter.
No
Device
Transactions
Device (OTG
FSM in b_idle stat e)
USB_GOTGCTL.
BSESVLD = 1 ?
Set USB_GOTGCTL.
SESREQ = 1
USB_GINTSTS.
OTGINT = 1?
Note
The programming flow illustrated in Figure 15.33 (p. 326) is similar to OTG revision 1.3.
This is because the presence or absence of VBUS pulsing is transparent to the application.
15.4.6.2 OTG Revision 2.0 Host Negotiation Protocol
When the core is operating as A-device, the application must execute a GetStatus() operation to the B-
device with a frequency of THOST_REQ_POLL to determine the state of the host request flag in the
B-device. If the host request flag is set in B-device it must program the core to change its role within
THOST_REQ_SUSP.
Figure 15.34 (p. 327) shows the programming steps that need to be performed by A-device’s
application (core as A-device) in order to change its role to device. In Figure 15.34 (p. 327) , the A-
device performs a role change, becomes a B-device and then reverts back to host (A-device) mode of
operation.