HS_USB 2.0 device
RM0082
468/844
Doc ID 018672 Rev 1
Each
endpoint FIFO controller
maintains the write and read pointers to access the memory
where relevant TxFIFO is located. Besides, these controllers need both the base address
and the buffer size of each endpoint TxFIFO to implement adaptive buffer management.
This feature allows to tailor the size of each TxFIFO depending on specific buffering
requirements.
In particular, the base address of each TxFIFO results from the upper limit of the previous
TxFIFO which, in turn, depends on the buffer size set by the CSRs for this endpoint (buffer
size register,
Endpoint buffer size and received packet frame number register on page 501
That is, the base address of the TxFIFO associated to n
th
in endoint added to the size of the
TxFIFO of the same n
th
in endpoint represents the base address for the TxFIFO associated
to the (n+1)
th
in endpoint.
Note:
Any attempt to read from TxFIFO via the AHB interface results in an AHB error.
Like
r
eceive FIFO controller, the transmit
endpoint FIFO controller
also requires a
confirmation signal indicating a successful transfer to TxFIFO. This confirmation signal
allows the controller to export the FIFO pointers to other domains.
23.3.6
Control and status registers
The
control and status registers
(CSRs) allow to exchange control information with the
application, as well as provide a means for the application to control the UDC-AHB
Subsystem.
23.3.7 AHB
slave-only
interface
The
AHB slave-only interface
block is active only when the UDC-AHB subsystem is
configured as a slave on the AHB.
In this scenario, all endpoint FIFOs are mapped to the system memory, and the application
writes the data directly to the endpoint FIFOs. Similarly, the RxFIFO is also mapped to the
system memory, and the application reads directly from the RxFIFO.
23.3.8
DMA (AHB master interface)
Enabling the UDC-AHB Subsystem to become an AHB master (that is, entering the DMA
mode,
), the
DMA
block receives the required data pointers from
the values programmed in the CSRs (
Section 23.3.6: Control and status registers
), and it
can transfer data with the system memory.
In particular, the
DMA
supports a true scatter/gather memory distribution, where each
endpoint memory structure is implemented as a linked-list (as detailed in
The DMA block (which is inactive in slave-only mode) consists of three basic components:
●
The DMA transfer engine, which moves the actual data,
●
The DMA controller, which controls the movement of the data,
●
The AHB interface, which manages the flow of data between the DMA and AHB for
both data transfer and CSRs accesses.
23.3.9 DMA
transfer
engine
The
DMA transfer engine
is a slave to the DMA by the DMA controller for the actual data
transfer to and from system memory.