Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

block read problem with sdcard (solved)

Status
Not open for further replies.

musfiq

Newbie level 6
Joined
Mar 13, 2005
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,474
friends,

i am having severe problems with reading (and writing) from sdcard. i am using SD bus mode for communication with the sdcard and NOT using any sort of scard-controller for that.

now i have successfully intialized the sdcard with ACMD41 (with OCR = 0x80FF8000 ), got the RCA and selected the card for data transfer. Now the card is on TRAN state. i have checked the card state by CMD13. everything till now is ok. but...

problem is that the DAT0 pin is always '0' (ie, LOW). so i am not getting the proper start bit '0' to synchronize the data blocks that the card is sending to the host (my code). According to SanDisk product manual v1.9, there must be a stream of '1' when i have issued read command (CMD18) and getting the response. unfortunately, my DAT0 pin is always '0'. but analysing the response packet i have found that there is no error and the state transition is happening according to the documentation (TRAN --> DATA --> TRAN).

another point... i am reading data from address 0x00000000.

can anyone tell my why my DAT0 pin is '0' all the time ? is there any specific configuration for the DAT0 pin ? (i haven't done any configuration for the CMD pin and it worked as i expected)

one more thing, the DAT0 pin is always low '0' even when the initialization was going on. ie, since power-on, i have never got '1' on DAT0 pin.

thank u
 

musfiq

Newbie level 6
Joined
Mar 13, 2005
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,474
Re: block read/write problem with sdcard

i solved my problem myself. actually the DAT0 line was shared by some other bus. so, i was not getting proper voltage levels on the DAT0 pin. i had to disable that bus sharing. now i can read properly from the card.

hope it would be helpful for others too (in this type of problems).
 

YangZ

Newbie level 5
Joined
Dec 4, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Malaysia
Activity points
1,352
Hey musfiq,
Would like to know, how do you determine which data address you wan to read from your sd card? I have an sd card and i would like to read a simple txt file which contains 1010 inside the file but i dont know where is this file stored in my sd card. Frm your post it seems that you start to read the address at 0x00000000b. why do you read tat?

Thanks in advance for your advice.

Regards
YangZ
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top