STM32F4XX and embedded MMC

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
ucasano
Posts: 57
Joined: Mon Aug 06, 2012 1:05 pm
Has thanked: 1 time

STM32F4XX and embedded MMC

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX and embedded MMC

Post 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
ucasano
Posts: 57
Joined: Mon Aug 06, 2012 1:05 pm
Has thanked: 1 time

Re: STM32F4XX and embedded MMC

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX and embedded MMC

Post 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
ucasano
Posts: 57
Joined: Mon Aug 06, 2012 1:05 pm
Has thanked: 1 time

Re: STM32F4XX and embedded MMC

Post by ucasano »

my eMMC does not support SPI mode at all: do the sdc driver use SPI mode only?
-g
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX and embedded MMC

Post by Giovanni »

The SDC driver uses SDIO, the MMC_SPI driver uses SPI, both drivers have a common interface.

Giovanni
Post Reply