HI All,
interfaced SDHC 4gb (class 4) card to msp430F5329 MCU.
My spi speed is less than 400Khzs.
1. getting response 0x01 from SD card after sending CMD0.
2. getting response 0x05 from SD card after sending CMD8, means my sd card is version1, not version 2.
3.getting response 0x01 from SD card after sending ACMD41(0x55+0x69).(if i test with 16Mhz SPI clock frequency getting response 0x00).
CLEAR_CS_SDCARD;
SD_sendcmd(GO_IDLE_STATE,0,0x95); // software reset and Ideal cmd
//Now wait for READY RESPONSE
if(mmcGetResponse(GO_IDLE_STATE)!=0x01)
return MMC_INIT_ERROR;
CLEAR_CS_SDCARD;
spiB1Tx(DUMYBYTE);
if(response==0x01)
{
CLEAR_CS_SDCARD;
spiB1Tx(DUMYBYTE);
SD_sendcmd(SEND_IF_COND ,0x1AA,0x87); // using old SD card
// if new SD card want to use CMD8,arg:0x1AA,CRC:0x87
response=mmcGetResponse(SEND_IF_COND);
do{
// CLEAR_CS_SDCARD;
spiB1Tx(DUMYBYTE);
SD_sendcmd(APP_CMD,0x0,0x65); // using old SD card
// if new SD card want to use CMD8,arg:0x1AA,CRC:0x87
response=mmcGetResponse(APP_CMD);
// SET_CS_SDCARD;
spiB1Tx(DUMYBYTE);
spiB1Tx(DUMYBYTE);
// CLEAR_CS_SDCARD;
SD_sendcmd(APP_SEND_OP_COND,0x40000000,0xFF); // ACMD41 SCH=1
response=mmcGetResponse(0x69);
// SET_CS_SDCARD;
watchdogReset();
} while(response !=0x00);
IF spi clock is 16MHZ getting responce 0x00, and CMD1 also getting response, But not getting response of CMD16 . kindly help me to solve the problem.