EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

SD card in high speed mode

Started by scis...@gmail.com May 11, 2012
Hi

I have question not involved with lpc2000, but I see that people in this group know the matter.
I want to make me sure that I use CMD6 correctly if I want to set SD card in High Speed mode. Card starts in Standard Speed and from secification I get that I should change Access mode from Standard to High.

So this is what I send in hex: 4680000001CB as CMD6.
46 - conjunction of start bit and number of command;
8 - to set 31. bit of argument to choose Switch mode (0 on 31.bit is check function),
0...0 - reserved bits, current limit, drive strength, command system are zeros because I want to leave it default,
1 - to change access mode from default speed to high speed,
CB - it is CRC7.

Is it correct way? Because I have trouble to change my clock frequency and I would like to know that card side is ok (card can work with 50 MHz).

danics

An Engineer's Guide to the LPC2100 Series

It is right, the argument field to switch speed is 0x80000001.

You have to wait a few cycles before trying to communicate again with the
SD card.

Also, you can only issue this command to the SDHC and SDXC card. Check the
CCS bit of the response of the ACMD41
2012/5/11

> **
> Hi
>
> I have question not involved with lpc2000, but I see that people in this
> group know the matter.
> I want to make me sure that I use CMD6 correctly if I want to set SD card
> in High Speed mode. Card starts in Standard Speed and from secification I
> get that I should change Access mode from Standard to High.
>
> So this is what I send in hex: 4680000001CB as CMD6.
> 46 - conjunction of start bit and number of command;
> 8 - to set 31. bit of argument to choose Switch mode (0 on 31.bit is check
> function),
> 0...0 - reserved bits, current limit, drive strength, command system are
> zeros because I want to leave it default,
> 1 - to change access mode from default speed to high speed,
> CB - it is CRC7.
>
> Is it correct way? Because I have trouble to change my clock frequency and
> I would like to know that card side is ok (card can work with 50 MHz).
>
> danics
>
>


Hi,

I still have problem with my card. I'm sure my card can work in HighSpeed mode.
I think my problem can be caused by clock which I provide to card.
If I work with 25MHz, clock has duty cycle about 44/56, and card sends responses to me. But on 50MHz duty cycle is about 39/61 and I don't see any response (on oscilloscope).

Do you think it can be a problem? I couldn't find any timing restrictions for SD cards. Do you know some?

Regards
danics

Hi
>
>I have question not involved with lpc2000, but I see that people in this group know the matter.
>I want to make me sure that I use CMD6 correctly if I want to set SD card in High Speed mode. Card starts in Standard Speed and from secification I get that I should change Access mode from Standard to High.
>
>So this is what I send in hex: 4680000001CB as CMD6.
>46 - conjunction of start bit and number of command;
>8 - to set 31. bit of argument to choose Switch mode (0 on 31.bit is check function),
>0...0 - reserved bits, current limit, drive strength, command system are zeros because I want to leave it default,
>1 - to change access mode from default speed to high speed,
>CB - it is CRC7.
>
>Is it correct way? Because I have trouble to change my clock frequency and I would like to know that card side is ok (card can work with 50 MHz).
>
>danics
>
> I still have problem with my card. I'm sure my card can work in HighSpeed
> mode.
> I think my problem can be caused by clock which I provide to card.
> If I work with 25MHz, clock has duty cycle about 44/56, and card sends
> responses to me. But on 50MHz duty cycle is about 39/61 and I don't see
> any response (on oscilloscope).
>
> Do you think it can be a problem? I couldn't find any timing restrictions
> for SD cards. Do you know some?

The card timing is encoded in the CSD.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore Development Platform http://www.soldercore.com

Thanks. Finally I can read from card with 50 MHz clock frequency. But don't understand why writing doesn't work. If you could read this and check my approach, I appreciate that.

I try to write to first sector so I send CMD24: 58000000006F.
Respond from card: 18000009005D, so it says READY_FOR_DATA and STATE: TRANSFER. On data lines I keep '1' all the time and afer receving last bit of respond I set 0 on all data lines as start bit. My test data is repeated 'FA'h byte. So lines DAT3 and DAT1 transmit '1' all the time and DAT2 and DAT0 start with '1', then '0', then '1'... and so on. After 1024 cycles I send CRC16 for every line. DAT3,DAT1 have 64 times 'F'h (256 x '1') so CRC16 from is '84B4'h. DAT2,DAT0 have 64 times 'A'h so CRC16 is '08C7'h.
I'm not sure if CRC16 should be sent with sequence: first MSB, then LSB, because specification say that on DAT lines is LSB...MSB convention, not mentioned if it is only for data or for CRC16 also. But I tried both ways and have no good result.

Card doesn,t change sector value. I also noticed that if I set zeros on data lines and for crc, this is written to the card and sector has zeros only.

Regards
danics
Hi,
>
>I still have problem with my card. I'm sure my card can work in HighSpeed mode.
>I think my problem can be caused by clock which I provide to card.
>If I work with 25MHz, clock has duty cycle about 44/56, and card sends responses to me. But on 50MHz duty cycle is about 39/61 and I don't see any response (on oscilloscope).
>
>Do you think it can be a problem? I couldn't find any timing restrictions for SD cards. Do you know some?
>
>Regards
>danics
>
>Hi
>>
>> I have question not involved with lpc2000, but I see that people in this group know the matter.
>> I want to make me sure that I use CMD6 correctly if I want to set SD card in High Speed mode. Card starts in Standard Speed and from secification I get that I should change Access mode from Standard to High.
>>
>> So this is what I send in hex: 4680000001CB as CMD6.
>> 46 - conjunction of start bit and number of command;
>> 8 - to set 31. bit of argument to choose Switch mode (0 on 31.bit is check function),
>> 0...0 - reserved bits, current limit, drive strength, command system are zeros because I want to leave it default,
>> 1 - to change access mode from default speed to high speed,
>> CB - it is CRC7.
>>
>> Is it correct way? Because I have trouble to change my clock frequency and I would like to know that card side is ok (card can work with 50 MHz).
>>
>> danics
>>
>

The 2024 Embedded Online Conference