Agilex™ 7 Hard Processor System Technical Reference Manual

ID 683567
Date 8/13/2024
Public
Document Table of Contents

16.5.8.1.2. 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 157.  cmdarg Bit Values for RESUME Command
    Bits Content Value

    31

    R/W flag

    1

    30:28

    Function number

    0, for CCCR access

    27

    RAW flag

    1, read after write

    26

    Don't care

    -

    25:9

    Register address

    0x0D

    8

    Don't care

    -

    7:0

    Write data

    Function number that is to be resumed

  5. Write the block size value to the blksiz register. Data is transferred in units of this block size.
  6. Write the byte count value to the bytcnt register. Specify the total size of the data that is the remaining bytes to be transferred. It is the responsibility of the software to handle the data.

    To determine the number of pending bytes to transfer, read the transferred CIU card byte count register (tcbcnt). Subtract this value from the total transfer size to calculate the number of remaining bytes to transfer.

  7. Write to the cmd register similar to a block transfer operation. When the cmd register is written, the command is sent and the function resumes data transfer. For more information, refer to Single‑Block or Multiple‑Block Read and Single‑Block or Multiple‑Block Write.
  8. Read the resume data flag (DF) of the SDIO card device. Interpret the DF flag as follows:
    • DF=1—The function has data for the transfer and begins a data transfer as soon as the function or memory is resumed.
    • DF=0—The function has no data for the transfer. If the data transfer is a read, the controller waits for data. After the data timeout period, it issues a data timeout error.