Skip to main content
Ybaya.1
Visitor II
March 15, 2020
Question

source code for writing data in SD card

  • March 15, 2020
  • 3 replies
  • 842 views

Hi everybody ,

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

I am using STM32F103C8Tx

thanks alot

This topic has been closed for replies.

3 replies

KnarfB
Super User
March 15, 2020

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 :face_with_tears_of_joy:.

Piranha
Principal III
April 25, 2020

> 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...

Tesla DeLorean
Guru
April 26, 2020

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..