English
Language : 

EFM32WG Datasheet, PDF (291/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
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. 349) .
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. 291) provides a flow chart of this procedure.
Figure 15.21. Receive FIFO Packet Read in Slave Mode
wait unt il USB_GINTSTS.RXFLVL
rd_dat a = rd_reg(USB_RXSTSP)
packet
store in
m em ory
Y
rd_dat a.BCNT = 0
N
m em [ 0:dword_cnt -1] =
rd_rxfifo(rd_dat a.EPNUM,
dword_cnt )
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. 327) .
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.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
291
www.energymicro.com