stm32 sd card

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

Moderator: RoccoMarco

Post Reply
cafi
Posts: 1
Joined: Thu Jul 31, 2014 12:47 pm

stm32 sd card

Post by cafi »

Hello,

I am trying for a while to configure my STM32f4 discovery+STM32f4DIS-BB to communicate with SD card. I was able to mount correctly the card but when I tried to read the free space(f_getfree return 1- FR_DISK_ERR ) from my sd card I saw that is using disk_ioctl witch is not present in the files from /ext folder except that the prototype is declared in diskio.h. In this moment for me is not very clear how fatfs 0.9 interact with disckio or sd card drivers from chibios. Can someone explain me if am using the right files, because I don't see in the archive the disc_ioctl? I should make my disk_ioctl?
#if _MAX_SS != 512 /* Get disk sector size (variable sector size cfg only) */
if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &fs->ssize) != RES_OK)
return FR_DISK_ERR;

I am using Usart6 for shell commands.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32 sd card

Post by Giovanni »

Hi,

Probably you have to configure the SDIO pins correctly in board.h.

If you search the forum you probably will find a solution, if I remember well this has been discussed before.

Giovanni
Post Reply