STM32F4XX MMC/SDC driver status

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

Moderator: RoccoMarco

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

STM32F4XX MMC/SDC driver status

Post by ucasano »

Hello, is it safe to use the MMC over SDC driver included in the 2.6.1 release of the os?
Is the 8 bit bus supported?
-g
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX MMC/SDC driver status

Post by Giovanni »

It should be safe, I never tested the 8bits mode.

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

Re: STM32F4XX MMC/SDC driver status

Post by ucasano »

Really nice!

In order to start development the right way, where could I find sample code of mmc/sdc using SDIO?

Thank you!
-g
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX MMC/SDC driver status

Post by Giovanni »

Look for the demos using FatFS.

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

Re: STM32F4XX MMC/SDC driver status

Post by ucasano »

Ok, I will take a look! Thank you!
-g
nikhilz
Posts: 4
Joined: Thu Oct 24, 2013 7:33 am

Re: STM32F4XX MMC/SDC driver status

Post by nikhilz »

hi

Im integrating micro sd card to stm32f4 discovery board using SDC driver.Initially I formatted the sd card uisng FAT32 and called sdcConnect(&SDCD1) function ,it returns zero and then I'm trying to mount the file system using f_mount(0, &SDC_FS);This function returns FR_OK.After that when I tried to open a file using f_open it is returning FR_DISK_ERR.What might be the reason?Is there any sample code to refer?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4XX MMC/SDC driver status

Post by Giovanni »

I don't have FatFS code at hand, the demos are very simple but I know several people is using FatFS without problems. If you have a chance try to join the IRC chibios channel and ask there.

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

Re: STM32F4XX MMC/SDC driver status

Post by ucasano »

The FATFs works really nice with STM32F4 and ChibiOS.

I think you should take care of accessing files on your card from the same process: I will suggest you to use a logger process, containing all the stuff relative
to FATFs.

Bye.
-g
kenyee
Posts: 14
Joined: Fri Sep 20, 2013 8:27 pm

Re: STM32F4XX MMC/SDC driver status

Post by kenyee »

ucasano wrote:The FATFs works really nice with STM32F4 and ChibiOS.


Did you have to do anything special to get FATFs to work?
Or is it just a simple compile/link to your program?
nikhilz
Posts: 4
Joined: Thu Oct 24, 2013 7:33 am

Re: STM32F4XX MMC/SDC driver status

Post by nikhilz »

Hi,

Now f_open,f_read,f_close functions are working.But f_write function still gives disk error.This error is causing by the 'create chain' function.Internally this is causing by "get_fat" function,
case FS_FAT32 :
test3 = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)));
This move_window returns FR_DISK_ERR.

Any idea?
Post Reply