English
Language : 

EFM32WG Datasheet, PDF (247/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
7. Program the USB_HPRT.PRTRST bit to 0.
8. Wait for the USB_HPRT.PRTENCHNG interrupt.
9. Read the USB_HPRT.PRTSPD field to get the enumerated speed.
10.Program the USB_HFIR register with a value corresponding to the selected PHY clock. At this point,
the host is up and running and the port register begins to report device disconnects, etc. The port is
active with SOFs occurring down the enabled port.
11.Program the RXFSIZE register to select the size of the receive FIFO.
12.Program the NPTXFSIZE register to select the size and the start address of the Non-periodic Transmit
FIFO for non-periodic transactions.
13.Program the USB_HPTXFSIZ register to select the size and start address of the Periodic Transmit
FIFO for periodic transactions.
To communicate with devices, the system software must initialize and enable at least one channel as
described in Device Initialization (p. 247) .
15.4.1.1.1 Host Connection
The following steps explain the host connection flow:
1. When the USB Cable is plugged to the Host port, the core triggers USB_GINTSTS.CONIDSTSCHNG
interrupt.
2. When the Host application detects USB_GINTSTS.CONIDSTSCHNG interrupt, the application can
perform one of the following actions:
• Turn on VBUS by setting USB_HPRT.PRTPWR = 1 or
• Wait for SRP Signaling from Device to turn on VBUS.
3. The PHY indicates VBUS power-on by detecting a VBUS valid voltage level.
4. When the Host Core detects the device connection, it triggers the Host Port Interrupt
(USB_GINTSTS.PRTINT) to the application.
5. When USB_GINTSTS.PRTINT is triggered, the application reads the USB_HPRT register to check if
the Port Connect Detected (USB_HPRT.PRTCONNDET) bit is set or not.
15.4.1.1.2 Host Disconnection
The following steps explain the host disconnection flow:
1. When the Device is disconnected from the USB Cable (but the cable is still connected to the USB
host), the Core triggers USB_GINTSTS.DISCONNINT (Disconnect Detected) interrupt.
Note
If the USB cable is disconnected from the Host port without removing the device, the
core generates an additional interrupt - USB_GINTSTS.CONIDSTSCHNG (Connector ID
Status Change).
2. The Host application can choose to turn off the VBUS by programming USB_HPRT.PRTPWR = 0.
15.4.1.2 Device Initialization
The application must perform the following steps to initialize the core at device on, power on, or after
a mode change from Host to Device.
1. Program the following fields in USB_DCFG register.
• Device Speed
• Non-Zero-Length Status OUT Handshake
• Periodic Frame Interval
2. Program the USB_GINTMSK register to unmask the following interrupts.
• USB Reset
• Enumeration Done
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
247
www.energymicro.com