English
Language : 

EFM32WG Datasheet, PDF (333/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
the largest one)
//Slave mode
OTG Total RAM = (Device RxFIFO or Host RxFIFO; choose the largest one) +
((Host Non-Periodic TxFIFO + Host periodic TxFIFO) OR
(Device IN Endpoint TxFIFO #0 + #1 + #2 + #n); choose the largest one)
15.4.7.2 Dynamic FIFO Allocation
The application can change the RAM allocation for each FIFO during the operation of the core.
15.4.7.2.1 Host Mode
In Host mode, before changing FIFO data RAM allocation, the application must determine the following.
All channels are disabled
• All FIFOs are empty
Once these conditions are met, the application can reallocate FIFO data RAM as explained in Data FIFO
RAM Allocation (p. 327) .
After reallocating the FIFO data RAM, the application must flush all FIFOs in the core using the
USB_GRSTCTL.TXFFLSH (TxFIFO Flush) and USB_GRSTCTL.RXFFLSH (RxFIFO Flush) fields.
Flushing is required to reset the pointers in the FIFOs for proper FIFO operation after reallocation. For
more information on flushing FIFOs, see Flushing TxFIFOs in the Core(p. 333) and Flushing RxFIFOs
in the Core (p. 334) .
15.4.7.2.2 Device Mode
In Device mode, before changing FIFO data RAM allocation, the application must determine the
following.
• All IN and OUT endpoints are disabled
• NAK mode is enabled in the core on all IN endpoints
• Global OUT NAK mode is enabled in the core
• All FIFOs are empty
Once these conditions are met, the application can reallocate FIFO data RAM as explained in Data FIFO
RAM Allocation (p. 327) . When NAK mode is enabled in the core, the core responds with a NAK
handshake on all tokens received on the USB, except for SETUP packets.
After the reallocating the FIFO data RAM, the application must flush all FIFOs in the core using
the USB_GRSTCTL.TXFFLSH (TxFIFO Flush) and USB_GRSTCTL.RXFFLSH (RxFIFO Flush) fields.
Flushing is required to reset the pointers in the FIFOs for proper FIFO operation after reallocation. For
more information on flushing FIFOs, see Flushing TxFIFOs in the Core(p. 333) and Flushing RxFIFOs
in the Core (p. 334) .
15.4.7.2.3 Flushing TxFIFOs in the Core
The application can flush all TxFIFOs in the core using USB_GRSTCTL.TXFFLSH as follows:
1. Check that USB_GINTSTS.GINNAKEFF=0. If this bit is cleared then set USB_DCTL.SGNPINNAK=1.
2. Wait for USB_GINTSTS.GINNAKEFF=1, which indicates the NAK setting has taken effect to all IN
endpoints.
3. Poll USB_GRSTCTL.AHBIDLE until it is 1.
AHBIdle = H indicates that the core is not writing anything to the FIFO.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
333
www.energymicro.com