GD32W51x User Manual
803
Figure 23-13. Read wait operation using SDIO_D[2]
SDIO_CK
D[3:0]
Read data 1a
INT
Read data 1b
2 CLK
2 CLK
4 CLK min(no wait)
2 CLK
CMD
CMD52
D1
D2
Read data 1a
Read data 1a
Read data 1b
Read data 1b
We can start the Read Wait interval before the data block is received: when the data unit is
enabled (SDIO_DATACTL[0] bit set), the SD I/O specific operation is enabled
(SDIO_DATACTL[11] bit set), Read Wait starts (SDIO_DATACTL[10] = 0 and
SDIO_DATACTL[8] = 1) and data direction is from card to SD I/O (SDIO_DATACTL[1] = 1),
the DSM directly moves from Idle to Read Wait. In Read Wait the DSM drives SDIO_D[2] to
0 after 2 SDIO_CK clock cycles. In this state, when you set the RWSTOP bit
(SDIO_DATACTL[9]), the DSM remains in Wait for two more SDIO_CK clock cycles to drive
SDIO_D[2] to 1 for one clock cycle. The DSM then starts waiting again until it receives data
from the card. The DSM will not start a Read Wait interval while receiving a block even if Read
Wait start is set: the Read Wait interval will start after the CRC is received. The RWSTOP bit
has to be cleared to start a new Read Wait operation. During the Read Wait interval, the SDIO
can detect SD I/O interrupts on SDIO_D[1].
SD I/O suspend/resume operation
Within a multi-function SD I/O or a Combo card, there are multiple devices (I/O and memory)
that share access to the SD bus. In order to allow the sharing of access to the host among
multiple devices, SD I/O and combo cards can implement the optional concept of
suspend/resume. If a card supports suspend/resume, the host may temporarily halt a data
transfer operation to one function or memory (suspend) in order to free the bus for a higher
priority transfer to a different function or memory. Once this higher-priority transfer is
completed, the original transfer is re-started where it left off (resume).
Figure 23-14. Function2 read cycle inserted during function1 multiple read cycle
shows
a condition where the first suspend request is not immediately accepted. The host then
checks the status of the request with a read and determines that the bus has now been
released (BS=0). At this time, a read to function 2 is started. Once that single block read is
completed, the resume is issued to function, causing the data transfer to resume (DF=1).
Figure 23-14. Function2 read cycle inserted during function1 multiple read cycle
CMD
D
Read n blocks
CMD(1)
RES
P(1)
CMD52(RAW)
BR=1,BS=1
CMD52(R)
BS=0
Read 1 block
CMD(2)
RES
P(1)
CMD52(RAW)
FS=1,DF=1
Data
Fn1
Data
Fn2
Data
Fn1
Suspend to
function1 is not
accepted
Check status,
bus suspended
Read n blocks to
function 1
Read 1 blocks to
function 2
Resume to
function 1
When the host sends data to the card, the host can suspend the write operation. The