Skip to main content
benjamin Gräf
Associate III
September 19, 2018
Question

STM32F103 read/write SD card with SPI not SDIO

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.

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    September 19, 2018

    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    benjamin Gräf
    Associate III
    September 24, 2018

    Ok thank you.

    I will get into it