MMC(MultiMedia Card) interfacing with FPGA

Hi We are trying to interface a 16MB MMC(of Infineon) to Spartan- FPGA ... We have designed reader for card(in VHDL) abopting MMC protocol(no SPI) and this card is supports 2.7 to 3.0 standard .. Before designing its writer i want to test reader .. and before that i want your suggestions ... :)

So please share your experience and guide me ..

Thank

Reply to
fahadislam2002
Loading thread data ...

"fahadislam2002" schrieb im Newsbeitrag news:kdqdnV-4CqYi4AbeRVn snipped-for-privacy@giganews.com...

so whats your problem ?? why are "trying" and not "DOING" ??

I have published an project at opencores that can configure an FPGA from MMC in MMC mode this IPcore is hardware tested (uses 21 PLD macrocells!)

at

formatting link

there is snapshot from mmc host controller ip core from LARK project - notice that ipcore is 100% non-tested

and

formatting link
has MMC/SD cardside ipcore that could be used for testing (not announced yet)

for initial testing you can just make an Microblaze SoC in the S-2 and use bitbang to read the MMC so it would be easy to debug and see the response, I think I published once that software but dont recall where and if it is still on the web, in any case it isnt complex

so go ahead and test you mmc interface, until you do that, you would not know if it works or not

Antti

Reply to
Antti Lukats

Ah, the Verilog one. Very useful project. I hope to get it booting my own project.

Very nice, I've just downloaded that!

I've got ideas for using that too. Looks like it is for a 32-bit wide data bus, I'd like to mod it for humble

8-bitters.

#> and

formatting link

I look forward to it.

I hear SD is a superset of MMC.

SD details are harder to come by without NDA or licences, but presumably if you don't use the 'secure' features then it will just look like an MMC card with 4-bit wide data bus?

Cheers, K.

Reply to
Kryten

"Kryten" schrieb im Newsbeitrag news:WuXmf.5709$ snipped-for-privacy@newsfe1-gui.ntli.net...

this is one really works !

I think there is small bug in CRC7 and maybe something else as said its presented in the way I got it, and its completly untested

go ahead :)

:) me too

somewhat

no exactly

SD and MMC have the same mmc like communication protocol what by default is

1 bit

SD has somewhat different command set meaning that some commands that are present in MMC are not there in SD like streaming read is only in MMC not in SD also the initialization is different

both MMC and SD can turn on 4 bit mode additionally MMC (standard 4.1) can also support 8 bit mode and turbo clock up to 52MHz !

Antti

Reply to
Antti Lukats

Sigh. SD cards seem to be the best thing to buy for most consumer electronics, they seem to be replacing MMC cards. Better data bus width etc.

Any recommendations for documentation describing MMC, SD, and their differences. I have Googled, and got swamped with loads of links to places selling such cards. The few techy links were fairly useless, along the lines of "you can buy the full spec from...."

formatting link
indicates MMC has only 7 pins, and only one of these for data.

Wow.

I thought most of the 'new features' work would be done on SD cards. The Mini-format is just a repackaging.

Reply to
Kryten

differences. I have Googled, and got swamped with loads of

along the lines of "you can buy the full spec

formatting link
formatting link

BTW: will your MMC or SD card interface be open-source? I am interested in the SD card interface, ?but don't find the time to implement it.

Martin

Reply to
Martin Schoeberl

"Martin Schoeberl" schrieb im Newsbeitrag news:439d69c8$0$11610$ snipped-for-privacy@tunews.univie.ac.at...

Hi Martin,

your question was to whom?

if you want a SD card interface for your JOP, then firstly it can be done

100% in software (I guess you are talking about the host side).

the SW version can be painfully slow depending on the CPU and compiler being used and coding style

for better speed one combo option could be that CMD line eg all command-response is handled in sw bitbang and only the DAT (eg block read/write) is implemented in hardware this would give very small FPGA core and only have a minor penalty on the speed. for this purpose the LARK mmc vhdl code archive actually contains allmost ready to use block (but I think the crc16 is also wrong there), in any case its not a major issue to design module that can rec-transmit the mmc style commands from-to block ram

Antti

Reply to
Antti Lukats

"Kryten" schrieb im Newsbeitrag news:OWXmf.4434$ snipped-for-privacy@newsfe5-gui.ntli.net...

there are enough specs to be find with DEEPgoogling

both mmc and sd have new things

MMC has rs-mmc format, also microMMC and the 8 bit mode and turbo speed

SD has miniSD and microSD (aga Transflash)

OMHO the only card to be used is microSD :)

Antti

Reply to
Antti Lukats

differences. I have Googled, and got swamped with loads of

along the lines of "you can buy the full spec

Hi Antti,

Who ever wants to provide it ;-)

in software (I guess you are talking about the host

That's the way I (or everybody else) would implement it first. And than when it works one usually 'forgets' to ove it to HW.

used and coding style

command-response is handled in sw bitbang and only the DAT (eg

core and only have a minor penalty on the speed. for

use block (but I think the crc16 is also wrong

rec-transmit the mmc style commands from-to block ram

Yes, a practical idea.

Martin

Reply to
Martin Schoeberl

Hi Antt as later i told i stated from Reader ... and i am facin problem in crc-7 ... i know that serial crc is easy but it will tak more time so i was trying for table based crc approach ... but its little more complex .. whats your suggestion for that .. and also I got your code and trying to understand and learn fro it(as your coding style is much better and professional than me) .. but i have some questions about ur code .. 1) stream read 2) crc7 is right 3) standard 3.1 (7 pin) and one more question .. Is there any way to avoid crc in command as fo developing reader i got help from sandisk datasheet and also o hitachi ... and in that although I not found any kind of suc description ... but in one example in datasheet i felt that to ignor crc he was puting all crc bits one(1111111) ...is it true

Reply to
fahadislam2002

"fahadislam2002" schrieb im Newsbeitrag news:d4mdncW_s-FWvQPeRVn snipped-for-privacy@giganews.com...

yes, but this is not available on SD cards only MMC :(

is calculated from table as for that PLD application it uses less resources than 7 FF for crc7

7 pin MMC yes

no, the CRC has to be present in all transmitted commands some command responses(broadcast) have 1111111 as crc7

and attached is tested correct MMC/SD CRC7 module

-- cut here

--------------------------------------------------------------------------------

-- Company: Xilant Technologies Inc.

-- Engineer: Antti Lukats

--

-- Create Date: 02/08/05

-- Design Name:

-- Module Name: mmc_crc7 - Behavioral

-- Project Name:

-- Target Device:

-- Tool versions:

-- Description: MMC/SD Carc CRC7 module

-- Can be used to 'shift out'

-- the CRC7+stop bit after CALC

-- Dependencies:

--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--   Silicon(FPGA) tested
--   This module has 7-bit running CRC available on each clock
--   high bit crc(6) will be come output of shift register
--   when crcen goes low shifting the CRC7 and stop-bit(high)
--   serially out
--------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity xti_mmc_crc7 is Port (
 rst : in std_logic;
        clk : in std_logic;
        din : in std_logic;
        crc : out std_logic_vector(6 downto 0);
        crcen : in std_logic);
end xti_mmc_crc7;

architecture Behavioral of xti_mmc_crc7 is

signal sr : std_logic_vector(6 downto 0);

begin
 crc
Reply to
Antti Lukats

We turned to serial CRC7 and implemented it using "for loop" as wan for 40 bits ... and it give result in same cycle ... although is a inefficient approach (takes more hardware i feel your approach is better than us ... we will try it .. Anyways thanks Anti ... will meet u soon with some other issue

Reply to
fahadislam2002

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.