English
Language : 

EFM32WG Datasheet, PDF (334/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
4. Check that USB_GRSTCTL.TXFFLSH =0. If it is 0, then write the TxFIFO number you want to flush
to USB_GRSTCTL.TXFNUM.
5. Set USB_GRSTCTL.TXFFLSH=1and wait for it to clear.
6. Set the USB_DCTL.GCNPINNAK bit.
15.4.7.2.4 Flushing RxFIFOs in the Core
The application can flush all RxFIFOs in the core using USB_GRSTCTL.RXFFLSH as follows:
1. Check the status of the USB_GINTSTS.GOUTNAKEFF bit. If it has been cleared, then set
USB_DCTL.SGOUTNAK=1. Else, clear USB_GINTSTS.GOUTNAKEFF.
NAK Effective interrupt = 1 indicates that the core is not writing to FIFO.
2. Wait for USB_GINTSTS.GOUTNAKEFF=1, which indicates the NAK setting has taken effect to all
OUT endpoints.
3. Poll the USB_GRSTCTL.AHBIDLE until it is 1.
AHBIDLE = 1 indicates that the core is not reading anything from the FIFO.
4. Set USB_GRSTCTL.RXFFLSH=1 and wait for it to clear.
5. Set the USB_DCTL.GCOUTNAK bit.
The Core Interrupt Handler
Figure 15.36. Core Interrupt Handler
ot g_int r_ handler
Wait for interrupt
Read
USB_GINTSTS
Clear int errupt
OTG
int errup?t
No
Read
Yes
USB_GOTGCT. L
Generat e OTG
software interrupt
Host/
Device common
int errup?t
Yes
Generat e gobal
software interrupt
No
RTL
in Device
No
m ode?
Yes
Generat e host
global soft ware Yes
interrupt
Host
global
int errup?t
Device
global
int errup?t
Generat e device
Yes
global software
interrupt
Read USB_HPRT
Generat e por-t Yes
specific software
int errup.t
No
Host Port
Int errup?t
No
Read
USB_HAINT
No
Read
USB_DAINT
IN endpoint
int errup?t
Read USB_DIEPx_INT
Yes
Generat e IN-
endpoin-t specific
soft ware int erru.pt
Read USB_HCx_INT
Generat e channe- l
specific software
int errup.t
No
Read USB_DOEPx_INT
Generat e OUT-
endpoin-t specific
soft ware int erru.pt
Clear
interrupt
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
334
www.energymicro.com