Skip to main content
baptor
Associate III
March 20, 2018
Question

STM32F411re SPI SDCARD

  • March 20, 2018
  • 1 reply
  • 1416 views
Posted on March 20, 2018 at 22:57

Hi everybody, I am back here because two weeks ago, I started to try to add a SD card on my nucleo F411re. I used SPI connexion. I tested the wiring with a mbed software called Nucleo_L476RG_SDCard_WorkingSample. I just changed the pin to match my SPI1 on nucleo F411re :

// MOSI, MISO, SCLK, CS, name

SDFileSystem sd(PB_5, PB_4, PB_3, PA_10, 'sd');

I tried a lot of things using cubeMX to get this working using SW4STM32. I added FatFS, but since I not using SDIO, CubeMX do not allow to tick SDcard in FatFS. I ticked 'user defined', but after generating the project, I am not able to move forward. I tested every library/tutorial available on the first two pages of a famous web browser. Now I still stucked, with nothing new to try.

Does somebody here could share a project that I could start with ( open it and compile at less using sw4stm32? generated with cubemx ? using Hal? and finaly using a stm32F411?).

Thanks in advance

Baptiste

#stm32f411 #fatfs #sdcard #spi #cubemx #sw4stm32
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
March 20, 2018
Posted on March 20, 2018 at 23:31

Should be an SPI adafruit example that builds with the nucleo. And fatfs application example under the HAL example trees. On phone will find an example later.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
March 21, 2018
Posted on March 21, 2018 at 02:09

STM32Cube_FW_F4_V1.21.0\Projects\STM32F411RE-Nucleo\Demonstrations\SW4STM32\STM32F4xx_Nucleo\.project

Uses SPI SD Card, and FatFs

STM32Cube_FW_F4_V1.21.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..
baptor
baptorAuthor
Associate III
March 21, 2018
Posted on March 21, 2018 at 15:40

Hello, thank you for that, that's a good start for me since I can compile for my nucleo. I imported the project into SW4STM32, compiled it, OK . Since I dont use the lcd shield I commented all the lcd related fonctions. I still use spi for my sdcard and I dont find in the project something about spi1, or somewhere to specify witch spi pin I will use...

Could you drive me to the good place to set that?

Thanks a lot

Baptiste