Skip to main content
HTajb.1
Associate III
Jul 2, 2020 12:29 PM UTC
Solved

A question about using FATFS with SD Cards(SDMMC Host controller of STM32-H7)

Dear Sir/Madam,

I am quite new to the world of STM32 ,although I explore new things about them everyday.

I have to use (internal) DMA of SDMMC of a MCU,to transfer large capacity of bytes from a SD Card to the internal RAM of the micro .

For doing this,is it really necessary to use FATFS(as a middle-ware for SD card) or not?

I really appreciate your attention.

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jul 2, 2020 12:44 PM UTC

FATFS is reasonably efficient, you want to be reading large/aligned blocks, think sector/cluster, and create buffering or algorithms that facilitate optimum interaction with the underlying media.

You can read/write block(s) directly to the SD Cards, but if you're throwing away the file system you'd want to come up with something better.

Might want to create an optimized method that manages and chases the cluster chain for a single file data stream, or cache/prefetch the file allocation table to help FATFS hit your performance goals.

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

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jul 2, 2020 12:44 PM UTC

FATFS is reasonably efficient, you want to be reading large/aligned blocks, think sector/cluster, and create buffering or algorithms that facilitate optimum interaction with the underlying media.

You can read/write block(s) directly to the SD Cards, but if you're throwing away the file system you'd want to come up with something better.

Might want to create an optimized method that manages and chases the cluster chain for a single file data stream, or cache/prefetch the file allocation table to help FATFS hit your performance goals.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
HTajb.1
HTajb.1Author
Associate III
Jul 2, 2020 2:43 PM UTC

Thank you clive1 for your reply .