Saturday, November 25th 2017, 10:34am UTC+1

You are not logged in.

  • Login
  • Register

RodolfoDias

Beginner

Date of registration: Mar 3rd 2017

Posts: 15

1

Wednesday, May 17th 2017, 4:41pm

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/C++ Source code

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

SEGGER - Marius

Super Moderator

Date of registration: Aug 10th 2011

Posts: 31

2

Monday, May 22nd 2017, 9:47am

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: <https://www.segger.com/downloads/emfile/UM02001_emFile.pdf>

Best regards,
Marius

Similar threads