...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
337
www.silabs.com
the largest one)
//Slave mode
OTG Total RAM = (Device RxFIFO or Host RxFIFO; choose the largest one) +
((Host Non-Periodic 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. 331) .
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. 337) and Flushing RxFIFOs
in the Core (p. 338) .
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. 331) . 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. 337) and Flushing RxFIFOs
in the Core (p. 338) .
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.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......