Skip to main content
Taylor Welsh
Associate II
Nov 22, 2018 1:57 AM UTC
Question

Can we please have an option in CubeMX for interfacing with fatfs over spi for microcontrollers that don't have a sdio interface? Alternatively has anybody out there written a user_diskio.c and user_diskio.h that i could use? thanks

..

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
Nov 22, 2018 2:06 AM UTC

HAL Example using SPI attached SD Card using the common BSP abstraction

STM32Cube_FW_F7_V1.12.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

STM32Cube_FW_F7_V1.12.0\Projects\STM32F722ZE-Nucleo\Applications\FatFS\FatFs_uSD\readme.txt

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Taylor Welsh
Associate II
Nov 22, 2018 2:09 AM UTC

what would I need to do in order to use this code with a project generated under CubeMX?

Tesla DeLorean
Guru
Nov 22, 2018 2:32 AM UTC

I guess you'd need to figure out how it uses BSP or user/template code in other circumstances, and then apply that to your board. Sorry I don't CubeMX

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Taylor Welsh
Associate II
Nov 22, 2018 8:42 PM UTC

For others stuck in this position i found kiwih's drivers very useful, it's an easy drop in implementation for existing CubeMX projects.

https://github.com/kiwih/cubemx-mmc-sd-card