8. The internal DMA controller fetches the transmit data from the data buffer in the system memory and
transfers the data to the FIFO buffer in preparation for transmission to the card.
†
9. When data spans across multiple descriptors, the internal DMA controller fetches the next descriptor
and continues with its operation with the next descriptor. The Last Descriptor bit in the descriptor DES0
field indicates whether the data spans multiple descriptors or not.
†
10. When data transmission is complete, status information is updated in the
idsts
register by setting the
ti
bit to 1, if enabled. Also, the OWN bit is set to 0 by the DMA controller by updating the DES0 field
of the descriptor.
†
Internal DMA Controller Reception Sequences
To use the internal DMA controller to receive data, perform the following steps:
1. The host sets up the descriptor fields (DES0—DES3) for reception, sets the OWN (DES0 [31]) to 1.
†
2. The host writes the read data command to the
cmd
register in BIU. The internal DMA controller
determines that a read data transfer needs to be performed.
†
3. The host sets the required receive threshold level in the
rx_wmark
field in the
fifoth
register.
†
4. The internal DMA controller engine fetches the descriptor and checks the OWN bit. If the OWN bit is
set to 0, the host owns the descriptor. In this case, the internal DMA controller enters suspend state and
asserts the Descriptor Unable interrupt. The host then needs to set the descriptor OWN bit to 1 and
release the DMA controller by writing any value to the
pldmnd
register.
†
5. The host must write the descriptor base address to the
dbaddr
register.
†
6. The internal DMA controller waits for the
CD
bit in the
rintsts
register to be set to 1, with no errors
from the BIU. This condition indicates that a transfer can be done.
†
7. The internal DMA controller engine waits for a DMA interface request from the BIU. The BIU divides
each transfer into smaller chunks. Each chunk is an internal request to the DMA. This request is generated
based on the receive threshold value.
†
8. The internal DMA controller fetches the data from the FIFO buffer and transfers the data to system
memory.
†
9. When data spans across multiple descriptors, the internal DMA controller fetches the next descriptor
and continues with its operation with the next descriptor. The Last Descriptor bit in the descriptor
indicates whether the data spans multiple descriptors or not.
†
10. When data reception is complete, status information is updated in the
idsts
register by setting the
ri
bit to 1, if enabled. Also, the OWN bit is set to 0 by the DMA controller by updating the DES0 field of
the descriptor.
†
Commands for SDIO Card Devices
This section describes the commands to temporarily halt the transfers between the controller and SDIO card
device.
Suspend and Resume Sequence
For SDIO cards, a data transfer between an I/O function and the controller can be temporarily halted using
the SUSPEND command. This capability might be required to perform a high-priority data transfer with
another function. When desired, the suspended data transfer can be resumed using the RESUME command.
†
The SUSPEND and RESUME operations are implemented by writing to the appropriate bits in the CCCR
(Function 0) of the SDIO card. To read from or write to the CCCR, use the controller’s IO_RW_DIRECT
command.
†
Altera Corporation
SD/MMC Controller
11-47
Internal DMA Controller Reception Sequences
cv_54011
2013.12.30