cancel
Showing results for 
Search instead for 
Did you mean: 

SD card memmory support

Uman-Butani
Associate II

Hello,

Hope everyone are doing well!

Can anyone please provide specific numbers?

What is the maximum size(GB/MB) of the micro SD card each STM32 device can support?

  1. STM32F407VET6 - SDIO interface
  2. STM32F745VET6 - SDMMC interface
  3. STM32H745ZIT6 - 2 SDMMC interface

Let me know if you require any more information.

Also please let me know, How I can conclude the same information for any other controller parts?

 

Thanks and Regards

Umang

9 REPLIES 9
Andrew Neil
Evangelist III

It doesn't have anything (directly) to do with the microcontroller itself.

It may be limited by the filesystem software you use; eg, FatFs

It will be limited by the formatting you use on the card; eg, FAT-16, FAT-32, ...

Uman-Butani
Associate II

ok,
But let's assume we will use freeRTOS with FatFS as middleware and choose FAT-32 or exFAT formatting. 
How one can calculate the maximum supporting size? 

Thanks, 

Check the FatFs documentation:

http://elm-chan.org/fsw/ff/

Also the documentations of the FAT-32 and exFAT formats.

 

eg, https://www.sciencedirect.com/topics/computer-science/maximum-file-size

AScha.3
Chief

Hi,

>What is the maximum size(GB/MB) of the micro SD card each STM32 device can support?

Read in rm of the controller, you want to use :

e.g.

AScha3_0-1715941368056.png

from F407 ds :

AScha3_1-1715941438513.png

from H563 ds:

AScha3_2-1715941487915.png

And as Andrew wrote, size is at first limited by the filesystem and the card type.

I have biggest cards with 64GB and exfat , all working fine.

If you feel a post has answered your question, please click "Accept as Solution".

They should all be able to use 2TB cards with appropriately coded drivers and file systems.

I've tested 400-512 GB cards, larger than practical in my opinion, but usable.

You wouldn't want to use FatFs 0.12 that ST ships. It's from 2017 has issues with large volumes. 

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

On which driver/midelware code you have tested this? 

Definitely with F4, F7 and H7, and with eMMC

FatFs 0.14 and 0.15

On Keil w/HAL

Part of the testing / validation is the filling the cards with content (PRBS), and recovering the same.

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

Thanks for your input! 
During further testing, as per below snap, 

UmanButani_0-1716198347551.png

STM32CUBEMX doesn't have an enable selection to use exFAT with STM32F407VET,

Does this limit our read/write operation on the memory card to 32GB(With FAT32) only?   

>Does this limit our read/write operation on the memory card to 32GB(With FAT32) only?

No. Cards up to 32GB can be FAT32 , no problem . (Just check, whats on the card you use, or format it.)

+

Maybe you try : tiny mode -> disabled . (exFAT is not "tiny" ...) Then see...if possible.

If you feel a post has answered your question, please click "Accept as Solution".