Author Topic: SDCard 1-BitMode no Command Response  (Read 1320 times)

0 Members and 1 Guest are viewing this topic.

Offline Snoopy04Topic starter

  • Contributor
  • Posts: 10
  • Country: de
SDCard 1-BitMode no Command Response
« on: May 04, 2019, 02:22:33 pm »
Hi,
for a week I'm trying now to get a SDCard to Respond to a 1-BitMode Command instead of SPI because of the Speed Advantage. The Command Sequence I'm sending in correlation with the Clock Signal looks perfect on the Oscilloscope but No matter what I'm trying there is no Respose on the Command line. If I've understood correctly the Initialisation is exactly the same as SPI but with the CS Signal constantly on HIGH. So After sending a CMD0 I should get a response on the Command line. I've nearly read all Documentaion I've could find on this toppic without success. Does anybody now what I'm doing wrong.
 

Offline Freddie Chopin

  • Regular Contributor
  • *
  • Posts: 71
  • Country: pl
Re: SDCard 1-BitMode no Command Response
« Reply #1 on: May 04, 2019, 06:11:44 pm »
For some commands there is *NO* response when using the SD/MMC interface. This would also be the first command you are expected to send, which is CMD0 - the card will *NOT* respond to this command in any way. So you need to post some more details - for example whether you try to implement this protocol in software or if you are using a dedicated peripheral.
 
The following users thanked this post: thm_w

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7037
  • Country: ca
  • Non-expert
Re: SDCard 1-BitMode no Command Response
« Reply #2 on: May 06, 2019, 09:32:42 pm »
If you have a USB logic analyzer that could help a lot, sigrok has some build in SD decoding. Along with posting screenshots here.

Did it work already using SPI mode?
I assume you've read the SD Card spec and have seen the card initialization steps tree?
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline Snoopy04Topic starter

  • Contributor
  • Posts: 10
  • Country: de
Re: SDCard 1-BitMode no Command Response
« Reply #3 on: May 10, 2019, 01:33:24 pm »
@Freddie Chopin
Are you sure that this is right? if I'm issuing a CMD0 in SPI Mode I'm getting a R1 Response.
I'm trying to implement it in Software. A Harware solution would reqire a new Micro with a complete new Architecture.

@thm_w
Well I do not have a logic analyse. Yet. Only my trusty DS1054z  8)
Yes it Did. It worked perfectly. I've already read that but in every Document it's not Clear how exactly I'm getting into SD Mode. For example in the TOSHIBA Datasheet it states the following:

Quote
To initialize the Toshiba SD card, follow the following procedure is recommended example.
1) Supply Voltage for initialization.
Host System can apply the Operating Voltage from initialization to the card.
Apply more than 74 cycles of Dummy-clock to the SD card.
2) Select operation mode (SD mode or SPI mode)
In case of SPI mode operation, host should drive 1 pin (CD/DAT3) of SD Card I/F to “Low” level. Then, issue CMD0.
In case of SD mode operation, host should drive or detect 1 pin of SD Card I/F (Pull up register of 1 pin is pull
up to “High” normally).
Card maintain selected operation mode except re-issue of CMD0 or power on below is SD mode initialization procedure.
3) Send the ACMD41 with Arg = 0 and identify the operating voltage range of the Card.

For SPI step 2 is pretty obvious but what the hell does step 2 for SD mode mean  :palm:

 

Offline Freddie Chopin

  • Regular Contributor
  • *
  • Posts: 71
  • Country: pl
Re: SDCard 1-BitMode no Command Response
« Reply #4 on: May 10, 2019, 01:40:27 pm »
Are you sure that this is right? if I'm issuing a CMD0 in SPI Mode I'm getting a R1 Response.
Yes, I'm sure. in SD mode, there is _NO_ response for CMD0. See Chapter 4.7.4, page 86 in the simplified specification for the SD cards (first download here - https://www.sdcard.org/downloads/pls/ ). CMD0 is not the only command which has no response in this mode. You can find my driver for SD cards in SD mode here - https://github.com/DISTORTEC/distortos/blob/master/source/devices/memory/SdCard.cpp

 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7037
  • Country: ca
  • Non-expert
Re: SDCard 1-BitMode no Command Response
« Reply #5 on: May 10, 2019, 09:04:48 pm »
For SPI step 2 is pretty obvious but what the hell does step 2 for SD mode mean  :palm:

CD/DAT3 pin is also called CS in spi mode.
You leave it driven high to enter normal mode, instead of pulling it low to enter SPI.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf