Skip to main content
Explorer
May 17, 2024
Question

SD card memmory support

  • May 17, 2024
  • 5 replies
  • 3615 views

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

    This topic has been closed for replies.

    5 replies

    Super User
    May 17, 2024

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

    Explorer
    May 17, 2024

    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, 

    Super User
    May 17, 2024

    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

    Super User
    May 17, 2024

    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.

    Graduate II
    May 17, 2024

    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. 

    Explorer
    May 17, 2024

    On which driver/midelware code you have tested this? 

    Graduate II
    May 17, 2024

    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.

    Explorer
    May 20, 2024

    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?   

    Super User
    May 20, 2024

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