Home

Awesome

MMC (and derivative standards) Host Controller

Github: https://github.com/ultraembedded/core_mmc

Work-in-progress - basically functional but not yet complete / robust.

Features
Current Bugs
Testing

Exercised on the following FPGA boards;

Register Map
OffsetNameDescription
0x00MMC_CONTROL[RW] Transfer Control Register
0x04MMC_CLOCK[RW] Clock Configuration Register
0x08MMC_STATUS[R] Transfer Status Register
0x0cMMC_CMD0[RW] Command (first 32-bits)
0x10MMC_CMD1[RW] Command (subsequent 16-bits)
0x14MMC_RESP0[R] Response Register
0x18MMC_RESP1[R] Response Register
0x1cMMC_RESP2[R] Response Register
0x20MMC_RESP3[R] Response Register
0x24MMC_RESP4[R] Response Register
0x28MMC_TX[W] Data Transmit Register
0x2cMMC_RX[R] Data Receive Register
0x30MMC_DMA[RW] DMA Target
Register: MMC_CONTROL
BitsNameDescription
31STARTStart transfer.
30ABORTAbort transfer.
29FIFO_RSTFIFO reset.
15:8BLOCK_CNTNumber of blocks (0=1, 1=2, ...)
5WRITEData write operation
4DMA_ENDMA port enable
3WIDE_MODE4-bit data mode.
2DATA_EXPWait for data
1RESP136_EXPWait for response (R2).
0RESP48_EXPWait for response (~R2).
Register: MMC_CLOCK
BitsNameDescription
7:0DIVClock divider
Register: MMC_STATUS
BitsNameDescription
8CMD_INCommand input line state
7:4DAT_INData input line state
3FIFO_EMPTYFIFO empty.
2FIFO_FULLFIFO full.
1CRC_ERRCRC error
0BUSYTransfer active
Register: MMC_CMD0
BitsNameDescription
31:0VALUECommand data.
Register: MMC_CMD1
BitsNameDescription
15:0VALUECommand data.
Register: MMC_RESP0
BitsNameDescription
31:0VALUEResponse data.
Register: MMC_RESP1
BitsNameDescription
31:0VALUEResponse data.
Register: MMC_RESP2
BitsNameDescription
31:0VALUEResponse data.
Register: MMC_RESP3
BitsNameDescription
31:0VALUEResponse data.
Register: MMC_RESP4
BitsNameDescription
31:0VALUEResponse data.
Register: MMC_TX
BitsNameDescription
31:0DATAData
Register: MMC_RX
BitsNameDescription
31:0DATAData
Register: MMC_DMA
BitsNameDescription
31:0ADDRStart address