2007-06-20 08:32 AM
Start of data token problem(SD Card)
2007-05-16 08:31 PM
hi,
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 me2007-05-16 09:41 PM
getting 0xff is fine, it means the card is not ready.
0xfc is the start multi block write response. Are you sure your commands to the SD card are correct ?2007-05-16 10:31 PM
hi,
I am sending command 17 for reading from the card &command 10 for status register read, in both case I am getting the same response.Please help me2007-05-16 10:42 PM
what are your settings for CPHA and CPOL ?
2007-05-17 05:57 PM
hi
Both CPHA &CPOL are zero,I am attaching my code with this,I have tried both command 1 &41 for initialization. [ This message was edited by: prasobhp on 18-05-2007 06:39 ] ________________ Attachments : code.doc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtO5&d=%2Fa%2F0X0000000aPH%2FeMOBiMsTc8S0GOhlMrpwjsJ_mKrb5xKgWWedN4b2HJI&asPdf=false2007-05-17 09:37 PM
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.2007-05-17 10:48 PM
so are you using another GPIO pin as chip select?
2007-05-17 11:09 PM
Yes I am using a GPIO0.14 for CS.
2007-05-18 08:25 PM
Hi,
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.