2015-03-10 01:34 PM
Hi,
I want to read/write data to SD card via SPI. is it possible to initialize the FatFS module to work with SPI interface in cubeMX tool? The SD card option in the FatFS middleware is available only when I am enabling the SDIO peripheral. I am using STM32F4-DISCOVERY board and STM32CubeMX ver. 4.6 Thanks #stm32cubemx #stm32 #spi #fatfs #sd #sdio2016-06-08 10:37 PM
Exatly what I've been up to the last week. And I haven't figured it out yet.
If anyone knows how to interface SPI SD cards with STM32, please answer. I am using STM32F4-Discovery (STM32F407), Keil uVision 5 and STM32CubeMX 1.0 (4.12.0). Till date, I tried: - translating the Arduino SD libraries (C++) to work with HAL_SPI_x() funtions gave up this one, because everything is deeply wired to the Arduino environment - implementing the ElmChan FatFs library on my own didn't work, or at least it threw no errors, but still didn't work - implementing the TM libraries from http://stm32f4-discovery.net/ I don't get how to implement these correctly, ended up like the one above or with several L6218e errors from the linker2016-06-09 02:06 AM
Hi,
I suggest you to use the last version of CubeMx v4.15 andhave a look to this example using most of the features offered by FatFs toconfigure a microSD drive: STM32Cube_FW_F1_V1.4.0\Projects\STM3210C_EVAL\Applications\FatFs\FatFs_uSDYou'll still have to own the integration with this application which can help you as an implementation example and get inspiration to achieve you goal.
You can refer to this it may be helpful for you. Regards2018-11-22 12:45 PM
i found kiwih's drivers very useful, it's an easy drop in implementation for existing CubeMX projects.
2018-11-22 12:45 PM
i found kiwih's drivers very useful, it's an easy drop in implementation for existing CubeMX projects.
2019-01-13 08:32 PM
This guys works for SPI, integrated into user io..
Uses SPI in place of SDIO.
or in a project for L4 nucleo as example
2019-05-07 11:39 AM
Hi, new to the forums. Maybe someone can help me here. I am also new to ST/CubeMX. I have a quick little project I am trying to put togther, and thought I could just uses this cubemx-mmc-sd-card you mention, but I don't understand how I take it from a dev board, to a different MCU "easily". CubeMX is not intuative on this. If I go back to board/mcu selection it's restarting the project. Do I import? I did that, but resulted in import errors, and generating code there is a ton missing (of course, it also crashed the first try so...). Anyway, any help is appreciated. I just need to use SPI to an sd card in the most basic way. I was hoping to use CubeMX to generate the guts, then read/write some files. I have some GPIO interrupts etc. already running that I need to trigger on.
Maybe I am better of just doing it from scratch?
Thanks in advance.
Jay
2019-05-07 10:13 PM
The HAL has Nucleo based SPI examples, using the AdaFruit shield code in the HAL/BSP code trees.
2019-05-08 06:29 AM
Thanks. I have found some things. The issue I am having is I am not using a dev board. We created a board and plopped an F030C8 on it. Maybe that's not the best processor for this application. Anyway, using cubeMX seemed like the way to go, but I can't seem to figure out the "easy" transition to my MCU from within CubeMX. I am going to try it from scratch and use the examples a reference only.
Thanks.
2019-05-08 03:09 PM
Send a schematic and code... hard to decipher where the issue is. Dev board vs chip makes no difference in cubemx. Do you have the chip working at all, ie can flash a led?