Handling FAT32 partitions with emFile

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Handling FAT32 partitions with emFile

    Hi,

    is it possible to handle more than one FAT32 partition in a single SD using emFile? My intent is to store data in different areas of the card.

    My FS_X_AddDevices looks like this:

    C Source Code

    1. void FS_X_AddDevices(void)
    2. {
    3. FS_AssignMemory(&_aMemBlock[0], sizeof(_aMemBlock));
    4. FS_AddDevice(&FS_MMC_CardMode_Driver);
    5. FS_MMC_CM_Allow4bitMode(0, 1);
    6. FS_MMC_CM_AllowHighSpeedMode(0, 0);
    7. FS_ConfigUpdateDirOnWrite(0);
    8. FS_AddDevice(&USBH_MSD_FS_Driver);
    9. }
  • Hello,

    There are two possibilities to handle more than one partition on an SD card:

    1) Using the logical volume feature that allows the application to configure a fixed partition size and offset.
    You can find more information in the sections "4.3.6 FS_LOGVOL_Create()" and "4.3.7 FS_LOGVOL_AddDevice()" of the emFile manual.

    2) Using the disk partition logical driver that employs the information stored in the Master Boot Partition.
    For more information please refer to the "7.2 Disk partition driver" section in the emFile manual.

    The latest version of the emFile manual can be downloaded from here: <segger.com/downloads/emfile/UM02001_emFile.pdf>

    Best regards,
    Marius