...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
295
www.silabs.com
a. SETUP Packet Pattern: PKTSTS = SETUP, BCNT = 0x008, EPNUM = Control EP Num,
DPID = D0. This data indicates that a SETUP packet for the specified endpoint is now available
for reading from the receive FIFO.
b. Setup Stage Done Pattern: PKTSTS = Setup Stage Done, BCNT = 0x0, EPNUM = Control EP
Num, DPID = Don’t Care (0b00). This data indicates that the Setup stage for the specified endpoint
has completed and the Data stage has started. After this entry is popped from the receive FIFO,
the core asserts a Setup interrupt on the specified control OUT endpoint.
c. Data OUT Packet Pattern: PKTSTS = DataOUT, BCNT = size of the Received data OUT packet,
EPNUM = EPNum on which the packet was received, DPID = Actual Data PID.
d. Data Transfer Completed Pattern: PKTSTS = Data OUT Transfer Done, BCNT = 0x0,
EPNUM = OUT EP Num on which the data transfer is complete, DPID = Dont Care (0b00). This
data indicates that a OUT data transfer for the specified OUT endpoint has completed. After this
entry is popped from the receive FIFO, the core asserts a Transfer Completed interrupt on the
specified OUT endpoint.
The encoding for the PKTSTS is listed in Section 15.6 (p. 353) .
6. After the data payload is popped from the receive FIFO, the USB_GINTSTS.RXFLVL interrupt must
be unmasked.
7. Steps 1–5 are repeated every time the application detects assertion of the interrupt line due to
USB_GINTSTS.RXFLVL. Reading an empty receive FIFO can result in undefined core behavior.
Figure 15.21 (p. 295) provides a flow chart of this procedure.
Figure 15.21. Receive FIFO Packet Read in Slave Mode
N
wait unt il USB_GINTSTS.RXFLVL
packet
st ore in
m em ory
Y
m em [0:dword_cnt - 1] =
rd_rx fifo(rd_dat a.EPNUM,
dword_cnt )
rd_dat a.BCNT = 0
rd_dat a = rd_reg(USB_RXSTSP)
rcv_out _pkt ()
dword_cnt =
BCNT[11:2] +
(BCNT[1] | BCNT[0])
15.4.4.2.2.5 Setting the Global OUT NAK
Internal Data Flow
1. When the application sets the Global OUT NAK (USB_DCTL.SGOUTNAK), the core stops writing
data, except SETUP packets, to the receive FIFO. Irrespective of the space availability in the receive
FIFO, non-isochronous OUT tokens receive a NAK handshake response, and the core ignores
isochronous OUT data packets
2. The core writes the Global OUT NAK pattern to the receive FIFO. The application must reserve
enough receive FIFO space to write this data pattern. See Data FIFO RAM Allocation (p. 331) .
3. When either the core (in DMA mode) or the application (in Slave mode) pops the Global OUT NAK
pattern DWORD from the receive FIFO, the core sets the USB_GINTSTS.GOUTNAKEFF interrupt.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......