Page 1 of 1

STM32F4XX and embedded MMC

Posted: Mon Dec 02, 2013 8:03 pm
by ucasano
Dear all,

these days I am trying to read an embedded MMC device, using the SDIO interface.

After getting to BLK_ACTIVE state, I try to sdcConnect(), and the result is CH_FAILED.

Precisely, the place where fail happens is file sdc.c:

00236 #if SDC_MMC_SUPPORT
00237 if ((sdcp->cardmode & SDC_MODE_CARDTYPE_MASK) == SDC_MODE_CARDTYPE_MMC) {
00238 /* TODO: MMC initialization.*/
00239 goto failed;
00240 }
00241 else
00242 #endif /* SDC_MMC_SUPPORT */

So, is it possible my embedded MMC card is not supported?
It's a common eMMC from Micron.

Regards.
-g

Re: STM32F4XX and embedded MMC

Posted: Mon Dec 02, 2013 8:07 pm
by Giovanni
Hi,

It is not yet supported, there is a missing portion of code in the driver. MMC devices are way less common than SD devices so it has never been an high priority.

Giovanni

Re: STM32F4XX and embedded MMC

Posted: Mon Dec 02, 2013 11:55 pm
by ucasano
Dear Giovanni, when you say "missing portion" of code, you mean small, medium or large ;)
i need this feature working for my project, so i could spend some time developing and fixing this issue.

where do i start? what is needed in order to make it working? do somebody try this at home?

thanks.
-g

Re: STM32F4XX and embedded MMC

Posted: Tue Dec 03, 2013 9:11 am
by Giovanni
Hi,

It is just missing the MMC initialization part, it could be as small as 10 lines of code. There is a remark in the code.

I don't have pure MMC devices so cannot write nor test it.

Giovanni

Re: STM32F4XX and embedded MMC

Posted: Fri Dec 06, 2013 5:19 pm
by ucasano
my eMMC does not support SPI mode at all: do the sdc driver use SPI mode only?
-g

Re: STM32F4XX and embedded MMC

Posted: Fri Dec 06, 2013 5:48 pm
by Giovanni
The SDC driver uses SDIO, the MMC_SPI driver uses SPI, both drivers have a common interface.

Giovanni