MMC/SD/SDIO CONTROLLER S3C2440A RISC MICROPROCESSOR
19-2
SD OPERATION
A serial clock line synchronizes shifting and sampling of the information on the five data lines . The transmission
frequency is controlled by making the appropriate bit settings to the SDIPRE register. You can modify its frequency
to adjust the baud rate data register value.
Programming Procedure (common)
To program the SDI modules, follow these basic steps:
1. Set SDICON to configure properly with clock & interrupt enable
2. Set SDIPRE to configure with a proper value.
3. Wait 74 SDCLK clock cycle in order to initialize the card.
CMD Path Programming
1. Write command argument 32bit to SDICmdAr g.
2. Determine command types and start command transmit with setting SDICm dCon.
3. Confirm the end of SDI CMD path operation when the specific flag of SDICmdSta is set
4. The flag is CmdSent if command type is no response.
5. The flag is RspFin if command type is with response.
6. Clear the flags of SDICmdSta by writing '1' to the corresponding bit.
DAT Path Programming
1. Write data timeout period to SDIDTimer.
2. Write block size (block length) to SDIBSize(normally 0x80 word).
3. Determine the mode of block, wide bus, dma, etc and start data transfer with setting SDIDatCon.
4. Tx data Write data to Data Register (SDIDAT) while Tx FIFO is available (TFDET is set), or half (T FHalf is
set), or empty(TFEmpty is set).
5. Rx data Read data f rom Data Register (SDIDAT) while Rx FIFO is available (RFDET is set), or full (RFFull
is set), or half (RFHalf is set), or ready for last data(RFLast is set).
6. Confirm the end of SDI DAT path operation when DatFin flag of SDIDatSta is set
7. Clear the flags of SDIDatSta by writing '1' to the corresponding bit.