Hi,
I'm trying to write an SD card driver for my Raspberry Pi 3B+. I'm always getting a CRC error when I issue a single block read command (CMD17) to the SD card (I haven't tried multiblock read or writes yet. I want to get the single block read down first). For the card initialization process, I reset the EMMC, set the EMMC clock to 400KHz, send CMD0, CMD8, ACMD41, CMD2, CMD3, set EMMC clock to 25MHz, CMD7, then ACMD6 (after reading the SCR). The initialization process seems to succeed. After the initialization process, the card is in the TRAN state. For my read function, I wait for the data line to become available, set the EMMC blocksize to 0x00010200 (which should be correct for a single 512 bytes read), and issue CMD17. I'm trying to read block 0. The interrupt register before the read command is 0 and after is always 0x00208101. I'm not sure if there is a command or step I am missing which is causing my CRC error.
Any help is greatly appreciated.