cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 read/write SD card with SPI not SDIO

benjamin Gräf
Associate II

I would like to know if there is any examples on SD cards with SPI interface and HAL drivers. I use cube MX to generate my code and also the HAL librarys. However i know to get SD cards working with SPI I need to change the low level files which fatfs uses to communicate with the SD card. I have less clue about that and an example would really help me. Also a cubeMX option for sd card with spi would be fine^^

best regards, Benjamin.

2 REPLIES 2

The AdaFruit code provides an example of SPI usage for SD card, there should be worked examples for the NUCLEO boards using this.

STM32Cube_FW_XX_Vx.y.z\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
benjamin Gräf
Associate II

Ok thank you.

I will get into it