i am interfacing sdhc card & referring below ti note for this.
http://www.ti.com/apps/docs/litabsmultiplefilelist.tsp?literatureNumber=spraao7&docCategoryId=1&appId=307
1. error in code:i think
in file,:SD_SPI_Initialization.c
function: void sd_version2_initialization()
error: for(i=0;i<3;i++)
send_if_cond_response[i] = spi_xmit_byte(DUMMY_DATA);
i think i <= 3 should be there.
2. problem:
i am using spi protocol to interface sdhc card.
i have three different cards: sandisk , kingston , sony.
i am successfully interface sandisk , kingston card. but having problem in sony card.
problem is same as : http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/291450/1018314.aspx#1018314.
Card don't go to idle state. code gets stuck in :
spi_xmit_command(GO_IDLE_STATE, STUFF_BITS, INITIAL_CRC);
RESET_RESPONSE; //Reset response
while(response != IN_IDLE_STATE) //Wait until card responds with IDLE response
sd_command_response();
As above link suggest I have already 10K pull up on DI , DO & unconnected 8 and 9 pin.
I haven't put pull up on CS & CLK pin.
3. where I can fat32 example code download link:
FatSD example from TI Resource Explorer/TI-RTOS/ARM/Tiva C Series/Tiva TM4C123GH6PGE/Examples.