...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
338
www.silabs.com
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 int errupt
OTG
int errupt?
Read
USB_GINTSTS
Yes
Read
USB_GOTGCTL
.
Generat e OTG
soft ware int errupt
Clear
int errupt
Host/
Device com m on
int errupt?
No
Yes
Generat e gobal
soft ware int errupt
No
RTL
in Device
m ode?
Device
global
int errupt?
Host
global
int errupt?
Yes
No
Clear int errupt
Generat e host
global soft ware
int errupt
Generat e device
global soft ware
int errupt
Yes
Yes
No
No
Host Port
Int errupt?
Read USB_HPRT
Generat e port-
specific soft ware
int errupt.
Yes
No
Read
USB_HAINT
Read USB_HCx _INT
Generat e channel-
specific soft ware
int errupt.
Read
USB_DAINT
IN endpoint
int errupt?
Read USB_DIEPx _INT
Generat e IN-
endpoint- specific
soft ware int errupt
.
Yes
No
Read USB_DOEPx _INT
Generat e OUT-
endpoint- specific
soft ware int errupt
.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......