Altera Cyclone V Device Handbook page 719

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

cv_54011
2013.12.30
Table 11-18: cmd Register Settings for Single-Block and Multiple-Block Reads (User Selectable)
wait_prvdata_complete
check_response_crc
cmd_index
Related Information
Auto-Stop
Refer to this table for information about setting the send_auto_stop parameter.
Single-Block or Multiple-Block Write
The following steps comprise a single-block or multiple-block write:
1. Write the data size in bytes to the bytcnt register. For a multi-block write, bytcnt must be a multiple
of the block size.
2. Write the block size in bytes to the blksiz register. The controller sends data in blocks of size blksiz
each.
3. Write the cmdarg register with the data address to which data must be written.
4. Write data into the FIFO buffer. For best performance, the host software should write data continuously
until the FIFO buffer is full.
5. Write the cmd register with the parameters listed in cmd Register Settings for Single-Block and Multiple-
Block Write. For SD and MMC cards, use the SD/SDIO WRITE_BLOCK (CMD24) command for a single-
block write and the WRITE_MULTIPLE_BLOCK (CMD25) command for a multiple-block writes. For
SDIO cards, use the IO_RW_EXTENDED command for both single-block and multiple-block transfers.
After writing to the cmd register, the controller starts executing a command if there is no other command
already being processed. When the command is sent to the bus, a Command Done interrupt is generated.
6. Software must check for data error interrupts; that is, for dcrc, bds, and ebe bits of the rintsts
register. If required, software can terminate the data transfer early by sending the SD/SDIO STOP
command.
7. Software must check for host timeout conditions in the rintsts register:
• Transmit FIFO buffer data request.
• Data starvation by the host the controller wrote data to the card faster than the host could supply
the data.
In both cases, the software must write data into the FIFO buffer.
There are two types of transfers: open-ended and fixed length.
SD/MMC Controller
Send Feedback
Parameter
on page 11-22
Single-Block or Multiple-Block Write
Value
1 or 0
0 - sends command to CIU immediately
1 - sends command after previous data transfer
ends
1 or 0
0 - Controller must not check response CRC
1 - Controller must check responce CRC
Command
Set this parameter to the command number. For
Index
example, set to 17 or 18 for SD/SDIO READ_
SINGLE_BLOCK (CMS17) or READ_MULTIPLE_
BLOCK (CMD18)
Comment
11-41
Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents