GD32W51x User Manual
764
CS_Waitcompl
Wait for the Command Completion signal.
1.CE-ATA Command Completion signal received
→
CS_Idle
2.CSM disabled
→
CS_Idle
3.Command CRC failed
→
CS_Idle
Data unit
The data unit performs data transfers to and from cards. The data transfer uses SDIO_D[7:0]
signals when 8-bits data width (BUSMODE bits in SDIO_CLKCTL register is 0b10), use
SDIO_D[3:0] signals when 4-bits data width (BUSMODE bits in SDIO_CLKCTL register is
0b01), or SDIO_D[0] signal when 1-bit data width (BUSMODE bits in SDIO_CLKCTL register
is 0b00). The data transfer flow is controlled by Date State Machine (DSM). After a write
operation to SDIO_DATACTL register and DATAEN in SDIO_DATACTL register is 1, the data
transfer starts. It sends data to card when DATADIR in SDIO_DATACTL register is 0, or
receive data from card when DATADIR in SDIO_DATACTL register is 1. The data unit also
generates the data status flags defined in SDIO_STAT register.
Data state machine
DS_Idle
The data unit is inactive, w aiting for send and receive.
1.DSM enabled and data transfer direction is from
host to card
→
DS_WaitS
2.DSM enabled and data transfer direction is from
card to host
→
DS_WaitR
3.DSM enabled and Read Wait Started and SD I/O
mode enabled
→
DS_Readw ait
DS_WaitS
Wait until the data FIFO empty flag is deasserted or data
transfer ended.
1.Data transfer ended
→
DS_Idle
2.DSM disabled
→
DS_Idle
3.Data FIFO empty flag is deasserted
→
DS_Send
DS_Send
Transmit data to the card.
1.Data block transmitted
→
DS_Busy
2.DSM disabled
→
DS_Idle
3.Data FIFO underrun error occurs
→
DS_Idle
4. Internal CRC error
→
DS_Idle
DS_Busy
Waits for the CRC status flag.
1.Receive a positive CRC status
→
DS_WaitS
2.Receive a negative CRC status
→
DS_Idle