English
Language : 

EFM32WG Datasheet, PDF (314/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
as described in Endpoint Initialization (p. 281) . For packet writes in Slave mode, see: Packet Write
in Slave Mode (p. 303) .
Application Requirements
1. Application requirements 1, 2, 3, and 4 of Generic Non-Periodic (Bulk and Control) IN Data Transfers
Without Thresholding in DMA and Slave Mode (p. 308) also apply to periodic IN data transfers,
except for a slight modification of Requirement 2.
• The application can only transmit multiples of maximum-packet-size data packets or multiples of
maximum-packet-size packets, plus a short packet at the end. To transmit a few maximum-packet-
size packets and a short packet at the end of the transfer, the following conditions must be met.
• transfer size[epnum] = n * mps[epnum] + sp(where n is an integer # 0, and 0 >= sp < mps[epnum])
• If (sp > 0), packet count[epnum] = n + 1Otherwise, packet count[epnum] = n;
• mc[epnum] = packet count[epnum]
• The application cannot transmit a zero-length data packet at the end of transfer. It can transmit a
single zero-length data packet by it self. To transmit a single zero-length data packet,
• transfer size[epnum] = 0
• packet count[epnum] = 1
• mc[epnum] = packet count[epnum]
2. The application can only schedule data transfers 1 frame at a time.
• (USB_DIEPx_TSIZ.MC – 1) * USB_DIEPx_CTL.MPS =< USB_DIEPx_TSIZ.XFERSIZE =<
USB_DIEPx_TSIZ.MC * USB_DIEPx_CTL.MPS
• USB_DIEPx_TSIZ.PKTCNT = USB_DIEPx_TSIZ.MC
• If USB_DIEPx_TSIZ.XFERSIZE < USB_DIEPx_TSIZ.MC * USB_DIEPx_CTL.MPS, the last data
packet of the transfer is a short packet.
3. This step is not applicable for isochronous data transfers, only for interrupt transfers.
The application can schedule data transfers for multiple frames, only if multiples of max packet sizes
(up to 3 packets), must be transmitted every frame. This is can be done, only when the core is
operating in DMA mode. This is not a recommended mode though.
• ((n*USB_DIEPx_TSIZ.MC) - 1)*USB_DIEPx_CTL.MPS <= USB_DIEPx_TSIZ.XFERSIZE <=
n*USB_DIEPx_TSIZ.MC*USB_DIEPx_CTL.MPS
• USB_DIEPx_TSIZ.PKTCNT = n*USB_DIEPx_TSIZ.MC
• n is the number of frames for which the data transfers are scheduled
Data Transmitted per frame in this case would be USB_DIEPx_TSIZ.MC*USB_DIEPx_CTL.MPS,
in all the frames except the last one. In the frame “n”, the data transmitted would be
(USB_DIEPx_TSIZ.XFERSIZE - (n-1)*USB_DIEPx_TSIZ.MC*USB_DIEPx_CTL.MPS)
4. For Periodic IN endpoints, the data must always be prefetched 1 frame ahead for transmission in the
next frame. This can be done, by enabling the Periodic IN endpoint 1 frame ahead of the frame in
which the data transfer is scheduled.
5. The complete data to be transmitted in the frame must be written into the transmit FIFO (either by the
application or the DMA), before the Periodic IN token is received. Even when 1 DWORD of the data
to be transmitted per frame is missing in the transmit FIFO when the Periodic IN token is received,
the core behaves as when the FIFO was empty. When the transmit FIFO is empty,
6. A zero data length packet would be transmitted on the USB for ISO IN endpoints
• A NAK handshake would be transmitted on the USB for INTR IN endpoints
7. For a High Bandwidth IN endpoint with three packets in a frame, the application can program the
endpoint FIFO size to be 2*max_pkt_size and have the third packet load in after the first packet has
been transmitted on the USB.
Internal Data Flow
1. The application must set the Transfer Size and Packet Count fields in the endpoint-specific registers
and enable the endpoint to transmit the data.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
314
www.energymicro.com