HS_USB 2.0 device
RM0082
470/844
Doc ID 018672 Rev 1
23.4
Theory of operation
The UDC-AHB Subsystem supports two distinct operation modes:
●
), a DMA-based implementation where the UDC-
AHB Subsystem acts as an AHB master for data transfers.
●
Slave-Only mode (detailed in
), where the UDC-AHB Subsystem is
slaved to the application and any application AHB master reads data from, or writes
data to the memory-mapped FIFOs provided by the device.
In both modes, all data transfers are interrupt-driven.
23.4.1 DMA
mode
In general, a major advantage of DMA-based implementations is that they spare the main
processor’s computing power from involvement in data transfer tasks. Moreover, use of a
scatter-gather DMA helps applications to make efficient and optimal use of system memory,
which is indeed a major design constraint on portable systems.
Specifically, in DMA mode, the UDC-AHB subsystem implements a true scatter-gather
memory distribution, in which memory structures are scattered over the system memory. As
illustrated in
, each in/out endpoint memory structure is implemented as a linked-
list, where each element of the list is a data buffer of a predefined size.
In addition to data (both in and out), each buffer also has a status quadlet and a pointer to
the next buffer. The last element of such a linked list can point either to a null pointer or, if
the linked list is implemented as a ring buffer, to the first element of the list. Data buffer
structure for both in and out endpoint is described in
,
respectively.
Besides, all control endpoints implement an additional 16-byte buffer to store SETUP data.
The SETUP data structure (detailed in
) does not implement a linked-list
structure.