I've been trying to hook up an eMMC chip to a FPGA, that receives commands via a micro-controller to initialize and trigger write/read operations on given sectors.
I'm having trouble with the boot sequence of the MMC I'm using, I'm following the standards that you'll find here or here if you don't want to create an account on JEDEC. The document is rather dense and I'm a bit confused. This is what I do for now:
- Startup: MMC is clocked, CMD line is pulled down
- On user action, send CMD0 0x00 through CMD, it's a 48bits wide command built like this:
cmd <= "01" & CMD0 & STUFF_BITS32 & "1001010" & '1';(See p145/352 of the pdf file above). This is the GO_IDLE_STATE command. No response expected.
- On user action, send CMD1 0x80FF8080. Built like the previous command, except CRC7 is
0010110. This is SEND_OP_COND command, which should send back data through the CMD line.
- On user action, send CMD2 0x00. Built like the previous command, except CRC7 is
1100001. This is ALL_SEND_CID command, which should send back data through the CMD line.
Problem is, I don't get any data in. Any idea on what I'm doing wrong?
Additional info: For now I've wired a Transcend MMCPlus 1GB card, following the pinouts I've found online. I have not connected the data lines yet. I'm calculating the CRC7 with the info provided on p.254/352 (8.2.1). The MMC Clock is divided from my 12MHz on-chip clock 32 times, making it ~375kHz for now (planning on speeding it up after initialization succeeds)