MMC Card Briefing
1. MMC Card Registers CID 128bit Mandatory RCA 16bit Mandatory DSR 16bit Optional CSD 128bit Mandatory OCR 32bit Mandatory
2. Register Description OCR - operation conditions register stores the VDD voltage profile of the card, READ ONLY CID - card identification register carries the card ID, used during the card identification procedure CSD - card-specific data register provides the information on how to access the card contents, e.g. 1)data format 2)error correction type 3)maximum data access time 4)data transfer speed 5)whether DSR register is available RCS - relative card address register carries the card address assigned by the host during the card identification DSR - driver stage register, optional used to improve the bus performance for extended operating conditions e.g bus length, transfer rate or number of cards
3. MMC bus CMD - 雙向 工作OD/PP模式 DAT - 雙向 工作在PP模式 CLK - 單向 工作在PP模式 VDD - 電源 Vss1,Vss2 - 地OD: Open-DrainPP: Push-Pull
4. MMC Bus Circuitry Diagram Rod: 用來切換OD和PP模式Rdat、Rcmd: 用來防止DAT和CMD在沒有卡插入或者所有卡都處於高阻狀態時處於浮空
5. SPI modeSPI模式包含一個有flash-based的MMC卡所提供的可選性的通訊協議,它主要是為了那些系統沒有專門的MMC host controller、且對通訊速率要求不高的情況所定義的。SPI只定義了一個物理連結標準,用於MMC的通訊,只有MMC協議和命令的一個子集。SPI的優點就是利用現有的SPI介面,既可以是硬體的也可以是軟體的,這就省去了設計專門的硬體MMC host controller。SPI的缺點是與MMC協議相比,資料轉送率很低,能夠支援的卡比較少(通常只是一張卡),而且每張卡都需要一個片選來使能,不像MMC協議那樣可以通過RCA來選定一張卡。SPI訊號: CS – 片選 CLK - 時鐘 DataIn - Host->Card資料 DataOut- Host<-Card資料SPI的資料傳送是以位元組的整數倍來進行的,總是根據CS訊號進行byte-alignedSPI只支援Single/Multiple Block read/write操作,不能支援Sequential 操作
6. SPI vs MMC pinout MMC SPI1. RSV CS2. CMD DI3. Vss1 Vss4. Vdd Vdd5. CLK SCLK6. Vss2 Vss27 DAT DO
7. Registers in SPI modeSPI模式下只有三個寄存器的部分bit可以訪問,它們是: CID 16bit CSD 16bit OCR 32bit
8. File systems for MMC card8.1 Hard Disk-Like file system w/ partition tableThe first data block is used to store partition table
8.2 DOS FAT file system w/o partition table8.3 Universal file system for MMC card