...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
289
www.silabs.com
in DMA and Slave
Modes (p. 305)
DMA
Generic Periodic
IN (Interrupt and
Isochronous) Data
Transfers Without
Thresholding (p. 317)
and Generic Periodic IN
Data Transfers Without
Thresholding Using
the Periodic Transfer
Interrupt Feature (p.
319)
Control Read Transfers
(SETUP, Data IN, Status
OUT) (p. 292) and
Incomplete Isochronous
OUT Data Transfers
in DMA and Slave
Modes (p. 305)
15.4.4.2.1 OUT Data Transfers in Slave and DMA Modes
This section describes the internal data flow and application-level operations during data OUT transfers
and setup transactions.
15.4.4.2.1.1 Control Setup Transactions
This section describes how the core handles SETUP packets and the application’s sequence for handling
setup transactions. To initialize the core after power-on reset, the application must follow the sequence
in Overview: Programming the Core (p. 250) . Before it can communicate with the host, it must initialize
an endpoint as described in Endpoint Initialization (p. 285) . See Packet Read from FIFO in Slave
Mode (p. 294) .
Application Requirements
1. To receive a SETUP packet, the USB_DOEPx_TSIZ.SUPCNT field in a control OUT endpoint must
be programmed to a non-zero value. When the application programs the SUPCNT field to a non-
zero value, the core receives SETUP packets and writes them to the receive FIFO, irrespective of
the USB_DOEPx_CTL.NAK status and USB_DOEPx_CTL.EPENA bit setting. The SUPCNT field is
decremented every time the control endpoint receives a SETUP packet. If the SUPCNT field is not
programmed to a proper value before receiving a SETUP packet, the core still receives the SETUP
packet and decrements the SUPCNT field, but the application possibly is not be able to determine
the correct number of SETUP packets received in the Setup stage of a control transfer.
• USB_DOEPx_TSIZ.SUPCNT = 3
2. In DMA mode, the OUT endpoint must also be enabled, to transfer the received SETUP packet data
from the internal receive FIFO to the external memory.
• USB_DOEPx_CTL.EPENA = 1
3. The application must always allocate some extra space in the Receive Data FIFO, to be able to
receive up to three SETUP packets on a control endpoint.
• The space to be Reserved is (4 * n) + 6 DWORDs, where n is the number of control endpoints
supported by the device. Three DWORDs are required for the first SETUP packet, 1 DWORD is
required for the Setup Stage Done DWORD, and 6 DWORDs are required to store two extra SETUP
packets among all control endpoints.
• 3 DWORDs per SETUP packet are required to store 8 bytes of SETUP data and 4 bytes of SETUP
status (Setup Packet Pattern). The core reserves this space in the receive data
• FIFO to write SETUP data only, and never uses this space for data packets.
4. In Slave mode, the application must read the 2 DWORDs of the SETUP packet from the receive FIFO.
In DMA mode, the core writes the 2 DWORDs of SETUP data to the memory.
5. The application must read and discard the Setup Stage Done DWORD from the receive FIFO.
Internal Data Flow
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......