2014-11-05 02:50 AM
Hello at all,
Somebody knows where can I take the fatfs library for SD card on STM32F107 MCU?thank you #stm32-stm3210c-sd-card-fatfs2014-11-05 08:05 AM
The board level SD card stuff can be found here
STM32F10x_StdPeriph_Lib_V3.5.0\Utilities\STM32_EVAL\Common\stm32_eval_spi_sd.c Reasonably generic DISKIO.C abstraction here STM32L152-EVAL_FW_V1.2.0\Project\STM32L152-EVAL\src\diskio.c2014-11-07 06:32 AM
Thanks for the reply, but i have still a problem.
I'm using the Diskio.c you mentioned and the stm3210c_eval_spi_sd.c as staff for SD card.Moreover I'm using the FatFs library taken from STM3210C-EVAL_USB_Host_MSC example.The problem is that, using a 16Gb uSD card (FAT32), when I call SD_Init() function execution hangs in an infinite loop inside this function. More in details, execution is not able to exit from SD_GoIdleState() function.While if I use the 2Gb uSD card provided with the STM3210C kit (without file system, I think) i don't have the same problem?Do you know why?Thank youLuca2014-11-07 07:56 AM
Most of ST's SD Card examples use BYTE addressing, and 32-bit variables, this is not conducive to access >2GB. You'd need to modify it to use BLOCK addressing (512 byte sectors). Also SDHC cards have a slightly different command set than SD/MMC cards.
I've posted working examples (SDHC/SDXC up to 64 GB) for the STM32F4-DISCO board (FATFS and MSC). I've worked on the F1 (103/107) with SD cards, but have moved on.