...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
334
www.silabs.com
2. Non-periodic Transmit FIFO Size Register (USB_GNPTXFSIZ)
• USB_GNPTXFSIZ.NPTXFDEP = tx_fifo_size[0];
• USB_GNPTXFSIZ.NPTXFSTADDR = rx_fifo_size;
3. Host Periodic Transmit FIFO Size Register (USB_HPTXFSIZ)
• USB_HPTXFSIZ.PTXFSIZE = tx_fifo_size[1];
• USB_HPTXFSIZ.PTXFSTADDR = USB_GNPTXFSIZ.NPTXF tx_fifo_size[0];
4. The transmit FIFOs and receive FIFO must be flushed after RAM allocation for proper FIFO function.
• USB_GRSTCTL.TXFNUM = 0x10
• USB_GRSTCTL.TXFFLSH = 1
• USB_GRSTCTL.RXFFLSH = 1
• The application must wait until the TXFFLSH bit and the RXFFLSH bits are cleared before
performing any operation on the core.
15.4.7.1.3 Summary of Guidelines for Choosing Data FIFO RAM Depth in Host Mode
15.4.7.1.3.1 RX FIFO size
The RX FIFO size must be equal to at least twice the largest value of MPS size used. The recommended
minimum RXFIFO depth = ((largest packet size/4)*2)+2. (+2) is required by the core for the status
quadlets internally.
15.4.7.1.3.2 Non periodic TX FIFO size
This should be equal to at least twice the largest value of MPS size used. The recommended minimum
non-periodic TXFIFO depth = ((largest packet size/4)*2).
15.4.7.1.3.3 Periodic TX FIFO size
The recommended size for Periodic TXFIFO is sum total of (MPS*MC)/4 for all the channels.
Note
Note: In the above recommendations, always round off the MPS value to the nearest
multiple of 4. For example, if the largest value of MPS=125, use the rounded-off value,
which is 128.
15.4.7.1.4 Calculating the Total FIFO Size
The RxFIFO is shared between the host and device. The Host TxFIFOs are also shared with Device
IN endpoint TxFIFOs 0 through n.
There are three ways to calculate the total FIFO size.
Method 1
Use this method if you are using the following conditions:
• Minimum FIFO depth allocation
• The FIFO must equal at least one MaxPacketSize (MPS).
Device RxFIFO =
• (4 * number of control end 6) + ((largest USB packet used / 4) + 1 for status information) +
(2 * number of OUT endpoints) + 1 for Global NAK
Note
Include the Control OUT endpoint in the number of OUT endpoints.
Host RxFIFO =
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......