Problem with MMC driver

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

damien83
Posts: 5
Joined: Fri Aug 19, 2005 7:33 pm

Problem with MMC driver

Fri Aug 19, 2005 7:49 pm

Hello,

I can't have the mmc driver to work, I get the following errors, and have no idea how to solve it :

Added MCI driver
AT91RM9200 MCI initialized
Clock 0Hz, busmode 1, powermode 1, Vdd 21
Clock 375000Hz, busmode 1, powermode 2, Vdd 21
clkdiv = 79. mcck = 375000
MMC: starting cmd 00 arg 00000000 flags 00000000
Sending command 0 as 00000800, arg = 00000000, blocks = 0, length = 0 (MR = 0000834F)
setting ier to 00000001
MCI irq: status = 0000C0C5, C07F0001, 00000001
Command ready
Completed command
Status = 0000C0C5 [00000000 00000000 00000000 00000000]
MMC: req done (00): 0: 00000000 00000000 00000000 00000000
MMC: starting cmd 01 arg 00000000 flags 00000001
Sending command 1 as 00000841, arg = 00000000, blocks = 0, length = 0 (MR = 0000834F)
setting ier to 00000001
MCI irq: status = 0009C0C5, C07F0001, 00090001
Response end bit error
Response index error
Command ready
Completed command
Status = 0009C0C5 [00000000 00000000 00000000 00000000]
MMC: req done (01): 0: 00000000 00000000 00000000 00000000
Clock 0Hz, busmode 1, powermode 0, Vdd 0

Then nothing happend...

Hope you can help.

Damien_
Colonel Sammy
Location: Warwick, England
Posts: 7
Joined: Wed Jun 15, 2005 8:58 pm

Wed Aug 24, 2005 10:50 am

First you need to check that you have an MMC card and not an SD-card - only MMC cards are supported by the default kernel. This doesn't look like you problem though because it hasn't got to the stage where it's got a response back from the card yet.

The second problem is that the MMC and SD-card specifications require pull-up resistors on the CMD and DAT lines. According to the arm-linux mailing lists the internal pullups on the AT91RM9200 don't always work, so you could try adding these. We have 2 boards (an EK and a Kwikbyte KB9202) and neither worked with MMC as delivered. The EK complained about CRC errors during data read and the KB9202 had very similar errors to you, so I would suspect that this is the cause.

We soldered a 10K pull-up on the CMD line (pin 2) to pin 4 (VDD) of the MMC connector and also a 100K pull-up on the DAT pins (again all to pin 4 - VDD). These values were just those that we had to hand, other values in the 4k7 to 100k should work for CMD according to the spec. (50k to 100k for the DAT lines IIRC). Both boards now appear to work just fine.

HTH.
damien83
Posts: 5
Joined: Fri Aug 19, 2005 7:33 pm

Solution

Thu Aug 25, 2005 5:59 pm

Finally it's working. I need to activate internal pullup resistors, then as you said I have CRC errors, but I solve this reducing the minimum clock rate.

Thank you.

Damien

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 5 guests