09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> Secure digital input/output interface (SDIO)<br />

the CPSM to the Send state. When the command counter reaches 48, the CPSM becomes<br />

Idle as no response is awaited.<br />

28.7.2 Command completion signal enable<br />

If the ‘enable CMD completion’ bit SDIO_CMD[12] is set and the ‘not interrupt Enable’ bit<br />

SDIO_CMD[13] is set, the CPSM waits for the command completion signal in the Waitcpl<br />

state.<br />

When ‘0’ is received on the CMD line, the CPSM enters the Idle state. No new command<br />

can be sent for 7 bit cycles. Then, for the last 5 cycles (out of the 7) the CMD line is driven to<br />

‘1’ in push-pull mode.<br />

28.7.3 CE-ATA interrupt<br />

The command completion is signaled to the CPU by the status bit SDIO_STA[23]. This static<br />

bit can be cleared with the clear bit SDIO_ICR[23].<br />

The SDIO_STA[23] status bit can generate an interrupt on each interrupt line, depending on<br />

the mask bit SDIO_MASKx[23].<br />

28.7.4 Aborting CMD61<br />

If the command completion disable signal has not been sent and CMD61 needs to be<br />

aborted, the command state machine must be disabled. It then becomes Idle, and the<br />

CMD12 command can be sent. No command completion disable signal is sent during the<br />

operation.<br />

28.8 HW flow control<br />

The HW flow control functionality is used to avoid FIFO underrun (TX mode) and overrun<br />

(RX mode) errors.<br />

The behavior is to stop SDIO_CK and freeze SDIO state machines. The data transfer is<br />

stalled while the FIFO is unable to transmit or receive data. Only state machines clocked by<br />

SDIOCLK are frozen, the APB2 interface is still alive. The FIFO can thus be filled or emptied<br />

even if flow control is activated.<br />

To enable HW flow control, the SDIO_CLKCR[14] register bit must be set to 1. After reset<br />

Flow Control is disabled.<br />

Doc ID 018909 Rev 3 882/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!