Nithin Kurian
Nithin Kurian

Reputation: 101

What is the maximum size of SD card supported for FatFS created from stm32cubemx

I am using STM32L476, it has a SDMMC interface. I want interface SD card to it. I also want to use FatFs availble in STM32cubemx. What is the maximum size of SD card supported by it.

Upvotes: 3

Views: 6772

Answers (1)

According to the FatFS webpage

  • Volume size: Upto 2 TB at 512 bytes/sector.

Note that cards SD cards with a size of 64 GB or more are preformatted with the patent-encumbered exFAT filesystem. They are called SDXC cards (instead of SDHC), the only difference (apart from the size) is the file system format. FatFS supports exFAT with the _FS_EXFAT configuration option, but it's disabled by default in ffconf.h. You should apparently pay some license fees to Microsoft in order to use it, if you care about it.

If you don't use exFAT, then you can reformat SDXC cards with FAT32, they will work fine with FatFS afterwards. Note that Windows refuses to format large SD cards with FAT32, but there are external utilities for Windows which can do it. Otherwise you can do it in Linux with mkfs.fat, or use FatFS itself to reformat the card.

Upvotes: 5

Related Questions