2012-07-18 06:21 AM
I am currently working on a project in which i have to interface SD card with STM32f100RB.
I did the same with 8bit PIC microcontroller using Application Library provided by Microchip.for STM32 i get a FATFs module named Chan Application Module modified by Martin Thomas But this code is tested for Gcc Toolchain . I am using Keil compiler. This code is not building with Keil compiler.Please help me in converting the code in Keil compiler compatible.Thanks in advance.2012-07-18 07:55 AM
You're right, it's a bit of a mess.
Suggest you start with a donor/template project for your unspecified board, get that working. Then copy/merge in the functions you need. SD and FsFat support is presented in several of the ST firmware libraries for their assorted boards and chips. Suggest you download and review some of those. There is definitely code in the \Utilities\STM32_EVAL\Common directory (STM32F2 peripheral library for example) that demonstrate SPI SD, and SDIO SD, the latter probably not application to the VL series parts, but there is definitely code for the F1xx parts.2012-07-18 11:01 PM
Thanks for your quick response.
Can you suggest me a link from where i can download STM32 Firmware Library?2012-07-19 01:56 AM
There is the ''Design Support'' page for the STM32F100RB, with documentation and software/firmware downloads:
2012-07-19 05:05 AM
Can you suggest me a link from where i can download STM32 Firmware Library?
The one I cited, that also contains F1 series EVAL board code is currently here
http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f2xx_stdperiph_lib.zip
2012-07-19 10:13 PM
http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f2xx_stdperiph_lib.zip
sir i was look for application firmware library but its only a peripheral library.
2012-07-19 11:15 PM
Then perhaps
STM32F10x_StdPeriph_Lib_V3.5.0\Utilities\STM32_EVAL\Common\stm32_eval_spi_sd.c STM32L1xx_StdPeriph_Lib_V1.1.1\Utilities\STM32_EVAL\STM32L152_EVAL\stm32l152_eval_spi_sd.c Might be instructive. Go fish under the ''Design Support'' tabs of the assorted parts.2012-07-20 04:10 AM
Might be instructive. Go fish under the ''Design Support'' tabs of the assorted parts.
Sir i need to store a file in FAT32 file system. So none of these could not help me.
2012-07-20 04:23 AM
2012-07-20 05:04 AM
FatFs code is pervasive
STM32F4-Discovery_FW_V1.1.0\Utilities\Third_Party\fat_fs\src\ff.c If you have used it before, you'd be aware that the only part you have to port to your memory/disk subsystem is in diskio.c. The bulk of FatFs can be dropped into Keil with no modification. The trick with pulling a project into a new platform is to be familiar with the code, pull out and use the parts that work, discard those that won't, and code the pieces needed to tied them back together. The ease of this will depend on your familiarity with both GNU/GCC and Keil.