STM32F411re SPI SDCARD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-20 2:57 PM
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- Labels:
-
FatFS
-
SDIO-SDMMC
-
SPI
-
STM32CubeMX
-
STM32F4 Series
-
SW4STM32
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-20 3:31 PM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-20 7:09 PM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-21 8:40 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-21 9:53 AM
The board specific stuff is defined here
STM32Cube_FW_F4_V1.0\Drivers\BSP\STM32F4xx-Nucleo\stm32f4xx_nucleo.h
STM32Cube_FW_F4_V1.0\Drivers\BSP\STM32F4xx-Nucleo\stm32f4xx_nucleo.c
I'm not using a shield either, I have a spidered up micro sd socket
https://community.st.com/0D50X00009XkYXdSAN
I've used the code as the basis for adding SPI SDCARDs to Nucleo-64 and Nucleo-144 boards.
I personally don't like the SPI implementation because it is very slow, I prefer SDIO or SDMMC as it is significantly more rapid and usable in real-world applications.
Up vote any posts that you find helpful, it shows what's working..
