RM0082
HS_USB 2.0 device
Doc ID 018672 Rev 1
469/844
In case of a memory access, the
DMA transfer engine
interfaces with the FIFOs and the
AHB interface module of DMA, and indicates to the DMA whether or not the transfer was
successful. If the data transfer was unsuccessful, the
DMA transfer engine
also indicates
how many bytes were successfully transferred to the destination, so that the DMA can
decide whether to retry the transaction.
In case of data transfer from the FIFOs to system memory, the
DMA transfer engine
depends on status signals from the FIFOs’ respective FIFO controllers. In case of
transferring the data to system memory, the
DMA transfer engine
registers the data, then
waits for the request from the DMA controller and decides on the direction of the transfer. It
completes the transfer whether the transaction is completed successfully or if there is an
error during the data transfer.
23.3.10 DMA
controller
The
DMA controller
is in charge of all data exchange between FIFOs and system memory.
Specifically, the
DMA controller
actually consists of two distinct controllers with the aim to
manage both in (transmit) and out (receive) transactions simultaneously, although transmit
and receive functions cannot be performed simultaneously.
From a functional perspective, the
DMA controller
parses the descriptor structures and then
commands the other subsystem blocks to perform data transfers accordingly. The
descriptors fetched from memory are stored by the
DMA controller
in a proper descriptors
buffer.
23.3.11 AHB
interface
This block contains all the subsystem’s AHB protocol logic. In particular, the
AHB interface
has two functional states where it is able to act:
●
As a AHB slave, when the application programs the CSRs of either the UDC-AHB
Subsystem or the UDC (
),
●
As a AHB master, when the DMA performs data transfers.
Acting as AHB master, the UDC-AHB subsystem accesses the application memory for
descriptors and data buffers. When the subsystem is in slave-only mode, the
AHB interface
also acts as a slave. In this mode, all the FIFOs are memory-mapped, and the application
writes directly to the FIFOs.
23.3.12
CSRs slave access
The
CSRs slave access
block is active in DMA mode only (
) and,
acting as an AHB slave, it responds to any CSRs access from the application (which acts as
an AHB master).
In DMA mode CSR registers are accessible through CSR slave access block as this time
AHB slave only block is de-activated. This AHB slave only block is activated only in slave
mode.