SD card interface 8 bit MCU

Thread Starter

ashrd

Joined Jan 7, 2009
4
Hello there,

I am interfacing a SD card with MC9S08AW16 using SPI. I have a problem while initialising the SD card. I sending CMD0 and CMD1 to initialise it. The SD card is not returning any value (it should return 1 for CMD0 and 0 or CMD1).

SPI clock is set to 357.14KHz during initilisation.

Can anyone help me out!

Regards,
Ashrd
 

ahwaheed

Joined Feb 25, 2009
4
what are the settings of the SPI interface "Master or Slave ,...." and what is the return value from the reading spi function you use ?
 

davebee

Joined Oct 22, 2008
540
I would suggest to forget about CMD1 until CMD0 correctly returns what it is supposed to (1, I think). If you did the wiring, double check it, including pullup resistors, even on the unused DAT1 and DAT2 pins, and if you did the coding, doublecheck your code. Make sure you're issuing the 80 or so initial clocks that the card is supposed to get before issuing CMD0.

SD Cards do fail, so if everything checks out properly, try another card.
 
Top