cancel
Showing results for 
Search instead for 
Did you mean: 

Using 1TB SD Card with SDMMC Interface on STM32 – Need Adapter Recommendations

Ditzhak
Associate III

 

  1. Hello everyone,

    I am currently working on a project using an STM32H753ZI, and I'm exploring the integration of a 1TB SD card using the SDMMC interface. I have successfully managed to write to a 32GB SD card using an SPI adapter, but I'm looking to upgrade in terms of capacity and interface speed. I would appreciate some guidance on a few points:

    1. Compatibility: Has anyone successfully used a 1TB SD card with an STM32? Are there any specific settings or considerations I need to be aware of for compatibility, especially concerning the SDXC standard and filesystems?

    2. Adapter Recommendations: Can anyone recommend a suitable SD card adapter that works well with STM32 for such high-capacity cards? I'm looking for something reliable for continuous read/write operations.

    3. Performance Tips: Any tips on optimizing performance when using SDMMC with high-capacity SD cards would also be greatly appreciated.

     




4 REPLIES 4
AScha.3
Chief III

Hi,

i have the SDcard on SDMMC interface 4bit mode running, on H743ZI (same chip as you).

Speed is about 20MB/s read . (maximum without UHS 1.8V interface/driver - i dont have.)

But my 1TB card is a fake - i checked. (did you check it with H2testw ? )

Need for all big cards : set exFAT enabled in fatfs.

So i just can say: all cards up to my 64GB and the 1TB fake working ok.

 

Adapter is just standard card holder (2x):

AScha3_0-1739714457100.png

 

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

My five cents:
Assuming the HW works, e.g. you can insert the 1TB SD card into an SD card socket (or are you talking about SD card as USB adapter?),

there is potentially an issue which FW/SW you use to make use of this 1TB SD Card:

  • if you use FatFS with a FAT32 file system - it cannot make use of the entire 1TB capacity:
    Even potentially possible for 1TB, Windows OS (before Windows 11) supports just up to 32GB.
  • there can be also a limitation on the max. capacity for SD card if you use FatFS for MCU as FAT32 (FAT16 is even worse: just 2 or 4 GB)
  • For 1TB, you might need to consider to use a different FileSystem, e.g. NTFS or exFAT:
    but if this is supported by the Middleware SW, e.g. FatFS - you have to check (and configure accordingly)

What you could try:
Even you have a 1TB SD Card - use it with FatFS. Format it with the FatFS FW, on the MCU (not PC Format tool).
At the end, you might get a 32GB SD Card formatted which works on your MCU (but you lose the entire 1TB capacity).

It is not just an adapter question: it is more a question if your FW (Middleware, e.g. FatFS) supports FileSystems supporting up to 1TB of capacity.

Yes, my experience:
Using "FatFS" works fine with "any" SD Card but it limits the capacity to 64 GB. It can happen here as well, that you insert the 1TB, you format it via FatFS but it gives you at the end just 64 GB.

"1TB is fake"? Potentially, it has really 1TB capacity, but the FileSystem SW/FW you use is not able to use it as 1TB. Formatting it to the "Max. for the FileSystem" will reduce the "access-able capacity".

I would assume:

  • using a 1TB SD Card should work on embedded MCU, with FatFS
  • but it needs to be formatted as FAT32, or exFAT - the file system which is supported by the FatFS
  • you get the max. possible for the FatFS, the SD Card is formatted with a file system structure which allows just access to the max. (e.g. 64 GB), even the entire capacity is 1TB (but not "addressable" by the file system

The Limitation comes from the File System (e.g. FatFS), not from the SD Card.

BTW:

Even your FatFS system does not support 1TB capacity - you could consider to format the 1TB with different "partitions": you configure, for instance, 5x different partitions (each as 64GB), so that they appear on FW as five different "devices".

But I am not sure:
If your FatFS file system, talking to the SD Card to select sectors (as 512Byte chunks - the fundamental of using SD Cards), has a limitation on the maximum address size, e.g. the SD Card commands for selecting a sector is "limited" to a max. number for a sector number - you cannot use still 1TB total capacity.

So, it depends on what your File System SW/FW (on MCU, on Windows OS) would support as the maximal address-able sector number.

My conclusion:

A 1TB SD card is possible to use (physically) on a MCU file system, but no way to 'format' and use as a full 1TB storage media (your file system and the low-level SD card drivers do not support). You can format this 1TB card to be usable as 32 or 64GB storage, but potentially the MCU File System will not support 1TB storage capacity.
So, the 1TB SD card is potentially not a fake: it is the limitation of your File System and the SD Card drivers.

Hi,

just: what Mr. Chan wrote about limitation: (exfat enabled ! ) : Volume size: Upto 2 TB at 512 bytes/sector.

So 1TB is no problem at all. Just never format it - its optimized formatted, when new. (exfat system)

+ FatFS supports exFAT with the _FS_EXFAT configuration option, but it's disabled by default in ffconf.h.

Need for all big cards : set exFAT enabled in fatfs.

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