Hi Team, we have a design where an FPGA is interfacing with the SD Card to read/write data from/to it. Per my understanding, files are generally managed by an operating system which has a file system. Since we have FPGA here, what are the additional SD Commands we would have to incorporate in the FPGA code to mimic a filesystem?
Thanks!
Hi @leaning1234
Have you checked our knowledge base articles?
(Get Support for Your SSDs and Flash Products | SanDisk )
Have you opened a Support Case?
If not, contact SanDisk Technical Support for assistance.
(Contact Support | SanDisk )
leaning1234:
Hi Team, we have a design where an FPGA is interfacing with the SD Card to read/write data from/to it. Per my understanding, files are generally managed by an operating system which has a file system. Since we have FPGA here, what are the additional SD Commands we would have to incorporate in the FPGA code to mimic a filesystem?
Thanks!
To make an FPGA mimic a filesystem on an SD card, you need to:
Use basic SD card commands to read and write data.
Handle the FAT table to manage file locations.
Manage directories and clusters to track files.
Implement error handling and block management.
The FPGA will need to manage file storage directly, including reading the FAT and handling files.
Thanks for the info John. I have a few more questions -
What are the commands to create a file in the SD card with SD Physical layer interface.
Can we open the file only 1 time during the beginning and keep writing the complete memory side of 2TB
Are there any specific commands to create an FAT32 file systems for the Sandisk cards through SD physical layer interface?
From where we can get write endurance numbers for the bought cards (Sandisk Extreme and Ultra)?
Thanks in advance!
The SD physical layer doesn’t handle files directly. Use CMD24 (single block write) or CMD25 (multiple block write) to write raw data.
Yes, you can write across the full 2TB without opening a file if writing directly to raw storage.
Use mkfs.fat (Linux) or format /FS:FAT32 (Windows). At the physical layer, you need to set up the MBR, FAT tables, and root directory manually.
Write endurance –
MLC: ~3000-5000 writes
TLC: ~500-1000 writes
QLC: ~100-300 writes
SanDisk doesn’t always list endurance specs, so check datasheets or ask support.