D
Donald
- Jan 1, 1970
- 0
Hello all,
I have built up an ATmega32 and an SD card socket.
The SD card is a Lexar Media 32MB card.
I have been following many souce code examples on how to read this SD card.
I have been able to read the CID and the CSD registers, and it seems to
be reading correctly.
When I try to read a sector ( 0000 ) I wait for a "start data token"
0xfe, but it never comes.
The psudo-code is:
lower CS,
send 6 bytes of CMD17,0x00,0x00,0x00,0x00,0x95,
wait for a response. ( anything not 0xff)
raise CS (check for response = 0x00)
lower CS again and wait for the data token (0xfe)
( send 0xff as a wait for token )
It times out waiting for the 0xfe.
I tried to not raise and lower CS in-between the CMD17 and waiting for
the data token, but same result.
Any ideas why I do not see the data token ???
Thanks
Donald
I have built up an ATmega32 and an SD card socket.
The SD card is a Lexar Media 32MB card.
I have been following many souce code examples on how to read this SD card.
I have been able to read the CID and the CSD registers, and it seems to
be reading correctly.
When I try to read a sector ( 0000 ) I wait for a "start data token"
0xfe, but it never comes.
The psudo-code is:
lower CS,
send 6 bytes of CMD17,0x00,0x00,0x00,0x00,0x95,
wait for a response. ( anything not 0xff)
raise CS (check for response = 0x00)
lower CS again and wait for the data token (0xfe)
( send 0xff as a wait for token )
It times out waiting for the 0xfe.
I tried to not raise and lower CS in-between the CMD17 and waiting for
the data token, but same result.
Any ideas why I do not see the data token ???
Thanks
Donald