cancel
Showing results for 
Search instead for 
Did you mean: 

SD module with SPI on STM32F401RCT6

Demiañ
Associate II

I'm doing a project with a SD card, but I have not been able to make it work.

I'm using an STM32F401RCT6 and a Micro SD Card Adapter (HW-125), I want to connect them via SPI. I've followed several tutorials online, but I haven't been able to get it to work.

Do you know any tutorial or resource that could help me?

2 REPLIES 2
Andrew Neil
Super User

Welcome to the forum.

You'll need to give some more details of what, exactly, you've tried - both hardware and software - and what testing & debugging you've done.

See: How to write your question to maximize your chances to find a solution.

 


@Demiañ wrote:

a Micro SD Card Adapter (HW-125)


Please give a link

 


@Demiañ wrote:

Do you know any tutorial or resource that could help me?


Lots of resources here: 

https://elm-chan.org/fsw/ff/#:~:text=Get%20current%20time-,Resources,-The%20FatFs%20module

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Not sure the HW-125 is ideal, the one that comes up takes a 5V input, has a regulator to get to 3.3V on the card side

The STM32F4 isn't running at 5V, so the Arduino / 5V adapter isn't helping you here. The WaveShare MicroSD adapter is a better choice. Pull-up's on the right pins, and a socket sense pin.

ST has an SPI SD Card example under the AdaFruit / Nucleo board support.

https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/BSP/Adafruit_Shield/stm32_adafruit_sd.c

https://www.waveshare.com/micro-sd-storage-board.htm

 

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