cancel
Showing results for 
Search instead for 
Did you mean: 

source code for writing data in SD card

Ybaya.1
Associate

Hi everybody ,

does anyone have source code for writing data in SD card?

I am using STM32F103C8Tx

thanks alot

3 REPLIES 3
KnarfB
Principal III

Chan's FatFs is used quite often. If you are using STM32CubeIDE, you can add it as a third-party middleware. Examples come with the firmware packages.

If you are an expert, you can start at register level using SD and FAT specification documents 😂.

> If you are an expert, you can start at register level using SD and FAT specification documents

This is a misleading sarcasm wrongly presenting the choice as a binary - all or nothing. In real life one can use decent software libraries and write the code by themselves for the missing parts. For networking it means using lwIP, but writing your own Ethernet driver, because ST's one is absolute crap. I have no experience with FatFS and SD, but most likely the situation is the same...

The STM32F103C8 doesn't have SDIO so would need SPI

See the adafruit shield driver and NUCLEO BSP supporting SD Cards via SPI

Very old STM32 part, surely better choices.

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