English
Language : 

EFM32WG Datasheet, PDF (325/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
Figure 15.34. HNP When the Core is an A-Device
Host to Device to Host
Host m ode
(Send Set Feat ure Com m and t o enable
b_hnp_enable feat ure in HNP capable
devices. HNP polling m echanism is also
involved. This is done when OTG FSM
is in a_host st at e)
Pr o g r a m
USB_GOTGCTL .HSTSETHNPEN = 1
Program USB_HPRT.PRTSUSP= 1
Unm ask USB_GINTSTSO. TGINT
No
Interrupt ?
Yes
No
Read
USB_GINTSTS
No
USB_GINTSTS.
OTGINT=1 ?
Yes
No
Interrupt ?
Yes
USB_GOTGINT.
HSTNEGDET
=1?
Yes
Read
USB_GINTSTS.CURMOD
Rem ain as
Host(The host ’s
application can
take a call whether
No
t o swit ch off VBUS
or not)
USB_GINTSTS.
CURMOD = 0?
Yes
C1
C1
1. Unm ask
USB_GINTSTS.ERLYSUSP
2. Device Init ializat ion St. eps
For m ore inform at io, nsee
Device Initialization section
of t his chapt.er
St art of Device
t r an sact ion s
End of Device
t r an sact ion s
No
Interrupt ?
No
Read
USB_GINTSTS
Yes
USB_GINTSTS.
ERLYSUSP = 1 ?
Yes
No
Interrupt ?
No
Read
USB_GINTSTS
USB_GINTSTS.
USBSUSP = 1 ?
Yes
Application starts
200 ms timer
In t er r u p t
within
200 ms ?
yes
No
Read
USB_GINTSTS
Read USB_GINTSTS
Check t hat CURMOD
=0
Yes
Host Initialization
St eps. For m ore
inform at io,n see Host
Initialization section
of t his chapt.er
Host Mode
Transact ions
No
USB_GINTSTS.WKUPINT = 1
or
USB_GINTSTS.RESETDET ?
Figure 15.35 (p. 326) shows the programming steps that need to be performed by B-device’s
application (core as B-device) in order to change its role to Host. In Figure 15.35 (p. 326) , the B-
device performs a role change, becomes a Host and then reverts back to Device mode of operation.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
325
www.energymicro.com