cancel
Showing results for 
Search instead for 
Did you mean: 

SD Card Interface with STM32F0

KSALA
Associate

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:-

5 REPLIES 5

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
KSALA
Associate

Hi Clive,

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

Thanks,

Deekshitulu

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Sarthak Tanwani
Associate

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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..