Has anyone else enoucntered this problem before?
I'm using an STM32F105VC, SPI port 1 at a speed of either ~100kHz, ~200kHz and ~800kHz.
I've tried using a 16GB Sandisk microSDHC and a 2GB Transcend microSDSC both providing the same results.
I have the Host Capacity Support (HCS) bit set when I send ACMD41, which loops until the idle state bit in R1 response is no longer set (usually after 3 repeats; seems too fast maybe?).
I have tried with the SS toggling between each Tx/Rx transaction and with it held low for the whole init procedure, made no difference. Stuff bits as 0's or 1's made no difference. Sending around 1s worth of ACMD41s before checking the OCR made no difference.
If you think you can help give me a shout for more info on my setup. Or if you can think of any obvious errors I may have made then it would all be greatly appreciated!
Best Answer
Command which reads OCR from the SD-card is CMD58, you do not mention it in your question.
Read OCR command gives 32-bit R3 response, and before this response card gives R1 status. From things you say I can only guess that
the value you mention includes R1 response code, thus OCR you are reading is actually 00_00_ff_xx, where XX - to be read following ff, is 0, or most probably 80.
Check your code to handle R3-type response commands properly.