Download Print this page

Sdio Read Wait Operation By Stopping Sdio_Ck - ST STM32F413 Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F413:

Advertisement

Secure digital input/output interface (SDIO)
31.6.2

SDIO read wait operation by stopping SDIO_CK

If the SDIO card does not support the previous read wait method, the SDIO can perform a
read wait by stopping SDIO_CK (SDIO_DCTRL is set just like in the method presented in
Section
31.6.1, but SDIO_DCTRL[10] =1): DSPM stops the clock two SDIO_CK cycles after
the end bit of the current received block and starts the clock again after the read wait start bit
is set.
As SDIO_CK is stopped, any command can be issued to the card. During a read/wait
interval, the SDIO can detect SDIO interrupts on SDIO_D1.
31.6.3
SDIO suspend/resume operation
While sending data to the card, the SDIO can suspend the write operation. the
SDIO_CMD[11] bit is set and indicates to the CPSM that the current command is a suspend
command. The CPSM analyzes the response and when the ACK is received from the card
(suspend accepted), it acknowledges the DPSM that goes Idle after receiving the CRC
token of the current block.
The hardware does not save the number of the remaining block to be sent to complete the
suspended operation (resume).
The write operation can be suspended by software, just by disabling the DPSM
(SDIO_DCTRL[0] =0) when the ACK of the suspend command is received from the card.
The DPSM enters then the Idle state.
To suspend a read: the DPSM waits in the Wait_r state as the function to be suspended
sends a complete packet just before stopping the data transaction. The application
continues reading RxFIFO until the FIF0 is empty, and the DPSM goes Idle automatically.
31.6.4
SDIO interrupts
SDIO interrupts are detected on the SDIO_D1 line once the SDIO_DCTRL[11] bit is set.
When SDIO interrupt is detected, SDIO_STA[22] (SDIOIT) bit is set. This static bit can be
cleared with clear bit SDIO_ICR[22] (SDIOITC). An interrupt can be generated when
SDIOIT status bit is set. Separated interrupt enable SDIO_MASK[22] bit (SDIOITE) is
available to enable and disable interrupt request.
When SD card interrupt occurs (SDIO_STA[22] bit set), host software follows below steps to
handle it.
1.
Disable SDIOIT interrupt signaling by clearing SDIOITE bit (SDIO_MASK[22] = '0'),
2.
Serve card interrupt request, and clear the source of interrupt on the SD card,
3.
Clear SDIOIT bit by writing '1' to SDIOITC bit (SDIO_ICR[22] = '1'),
4.
Enable SDIOIT interrupt signaling by writing '1' to SDIOITE bit (SDIO_MASK[22] = '1').
Steps 2 to 4 can be executed out of the SDIO interrupt service routine.
31.7
HW flow control
The HW flow control functionality is used to avoid FIFO underrun (TX mode) and overrun
(RX mode) errors.
The behavior is to stop SDIO_CK and freeze SDIO state machines. The data transfer is
stalled while the FIFO is unable to transmit or receive data. Only state machines clocked by
1034/1284
DocID029473 Rev 3
RM0430

Advertisement

loading
Need help?

Need help?

Do you have a question about the STM32F413 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f423