I have a Buffalo SDHC SD card with 4GB of storage, and a Raspberry Pi Pico. I have connected the SD card to the Pico's relevant SPI pins and have set the SPI clock speed to 1MHz.
I have reset the SD card with command 0, and have received a successful R1 response of 1 (to clarify, that is all I have done).
Now, I want to read a single block (512 bytes), and after researching, the command code is 17 and the arguments is the block index I want to read (in my case, 0 - 0-511 bytes). I have sent the command, and have received an R1 response of 1 (meaning card is in idle mode), however after some research, I was supposed to also receive a "token" containing 0xFE
indicating a successful read followed by the bytes in the sector, or an error code.
However, the only things I am receiving after the initial R1 response are 0xFF
bytes which would indicate the SD card is idle. I have tried reading several thousand bytes from the SD card, perhaps thinking the read is taking a while, but nothing, I am only receiving 0xFF bytes with the token nowhere to be found.
Does anyone have any advice on why this could be the case? I have looked over my command syntax and have found it to be correct:
(bits + cmd code) 01010001 (32-bit arguments) 00000000 00000000 00000000 00000000 (CRC value set to 0 due to checking disabled + end bit) 00000001
I have also tried experimenting with a different argument and different clock speeds but to no avail.