Showing results for 
Search instead for 
Did you mean: 

error in working with SD card using SPI in STM32F4

Associate II


I want to work with SD card using SPI in STM32 but it is not working. I tried many things but it didn't work. It was working fine when I tried it 4-5 months ago. What is the problem now? I am referencing sample code from here:

Then i referred to other sample code. The problem still continues. "(fresh != FR_OK)" is correct, so I have an error in mounting the SD card. I also tried another SD card. Have you any idea?


Debug the DISKIO layer, if the basic functionality of a block device isn't working it's not something you can fix looking at top-level code. FatFS is pretty solid/stable, so focus on the data you give it to work with.

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

Just a warning... ControllersTech is a site made by an absolutely incompetent amateur and is full of broken code.