GD32W51x User Manual
765
3.DSM disabled
→
DS_Idle
4.Timeout occurs
→
DS_Idle
Note:
The command timeout programmed in the data timer register (SDIO_DATA TO).
DS_WaitR
Wait for the start bit of the receive data.
1.Data receive ended
→
DS_Idle
2.DSM disabled
→
DS_Idle
3.Data timeout reached
→
DS_Idle
4.Receives a start bit before timeout
→
DS_Receive
Note:
The command timeout programmed in the data timer register (SDIO_DATA TO).
DS_Receive
Receive data from the card and w rite it to the data FIFO.
1.Data block received
→
DS_WaitR
2.Data transfer ended
→
DS_WaitR
3.Data FIFO overrun error occurs
→
DS_Idle
4.Data received and Read Wait Started and SD I/O
mode enabled
→
DS_Readw ait
5.DSM disabled or CRC fails
→
DS_Idle
DS_Readw ait
Wait for the read w ait stop command.
1.ReadWait stop enabled
→
DS_WaitR
2.DSM disabled
→
DS_Idle
23.4.2.
APB2 interface
The APB2 interface implements access to SDIO registers, data FIFO and generates interrupt
and DMA request. It includes a data FIFO unit, registers unit, and the interrupt / DMA logic.
The interrupt logic generates interrupt when at least one of the selected status flags is high.
An interrupt enable register is provided to allow the logic to generate a corresponding interrupt.
The DMA interface provides a method for fast data transfers between the SDIO data FIFO
and memory. The following example describes how to implement this method:
1. Completes the card identification process
2. Increase the SDIO_CK frequency
3. Send CMD7 to select the card and configure the bus width
4. Configure the DMA1 as follows:
Open the DMA1 controller and clear any pending flags. Configure the DMA1 _Channel3 or
DMA1 _Channel6 Peripheral4 source address register with the memory base address and
DMA1 _Channel3 or DMA1 _Channel6 Peripheral4 destination address register with the