Skip to main content
KSALA
Associate
October 18, 2018
Question

SD Card Interface with STM32F0

  • October 18, 2018
  • 4 replies
  • 2253 views

Hi Team,

I'm using STM32F030c8 micro controller, my application is to interface SD card with Stm32.

stm32fxx to micro sd card interface:- 

pa5-----------clock

pa6-----------miso

pa7-----------mosi

pf5------------cs

I'm using stm32f0 discovery board and example code. I didn't get proper response from SD card(received 255).

if there any limitations to use SD card size? currently we are trying with 4gb and 8gb sd cards

if there is any proper code please let me know

NOTE:-

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    October 18, 2018

    The SDHC/SDXC cards use different commands and blocking. The adafruit shield code in the Cube BSP should support old and new cards via SPI.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    KSALA
    KSALAAuthor
    Associate
    October 18, 2018

    Hi Clive,

    If you have any link related to  adafruit shield code please share it here.

    Thanks,

    Deekshitulu

    Tesla DeLorean
    Guru
    October 18, 2018

    In the CubeF0 package

    STM32Cube_FW_F0_V1.9.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Sarthak Tanwani
    Visitor II
    July 18, 2019

    Hello @Community member​ I've tried porting the stm32_adafruit_sd header files to use with the STM32F051 Discovery board and have failed. I believe it was intricately made for the Nucleo bard(s). I may be wrong.

    Could you help or provide the header file for STM32F051DISCOVERY for fatfs+sd+spi type implementation , It would be very helpful

    Thanks

    Tesla DeLorean
    Guru
    July 18, 2019

    It has like 4 or 5 pins, and most of those associate directly with an SPI peripheral.

    Reliant on SPI BSP code for the NUCLEO

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..