Altera Cyclone V Device Handbook page 726

Hide thumbs Also See for Cyclone V:
Table of Contents

Advertisement

11-48
Suspend
Suspend
To suspend data transfer, perform the following steps:
1. Check if the SDIO card supports the SUSPEND/RESUME protocol. This can be done through the SBS
bit in the CCCR at offset 0x08 of the card.
2. Check if the data transfer for the required function number is in process. The function number that is
currently active is reflected in the function select bits (FSx) of the CCCR, bits 3:0 at offset 0x0D of the
card.
Note:
If the bus status bit (BS), bit 0 at address 0xC, is 1, only the function number given by the FSx bits
is valid.
3. To suspend the transfer, set the bus release bit (BR), bit 2 at address 0xC, to 1.
4. Poll the BR and BS bits of the CCCR at offset 0x0C of the card until they are set to 0. The BS bit is 1 when
the currently-selected function is using the data bus. The BR bit remains 1 until the bus release is complete.
When the BR and BS bits are 0, the data transfer from the selected function is suspended.
5. During a read-data transfer, the controller can be waiting for the data from the card. If the data transfer
is a read from a card, the controller must be informed after the successful completion of the SUSPEND
command. The controller then resets the data state machine and comes out of the wait state. To accomplish
this, set the abort read data bit (abort_read_data) in the ctrl register to 1.
6. Wait for data completion, by polling until the dto bit is set to 1 in the rintsts register. To determine
the number of pending bytes to transfer, read the transferred CIU card byte count (tcbcnt) register of
the controller. Subtract this value from the total transfer size. You use this number to resume the transfer
properly.
Resume
To resume the data transfer, perform the following steps:
1. Check that the card is not in a transfer state, which confirms that the bus is free for data transfer.
2. If the card is in a disconnect state, select it using the SD/SDIO SELECT/DESELECT_CARD command.
The card status can be retrieved in response to an IO_RW_DIRECT or IO_RW_EXTENDED command.
3. Check that a function to be resumed is ready for data transfer. Determine this state by reading the
corresponding RF<n> flag in CCCR at offset 0x0F of the card. If RF<n> = 1, the function is ready for
data transfer.
Note:
For detailed information about the RF<n> flags, refer to SDIO Simplified Specification Version
2.00, available on the SD Association website.
4. To resume transfer, use the IO_RW_DIRECT command to write the function number at the FSx bits in
the CCCR, bits 3:0 at offset 0x0D of the card. Form the command argument for the IO_RW_DIRECT
command and write it to the cmdarg register. Bit values are listed in the following table.
Table 11-22: cmdarg Bit Values for RESUME Command
Bits
31
30:28
27
26
Altera Corporation
R/W flag
Function number
RAW flag
Don't care
Content
1
0, for CCCR access
1, read after write
cv_54011
2013.12.30
Value
-
SD/MMC Controller
Send Feedback

Advertisement

Table of Contents
loading

Table of Contents