![ARTERY AT32F435 Series Скачать руководство пользователя страница 564](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592564.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 564
Rev 2.03
Figure 25-8
SDIO command transfer
CMD
Response
Idle
Send
Wait
Receive
CMD
Send
Idle
At least 8
SDIO_CK cycles
SDIO_CMD
CPSM status
Data channel
The data path subunit transfers data between the host and the cards. The databus width can be
configured using the BUSWS bit in the SDIO_CLKCTRL register. By default, only the SDIO_DO signal
line is used for transfer. Only one bit of data is transferred with each clock cycle. If the 4-bit wide bus
mode is selected, four bits are transferred per clock cycle over the SDIO_D [ 3:0 ] signal line. If the 8-bit
wide bus mode is selected, eight bits are transferred per clock cycle over the SDIO_D [ 7: 0 ] signal line.
The TFRDIR bit is set in the SDIO_DTCTR register to define the transfer direction. If TFRDIR=0, it
indicates that the data is transferred from the controller to the card; if TFRDIR=1, it indicates that the
data is transferred from the card to the controller. The TFRMODE bit can be used to select block data
transfer or stream transfer for the MultiMedia card. If the TFREN bit is set, data transfer starts. Depending
on the TFRDIR bit, the DCSM enters Wait_S or Wait_R state.
Data channel state machine (DCSM)
The DCSM has seven states, in send and receive mode, as shown in the Figure below:
Figure 25-9
Data channel state machine (DCSM)
Idle
Busy
Read Wait
Send
Wait_R
Receive
After reset
Wait_S
Data ready
Enabled and send
Disabled or end of data
End of packet
Disabled, or CRC fails, or
timeout
Not busy
Disabled, or BUF underrun, or end of
data, or CRC error
Enabled and not send
Start bit
Disabled, or Rx BUF
Empty, or timeout, or
start bit error
End of packet or data, or
BUF overrun
Data received,
Read Wait
starts, and SD I/O mode
enabled
Read Wait
stops
DCSM disabled
Disabled or CRC fails
DCSM enabled, and
Read Wait starts, and SD
I/O mode enabled
Send mode
Idle: The data channel is inactive, either in the Wait_S or the Wait_R state.
Wait_S: Waits until the BUF flag becomes empty or the data transmission is completed. The
DCSM must remain in the Wait_S state for at least two clock periods to meet the N
WR
timing
requirements where the N
WR
is the interval between the reception of the card response and the start
of the data transfer from the host.
Send: The DCSM sends data to a card, and the data transfer mode can be either block or
stream, depending on the SDIO_DTCTRL_TFRMODE bit. If an overflow error occurred, the DCSM
then moves to the idle state