Continue to Site

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.

Designing a SD Card Host Controller

Status
Not open for further replies.

dkk1980

Newbie level 6
Joined
Sep 17, 2007
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
KL
Activity points
1,424
Hi,

Simplified specification of SD Card is available for free in sdcard.org. Is it possible to develop a SD card Host Controller using this simplified specification or one need to have the complete spec ?

Thanks and regards

dkk
 

Re: SD Card Controller

Hi Dkk,

This is something that I've been looking into as well.

I'm in the process of writing my own SD card host as well. From what I've seen the SD Card and MMC card physical interfaces are identical. Even the command formats are the same. Only the command sequences are different.
+ For example to init an SD card you have to send CMD0, CMD55, CMD41, ..etc
+ For a MMC card you have to send CMD1, CMD2, etc ...

You will need the following before you can start;
+ The SD Card - Physical Layer Simplified Spec - from sdcard.org
+ The SD Card - SD Card Host Controller Simplified Spec - from sdcard.org
+ The MMC Spec - from **broken link removed**
+ SD Card controller from open cores - https://opencores.org/project,sdcard_mass_storage_controller -- this has a SD Card model which I use. But the code has a number of bugs you'll have to sort out on your own.
+ ScanDisk secure digital card Product Manual - Google for the doc. I don't think it's available at the ScanDisk website anymore.

From what I've learned, as far as the host is concerned, all the so called proprietary info is in the open. I "think" it's really the "Digital Rights Management" features of the card that are proprietary. These I believe are in the realm of the host driver and not the host controller.

The point I'm currently stuck at is the SD card model. The one provided with the open cores has a number of bugs and isn't full featured (it doesn't support multiple block read write commands).

So I'm contemplating on weather I should extend the current SD Card model or if I should buy an MMC card model.

Btw .. pls note that the advice is provided with no warranty and you should follow my advice at great personal risk :).

Nuwan
 

    dkk1980

    Points: 2
    Helpful Answer Positive Rating
SD Card Controller

https://opencores.org have working SD Host controller. With litle bit updates you can use for your design.

U can try for Denali model for your simulations
 

    dkk1980

    Points: 2
    Helpful Answer Positive Rating
Re: SD Card Controller

Hi Nuwan

Thank you very much for the reply.

I would also like to know what is the latest specification version. Is it 3.0? It supports SDXC ? We are planning to have a microSDXC controller. Is there any difference b/w SDHC and SDXC in the physical interface ? or there is difference only in the commands ?

Thanks and regards

dkk
 

Re: SD Card Controller

@dkk

Sorry about the delay. Was a little but busy these past few days.

The latest spec is version 3.00 (Includes SDXC). The specification I was referring to in my earlier post is Version 2.0 (includes SDHC). This is the latest version that is shared by the SD Card association with the public. Using info found on these docs, you can only build a SD Card host (not an SDHC or SDXC host). as for microSD .. I haven't researched these.

Although the full ver 2.00 spec should include all the info on the SDHC card, the simplified spec only contains some info; From what I've got,
+ The block size used for data transfer in version 1 could be changed between 1 - 512. In version 2 this has been fixed to 512 bytes.
+ In ver 1 address fields in CMD17,18,25,24 specified the byte address. In ver 2 the block address is specified.
+ Ver 1 hosts had to clock out signals on the cmd and data pins at the neg edge. Maximum clock was 25 MHz. I "think" in ver 2 signals are clocked out the the pos edge and max clock freq is 50 MHz (I can't be sure though)
+ Some register structures are different in the two versions (I forget which).

I "think" in ver 3, the data signal is clocked out on both the rising and falling edge of the clock. This is just a guess I made, based on the MMC spec and some other data sheets I've seen.

The only way to verify these doubts is to actually write to a real SDHC, SDXC card and see. Will let you know If I have any progress :)

Other than that, I don' know of any difference in the physical interface. Maybe someone more knowledgeable could help out.

Hope this was of some use

btw ... At this point, I'm still not sure if we can sell the SD card host as SD ver 2.00/ver 3.00 complaint host without a valid license from the SD card association. Any ideas on that ?

