I am trying to interface an SD card with DV 710B (Embest) based on STR710FZ2 . I am using same circuitry& code provided by ST for its STR711 USB ARM DEVELOPMENT PROTOTYPE BOARD. I have success fully initialized the card in SPI mode & writing in to the card is done with out any problem .But any read operation from the card fails (including register read) since Start of frame token(0xFE) is missing. Instead of (0xFE) I am getting 0xFF,0xFC,and some other data .But I can read the data from the card using a card reader (connecting to PC).What can be the problem .please help me
ok I have had a look at your code and it is pretty similar to mine.
one thing I have noticed is that you are setting the SSN as an ouput. GPIO_Config ( GPIO0, M25_SSN|BSPI1_MC|BSPI1_SSN, GPIO_OUT_PP ); On my board I have the SSN pin set as an input and permanently pulled high.
I tried that but even initialization is not done correctly .Now I am using P1.15 as chip select configuration is changed like this GPIO_Config ( GPIO0,BSPI1_MC|BSPI1_SSN, GPIO_OUT_PP ); GPIO_Config ( GPIO0, M25_SSN, GPIO_IN_TRI_CMOS ); GPIO_Config ( GPIO1,15, GPIO_AF_PP ); please help if any change is needed.