MMC card with spi-sd-card.c
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Dec 23 07:35:58 UTC 2008
Gene Smith wrote:
> I have been trying to use an MMC with the "spi/sd" drivers in RTEMS. I
> worked until it tries to send two commands in a loop waiting for idle
> conditon in an init routine:
>
> rv = sd_card_send_command( e, SD_CARD_CMD_APP_CMD, 0);
> CLEANUP_RVSC( rv, sc, sd_card_driver_init_cleanup, "Send:
> SD_CARD_CMD_APP_CMD");
> rv = sd_card_send_command( e, SD_CARD_ACMD_SD_SEND_OP_COND, 0);
> CLEANUP_RVSC( rv, sc, sd_card_driver_init_cleanup, "Send:
> SD_CARD_ACMD_SD_SEND_OP_COND");
These commands set the SD Card into SPI mode.
>
> The first on seems to work but the 2nd on fails.
>
> I found something in a Samsung MMC manual that says when waiting for
> idle on it you should do this instead.
>
> rv = sd_card_send_command( e, SD_CARD_CMD_SEND_OP_COND, 0);
> CLEANUP_RVSC( rv, sc, sd_card_driver_init_cleanup, "Send:
> SD_CARD_CMD_SEND_OP_COND");
>
> When I do this instead the code detects idle after two loops (stepping
> with debugger) and continues on with no apparent errors and registers
> the card.
>
> I am not sure if there are other ways a MMC differs from a SD.
In MMC mode CRC is enabled by default and the state machine is different. CRC
is currently not supported in the SD Card driver.
>
> -gene
>
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
--
Sebastian Huber, Embedded Brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list