@samuraign

I'm currently using the SD card model from open cores. I've patched it to accept multi-block commands as well. But it would be better to use something like the model from Denali.

Do you have any idea on how to obtain the model? The cost? Are you using it right now? I read somewhere that Denali will only sell the model if we have a valid SD card license. Is this true?

Would be grateful for any pointers.

Regards
Nuwan
 

    dkk1980

    Points: 2
    Helpful Answer Positive Rating
Re: SD Card Controller

Hi Nuwan

Thanks for the reply.

The physical connectivity of both microSDHC and microSDXC are the same. Both use 8 pins. I think there is no difference b/w SD and microSD other than the physical dimension. The physical i/f of SD has 9 pins while that of microSD has 8 pins. SD has one additional ground pin.

I think for selling SD host controller , from their site sdcard.org

Host and Ancillary Products

If your company is planning to manufacture or have manufactured SD host products (eg. cell phones, cameras or computers) or SD ancillary products (eg. adapters or SD I/O cards), your company is required to:

1. Join the SD Card Association and
2. Enter into a Host/Ancillary Product License Agreement (HALA)** with the SD Card Association and the SD-3C, LLC. Latest Revision: December 12, 2009

see the link
https://www.sdcard.org/developers/howto/

Regarding the model from denali, i have not used it and have no idea.

thanks

dkk
 

Re: SD Card Controller

Dkk,

Thanks for you pointers on microSD and you comments on selling the SD card controller.

I think in the end ... it all comes back to your original question

Is it possible to develop a SD card Host Controller using this simplified specification or one need to have the complete spec ?

The answer is ... You can somehow develop one for sure ... but you can't sell it

So .. why bother going through all the hardships of developing an SD controller using the simplified spec. Might as well get a license. I'm thinking of pitching this idea to my boss. Thanks gain for your input. .. :)

BR
Nuwan
 

    dkk1980

    Points: 2
    Helpful Answer Positive Rating
Re: SD Card Controller

Nuwan

I think you should consider the pricing also. The spec will cost you 1000 USD. A general membership will cost you 2000 USD. IF you buy the spec and become a member in 90 days 1000 USD paid towards the spec will be deducted from the membership fee. I think with a general membership you will be able to sell the products.
If you are thinking of buying an IP of SD Host controller then you should consider the pricing also.

Thanks and regards

dkk
 

Re: SD Card Controller

dkk1980 said:
Hi,

Simplified specification of SD Card is available for free in sdcard.org. Is it possible to develop a SD card Host Controller using this simplified specification or one need to have the complete spec ?

Thanks and regards

dkk
you can get a sd controller core from "opencore" web site.
the core seems FPAG proven.
 

    dkk1980

    Points: 2
    Helpful Answer Positive Rating
Re: SD Card Controller

yanzixuan

Thanks for pointing that out. i will go through the same.

Thanks

dkk
 

Re: SD Card Controller

yanzixuan

Thanks for pointing that out. i will go through the same.

Thanks

dkk

can you please clear one of my doubts.
"During write operation, after each block write , the card will give a crc ok and bus indication" Is this statement correct? How will be the timing of that indication and vlotage levels?
Joe
 

Re: SD Card Controller

Could you find any simulation model for SD Card other than from open cores. i am searching for it.
Jose.
 

yes at a certain time the card is issued to the bus 101 or 010 depending faithfully CRC. then it keeps the line data_0 to 200 milliseconds. And when retention = removes You can send the next block of data.
 

Hai,
usually the crc status for an sdsc card should come two clocks after the end bit of transmitted data. but one sandisk 2gb gives it after 5 t0 6 clock. also the status it gives is 01011. have any body came across such a situation? what may be the reason? what we should do in such case?
Jose
 

it not possible/ the position of this 3 bits is fix

---------- Post added at 16:57 ---------- Previous post was at 16:55 ----------

in my core 32mb 64mb 128mb 256mb 512mb 1 -2 4 sd 4 8 16 32 sdhc and 64sdxc work similar
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top